abrown opened PR #8530 from abrown:wasi-nn-only-wit
to bytecodealliance:main
:
This is a relatively drastic change to remove all the preview1, WITX-based support from Wasmtime's wasi-nn implementation. This has ramifications:
- Wasmtime will not be able to run core modules that target wasi-nn, either through the CLI or the embedding API
- Sightglass will not be able to benchmark wasi-nn-using code until the
bench-api
learns how to handle components- the [
wasi-nn
] bindings crate is no longer usable with Wasmtime (it only understands the preview1 ABI)- all wasi-nn testing in Wasmtime will now use components (the
examples
are left for a later refactor)Why this change, then? The WebAssembly [specification] has pushed ahead, defining new functionality that depends on component model features (e.g., resources). So far, the
wasmtime-wasi-nn
has had its preview1- and preview2-ABI implementations coexisting side by side,wit.rs
andwitx.rs
. This was only possible because the WIT and WITX definitions were roughly similar. But I plan to update the Wasmtime implementation to support the new spec changes, which means the older preview1-ABI WITX code would immediately be out of date. And the differences between the updated WIT code and the old WITX code would only grow over time.[
wasi-nn
]: https://crates.io/crates/wasi-nn
[specification]: https://github.com/WebAssembly/wasi-nn
abrown updated PR #8530.
abrown updated PR #8530.
alexcrichton commented on PR #8530:
From a technical perspective this all looks fine to me, thanks! For a "is this the time to do this or not" I'd defer to the wasi-nn subgroup, which I know you're intimately tied into as well and likely have a consensus before making this PR
abrown updated PR #8530.
abrown closed without merge PR #8530.
Superseded by #8873.
Last updated: Dec 23 2024 at 12:05 UTC