Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate documentation #559

Merged
merged 1 commit into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bindgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ To use the Rust bindgen rules, add the following to your `WORKSPACE` file to add
external repositories for the Rust bindgen toolchain (in addition to the [rust rules setup](..)):

```python
load("@io_bazel_rules_rust//bindgen:repositories.bzl", "rust_bindgen_repositories")
load("@rules_rust//bindgen:repositories.bzl", "rust_bindgen_repositories")

rust_bindgen_repositories()
```
This makes the default toolchain defined in [`@io_bazel_rules_rust`](./BUILD) available.
This makes the default toolchain defined in [`@rules_rust`](./BUILD) available.

[raze]: https://github.com/google/cargo-raze

Expand Down Expand Up @@ -57,7 +57,7 @@ need to create your own toolchain. To do so you can create a BUILD
file with your [`rust_bindgen_toolchain`](../docs/index.md#rust_bindgen_toolchain) definition, for example:

```python
load("@io_bazel_rules_rust//bindgen:bindgen.bzl", "rust_bindgen_toolchain")
load("@rules_rust//bindgen:bindgen.bzl", "rust_bindgen_toolchain")

rust_bindgen_toolchain(
name = "bindgen-toolchain-impl",
Expand All @@ -70,7 +70,7 @@ rust_bindgen_toolchain(
toolchain(
name = "bindgen-toolchain",
toolchain = "bindgen-toolchain-impl",
toolchain_type = "@io_bazel_rules_rust//bindgen:bindgen_toolchain",
toolchain_type = "@rules_rust//bindgen:bindgen_toolchain",
)
```

Expand Down
12 changes: 6 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To use the Rust rules, add the following to your `WORKSPACE` file to add the ext
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_rust",
name = "rules_rust",
sha256 = "b5d4d1c7609714dfef821355f40353c58aa1afb3803401b3442ed2355db9b0c7",
strip_prefix = "rules_rust-8d2b4eeeff9dce24f5cbb36018f2d60ecd676639",
urls = [
Expand All @@ -27,7 +27,7 @@ http_archive(
],
)

load("@io_bazel_rules_rust//rust:repositories.bzl", "rust_repositories")
load("@rules_rust//rust:repositories.bzl", "rust_repositories")

rust_repositories()
```
Expand Down Expand Up @@ -73,16 +73,16 @@ Currently the most common approach to managing external dependencies is using

## WebAssembly

To build a `rust_binary` for `wasm32-unknown-unknown` target add the `--platforms=@io_bazel_rules_rust//rust/platform:wasm` flag.
To build a `rust_binary` for `wasm32-unknown-unknown` target add the `--platforms=@rules_rust//rust/platform:wasm` flag.

```command
bazel build @examples//hello_world_wasm --platforms=@io_bazel_rules_rust//rust/platform:wasm
bazel build @examples//hello_world_wasm --platforms=@rules_rust//rust/platform:wasm
```

To build a `rust_binary` for `wasm32-wasi` target add the `--platforms=@io_bazel_rules_rust//rust/platform:wasi` flag.
To build a `rust_binary` for `wasm32-wasi` target add the `--platforms=@rules_rust//rust/platform:wasi` flag.

```command
bazel build @examples//hello_world_wasm --platforms=@io_bazel_rules_rust//rust/platform:wasi
bazel build @examples//hello_world_wasm --platforms=@rules_rust//rust/platform:wasi
```

`rust_wasm_bindgen` will automatically transition to the `wasm` platform and can be used when
Expand Down
6 changes: 3 additions & 3 deletions proto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To use the Rust proto rules, add the following to your `WORKSPACE` file to add t
external repositories for the Rust proto toolchain (in addition to the [rust rules setup](..)):

```python
load("@io_bazel_rules_rust//proto:repositories.bzl", "rust_proto_repositories")
load("@rules_rust//proto:repositories.bzl", "rust_proto_repositories")

rust_proto_repositories()
```
Expand Down Expand Up @@ -58,7 +58,7 @@ need to create your own toolchain. To do so you can create a BUILD
file with your toolchain definition, for example:

```python
load("@io_bazel_rules_rust//proto:toolchain.bzl", "rust_proto_toolchain")
load("@rules_rust//proto:toolchain.bzl", "rust_proto_toolchain")

rust_proto_toolchain(
name = "proto-toolchain-impl",
Expand All @@ -73,7 +73,7 @@ rust_proto_toolchain(
toolchain(
name = "proto-toolchain",
toolchain = ":proto-toolchain-impl",
toolchain_type = "@io_bazel_rules_rust//proto:toolchain",
toolchain_type = "@rules_rust//proto:toolchain",
)
```

Expand Down