Make crate module extension os and arch dependent (#2939) This PR is follow up to #2453 and marks the `crate` extension as `os_dependent` and `arch_dependent`. For `crate.from_cargo`, the extension specifies reproducibility via the `reproducible` attribute of `extension_metadata` which makes Bazel skip the extension when writing the lockfile. But in the case of `crate.from_specs`, the current implementation marks the extension as non reproducible since the crates will not be backed by a lockfile. And because the `crate` module extension depends on `rust_host_tools` (which are os / arch dependent), the entry in the lockfile for the module extension includes the checksum of the `rustc` and `cargo` binaries for whatever host it was resolved for. This makes the bazel lock file platform dependent in that case. This PR will result in a new os/arch specific entry in the lockfile for users of `crate.from_specs`. And will have no impact for users of `crate.from_cargo`. Thanks to @fmeum for the guidance.
This repository provides rules for building Rust projects with Bazel.
General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust.
Please refer to the full documentation.