Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Remove the sed commands from the Makefile as the version is no longer
encoded in the function and type names. They're still way too long of
course...
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
This is superseded by the wasi-http 0.2.0 version.
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
This makes use of the 'reactor' adaptor for filesystem access via the
preopens method.
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
This adds a WASI 0.2.0 version of c/wasi-http/echo-request, although
there is no change in component.c, you do now need to link against the
'proxy' adaptor (which is included).
This is for running under wasmtime 17.
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Some of the u8 list types were changed/amalgamated.
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Use the 'blocking' versions of the stream read/write functions.
Things seemed to work fine previously. However with a version of this
that works under the enw Unit wasm module, it didn't and I needed to use
the _input_stream_blocking_read() &
_output_stream_blocking_write_and_flush() functions.
The latter does also allow for a little less code. Let's also use those
functions here...
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
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]: <https://github.com/nginx/unit-wasm/blob/main/examples/c/luw-echo-request.c>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Moved to c/wasmtime-wasi-http
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
This can be used for creating an equivalent rust based runtime with C
bindings.
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
This adds the 'Hello World' example from here[0]. The runtime is in Rust
and the component is in C.
This requires some new tools
- https://github.com/bytecodealliance/wit-bindgen
- https://github.com/bytecodealliance/wasm-tools
You can use the pre-built packages, once downloaded and untar'd, edit
rust/hello_world/component/Makefile
and adjust the paths for the above tools.
To build the component with make you may need to specify where the WASI
sysroot is
$ make WASI_SYSROOT=/path/to/wasi-sysroot
[0]: <https://docs.rs/wasmtime/latest/wasmtime/component/macro.bindgen.html>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|