3 ms·
There isn't any fundamental problem, it's just about tooling. Interpreted languages typically do this by packing all the necessary modules into an executable bi
by zzzcpan 7y ago
There isn't any fundamental problem, it's just about tooling. Interpreted languages typically do this by packing all the necessary modules into an executable binary together with an interpreter and preloading or faking import function to load them from memory. Dynamically linked libraries usually can be recompiled and relinked statically, sometimes you may need to fake dlopen() and add a namespace to functions as some people try to prevent static linking, and if recompiling is not a possibility, approaches like elf statifier [1] can be taken. It's too bad shipping a single self contained binary doesn't have a first class support in most languages as if deployment is somebody else's problem. But nothing actually prevents it.
[1] http://statifier.sourceforge.net/statifier/background.html http://statifier.sourceforge.net/statifier/background.html