|
1 | 1 | # Rust rules
|
2 | 2 |
|
| 3 | +* [CrateInfo](#CrateInfo) |
| 4 | +* [DepInfo](#DepInfo) |
| 5 | +* [StdLibInfo](#StdLibInfo) |
3 | 6 | * [cargo_bootstrap_repository](#cargo_bootstrap_repository)
|
4 | 7 | * [cargo_build_script](#cargo_build_script)
|
5 | 8 | * [crate](#crate)
|
@@ -1391,6 +1394,88 @@ A test rule for performing `rustfmt --check` on a set of targets
|
1391 | 1394 | | <a id="rustfmt_test-targets"></a>targets | Rust targets to run <code>rustfmt --check</code> on. | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
|
1392 | 1395 |
|
1393 | 1396 |
|
| 1397 | +<a id="#CrateInfo"></a> |
| 1398 | + |
| 1399 | +## CrateInfo |
| 1400 | + |
| 1401 | +<pre> |
| 1402 | +CrateInfo(<a href="#CrateInfo-aliases">aliases</a>, <a href="#CrateInfo-compile_data">compile_data</a>, <a href="#CrateInfo-deps">deps</a>, <a href="#CrateInfo-edition">edition</a>, <a href="#CrateInfo-is_test">is_test</a>, <a href="#CrateInfo-name">name</a>, <a href="#CrateInfo-output">output</a>, <a href="#CrateInfo-proc_macro_deps">proc_macro_deps</a>, <a href="#CrateInfo-root">root</a>, |
| 1403 | + <a href="#CrateInfo-rustc_env">rustc_env</a>, <a href="#CrateInfo-srcs">srcs</a>, <a href="#CrateInfo-type">type</a>, <a href="#CrateInfo-wrapped_crate_type">wrapped_crate_type</a>) |
| 1404 | +</pre> |
| 1405 | + |
| 1406 | +A provider containing general Crate information. |
| 1407 | + |
| 1408 | +**FIELDS** |
| 1409 | + |
| 1410 | + |
| 1411 | +| Name | Description | |
| 1412 | +| :------------- | :------------- | |
| 1413 | +| <a id="CrateInfo-aliases"></a>aliases | Dict[Label, String]: Renamed and aliased crates | |
| 1414 | +| <a id="CrateInfo-compile_data"></a>compile_data | depset[File]: Compile data required by this crate. | |
| 1415 | +| <a id="CrateInfo-deps"></a>deps | depset[Provider]: This crate's (rust or cc) dependencies' providers. | |
| 1416 | +| <a id="CrateInfo-edition"></a>edition | str: The edition of this crate. | |
| 1417 | +| <a id="CrateInfo-is_test"></a>is_test | bool: If the crate is being compiled in a test context | |
| 1418 | +| <a id="CrateInfo-name"></a>name | str: The name of this crate. | |
| 1419 | +| <a id="CrateInfo-output"></a>output | File: The output File that will be produced, depends on crate type. | |
| 1420 | +| <a id="CrateInfo-proc_macro_deps"></a>proc_macro_deps | depset[CrateInfo]: This crate's rust proc_macro dependencies' providers. | |
| 1421 | +| <a id="CrateInfo-root"></a>root | File: The source File entrypoint to this crate, eg. lib.rs | |
| 1422 | +| <a id="CrateInfo-rustc_env"></a>rustc_env | Dict[String, String]: Additional <code>"key": "value"</code> environment variables to set for rustc. | |
| 1423 | +| <a id="CrateInfo-srcs"></a>srcs | depset[File]: All source Files that are part of the crate. | |
| 1424 | +| <a id="CrateInfo-type"></a>type | str: The type of this crate (see [rustc --crate-type](https://doc.rust-lang.org/rustc/command-line-arguments.html#--crate-type-a-list-of-types-of-crates-for-the-compiler-to-emit)). | |
| 1425 | +| <a id="CrateInfo-wrapped_crate_type"></a>wrapped_crate_type | str, optional: The original crate type for targets generated using a previously defined crate (typically tests using the <code>rust_test::crate</code> attribute) | |
| 1426 | + |
| 1427 | + |
| 1428 | +<a id="#DepInfo"></a> |
| 1429 | + |
| 1430 | +## DepInfo |
| 1431 | + |
| 1432 | +<pre> |
| 1433 | +DepInfo(<a href="#DepInfo-dep_env">dep_env</a>, <a href="#DepInfo-direct_crates">direct_crates</a>, <a href="#DepInfo-transitive_build_infos">transitive_build_infos</a>, <a href="#DepInfo-transitive_crates">transitive_crates</a>, <a href="#DepInfo-transitive_libs">transitive_libs</a>, |
| 1434 | + <a href="#DepInfo-transitive_noncrates">transitive_noncrates</a>) |
| 1435 | +</pre> |
| 1436 | + |
| 1437 | +A provider containing information about a Crate's dependencies. |
| 1438 | + |
| 1439 | +**FIELDS** |
| 1440 | + |
| 1441 | + |
| 1442 | +| Name | Description | |
| 1443 | +| :------------- | :------------- | |
| 1444 | +| <a id="DepInfo-dep_env"></a>dep_env | File: File with environment variables direct dependencies build scripts rely upon. | |
| 1445 | +| <a id="DepInfo-direct_crates"></a>direct_crates | depset[AliasableDepInfo] | |
| 1446 | +| <a id="DepInfo-transitive_build_infos"></a>transitive_build_infos | depset[BuildInfo] | |
| 1447 | +| <a id="DepInfo-transitive_crates"></a>transitive_crates | depset[CrateInfo] | |
| 1448 | +| <a id="DepInfo-transitive_libs"></a>transitive_libs | List[File]: All transitive dependencies, not filtered by type. | |
| 1449 | +| <a id="DepInfo-transitive_noncrates"></a>transitive_noncrates | depset[LinkerInput]: All transitive dependencies that aren't crates. | |
| 1450 | + |
| 1451 | + |
| 1452 | +<a id="#StdLibInfo"></a> |
| 1453 | + |
| 1454 | +## StdLibInfo |
| 1455 | + |
| 1456 | +<pre> |
| 1457 | +StdLibInfo(<a href="#StdLibInfo-alloc_files">alloc_files</a>, <a href="#StdLibInfo-between_alloc_and_core_files">between_alloc_and_core_files</a>, <a href="#StdLibInfo-between_core_and_std_files">between_core_and_std_files</a>, <a href="#StdLibInfo-core_files">core_files</a>, |
| 1458 | + <a href="#StdLibInfo-dot_a_files">dot_a_files</a>, <a href="#StdLibInfo-self_contained_files">self_contained_files</a>, <a href="#StdLibInfo-srcs">srcs</a>, <a href="#StdLibInfo-std_files">std_files</a>, <a href="#StdLibInfo-std_rlibs">std_rlibs</a>) |
| 1459 | +</pre> |
| 1460 | + |
| 1461 | +A collection of files either found within the `rust-stdlib` artifact or generated based on existing files. |
| 1462 | + |
| 1463 | +**FIELDS** |
| 1464 | + |
| 1465 | + |
| 1466 | +| Name | Description | |
| 1467 | +| :------------- | :------------- | |
| 1468 | +| <a id="StdLibInfo-alloc_files"></a>alloc_files | List[File]: <code>.a</code> files related to the <code>alloc</code> module. | |
| 1469 | +| <a id="StdLibInfo-between_alloc_and_core_files"></a>between_alloc_and_core_files | List[File]: <code>.a</code> files related to the <code>compiler_builtins</code> module. | |
| 1470 | +| <a id="StdLibInfo-between_core_and_std_files"></a>between_core_and_std_files | List[File]: <code>.a</code> files related to all modules except <code>adler</code>, <code>alloc</code>, <code>compiler_builtins</code>, <code>core</code>, and <code>std</code>. | |
| 1471 | +| <a id="StdLibInfo-core_files"></a>core_files | List[File]: <code>.a</code> files related to the <code>core</code> and <code>adler</code> modules | |
| 1472 | +| <a id="StdLibInfo-dot_a_files"></a>dot_a_files | Depset[File]: Generated <code>.a</code> files | |
| 1473 | +| <a id="StdLibInfo-self_contained_files"></a>self_contained_files | List[File]: All <code>.o</code> files from the <code>self-contained</code> directory. | |
| 1474 | +| <a id="StdLibInfo-srcs"></a>srcs | List[Target]: The original <code>src</code> attribute. | |
| 1475 | +| <a id="StdLibInfo-std_files"></a>std_files | Depset[File]: <code>.a</code> files associated with the <code>std</code> module. | |
| 1476 | +| <a id="StdLibInfo-std_rlibs"></a>std_rlibs | List[File]: All <code>.rlib</code> files | |
| 1477 | + |
| 1478 | + |
1394 | 1479 | <a id="#cargo_build_script"></a>
|
1395 | 1480 |
|
1396 | 1481 | ## cargo_build_script
|
|
0 commit comments