Files
LiveSplitOne/.github
Christopher Serr f1515265a2 Build Rust's std with immediate abort (#746)
We generally want the wasm file to be as compact as possible. However
because there's so many paths in Rust code that could panic, but don't
ever in practice as they are meant to signal bugs, the wasm file has to
keep around all those panic paths, and even worse, all the code for
formatting the panic messages for all those different types that could
be involved in a panic. This bloats the binary a lot. There's a nightly
feature to build the standard library as part of your compilation and
with that you can pass various features to the standard library, just
like with any other crate. And one of those features is to remove all
the formatting machinery from the panics and just immediately abort,
resulting in smaller binaries. On top of that by building the standard
library ourselves we also get to build it with all our target features,
meaning that its code will make use of all the additional WebAssembly
instructions that have been added since the MVP. So this essentially is
a big win. However this forces us to use the nightly compiler, but it
usually is actually quite stable. We won't be using any nightly features
of the language itself and only optionally use the compiler in our CI,
so the stable compiler continues to work just fine for local
development.
2022-11-08 01:18:32 +01:00
..
2021-04-29 17:53:36 +02:00