examples/http-cpp/README.md
This is a simple example of a Spin HTTP trigger implemented in C++.
Next, grab the latest WASI SDK release and place it at /opt/wasi-sdk on your filesystem. For Linux, this would look something like:
curl -OL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-14/wasi-sdk-14.0-linux.tar.gz
tar xf wasi-sdk-14.0-linux.tar.gz
sudo mv wasi-sdk-14.0 /opt/wasi-sdk
Then install a compatible version of wit-bindgen. As of this writing, Spin uses a specific revision, which you can install like so:
cargo install --git https://github.com/bytecodealliance/wit-bindgen --rev cb871cfa1ee460b51eb1d144b175b9aab9c50aba wit-bindgen-cli
Finally, build and run the example from within this directory:
spin build
spin up
You can test the trigger using e.g.:
curl -v http://127.0.0.1:3000/hello