unit
unit copied to clipboard
Tests: initial "wasm-wasi-component" test
Note: libwasm_wasi_component.so module should be place into build/lib/unit/modules and be discoverable by Unit.
On Fri, 17 May 2024 09:45:56 -0700 andrey-zelenkov @.***> wrote:
-- File Changes --
A test/test_wasm_component.py (18) A test/unit/applications/lang/wasm_component.py (61) M test/unit/check/discover_available.py (4) A test/wasm_component/hello_world/.vscode/settings.json (10)
Committed by accident?
Committed by accident?
Yes, the patch needs to be polished, especially the app part.
Note:
libwasm_wasi_component.somodule should be place intobuild/lib/unit/modulesand be discoverable by Unit.
Ah, I see what you mean... should be fixed by https://github.com/nginx/unit/pull/1348
If you would like to avoid checking in the generated bindings you can always omit them and use wasm-tools to adapt a generic wasm app into a proxy component!
Here is an example: https://github.com/avahahn/wasm-traffic-tool
If you would like to avoid checking in the generated bindings you can always omit them and use wasm-tools to adapt a generic wasm app into a proxy component!
Here is an example: https://github.com/avahahn/wasm-traffic-tool
Hmm, it's going to be whichever is the lesser of two evils... (there may be a third evil also)
-
Include the generated bindings
-
Add a dependency on wasm-tools and the proxy adaptor module.
Though the tests already add cargo and cargo-component as dependencies...
- Generate the bindings on the fly, though no doubt adding another dependency....
How often would these bindings need to be updated?
I guess it's OK to merge now. We can deal with the bindings later if they become an issue...