unit icon indicating copy to clipboard operation
unit copied to clipboard

Tests: initial "wasm-wasi-component" test

Open andrey-zelenkov opened this issue 1 year ago • 3 comments

Note: libwasm_wasi_component.so module should be place into build/lib/unit/modules and be discoverable by Unit.

andrey-zelenkov avatar May 17 '24 16:05 andrey-zelenkov

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?

ac000 avatar May 17 '24 17:05 ac000

Committed by accident?

Yes, the patch needs to be polished, especially the app part.

andrey-zelenkov avatar May 24 '24 13:05 andrey-zelenkov

Note: libwasm_wasi_component.so module should be place into build/lib/unit/modules and be discoverable by Unit.

Ah, I see what you mean... should be fixed by https://github.com/nginx/unit/pull/1348

ac000 avatar Jul 02 '24 16:07 ac000

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

avahahn avatar Jul 08 '24 15:07 avahahn

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)

  1. Include the generated bindings

  2. Add a dependency on wasm-tools and the proxy adaptor module.

Though the tests already add cargo and cargo-component as dependencies...

  1. Generate the bindings on the fly, though no doubt adding another dependency....

ac000 avatar Jul 08 '24 19:07 ac000

How often would these bindings need to be updated?

ac000 avatar Aug 07 '24 01:08 ac000

I guess it's OK to merge now. We can deal with the bindings later if they become an issue...

ac000 avatar Aug 20 '24 02:08 ac000