Skip to content

Commit

Permalink
Deduplicate the CrateInfo provider (#720)
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed May 6, 2021
1 parent e707f16 commit 73335ee
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions rust/rust_common.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@

"""Module with Rust definitions required to write custom Rust rules."""

CrateInfo = provider(
doc = "A provider containing general Crate information.",
fields = {
"aliases": "Dict[Label, String]: Renamed and aliased crates",
"deps": "List[Provider]: This crate's (rust or cc) dependencies' providers.",
"edition": "str: The edition of this crate.",
"is_test": "bool: If the crate is being compiled in a test context",
"name": "str: The name of this crate.",
"output": "File: The output File that will be produced, depends on crate type.",
"proc_macro_deps": "List[CrateInfo]: This crate's rust proc_macro dependencies' providers.",
"root": "File: The source File entrypoint to this crate, eg. lib.rs",
"rustc_env": "Dict[String, String]: Additional `\"key\": \"value\"` environment variables to set for rustc.",
"srcs": "List[File]: All source Files that are part of the crate.",
"type": "str: The type of this crate. eg. lib or bin",
},
)
load("//rust/private:providers.bzl", _CrateInfo = "CrateInfo")

CrateInfo = _CrateInfo

0 comments on commit 73335ee

Please sign in to comment.