Open danbev opened 4 months ago
@danbev, thanks for this PR and apologies for not looking at it sooner. The reason is that I'm actually working on this at the moment (e.g., https://github.com/bytecodealliance/wasmtime/pull/8519) and have been thinking: once users fully switch to using WIT for the interface, is there a need to keep the wasi-nn
crate around? Once Wasmtime implements the latest spec, users should just be able to use wit-bindgen
to create a component (or something like that).
thanks for this PR and apologies for not looking at it sooner.
@abrown No worries at all!
once users fully switch to using WIT for the interface, is there a need to keep the wasi-nn crate around?
I see your point and that is an option. I just found that having this crate simplified the code in the project I was working on. But it is not a big deal to handle and if it means not having to maintain this repo I understand the value in that. So both ways work for me :+1:
This commit updates the regeneration script for the Rust bindings to use
wasi-nn.wit
types instead ofwasi-nn.witx
.The scripts has also been run and the bindings (src/generated.rs) have been updated.
This example currently compiles but fails at runtime because the version of the wasi-nn spec that wasmtime is using is not the latest. Once it has been updated this example should work (I've tested it with the version that wasmtime is currently on and it works but that requires changes to the examples in this repository).