huenique / agg-ticker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTTP Hello World

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

Prerequisites

  • cargo 1.75
  • wash 0.27.0
  • wasmtime >=19.0.0 (if running with wasmtime)

Building

wash build

Running with wasmtime

You must have wasmtime >=19.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

Ensuring you've built your component with wash build, you can launch wasmCloud and deploy the full hello world application with the following commands. Once the application reports as Deployed in the application list, you can use curl to send a request to the running HTTP server.

wash up -d
wash app deploy ./wadm.yaml
wash app list
curl http://127.0.0.1:8080

Adding Capabilities

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

About


Languages

Language:Rust 100.0%