-
Notifications
You must be signed in to change notification settings - Fork 165
Bloated so
binaries
#392
Comments
Its unclear to me whether this is a Lucet issue, or whether the Wasm produced by clang for this c++ program is just really big. When I compile it with wasi-sdk 8, |
The 15K native case with gcc is presumably using dynamic linking, so it doesn't include the C++ standard library. You can see the effect of static linking by compiling with |
You are right! Size of so should be compared to a binary compiled statically |
When comparing to a statically compiled application, do you see more comparable sizes? Our bookkeeping for Lucet implementation reasons should only be on the order of 64 bytes per function, so I certainly hope they would be much closer. |
I'm curios to understand the reason why
so
modules produced bylucetc
are so large. For instance let's compile the code below with Lucet's toolchain and gcc. The binary produced by gcc is pretty compact. It's just 15KB when compiled with-Oz
option. Theso
module from Lucet is almost 400KB. I've tried differentclang
andlucetc
options, also appliedstrip
. It doesn't matter.so
remains 350KB+.Is there some technological limitation under the hood? Can the size of the binaries be reduced?
The text was updated successfully, but these errors were encountered: