Skip to content

Commit 980c0f7

Browse files
fix(lang/c): add missing links
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
1 parent 12b0eeb commit 980c0f7

File tree

1 file changed

+6
-1
lines changed
  • component-model/src/language-support

1 file changed

+6
-1
lines changed

component-model/src/language-support/c.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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
66
given `.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
1010
language 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:
131133
wasm-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

136140
Finally, 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

Comments
 (0)