You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Building with `--release` removes all debug-related information from the resulting .wasm file.
115
-
>
116
-
> When prototyping or testing locally, you might want to avoid `--release` to obtain useful backtraces in case of errors (for example, with `wasmtime::WasmBacktraceDetails::Enable`). Note: the resulting .wasm file will be considerably larger (likely 4MB+).
117
121
118
122
### Running a Component
119
123
@@ -123,7 +127,7 @@ component targeting the [`adder` world](#adding-the-wit-world).
123
127
The application uses [`wasmtime`](https://github.com/bytecodealliance/wasmtime) crates to generate
124
128
Rust bindings, bring in WASI worlds, and execute the component.
125
129
126
-
```sh
130
+
```console
127
131
$ cd examples/example-host
128
132
$ cargo run --release -- 1 2 ../add/target/wasm32-wasip1/release/adder.wasm
129
133
1 + 2 = 3
@@ -175,9 +179,7 @@ world calculator {
175
179
176
180
### Referencing the package to import
177
181
178
-
Because the `docs:adder` package is in a different project, we must first tell
179
-
`cargo component` how to find it. To do this, add the following to the
180
-
`Cargo.toml` file:
182
+
Because the `docs:adder` package is in a different project, we must first tell `cargo component` how to find it. To do this, add the following to the `Cargo.toml` file:
181
183
182
184
```toml
183
185
[package.metadata.component.target.dependencies]
@@ -313,7 +315,7 @@ As mentioned above, `cargo component build` doesn't generate a WIT file for a co
313
315
314
316
6. Run the composed component:
315
317
316
-
```sh
318
+
```console
317
319
$ wasmtime run ./my-composed-command.wasm
318
320
1 + 1 = 579 # might need to go back and do some work on the calculator implementation
0 commit comments