I stumbled across this page, but ignored it, because I did not believe the "most official" way to use cranelift wasm codegen involved cloning + building from a git repo.
Rustc does include cranelift already... my impression was that it's already used for debug builds?
I don't see anything in the rustc cli docs to be able to specify using it explicitly, the closest match is the unstable option codegen_backend - The Rust Unstable Book but that wants a path
@bjorn3 : Can you take a break from compiler writing and enlighten us on this ?
What is the simplest way to do "rust code -> wasm32 that can run in Chrome browser" with cranelift , given code already builds with cargo build --target=wasm32-unknown-unknown --release
Cranelift doesn't support emitting wasm modules at the moment. It only supports wasm -> cranelift ir (using cranelift_wasm), not cranelift ir -> wasm. I opened an issue for adding it almost two years ago: