Skip to content

Commit e67f44d

Browse files
authored
Document that cdylib is needed in Rust manifest (#516)
1 parent 18eb686 commit e67f44d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ that are using `wasi_snapshot_preview1` APIs.
136136
The `wasm-tools component new` subcommand takes an `--adapt` argument which acts
137137
as a way to polyfill non-component-model APIs, like `wasi_snapshot_preview1`,
138138
with component model APIs. The [preview2-prototyping] project is the current
139-
go-to location to to acquire a polyfill from `wasi_snapshot_preview1` to an
139+
go-to location to acquire a polyfill from `wasi_snapshot_preview1` to an
140140
in-development version of "wasi preview2" which is specified with [WIT]
141141
and the component model.
142142

@@ -183,6 +183,13 @@ The Rust compiler supports a native `wasm32-wasi` target and can be added to any
183183
rustup target add wasm32-wasi
184184
```
185185

186+
In order to compile a wasi dynamic library, the following must be added to the `Cargo.toml` file:
187+
188+
```toml
189+
[lib]
190+
crate-type = ["cdylib"]
191+
```
192+
186193
Projects can then depend on `wit-bindgen` by executing:
187194

188195
```sh

0 commit comments

Comments
 (0)