bazelbuild / bazelbuild/rules_rust
How to do metadata-only typecheck build of a rust_library?
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
It looks like rules_rust unconditionally passes `--emit=dep-info,link`. This means Bazel builds cannot benefit from the biggest rustc speedup since 1.0.0 (https://blog.rust-lang.org/2017/03/16/Rust-1.16.html#whats-in-1160-stable). :crying_cat_face:
https://github.com/bazelbuild/rules_rust/blob/e64700dc9b8b3869bce4f77b78c33cb9d088cc4b/rust/private/rustc.bzl#L374
Is there any idiomatic way to perform non-code-generating builds which type-check only? Equivalent to Cargo's `cargo check` or `cargo rustc --profile=check`, rustc's `rustc --emit=metadata`, or Buck's #check flavored builds (`buck build :lib#check`; https://buck.build/concept/flavors.html#analysis_http).
Contributor guide
Assessment
This issue has not been assessed yet.