I am curious if it is possible to create an emscripten binary without libc.
If I have simple.c:
int add1(int x) { return x + 1; }
And I do not want to include any of libc, is this possible?
My best attempt:
emcc simple.c -s NO_FILESYSTEM=1 -s DISABLE_EXCEPTION_CATCHING=1 -s DEFAULT_LIBRARY_FUNCS_TO_INCLUDE='[]' -s LIBRARY_DEPS_TO_AUTOEXPORT='[]' -s EXPORTED_FUNCTIONS='["add1"]' -s USE_SDL=0 -o simple.js -nostdlib
But the generated output still contains characters for malloc, string conversion routines, etc.
I am also interested in the same process of creating a web assembly; that is, my real goal is to create a web assembly module containing only one function. Is this possible with emscripten?
source share