You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default wasm-bindgen toolchain can now optionally be registered (#640)
I find it to be the common case that users will want to register their own `rust_wasm_bindgen_toolchain` since they'll be writing code with their own set of crate dependencies and would otherwise be limited to the version of `wasm-bindgen` used in the default toolchain. This PR should make it clearer and easier for users looking to setup their own toolchain.
Notable changes in this PR:
- Added `register_default_toolchain` to `rust_wasm_bindgen_repositories`
- Improved docs
- Raised the default version of `rules_nodejs` from `3.1.0` to `3.2.2` to pick up a few bug fixes.
- Added a `providers.bzl` file for easy access to what `rust_wasm_bindgen` returns
| <aid="rust_wasm_bindgen_toolchain-name"></a>name | A unique name for this target. | <ahref="https://bazel.build/docs/build-ref.html#name">Name</a> | required ||
1218
-
| <aid="rust_wasm_bindgen_toolchain-bindgen"></a>bindgen | The label of a <code>wasm-bindgen</code> executable. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
1225
+
| <aid="rust_wasm_bindgen_toolchain-bindgen"></a>bindgen | The label of a <code>wasm-bindgen-cli</code> executable. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
1219
1226
1220
1227
1221
1228
<aid="#cargo_build_script"></a>
@@ -1426,12 +1433,16 @@ N.B. A "proxy repository" is needed to allow for registering the toolchain (with
Declare dependencies needed for [rust_wasm_bindgen](#rust_wasm_bindgen).
1440
+
1441
+
**PARAMETERS**
1433
1442
1434
-
This macro will load crate dependencies of `wasm-bindgen` that are generated using [cargo raze][raze] inside the rules_rust repository. This makes the default toolchain `@rules_rust//wasm_bindgen:default_wasm_bindgen_toolchain` available. For more information on `wasm_bindgen` toolchains, see [rust_wasm_bindgen_toolchain](#rust_wasm_bindgen_toolchain).
| <aid="rust_wasm_bindgen_repositories-register_default_toolchain"></a>register_default_toolchain | If True, the default [rust_wasm_bindgen_toolchain](#rust_wasm_bindgen_toolchain) (<code>@rules_rust//wasm_bindgen:default_wasm_bindgen_toolchain</code>) is registered. This toolchain requires a set of dependencies that were generated using [cargo raze](https://github.com/google/cargo-raze). These will also be loaded. | <code>True</code> |
| <aid="rust_wasm_bindgen_toolchain-name"></a>name | A unique name for this target. | <ahref="https://bazel.build/docs/build-ref.html#name">Name</a> | required ||
80
-
| <aid="rust_wasm_bindgen_toolchain-bindgen"></a>bindgen | The label of a <code>wasm-bindgen</code> executable. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
87
+
| <aid="rust_wasm_bindgen_toolchain-bindgen"></a>bindgen | The label of a <code>wasm-bindgen-cli</code> executable. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
Declare dependencies needed for [rust_wasm_bindgen](#rust_wasm_bindgen).
99
+
100
+
**PARAMETERS**
92
101
93
-
This macro will load crate dependencies of `wasm-bindgen` that are generated using [cargo raze][raze] inside the rules_rust repository. This makes the default toolchain `@rules_rust//wasm_bindgen:default_wasm_bindgen_toolchain` available. For more information on `wasm_bindgen` toolchains, see [rust_wasm_bindgen_toolchain](#rust_wasm_bindgen_toolchain).
| <aid="rust_wasm_bindgen_repositories-register_default_toolchain"></a>register_default_toolchain | If True, the default [rust_wasm_bindgen_toolchain](#rust_wasm_bindgen_toolchain) (<code>@rules_rust//wasm_bindgen:default_wasm_bindgen_toolchain</code>) is registered. This toolchain requires a set of dependencies that were generated using [cargo raze](https://github.com/google/cargo-raze). These will also be loaded. | <code>True</code> |
0 commit comments