Skip to content
File

Blob: samples/hello-wasm/README.md

Markdown38 lines

Hello WASM Example

Build WASM Binary

$ cargo install worker-build
$ worker-build --release

Run with workerd

To run the example on http://localhost:8080

$ ./workerd serve config.capnp

To run using bazel

$ bazel run //src/workerd/server:workerd -- serve $(pwd)/samples/hello-wasm/config.capnp

To create a standalone binary that can be run:

$ ./workerd compile config.capnp > hellowasm

$ ./hellowasm

To test:

% curl http://localhost:8080
Hello WASM!