Skip to content

Commit

Permalink
Regenerate documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Dec 3, 2024
1 parent 750d360 commit f027ebf
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/src/crate_universe.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ call against the generated workspace. The following table describes how to contr
| <a id="crates_vendor-annotations"></a>annotations | Extra settings to apply to crates. See [crate.annotation](#crateannotation). | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> List of strings</a> | optional | `{}` |
| <a id="crates_vendor-bazel"></a>bazel | The path to a bazel binary used to locate the output_base for the current workspace. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
| <a id="crates_vendor-buildifier"></a>buildifier | The path to a [buildifier](https://github.com/bazelbuild/buildtools/blob/5.0.1/buildifier/README.md) binary used to format generated BUILD files. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `"@rules_rust//crate_universe/private/vendor:buildifier"` |
| <a id="crates_vendor-cargo_bazel"></a>cargo_bazel | The cargo-bazel binary to use for vendoring. If this attribute is not set, then a `CARGO_BAZEL_GENERATOR_PATH` action env will be used. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `"@@rules_rust~~cargo_bazel_bootstrap~cargo_bazel_bootstrap//:binary"` |
| <a id="crates_vendor-cargo_bazel"></a>cargo_bazel | The cargo-bazel binary to use for vendoring. If this attribute is not set, then a `CARGO_BAZEL_GENERATOR_PATH` action env will be used. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `"@@rules_rust~~cu~cargo_bazel_bootstrap//:binary"` |
| <a id="crates_vendor-cargo_config"></a>cargo_config | A [Cargo configuration](https://doc.rust-lang.org/cargo/reference/config.html) file. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
| <a id="crates_vendor-cargo_lockfile"></a>cargo_lockfile | The path to an existing `Cargo.lock` file | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
| <a id="crates_vendor-generate_binaries"></a>generate_binaries | Whether to generate `rust_binary` targets for all the binary crates in every package. By default only the `rust_library` targets are generated. | Boolean | optional | `False` |
Expand Down
50 changes: 27 additions & 23 deletions docs/src/crate_universe_bzlmod.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,6 @@ There are some more examples of using crate_universe with bzlmod in the [example

<pre>
crate = use_extension("@rules_rust//crate_universe:docs_bzlmod.bzl", "crate")
crate.from_cargo(<a href="#crate.from_cargo-name">name</a>, <a href="#crate.from_cargo-cargo_config">cargo_config</a>, <a href="#crate.from_cargo-cargo_lockfile">cargo_lockfile</a>, <a href="#crate.from_cargo-generate_binaries">generate_binaries</a>, <a href="#crate.from_cargo-generate_build_scripts">generate_build_scripts</a>,
<a href="#crate.from_cargo-manifests">manifests</a>, <a href="#crate.from_cargo-splicing_config">splicing_config</a>, <a href="#crate.from_cargo-supported_platform_triples">supported_platform_triples</a>)
crate.annotation(<a href="#crate.annotation-deps">deps</a>, <a href="#crate.annotation-data">data</a>, <a href="#crate.annotation-additive_build_file">additive_build_file</a>, <a href="#crate.annotation-additive_build_file_content">additive_build_file_content</a>, <a href="#crate.annotation-alias_rule">alias_rule</a>,
<a href="#crate.annotation-build_script_data">build_script_data</a>, <a href="#crate.annotation-build_script_data_glob">build_script_data_glob</a>, <a href="#crate.annotation-build_script_deps">build_script_deps</a>, <a href="#crate.annotation-build_script_env">build_script_env</a>,
<a href="#crate.annotation-build_script_proc_macro_deps">build_script_proc_macro_deps</a>, <a href="#crate.annotation-build_script_rundir">build_script_rundir</a>, <a href="#crate.annotation-build_script_rustc_env">build_script_rustc_env</a>,
Expand All @@ -341,32 +339,17 @@ crate.annotation(<a href="#crate.annotation-deps">deps</a>, <a href="#crate.anno
<a href="#crate.annotation-override_target_build_script">override_target_build_script</a>, <a href="#crate.annotation-override_target_lib">override_target_lib</a>, <a href="#crate.annotation-override_target_proc_macro">override_target_proc_macro</a>,
<a href="#crate.annotation-patch_args">patch_args</a>, <a href="#crate.annotation-patch_tool">patch_tool</a>, <a href="#crate.annotation-patches">patches</a>, <a href="#crate.annotation-proc_macro_deps">proc_macro_deps</a>, <a href="#crate.annotation-repositories">repositories</a>, <a href="#crate.annotation-rustc_env">rustc_env</a>,
<a href="#crate.annotation-rustc_env_files">rustc_env_files</a>, <a href="#crate.annotation-rustc_flags">rustc_flags</a>, <a href="#crate.annotation-shallow_since">shallow_since</a>, <a href="#crate.annotation-version">version</a>)
crate.from_cargo(<a href="#crate.from_cargo-name">name</a>, <a href="#crate.from_cargo-cargo_config">cargo_config</a>, <a href="#crate.from_cargo-cargo_lockfile">cargo_lockfile</a>, <a href="#crate.from_cargo-generate_binaries">generate_binaries</a>, <a href="#crate.from_cargo-generate_build_scripts">generate_build_scripts</a>,
<a href="#crate.from_cargo-manifests">manifests</a>, <a href="#crate.from_cargo-splicing_config">splicing_config</a>, <a href="#crate.from_cargo-supported_platform_triples">supported_platform_triples</a>)
crate.from_specs(<a href="#crate.from_specs-name">name</a>, <a href="#crate.from_specs-cargo_config">cargo_config</a>, <a href="#crate.from_specs-generate_binaries">generate_binaries</a>, <a href="#crate.from_specs-generate_build_scripts">generate_build_scripts</a>, <a href="#crate.from_specs-splicing_config">splicing_config</a>,
<a href="#crate.from_specs-supported_platform_triples">supported_platform_triples</a>)
crate.spec(<a href="#crate.spec-artifact">artifact</a>, <a href="#crate.spec-branch">branch</a>, <a href="#crate.spec-default_features">default_features</a>, <a href="#crate.spec-features">features</a>, <a href="#crate.spec-git">git</a>, <a href="#crate.spec-lib">lib</a>, <a href="#crate.spec-package">package</a>, <a href="#crate.spec-rev">rev</a>, <a href="#crate.spec-tag">tag</a>, <a href="#crate.spec-version">version</a>)
</pre>

Crate universe module extensions.

**TAG CLASSES**

<a id="crate.from_cargo"></a>

### from_cargo

Generates a repo @crates from a Cargo.toml / Cargo.lock pair

**Attributes**

| Name | Description | Type | Mandatory | Default |
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="crate.from_cargo-name"></a>name | The name of the repo to generate | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | optional | `"crates"` |
| <a id="crate.from_cargo-cargo_config"></a>cargo_config | A [Cargo configuration](https://doc.rust-lang.org/cargo/reference/config.html) file. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
| <a id="crate.from_cargo-cargo_lockfile"></a>cargo_lockfile | The path to an existing `Cargo.lock` file | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
| <a id="crate.from_cargo-generate_binaries"></a>generate_binaries | Whether to generate `rust_binary` targets for all the binary crates in every package. By default only the `rust_library` targets are generated. | Boolean | optional | `False` |
| <a id="crate.from_cargo-generate_build_scripts"></a>generate_build_scripts | Whether or not to generate [cargo build scripts](https://doc.rust-lang.org/cargo/reference/build-scripts.html) by default. | Boolean | optional | `True` |
| <a id="crate.from_cargo-manifests"></a>manifests | A list of Cargo manifests (`Cargo.toml` files). | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
| <a id="crate.from_cargo-splicing_config"></a>splicing_config | The configuration flags to use for splicing Cargo maniests. Use `//crate_universe:defs.bzl\%rsplicing_config` to generate the value for this field. If unset, the defaults defined there will be used. | String | optional | `""` |
| <a id="crate.from_cargo-supported_platform_triples"></a>supported_platform_triples | A set of all platform triples to consider when generating dependencies. | List of strings | optional | `["aarch64-apple-darwin", "aarch64-apple-ios", "aarch64-apple-ios-sim", "aarch64-linux-android", "aarch64-pc-windows-msvc", "aarch64-unknown-fuchsia", "aarch64-unknown-linux-gnu", "aarch64-unknown-nixos-gnu", "aarch64-unknown-nto-qnx710", "arm-unknown-linux-gnueabi", "armv7-linux-androideabi", "armv7-unknown-linux-gnueabi", "i686-apple-darwin", "i686-linux-android", "i686-pc-windows-msvc", "i686-unknown-freebsd", "i686-unknown-linux-gnu", "powerpc-unknown-linux-gnu", "riscv32imc-unknown-none-elf", "riscv64gc-unknown-none-elf", "s390x-unknown-linux-gnu", "thumbv7em-none-eabi", "thumbv8m.main-none-eabi", "wasm32-unknown-unknown", "wasm32-wasip1", "x86_64-apple-darwin", "x86_64-apple-ios", "x86_64-linux-android", "x86_64-pc-windows-msvc", "x86_64-unknown-freebsd", "x86_64-unknown-fuchsia", "x86_64-unknown-linux-gnu", "x86_64-unknown-nixos-gnu", "x86_64-unknown-none"]` |
**TAG CLASSES**

<a id="crate.annotation"></a>

Expand Down Expand Up @@ -415,17 +398,36 @@ Generates a repo @crates from a Cargo.toml / Cargo.lock pair
| <a id="crate.annotation-shallow_since"></a>shallow_since | An optional timestamp used for crates originating from a git repository instead of a crate registry. This flag optimizes fetching the source code. | String | optional | `""` |
| <a id="crate.annotation-version"></a>version | The versions of the crate the annotation is applied to. Defaults to all versions. | String | optional | `"*"` |

<a id="crate.from_cargo"></a>

### from_cargo

Generates a repo @crates from a Cargo.toml / Cargo.lock pair.

**Attributes**

| Name | Description | Type | Mandatory | Default |
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="crate.from_cargo-name"></a>name | The name of the repo to generate | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | optional | `"crates"` |
| <a id="crate.from_cargo-cargo_config"></a>cargo_config | A [Cargo configuration](https://doc.rust-lang.org/cargo/reference/config.html) file. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
| <a id="crate.from_cargo-cargo_lockfile"></a>cargo_lockfile | The path to an existing `Cargo.lock` file | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
| <a id="crate.from_cargo-generate_binaries"></a>generate_binaries | Whether to generate `rust_binary` targets for all the binary crates in every package. By default only the `rust_library` targets are generated. | Boolean | optional | `False` |
| <a id="crate.from_cargo-generate_build_scripts"></a>generate_build_scripts | Whether or not to generate [cargo build scripts](https://doc.rust-lang.org/cargo/reference/build-scripts.html) by default. | Boolean | optional | `True` |
| <a id="crate.from_cargo-manifests"></a>manifests | A list of Cargo manifests (`Cargo.toml` files). | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
| <a id="crate.from_cargo-splicing_config"></a>splicing_config | The configuration flags to use for splicing Cargo maniests. Use `//crate_universe:defs.bzl\%rsplicing_config` to generate the value for this field. If unset, the defaults defined there will be used. | String | optional | `""` |
| <a id="crate.from_cargo-supported_platform_triples"></a>supported_platform_triples | A set of all platform triples to consider when generating dependencies. | List of strings | optional | `["aarch64-apple-darwin", "aarch64-apple-ios", "aarch64-apple-ios-sim", "aarch64-linux-android", "aarch64-pc-windows-msvc", "aarch64-unknown-fuchsia", "aarch64-unknown-linux-gnu", "aarch64-unknown-nixos-gnu", "aarch64-unknown-nto-qnx710", "arm-unknown-linux-gnueabi", "armv7-linux-androideabi", "armv7-unknown-linux-gnueabi", "i686-apple-darwin", "i686-linux-android", "i686-pc-windows-msvc", "i686-unknown-freebsd", "i686-unknown-linux-gnu", "powerpc-unknown-linux-gnu", "riscv32imc-unknown-none-elf", "riscv64gc-unknown-none-elf", "s390x-unknown-linux-gnu", "thumbv7em-none-eabi", "thumbv8m.main-none-eabi", "wasm32-unknown-unknown", "wasm32-wasip1", "x86_64-apple-darwin", "x86_64-apple-ios", "x86_64-linux-android", "x86_64-pc-windows-msvc", "x86_64-unknown-freebsd", "x86_64-unknown-fuchsia", "x86_64-unknown-linux-gnu", "x86_64-unknown-nixos-gnu", "x86_64-unknown-none"]` |

<a id="crate.from_specs"></a>

### from_specs

Generates a repo @crates from the defined `spec` tags
Generates a repo @crates from the defined `spec` tags.

**Attributes**

| Name | Description | Type | Mandatory | Default |
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="crate.from_specs-name"></a>name | The name of the repo to generate | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | optional | `"crates"` |
| <a id="crate.from_specs-name"></a>name | The name of the repo to generate. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | optional | `"crates"` |
| <a id="crate.from_specs-cargo_config"></a>cargo_config | A [Cargo configuration](https://doc.rust-lang.org/cargo/reference/config.html) file. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
| <a id="crate.from_specs-generate_binaries"></a>generate_binaries | Whether to generate `rust_binary` targets for all the binary crates in every package. By default only the `rust_library` targets are generated. | Boolean | optional | `False` |
| <a id="crate.from_specs-generate_build_scripts"></a>generate_build_scripts | Whether or not to generate [cargo build scripts](https://doc.rust-lang.org/cargo/reference/build-scripts.html) by default. | Boolean | optional | `True` |
Expand All @@ -450,3 +452,5 @@ Generates a repo @crates from the defined `spec` tags
| <a id="crate.spec-rev"></a>rev | The git revision of the remote crate. Tied with the `git` param. Only one of branch, tag or rev may be specified. | String | optional | `""` |
| <a id="crate.spec-tag"></a>tag | The git tag of the remote crate. Tied with the `git` param. Only one of branch, tag or rev may be specified. Specifying `rev` is recommended for fully-reproducible builds. | String | optional | `""` |
| <a id="crate.spec-version"></a>version | The exact version of the crate. Cannot be used with `git`. | String | optional | `""` |


0 comments on commit f027ebf

Please sign in to comment.