I have been working on adapting the Wasmtime implementation of wasi-nn to use WIT: https://github.com/bytecodealliance/wasmtime/pull/6821. That PR retains the original WITX glue code inpreview1.rs
and adds new WIT glue code in preview2.rs
. (Now, I understand that wasi-nn is not included in "preview1," etc., I'm just referring to the ABI that each part supports).
I would like the old "preview1-build" Wasm modules to still work for some intermediate time period but I am also wondering if I can get rid of preview1.rs
and rely on some kind of adapter to use preview2.rs
to service both "preview1-built" and "preview2-built" code (e.g., wasi-preview1-component-adapter
?).
Is it better to just maintain implementations for both ABIs for now? cc: @Dan Gohman, @Pat Hickey
i prefer to call those abis witx and wit
its up to you if you want to keep support for the witx abi built on top of the wit-bindgen traits, like we do in wasmtime_wasi::preview2::preview1
the wasi-preview1-component-adapter
is just for adapting stuff that is required by the toolchain. wasi-nn should not be part of that adapter.
if someone is trying to use wasi-nn from a component they should be recompiling their project to use wit-bindgen
with the wasi-nn wits
Pat Hickey said:
i prefer to call those abis witx and wit
Ok, I changed https://github.com/bytecodealliance/wasmtime/pull/6821 to use those terms instead
@Pat Hickey Will this impact availability of wasi-nn once preview2 stuff merges into Viceroy? If it does then Andrew and I need to plan on our work colliding, in particular if I'm making changes to preview1 backend impl in wasmtime for Sept
Last updated: Nov 22 2024 at 16:03 UTC