Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Rust gen to use .wit spec #97

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danbev
Copy link

@danbev danbev commented Apr 10, 2024

This commit updates the regeneration script for the Rust bindings to use wasi-nn.wit types instead of wasi-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).

This commit updates the regeneration script for the Rust bindings to
use `wasi-nn.wit` types instead of `wasi-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).

Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
@abrown
Copy link
Collaborator

abrown commented May 2, 2024

@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., bytecodealliance/wasmtime#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).

@dbevenius
Copy link

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants