Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions component-model/src/creating-runnable-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ wasmtime run --invoke 'add(1, 2)' add.component.wasm
Wasmtime contains code that can generically interpret exports, convert arguments to WebAssembly arguments, and execute
an existing component dynamically.

[example-host](https://github.com/bytecodealliance/component-docs/blob/main/component-model/examples/example-host/README.md)
[example-host]: https://github.com/bytecodealliance/component-docs/blob/main/component-model/examples/example-host/

## Creating components that behave like binaries

Expand All @@ -38,7 +38,7 @@ At a high level there are at least two ways to create components that are more l
(i.e. that are easy to run from a tool like `wasmtime run`):

1. Creating a "command" component
2. Exporting the [`wasi:cli/run` interface][wasi-cli-run]
2. Exporting the [`wasi:cli/run` interface][wasi-cli-iface-run]

While command components simply have a `_start` export, components that export the [`wasi:cli/run` run interface][wasi-cli-iface-run]
are able to make use of more robust standardized interfaces that mimic a CLI environment like stdout, stderr, via WASI.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ With `jco transpile`, any WebAssembly binary (compiled from any language) can be
[jco-example]: https://github.com/bytecodealliance/jco/tree/main/examples/components/adder
[wasm-core-module]: https://webassembly.github.io/spec/core/binary/modules.html
[core-wasm]: https://webassembly.github.io/spec/core/
[ts-decl-file]: https://www.typescriptlang.org/docs/handbook/declaration-files/deep-dive.html#declaration-file-theory-a-deep-dive

[!TIP]: #
[!NOTE]: #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,12 @@ With the help of `jco`, we have:
- Converted the compiled WebAssembly module (which could be from *any* language) to a module that can be used from any compliant JS runtime (`jco transpile`)
- Run the transpiled WebAssembly component from a JavaScript native runtime (NodeJS)

[repo]: https://github.com/bytecodealliance/component-docs
[docs-wit]: ../../design/wit.md
[jco-examples-string-reverse]: https://github.com/bytecodealliance/jco/tree/main/examples/components/string-reverse
[ts-decl-file]: https://www.typescriptlang.org/docs/handbook/declaration-files/deep-dive.html#declaration-file-theory-a-deep-dive
[string-reverse-package-json]: https://github.com/bytecodealliance/jco/blob/main/examples/components/string-reverse/package.json#L6
[ts-decl-file]: https://www.typescriptlang.org/docs/handbook/declaration-files/deep-dive.html#declaration-file-theory-a-deep-dive
[wasi]: https://wasi.dev/

[!NOTE]: #
[!TIP]: #
[!WARNING]: #
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,6 @@ Explore more examples of projects that use `wstd`:
- [An example `wasi:http` server component](https://github.com/bytecodealliance/sample-wasi-http-rust)
- [Various examples of using wstd](https://github.com/bytecodealliance/wstd/tree/main/examples)
- [Examples of using wstd with Axum](https://github.com/bytecodealliance/wstd/tree/main/axum/examples)


[!NOTE]: #
Loading