bazelbuild / bazelbuild/rules_rust
Allow building binaries in metadata-only mode
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
The approach described in https://github.com/bazelbuild/rules_rust/issues/1649 is a great way to get an equivalent of fast `cargo check` on `rust_library` targets. However, on `rust_binary` targets it runs codegen too, not just generating metadata.
This seems to be because the `rust_library` target specifies a metadata output (https://github.com/bazelbuild/rules_rust/blob/d9bbb1d57bef05b3a38a08310bd3760a0e413835/rust/private/rust.bzl#L198) but the `rust_binary` target does not (https://github.com/bazelbuild/rules_rust/blob/d9bbb1d57bef05b3a38a08310bd3760a0e413835/rust/private/rust.bzl#L252).
Would it be possible to produce a metadata output from `rust_binary` too?
Contributor guide
Assessment
This issue has not been assessed yet.