@@ -47,11 +47,11 @@ fn main() {
47
47
```
48
48
49
49
This crate is intended to target [ components] but today you need to go through
50
- the intermediate build step of a core WebAssembly module using the ` wasm32-wasi `
50
+ the intermediate build step of a core WebAssembly module using the ` wasm32-wasip1 `
51
51
target:
52
52
53
53
```
54
- $ cargo build --target wasm32-wasi
54
+ $ cargo build --target wasm32-wasip1
55
55
```
56
56
57
57
Next you'll want an "adapter" to convert the Rust standard library's usage of
@@ -67,7 +67,7 @@ component:
67
67
68
68
```
69
69
$ cargo install wasm-tools
70
- $ wasm-tools component new target/wasm32-wasi /debug/foo.wasm \
70
+ $ wasm-tools component new target/wasm32-wasip1 /debug/foo.wasm \
71
71
--adapt ./wasi_snapshot_preview1.command.wasm \
72
72
-o component.wasm
73
73
```
@@ -109,19 +109,17 @@ want to support. Rust WebAssembly targets include:
109
109
110
110
* ` wasm32-unknown-unknown ` - do not use this crate because this target indicates
111
111
that WASI is not desired.
112
- * ` wasm32-wasi ` or ` wasm32-wasip1 ` - this target has been present in Rust for
113
- quite some time and is recently being renamed from ` wasm32-wasi ` to
114
- ` wasm32-wasip1 ` . The two targets have the same definition, it's just the name
115
- that's changing. For this target you probably want the 0.11.0 track of this
116
- crate.
112
+ * ` wasm32-wasip1 ` - this target has been present in Rust for quite some time and
113
+ was previously known as ` wasm32-wasi ` . For this target you probably want the
114
+ 0.11.0 track of this crate.
117
115
* ` wasm32-wasip2 ` - this target is a recent addition to rustc (as of the time of
118
116
this writing it's not merged yet into rustc). This is what the 0.12.0 version
119
117
of the crate is intended for.
120
118
121
- Note that if you use ` wasm32-wasi ` or ` wasm32- wasip1` it's not necessarily
122
- guaranteed you want 0.11.0 of this crate. If your users are producing components
123
- then you probably want 0.12.0 instead. If you don't know what your users are
124
- producing then you should probably stick with 0.11.0.
119
+ Note that if you use ` wasm32-wasip1 ` it's not necessarily guaranteed you want
120
+ 0.11.0 of this crate. If your users are producing components then you probably
121
+ want 0.12.0 instead. If you don't know what your users are producing then you
122
+ should probably stick with 0.11.0.
125
123
126
124
Long story short, it's a bit complicated. We're in a transition period from
127
125
WASIp1 to WASIp2 and things aren't going to be perfect every step of the way, so
0 commit comments