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.
LiveSplit One
LiveSplit One is a version of LiveSplit that uses the multiplatform livesplit-core library and web technologies like React to create a new LiveSplit experience that works on a lot of different platforms.
The web version of LiveSplit One is available here.
Build Instructions
In order to build LiveSplit One, you need to install npm and the Rust compiler. Make sure to recursively clone the repository so that all git submodules are cloned as well:
git clone --recursive
Once you have cloned the repository and set up both npm and the Rust compiler, you need to install the WebAssembly target:
rustup target add wasm32-unknown-unknown
You also need to build wasm-bindgen:
cargo install wasm-bindgen-cli
You need to set up some npm modules before compiling the project:
npm install
You are now ready to build livesplit-core, which powers LiveSplit One:
npm run build:core
Now you can build and host LiveSplit One:
npm run start
A browser tab with LiveSplit One should now open. Alternatively, you can use npm run serve to just host it without opening a browser tab.