@@ -13,11 +13,25 @@ always be listed via `wasm-bindgen --help`.
13
13
14
14
The recommend way to install the ` wasm-bindgen ` command line tool is with the
15
15
` wasm-pack ` installer described
16
- [ here] ( https://rustwasm.github.io/wasm-pack/installer/ ) . After installing
17
- ` wasm-pack ` , run ` wasm-pack build ` to install the command line tool. (Although
18
- the command line tool is available through its own crate, ` wasm-bindgen-cli ` ,
19
- ` wasm-pack build ` will ensure the version installed matches the version of
20
- ` wasm-bindgen ` in ` Cargo.lock ` .)
16
+ [ here] ( https://rustwasm.github.io/wasm-pack/installer/ ) . After installing
17
+ ` wasm-pack ` , you are ready to build project invoking ` wasm-pack build ` .
18
+ This command installs apropriate version of the ` wasm-bindgen ` command-line
19
+ tool. The version of ` wasm-bindgen ` installed by ` wasm-pack ` is not available
20
+ to be used directly via command line.
21
+
22
+ It is not recommended to install ` wasm-bindgen-cli ` as its version must match
23
+ _ exactly_ the version of ` wasm-bindgen ` that is specified in the project's
24
+ cargo.lock file. Using ` wasm-pack ` for building simplifies the build process
25
+ as ` wasm-pack ` ensures that the proper version of ` wasm-bindgen ` command-line
26
+ tool is used. That means that ` wasm-pack ` may install many different versions
27
+ of ` wasm-bindgen ` , but during the build ` wasm-pack ` will always make sure to
28
+ use the correct one.
29
+
30
+ Note: if, for any reason, you decide to use wasm-bindgen directly (this is
31
+ not recommended!) you will have to manually take care of using exactly the
32
+ same version of wasm-bindgen command-line tool (wasm-bindgen-cli) that
33
+ matches the version of wasm-bingden in cargo.lock.
34
+
21
35
22
36
## Usage
23
37
0 commit comments