Fixed missing docs (#1358)
* Fixed docs
* Regenerate documentation
diff --git a/docs/flatten.md b/docs/flatten.md
index 61f5890..832629e 100644
--- a/docs/flatten.md
+++ b/docs/flatten.md
@@ -1541,6 +1541,30 @@
str: A json encoded string of the environment variables
+<a id="#rules_rust_dependencies"></a>
+
+## rules_rust_dependencies
+
+<pre>
+rules_rust_dependencies()
+</pre>
+
+Dependencies used in the implementation of `rules_rust`.
+
+
+
+<a id="#rust_bindgen_dependencies"></a>
+
+## rust_bindgen_dependencies
+
+<pre>
+rust_bindgen_dependencies()
+</pre>
+
+Declare dependencies needed for bindgen.
+
+
+
<a id="#rust_bindgen_library"></a>
## rust_bindgen_library
@@ -1568,6 +1592,27 @@
| <a id="rust_bindgen_library-kwargs"></a>kwargs | Arguments to forward to the underlying <code>rust_library</code> rule. | none |
+<a id="#rust_bindgen_register_toolchains"></a>
+
+## rust_bindgen_register_toolchains
+
+<pre>
+rust_bindgen_register_toolchains(<a href="#rust_bindgen_register_toolchains-register_toolchains">register_toolchains</a>)
+</pre>
+
+Registers the default toolchains for the `rules_rust` [bindgen][bg] rules.
+
+[bg]: https://rust-lang.github.io/rust-bindgen/
+
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="rust_bindgen_register_toolchains-register_toolchains"></a>register_toolchains | Whether or not to register toolchains. | <code>True</code> |
+
+
<a id="#rust_proto_repositories"></a>
## rust_proto_repositories
@@ -1600,6 +1645,49 @@
+<a id="#rust_register_toolchains"></a>
+
+## rust_register_toolchains
+
+<pre>
+rust_register_toolchains(<a href="#rust_register_toolchains-dev_components">dev_components</a>, <a href="#rust_register_toolchains-edition">edition</a>, <a href="#rust_register_toolchains-include_rustc_srcs">include_rustc_srcs</a>, <a href="#rust_register_toolchains-iso_date">iso_date</a>, <a href="#rust_register_toolchains-register_toolchains">register_toolchains</a>,
+ <a href="#rust_register_toolchains-rustfmt_version">rustfmt_version</a>, <a href="#rust_register_toolchains-sha256s">sha256s</a>, <a href="#rust_register_toolchains-extra_target_triples">extra_target_triples</a>, <a href="#rust_register_toolchains-urls">urls</a>, <a href="#rust_register_toolchains-version">version</a>)
+</pre>
+
+Emits a default set of toolchains for Linux, MacOS, and Freebsd
+
+Skip this macro and call the `rust_repository_set` macros directly if you need a compiler for other hosts or for additional target triples.
+
+The `sha256` attribute represents a dict associating tool subdirectories to sha256 hashes. As an example:
+```python
+{
+ "rust-1.46.0-x86_64-unknown-linux-gnu": "e3b98bc3440fe92817881933f9564389eccb396f5f431f33d48b979fa2fbdcf5",
+ "rustfmt-1.4.12-x86_64-unknown-linux-gnu": "1894e76913303d66bf40885a601462844eec15fca9e76a6d13c390d7000d64b0",
+ "rust-std-1.46.0-x86_64-unknown-linux-gnu": "ac04aef80423f612c0079829b504902de27a6997214eb58ab0765d02f7ec1dbc",
+}
+```
+This would match for `exec_triple = "x86_64-unknown-linux-gnu"`. If not specified, rules_rust pulls from a non-exhaustive list of known checksums..
+
+See `load_arbitrary_tool` in `@rules_rust//rust:repositories.bzl` for more details.
+
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="rust_register_toolchains-dev_components"></a>dev_components | Whether to download the rustc-dev components (defaults to False). Requires version to be "nightly". | <code>False</code> |
+| <a id="rust_register_toolchains-edition"></a>edition | The rust edition to be used by default (2015, 2018, or 2021). If absent, every rule is required to specify its <code>edition</code> attribute. | <code>None</code> |
+| <a id="rust_register_toolchains-include_rustc_srcs"></a>include_rustc_srcs | Whether to download rustc's src code. This is required in order to use rust-analyzer support. See [rust_toolchain_repository.include_rustc_srcs](#rust_toolchain_repository-include_rustc_srcs). for more details | <code>False</code> |
+| <a id="rust_register_toolchains-iso_date"></a>iso_date | The date of the nightly or beta release (ignored if the version is a specific version). | <code>None</code> |
+| <a id="rust_register_toolchains-register_toolchains"></a>register_toolchains | If true, repositories will be generated to produce and register <code>rust_toolchain</code> targets. | <code>True</code> |
+| <a id="rust_register_toolchains-rustfmt_version"></a>rustfmt_version | The version of rustfmt. Either "nightly", "beta", or an exact version. Defaults to <code>version</code> if not specified. | <code>None</code> |
+| <a id="rust_register_toolchains-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. | <code>None</code> |
+| <a id="rust_register_toolchains-extra_target_triples"></a>extra_target_triples | Additional rust-style targets that rust toolchains should support. | <code>["wasm32-unknown-unknown", "wasm32-wasi"]</code> |
+| <a id="rust_register_toolchains-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | <code>["https://static.rust-lang.org/dist/{}.tar.gz"]</code> |
+| <a id="rust_register_toolchains-version"></a>version | The version of Rust. Either "nightly", "beta", or an exact version. Defaults to a modern version. | <code>"1.61.0"</code> |
+
+
<a id="#rust_repositories"></a>
## rust_repositories
diff --git a/docs/rust_bindgen.md b/docs/rust_bindgen.md
index a1ab807..e41bce7 100644
--- a/docs/rust_bindgen.md
+++ b/docs/rust_bindgen.md
@@ -108,6 +108,18 @@
| <a id="rust_bindgen_toolchain-rustfmt"></a>rustfmt | The label of a <code>rustfmt</code> executable. If this is not provided, falls back to the rust_toolchain rustfmt. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
+<a id="#rust_bindgen_dependencies"></a>
+
+## rust_bindgen_dependencies
+
+<pre>
+rust_bindgen_dependencies()
+</pre>
+
+Declare dependencies needed for bindgen.
+
+
+
<a id="#rust_bindgen_library"></a>
## rust_bindgen_library
@@ -135,3 +147,24 @@
| <a id="rust_bindgen_library-kwargs"></a>kwargs | Arguments to forward to the underlying <code>rust_library</code> rule. | none |
+<a id="#rust_bindgen_register_toolchains"></a>
+
+## rust_bindgen_register_toolchains
+
+<pre>
+rust_bindgen_register_toolchains(<a href="#rust_bindgen_register_toolchains-register_toolchains">register_toolchains</a>)
+</pre>
+
+Registers the default toolchains for the `rules_rust` [bindgen][bg] rules.
+
+[bg]: https://rust-lang.github.io/rust-bindgen/
+
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="rust_bindgen_register_toolchains-register_toolchains"></a>register_toolchains | Whether or not to register toolchains. | <code>True</code> |
+
+
diff --git a/docs/rust_repositories.md b/docs/rust_repositories.md
index 04f052c..b2f3f1e 100644
--- a/docs/rust_repositories.md
+++ b/docs/rust_repositories.md
@@ -170,6 +170,61 @@
| <a id="rust_toolchain_repository_proxy-toolchain_name_prefix"></a>toolchain_name_prefix | The per-target prefix expected for the rust_toolchain declarations in the parent workspace. | String | optional | "" |
+<a id="#rules_rust_dependencies"></a>
+
+## rules_rust_dependencies
+
+<pre>
+rules_rust_dependencies()
+</pre>
+
+Dependencies used in the implementation of `rules_rust`.
+
+
+
+<a id="#rust_register_toolchains"></a>
+
+## rust_register_toolchains
+
+<pre>
+rust_register_toolchains(<a href="#rust_register_toolchains-dev_components">dev_components</a>, <a href="#rust_register_toolchains-edition">edition</a>, <a href="#rust_register_toolchains-include_rustc_srcs">include_rustc_srcs</a>, <a href="#rust_register_toolchains-iso_date">iso_date</a>, <a href="#rust_register_toolchains-register_toolchains">register_toolchains</a>,
+ <a href="#rust_register_toolchains-rustfmt_version">rustfmt_version</a>, <a href="#rust_register_toolchains-sha256s">sha256s</a>, <a href="#rust_register_toolchains-extra_target_triples">extra_target_triples</a>, <a href="#rust_register_toolchains-urls">urls</a>, <a href="#rust_register_toolchains-version">version</a>)
+</pre>
+
+Emits a default set of toolchains for Linux, MacOS, and Freebsd
+
+Skip this macro and call the `rust_repository_set` macros directly if you need a compiler for other hosts or for additional target triples.
+
+The `sha256` attribute represents a dict associating tool subdirectories to sha256 hashes. As an example:
+```python
+{
+ "rust-1.46.0-x86_64-unknown-linux-gnu": "e3b98bc3440fe92817881933f9564389eccb396f5f431f33d48b979fa2fbdcf5",
+ "rustfmt-1.4.12-x86_64-unknown-linux-gnu": "1894e76913303d66bf40885a601462844eec15fca9e76a6d13c390d7000d64b0",
+ "rust-std-1.46.0-x86_64-unknown-linux-gnu": "ac04aef80423f612c0079829b504902de27a6997214eb58ab0765d02f7ec1dbc",
+}
+```
+This would match for `exec_triple = "x86_64-unknown-linux-gnu"`. If not specified, rules_rust pulls from a non-exhaustive list of known checksums..
+
+See `load_arbitrary_tool` in `@rules_rust//rust:repositories.bzl` for more details.
+
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="rust_register_toolchains-dev_components"></a>dev_components | Whether to download the rustc-dev components (defaults to False). Requires version to be "nightly". | <code>False</code> |
+| <a id="rust_register_toolchains-edition"></a>edition | The rust edition to be used by default (2015, 2018, or 2021). If absent, every rule is required to specify its <code>edition</code> attribute. | <code>None</code> |
+| <a id="rust_register_toolchains-include_rustc_srcs"></a>include_rustc_srcs | Whether to download rustc's src code. This is required in order to use rust-analyzer support. See [rust_toolchain_repository.include_rustc_srcs](#rust_toolchain_repository-include_rustc_srcs). for more details | <code>False</code> |
+| <a id="rust_register_toolchains-iso_date"></a>iso_date | The date of the nightly or beta release (ignored if the version is a specific version). | <code>None</code> |
+| <a id="rust_register_toolchains-register_toolchains"></a>register_toolchains | If true, repositories will be generated to produce and register <code>rust_toolchain</code> targets. | <code>True</code> |
+| <a id="rust_register_toolchains-rustfmt_version"></a>rustfmt_version | The version of rustfmt. Either "nightly", "beta", or an exact version. Defaults to <code>version</code> if not specified. | <code>None</code> |
+| <a id="rust_register_toolchains-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. | <code>None</code> |
+| <a id="rust_register_toolchains-extra_target_triples"></a>extra_target_triples | Additional rust-style targets that rust toolchains should support. | <code>["wasm32-unknown-unknown", "wasm32-wasi"]</code> |
+| <a id="rust_register_toolchains-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | <code>["https://static.rust-lang.org/dist/{}.tar.gz"]</code> |
+| <a id="rust_register_toolchains-version"></a>version | The version of Rust. Either "nightly", "beta", or an exact version. Defaults to a modern version. | <code>"1.61.0"</code> |
+
+
<a id="#rust_repositories"></a>
## rust_repositories
diff --git a/docs/symbols.bzl b/docs/symbols.bzl
index 423fb59..1b48139 100644
--- a/docs/symbols.bzl
+++ b/docs/symbols.bzl
@@ -10,6 +10,8 @@
)
load(
"@rules_rust//bindgen:repositories.bzl",
+ _rust_bindgen_dependencies = "rust_bindgen_dependencies",
+ _rust_bindgen_register_toolchains = "rust_bindgen_register_toolchains",
_rust_bindgen_repositories = "rust_bindgen_repositories",
)
load(
@@ -19,8 +21,9 @@
_cargo_env = "cargo_env",
)
load(
- "@rules_rust//crate_universe:defs.bzl",
+ "@rules_rust//crate_universe:docs.bzl",
_crate = "crate",
+ _crate_universe_dependencies = "crate_universe_dependencies",
_crates_repository = "crates_repository",
_crates_vendor = "crates_vendor",
)
@@ -64,6 +67,8 @@
)
load(
"@rules_rust//rust:repositories.bzl",
+ _rules_rust_dependencies = "rules_rust_dependencies",
+ _rust_register_toolchains = "rust_register_toolchains",
_rust_repositories = "rust_repositories",
_rust_repository_set = "rust_repository_set",
_rust_toolchain_repository = "rust_toolchain_repository",
@@ -110,10 +115,12 @@
rust_proto_library = _rust_proto_library
rust_grpc_library = _rust_grpc_library
-rust_bindgen_toolchain = _rust_bindgen_toolchain
rust_bindgen = _rust_bindgen
+rust_bindgen_dependencies = _rust_bindgen_dependencies
rust_bindgen_library = _rust_bindgen_library
+rust_bindgen_register_toolchains = _rust_bindgen_register_toolchains
rust_bindgen_repositories = _rust_bindgen_repositories
+rust_bindgen_toolchain = _rust_bindgen_toolchain
rust_toolchain = _rust_toolchain
rust_proto_toolchain = _rust_proto_toolchain
@@ -130,6 +137,8 @@
rust_wasm_bindgen_register_toolchains = _rust_wasm_bindgen_register_toolchains
rust_wasm_bindgen_toolchain = _rust_wasm_bindgen_toolchain
+rules_rust_dependencies = _rules_rust_dependencies
+rust_register_toolchains = _rust_register_toolchains
rust_repositories = _rust_repositories
rust_repository_set = _rust_repository_set
rust_toolchain_repository = _rust_toolchain_repository
@@ -143,6 +152,7 @@
crate = _crate
crates_repository = _crates_repository
crates_vendor = _crates_vendor
+crate_universe_dependencies = _crate_universe_dependencies
rustfmt_aspect = _rustfmt_aspect
rustfmt_test = _rustfmt_test