rules_rust
rules_rust copied to clipboard
Dummy CC toolchain for wasm32
Some crates need access to GCC for their build script even under wasm, like ring. However, rules_rust is setting a dummy toolchain.
@duarten I ran into this and in my case it was due to a breaking change when upgrading from bazel 6.5.0 to 7.0.1. The fix was to specify this: --noincompatible_enable_cc_toolchain_resolution (fix suggested by @aherrmann)
I guess that's a workaround, but there should a fix compatible with that flag (which I was already enabling for unrelated reasons). What I ended up doing was creating a cc toolchain for clang (which can cross-compile to wasm).
the problem with above workaround is that it stops working on bazel 8+ (iiuc) and my reading of https://github.com/bazelbuild/rules_rust/issues/3242#issuecomment-2640934858 is that it also no longer works with recent rules_rust versions
@duarten ive tried to do similar but without success (my toolchain-fu is pretty weak) - can you share more details?
I wouldn't be opposed to not registering the toolchain by default as long as there was a convenient flag to continue to do so.