rules_rust
rules_rust copied to clipboard
bzlmod uses nightly by default
I'm trying to migrate a project to bzlmod and I noticed that rust-analyzer has started complaining about
proc macro Deserialize not expanded: Cannot create expander for .../rules_rust~~crate~crate_index__serde_derive-1.0.196/libserde_derive-1588483640.so: mismatched ABI expected: rustc 1.79.0 (129f3b996 2024-06-10), got rustc 1.81.0-nightly (8337ba918 2024-06-12)
It turns out that everything is being built with a nightly compiler including proc macros, so rust-analyzer can't load them.
I can reproduce this in the helloworld bzmod example. Trying to use a nightly feature in src/main.rs
compiles while it shouldn't.
I did a little digging and I'm fairly certain this happens because the toolchains that are generated in the toolchain hub don't contain channel target settings unlike toolchains in the proxy repo that are used outside of bzlmod.