Skip to content

How to do metadata-only typecheck build of a rust_library? #428

Open
@dtolnay

Description

@dtolnay

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). 😿

args.add("--emit=dep-info,link")

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions