From 76a6880605195d253dd4837204a252816bd5a396 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Tue, 28 Nov 2023 23:53:57 +0000 Subject: Add a wasi-http echo-request component in C This adds a wasi-http version of luw-echo-request.c[0] This works under the wasmtime v15 CLI serve command. e.g $ ~/src/c/wasm/wasmtime-v15.0.0-x86_64-linux/wasmtime serve c/wasi-http/echo-request/component.wasm Serving HTTP on http://0.0.0.0:8080/ $ curl localhost:8080/hello *** Welcome to WebAssembly with wasi-http / C *** [Request Info] REQUEST_PATH = /hello METHOD = GET QUERY = [Request Headers] host = localhost:8080 user-agent = curl/8.2.1 accept = */* [0]: Signed-off-by: Andrew Clayton --- c/wasi-http/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 c/wasi-http/.gitignore (limited to 'c/wasi-http/.gitignore') diff --git a/c/wasi-http/.gitignore b/c/wasi-http/.gitignore new file mode 100644 index 0000000..a9897e6 --- /dev/null +++ b/c/wasi-http/.gitignore @@ -0,0 +1,4 @@ +proxy* + +module.wasm +component.wasm -- cgit