[erlang-questions] Automated Stripping of otp libraries / modules
Mon Jun 20 10:11:36 CEST 2011
On 20 June 2011 00:46, Dale Harvey <> wrote:
> I have seen this mentioned a few times but no answers as yet
> Has anyone written any code that takes an application and strips the otp
> libraries to the absolute minimum amount of modules* needed to run that
> application? I am assuming it cant be entirely automated by dialyzer
> (evalled / runtime generated calls etc) but it should get fairly close
That sounds plausible to me, although I'd suggest that you might want
to look at xref as a potential data source for this sort of thing.
> If noone has already done this then I guess any pointers for how to
> implement it would be cool, I figured I would just need generate a plt with
> otp + myapp + deps, find my applications entry point in the plt and traverse
> the callgraph marking modules off one at a time, that easy?
So again, I suspect that xref is your friend here, probably more so
than dialyzer. Also it might be worth looking at the eco-system around
reltool, where the OTP tools may (or may not) be trying to do this a
bit more carefully in the latest release.
More information about the erlang-questions