[erlang-questions] Automated Stripping of otp libraries / modules

Matthias Lang matthias@REDACTED
Mon Jun 20 12:01:28 CEST 2011

On Monday, June 20, Dale Harvey wrote:

> 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? 

We do this in an ugly, pragmatic way.

Start the system with all modules available, run the test suite, then


Now you have a list of exactly what's needed. I then basically paste
that into a Makefile.

Works well for us because our system is small and test suite is large.

I realise that it won't work in general.

apply(), M:F, spawn() and hot loading make the problem impossible for
"sufficiently nasty" code. Your post has made me wonder how good the
information from xref and dialyzer (which came out after I started
doing this) would be for a real-world system.  I'll try it out on ours
and report back.


More information about the erlang-questions mailing list