@@ -5,7 +5,7 @@ WebAssembly components can be built from C and C++ using [`clang`][clang], the C
55[ ` wit-bindgen ` ] ( https://github.com/bytecodealliance/wit-bindgen ) is a tool to generate guest language bindings from a
66given ` .wit ` file.
77
8- Although ` wit-bindgen ` is a standalone tool (whereas some languages have more integrated toolchains [ ` cargo-component ` ] [ cargo-component ] ),
8+ Although ` wit-bindgen ` is a standalone tool (whereas some languages have more integrated toolchains like Rust's [ ` cargo-component ` ] [ cargo-component ] ),
99` wit-bindgen ` can generate source-level bindings for ` Rust ` , ` C ` , ` Java (TeaVM) ` , and ` TinyGo ` , with the ability for more
1010language generators to be added in the future.
1111
@@ -14,6 +14,8 @@ language generators to be added in the future.
1414[ clang ] : https://clang.llvm.org/
1515[ clang-tgt-wasm32-wasi ] : https://clang.llvm.org/docs/ClangCommandLineReference.html#webassembly
1616[ llvm ] : https://llvm.org/
17+ [ wasi ] : https://wasi.dev/
18+ [ cargo-component ] : https://crates.io/crates/cargo-component
1719
1820## 1. Download dependencies
1921
@@ -131,6 +133,8 @@ Now, you can adapt preview1 to preview2 to build a component:
131133wasm-tools component new adder.wasm --adapt wasi_snapshot_preview1.wasm -o adder.component.wasm
132134```
133135
136+ [ wasmtime-releases ] : https://github.com/bytecodealliance/wasmtime/releases
137+
134138## 7. Inspect the built component
135139
136140Finally, you can inspect the embedded wit to see your component (including any WASI imports if necessary):
@@ -199,6 +203,7 @@ This kind of error normally indicates that the host in question does not contain
199203
200204[ host ] : https://github.com/bytecodealliance/component-docs/tree/main/component-model/examples/example-host
201205[ add-to-linker ] : https://docs.wasmtime.dev/api/wasmtime_wasi/fn.add_to_linker_sync.html
206+ [ example-host ] : https://github.com/bytecodealliance/component-docs/tree/main/component-model/examples/example-host
202207
203208## 9. Running a Component from C/C++ Applications
204209
0 commit comments