Go to file
2024-12-06 12:54:33 +01:00
wit builda (si gode) 2024-12-06 00:36:10 +01:00
.gitignore upfated project data 2024-12-06 01:06:37 +01:00
bindings.wadge.go builda (si gode) 2024-12-06 00:36:10 +01:00
go.mod upfated project data 2024-12-06 01:06:37 +01:00
go.sum upfated project data 2024-12-06 01:06:37 +01:00
local.wadm.yaml add wadm for local deployment 2024-12-06 12:54:33 +01:00
main_test.go wasm project init 2024-12-06 00:30:02 +01:00
main.go removed useless stuff 2024-12-06 01:06:09 +01:00
messaging.go updated messaging handling 2024-12-06 01:29:36 +01:00
README.md updated messaging handling 2024-12-06 01:29:36 +01:00
tools.go wasm project init 2024-12-06 00:30:02 +01:00
wadm.yaml updated messaging handling 2024-12-06 01:29:36 +01:00
wasmcloud.lock builda (si gode) 2024-12-06 00:36:10 +01:00
wasmcloud.toml upfated project data 2024-12-06 01:06:37 +01:00

HTTP Hello World

This is a simple TinyGo Wasm example that responds with a "Hello World" message for each request.

Prerequisites

  • go 1.23
  • tinygo 0.33
  • wash 0.35.0
  • wasmtime 25.0.0 (if running with wasmtime)

Building

wash build

Push OCI Artifact to Gitea

wash push gitea.rebus.ninja/lore/go-nats-client:1.x.x build/go_nats_client_s.wasm 

Running with wasmtime

You must have wasmtime 25.0.0 for this to work. Make sure to follow the build step above first.

wasmtime serve -Scommon ./build/http_hello_world_s.wasm

Running with wasmCloud

Make sure to follow the build steps above, and replace the file path in the wadm manifest with the absolute path to your local built component.

wash up -d
wash app deploy ./wadm.yaml
curl http://localhost:8000

Adding Capabilities

To learn how to extend this example with additional capabilities, see the Adding Capabilities section of the wasmCloud documentation.