Full std crate is linked accidentally in wasm binary?

I’ve written some details on this in the past but the tl;dr; is that for the smallest binary size today with the wasm32-unknown-unknown target you need to enable LTO. With LTO I generate a 152-byte binary with today’s nightly.

This story will get better once we upgrade LLD. After that happens if you disable LTO I generate a 158 byte binary by default.

12 Likes