That is completely believable when you are compiling small amounts of code. 
When Emscripten transcompiles the C code it also must bring in the portions 
of the C environment that that code depends on. Alon wrote a great blog 
post recently that describes how to look through the output of Emscripten 
generated code. The blog post also describes how you can use the closure 
compiler to help automatically remove code that is unused and describes the 
naming convention to identify functions. It is unlikely that the single 
function will be useful without the library functions and support functions 
that are generated, but hopefully it will give you a head 
start: 
http://mozakai.blogspot.com.au/2014/06/looking-through-emscripten-output.html


On Wednesday, June 18, 2014 9:46:55 AM UTC-5, [email protected] wrote:
>
>  
>      I want to convert a function(writen in .c)  to javascript, and used 
> ./emcc 
> XXXX.c -o function.html -s EXPORTED_FUNCTIONS="['_XXXX']".  But I found the 
> function.js is too larger than XXX.c, there are many functions which 
> depends on runtime. I only want to get the function writen in javascript, 
> who can help me, thank you! 
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to