Users can now use Cranelift as the code-generation backend for debug builds of projects written in Rust
Didn't read the rest. But this is clearly inaccurate, as most Rustaceans probably already know.
Cranelift can be used in release builds. The performance is not competitive with LLVM. But some projects are completely useless (too slow) when built with the debug profile. So, some of us use a special release profile where Cranelift backend is used, and debug symbols are not stripped. This way, one can enjoy a quicker edit/compile/debug cycle with usable, if not the best, performance in built binaries.
I read the rest of the article, and it appears to have been partially written before support for codegen backends landing in cargo.
That "latest progress report" has the relevant info ;)
So, basically, you would add this to the top of
Cargo.toml:cargo-features = ["codegen-backend"]Then add a custom profile, for example:
[profile.release-dev-cl] inherits = "release" lto = "off" debug = "full" codegen-backend = "cranelift"Then build with:
cargo build --profile release-dev-cl