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
19 changes: 14 additions & 5 deletions docs/quickstart/develop-a-webassembly-component.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ async fn main(req: Request<Body>) -> Result<Response<Body>, wstd::http::Error> {
}
}

async fn home(req: Request<Body>) -> Result<Response<Body>, wstd::http::Error> {
async fn home(_req: Request<Body>) -> Result<Response<Body>, wstd::http::Error> { // [!code --]
async fn home(req: Request<Body>) -> Result<Response<Body>, wstd::http::Error> { // [!code ++]
Comment thread
ericgregory marked this conversation as resolved.
// Parse query string for name parameter // [!code ++]
let query = req.uri().query().unwrap_or(""); // [!code ++]
let name = match query.split("=").collect::<Vec<&str>>()[..] { // [!code ++]
Expand Down Expand Up @@ -173,8 +174,13 @@ Before we can use the interface, we'll need to update the `wit/world.wit` file:
package wasmcloud:hello;

world hello {
import wasi:keyvalue/store@0.2.0-draft; // [!code ++]
import wasi:keyvalue/atomics@0.2.0-draft; // [!code ++]
Comment thread
ericgregory marked this conversation as resolved.
// [!code ++]
import wasi:keyvalue/store@0.2.0-draft;
// [!code ++]
import wasi:keyvalue/atomics@0.2.0-draft;
// [!code ++]

export wasi:http/incoming-handler@0.2.6;
}
```
</TabItem>
Expand All @@ -186,8 +192,11 @@ Before we can use the interface, we'll need to update the `wit/world.wit` file:
package wasmcloud:templates@0.1.0;

world typescript-http-hello-world-hono {
import wasi:keyvalue/store@0.2.0-draft; // [!code ++]
import wasi:keyvalue/atomics@0.2.0-draft; // [!code ++]
// [!code ++]
import wasi:keyvalue/store@0.2.0-draft;
// [!code ++]
import wasi:keyvalue/atomics@0.2.0-draft;
// [!code ++]

export wasi:http/incoming-handler@0.2.6;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/wash/developer-guide/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -392,4 +392,4 @@ You can stop the development loop with CTRL+C.

## Next steps

In the [next section](./build-and-publish.mdx), we'll compile a component to a `.wasm` binary and publish the artifact to an OCI registry.
In the [next section](./build-and-publish.mdx), we'll compile a component to a `.wasm` binary and publish the artifact to an OCI registry.
3 changes: 2 additions & 1 deletion versioned_docs/version-0.82/examples/cruddy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ Remember that we targeted the `hello` world in our `wasmcloud.toml` file; this i
package wasmcloud:hello;

world hello {
import wasi:keyvalue/eventual@0.1.0; // [!code ++]
// [!code ++]
import wasi:keyvalue/eventual@0.1.0;
// [!code ++]
Comment thread
ericgregory marked this conversation as resolved.
export wasi:http/incoming-handler@0.2.0;
}
Expand Down
Loading