WebAssembly/wasi-testsuite

adapter

yamt opened this issue · 7 comments

yamt commented

is there a doc or an example implementation of runtime adapter?

Hi @yamt , there's no documentation yet as the project is in a very early phase (we'll for sure write a doc and examples once we closer to reach stable version). For now, you can look at the adapter representation file to have an idea of what's required: https://github.com/WebAssembly/wasi-testsuite/blob/main/test-runner/wasi_test_runner/runtime_adapter.py Also, I already have an implementation for wasmtime in my development repository: https://github.com/loganek/wasi-testsuite/blob/6122c801bb604241d184c5fc37fef8fc2841107c/adapters/wasmtime.sh

Please note those APIs are not stable yet and they're subject to change. Unless you just want to do some experiments, by recommendation would be to wait for the next couple of weeks and hopefully by then we'll have a stable API and start integrations with some of the runtimes.

What is the runtime you're looking to integrate the tests to? Our initial goal was to have integration with wasmtime and WAMR, so if you want to help with any of them, I'll send you an email once the API is stable.

yamt commented

Hi @yamt , there's no documentation yet as the project is in a very early phase (we'll for sure write a doc and examples once we closer to reach stable version). For now, you can look at the adapter representation file to have an idea of what's required: https://github.com/WebAssembly/wasi-testsuite/blob/main/test-runner/wasi_test_runner/runtime_adapter.py Also, I already have an implementation for wasmtime in my development repository: https://github.com/loganek/wasi-testsuite/blob/6122c801bb604241d184c5fc37fef8fc2841107c/adapters/wasmtime.sh

Please note those APIs are not stable yet and they're subject to change. Unless you just want to do some experiments, by recommendation would be to wait for the next couple of weeks and hopefully by then we'll have a stable API and start integrations with some of the runtimes.

ok. thank you.

What is the runtime you're looking to integrate the tests to? Our initial goal was to have integration with wasmtime and WAMR, so if you want to help with any of them, I'll send you an email once the API is stable.

at this point i'm interested in WAMR and toywasm.

hi @yamt , I've created a PR with documentation: #14
It will change for sure (e.g. we'll support preopens), but I think the structure is there already. I'd be happy to accept a PR for WAMR, but I'd recommend keeping adapter for toywasm in toywasm's repository - that seems like a pet project for now, and I don't think there'd be any benefit of having the adapter in here.

Also, we already merged adapter for wasmtime, so you can use it as a reference: #13

yamt commented

hi @yamt , I've created a PR with documentation: #14 It will change for sure (e.g. we'll support preopens), but I think the structure is there already.

thank you.

I'd be happy to accept a PR for WAMR, but I'd recommend keeping adapter for toywasm in toywasm's repository - that seems like a pet project for now, and I don't think there'd be any benefit of having the adapter in here.

Also, we already merged adapter for wasmtime, so you can use it as a reference: #13

i think it makes more sense to have an adapter for XXX in XXX's repository even if XXX is a BA project.
(once the adapter api gets stable.)

yamt commented

I'd be happy to accept a PR for WAMR,

#16

yamt commented

I'd recommend keeping adapter for toywasm in toywasm's repository

yamt/toywasm@29f72cc

Adapter's API has been documented in https://github.com/WebAssembly/wasi-testsuite/blob/main/doc/adapters.md, resolving the issue.