dtolnay / watt

Runtime for executing procedural macros as WebAssembly
Apache License 2.0
1.29k stars 28 forks source link

Panic info is compiled in #5

Open est31 opened 5 years ago

est31 commented 5 years ago

It seems that panic information is still compiled into the wasm file.

The crate file can be downloaded from this link. It contains the wasm file (2.7 MB uncompressed). If you run strings on the wasm file, you see some paths included. This is caused by panic information still being compiled in. Mostly, for proc macros such info is irrelevant. With a custom panic handler, the linker should be able to optimize it out.

Although I'm not sure, it might even be wanted: https://github.com/dtolnay/watt/blob/335dd49b107848d24469079c5fd85efa74fa10f1/src/lib.rs#L65