Skip to content

Commit

Permalink
Regenerate documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Jan 25, 2022
1 parent 4437e83 commit b5e9a64
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 57 deletions.
34 changes: 7 additions & 27 deletions docs/flatten.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* [extra_rustc_flags](#extra_rustc_flags)
* [fail_when_enabled](#fail_when_enabled)
* [incompatible_flag](#incompatible_flag)
* [rules_rust_depednencies](#rules_rust_depednencies)
* [rust_analyzer](#rust_analyzer)
* [rust_analyzer_aspect](#rust_analyzer_aspect)
* [rust_binary](#rust_binary)
Expand All @@ -31,6 +32,7 @@
* [rust_proto_repositories](#rust_proto_repositories)
* [rust_proto_toolchain](#rust_proto_toolchain)
* [rust_proto_transitive_repositories](#rust_proto_transitive_repositories)
* [rust_register_toolchains](#rust_register_toolchains)
* [rust_repositories](#rust_repositories)
* [rust_repository_set](#rust_repository_set)
* [rust_shared_library](#rust_shared_library)
Expand Down Expand Up @@ -1754,40 +1756,17 @@ This macro should be called immediately after the `rust_proto_repositories` macr
## rust_repositories

<pre>
rust_repositories(<a href="#rust_repositories-version">version</a>, <a href="#rust_repositories-iso_date">iso_date</a>, <a href="#rust_repositories-rustfmt_version">rustfmt_version</a>, <a href="#rust_repositories-edition">edition</a>, <a href="#rust_repositories-dev_components">dev_components</a>, <a href="#rust_repositories-sha256s">sha256s</a>,
<a href="#rust_repositories-include_rustc_srcs">include_rustc_srcs</a>, <a href="#rust_repositories-urls">urls</a>)
rust_repositories(<a href="#rust_repositories-kwargs">kwargs</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.

**Deprecated**: Use [rules_rust_dependencies](#rules_rust_dependencies) and [rust_register_toolchains](#rust_register_toolchains) directly.

**PARAMETERS**


| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="rust_repositories-version"></a>version | The version of Rust. Either "nightly", "beta", or an exact version. Defaults to a modern version. | <code>"1.58.1"</code> |
| <a id="rust_repositories-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_repositories-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_repositories-edition"></a>edition | The rust edition to be used by default (2015, 2018 (default), or 2021) | <code>None</code> |
| <a id="rust_repositories-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_repositories-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. Defaults to None. | <code>None</code> |
| <a id="rust_repositories-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_repositories-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). Defaults to ['https://static.rust-lang.org/dist/{}.tar.gz'] | <code>["https://static.rust-lang.org/dist/{}.tar.gz"]</code> |
| <a id="rust_repositories-kwargs"></a>kwargs | Keyword arguments for the <code>rust_register_toolchains</code> macro. | none |


<a id="#rust_repository_set"></a>
Expand All @@ -1796,7 +1775,7 @@ See `load_arbitrary_tool` in `@rules_rust//rust:repositories.bzl` for more detai

<pre>
rust_repository_set(<a href="#rust_repository_set-name">name</a>, <a href="#rust_repository_set-version">version</a>, <a href="#rust_repository_set-exec_triple">exec_triple</a>, <a href="#rust_repository_set-include_rustc_srcs">include_rustc_srcs</a>, <a href="#rust_repository_set-extra_target_triples">extra_target_triples</a>, <a href="#rust_repository_set-iso_date">iso_date</a>,
<a href="#rust_repository_set-rustfmt_version">rustfmt_version</a>, <a href="#rust_repository_set-edition">edition</a>, <a href="#rust_repository_set-dev_components">dev_components</a>, <a href="#rust_repository_set-sha256s">sha256s</a>, <a href="#rust_repository_set-urls">urls</a>, <a href="#rust_repository_set-auth">auth</a>)
<a href="#rust_repository_set-rustfmt_version">rustfmt_version</a>, <a href="#rust_repository_set-edition">edition</a>, <a href="#rust_repository_set-dev_components">dev_components</a>, <a href="#rust_repository_set-sha256s">sha256s</a>, <a href="#rust_repository_set-urls">urls</a>, <a href="#rust_repository_set-auth">auth</a>, <a href="#rust_repository_set-register_toolchain">register_toolchain</a>)
</pre>

Assembles a remote repository for the given toolchain params, produces a proxy repository to contain the toolchain declaration, and registers the toolchains.
Expand All @@ -1821,6 +1800,7 @@ N.B. A "proxy repository" is needed to allow for registering the toolchain (with
| <a id="rust_repository_set-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. See [rust_repositories](#rust_repositories) for more details. | <code>None</code> |
| <a id="rust_repository_set-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). Defaults to ['https://static.rust-lang.org/dist/{}.tar.gz'] | <code>["https://static.rust-lang.org/dist/{}.tar.gz"]</code> |
| <a id="rust_repository_set-auth"></a>auth | Auth object compatible with repository_ctx.download to use when downloading files. See https://docs.bazel.build/versions/main/skylark/lib/repository_ctx.html#download for more details. | <code>None</code> |
| <a id="rust_repository_set-register_toolchain"></a>register_toolchain | If True, the generated <code>rust_toolchain</code> target will become a registered toolchain. | <code>True</code> |


<a id="#rust_test_suite"></a>
Expand Down
40 changes: 10 additions & 30 deletions docs/rust_repositories.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
# Rust Repositories

* [rules_rust_depednencies](#rules_rust_depednencies)
* [rust_register_toolchains](#rust_register_toolchains)
* [rust_repositories](#rust_repositories)
* [rust_repository_set](#rust_repository_set)
* [rust_toolchain](#rust_toolchain)
* [rust_toolchain_repository](#rust_toolchain_repository)
* [rust_toolchain_repository_proxy](#rust_toolchain_repository_proxy)
* [rust_stdlib_filegroup](#rust_stdlib_filegroup)
* [rust_toolchain_repository_proxy](#rust_toolchain_repository_proxy)
* [rust_toolchain_repository](#rust_toolchain_repository)
* [rust_toolchain](#rust_toolchain)

<a id="#rust_stdlib_filegroup"></a>

Expand Down Expand Up @@ -172,40 +174,17 @@ Generates a toolchain-bearing repository that declares the toolchains from some
## rust_repositories

<pre>
rust_repositories(<a href="#rust_repositories-version">version</a>, <a href="#rust_repositories-iso_date">iso_date</a>, <a href="#rust_repositories-rustfmt_version">rustfmt_version</a>, <a href="#rust_repositories-edition">edition</a>, <a href="#rust_repositories-dev_components">dev_components</a>, <a href="#rust_repositories-sha256s">sha256s</a>,
<a href="#rust_repositories-include_rustc_srcs">include_rustc_srcs</a>, <a href="#rust_repositories-urls">urls</a>)
rust_repositories(<a href="#rust_repositories-kwargs">kwargs</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.

**Deprecated**: Use [rules_rust_dependencies](#rules_rust_dependencies) and [rust_register_toolchains](#rust_register_toolchains) directly.

**PARAMETERS**


| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="rust_repositories-version"></a>version | The version of Rust. Either "nightly", "beta", or an exact version. Defaults to a modern version. | <code>"1.58.1"</code> |
| <a id="rust_repositories-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_repositories-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_repositories-edition"></a>edition | The rust edition to be used by default (2015, 2018 (default), or 2021) | <code>None</code> |
| <a id="rust_repositories-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_repositories-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. Defaults to None. | <code>None</code> |
| <a id="rust_repositories-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_repositories-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). Defaults to ['https://static.rust-lang.org/dist/{}.tar.gz'] | <code>["https://static.rust-lang.org/dist/{}.tar.gz"]</code> |
| <a id="rust_repositories-kwargs"></a>kwargs | Keyword arguments for the <code>rust_register_toolchains</code> macro. | none |


<a id="#rust_repository_set"></a>
Expand All @@ -214,7 +193,7 @@ See `load_arbitrary_tool` in `@rules_rust//rust:repositories.bzl` for more detai

<pre>
rust_repository_set(<a href="#rust_repository_set-name">name</a>, <a href="#rust_repository_set-version">version</a>, <a href="#rust_repository_set-exec_triple">exec_triple</a>, <a href="#rust_repository_set-include_rustc_srcs">include_rustc_srcs</a>, <a href="#rust_repository_set-extra_target_triples">extra_target_triples</a>, <a href="#rust_repository_set-iso_date">iso_date</a>,
<a href="#rust_repository_set-rustfmt_version">rustfmt_version</a>, <a href="#rust_repository_set-edition">edition</a>, <a href="#rust_repository_set-dev_components">dev_components</a>, <a href="#rust_repository_set-sha256s">sha256s</a>, <a href="#rust_repository_set-urls">urls</a>, <a href="#rust_repository_set-auth">auth</a>)
<a href="#rust_repository_set-rustfmt_version">rustfmt_version</a>, <a href="#rust_repository_set-edition">edition</a>, <a href="#rust_repository_set-dev_components">dev_components</a>, <a href="#rust_repository_set-sha256s">sha256s</a>, <a href="#rust_repository_set-urls">urls</a>, <a href="#rust_repository_set-auth">auth</a>, <a href="#rust_repository_set-register_toolchain">register_toolchain</a>)
</pre>

Assembles a remote repository for the given toolchain params, produces a proxy repository to contain the toolchain declaration, and registers the toolchains.
Expand All @@ -239,5 +218,6 @@ N.B. A "proxy repository" is needed to allow for registering the toolchain (with
| <a id="rust_repository_set-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. See [rust_repositories](#rust_repositories) for more details. | <code>None</code> |
| <a id="rust_repository_set-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). Defaults to ['https://static.rust-lang.org/dist/{}.tar.gz'] | <code>["https://static.rust-lang.org/dist/{}.tar.gz"]</code> |
| <a id="rust_repository_set-auth"></a>auth | Auth object compatible with repository_ctx.download to use when downloading files. See https://docs.bazel.build/versions/main/skylark/lib/repository_ctx.html#download for more details. | <code>None</code> |
| <a id="rust_repository_set-register_toolchain"></a>register_toolchain | If True, the generated <code>rust_toolchain</code> target will become a registered toolchain. | <code>True</code> |


0 comments on commit b5e9a64

Please sign in to comment.