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

Add example to README #23

Open
abrown opened this issue Jul 13, 2022 · 7 comments
Open

Add example to README #23

abrown opened this issue Jul 13, 2022 · 7 comments

Comments

@abrown
Copy link
Collaborator

abrown commented Jul 13, 2022

The README includes a placeholder for an example walking through the API. Ideally, the example would include all of the calls in some language (e.g., Rust) to demonstrate how to perform something like image classification using the wasi-nn API. Optionally, this could leverage some of the wit-bindgen tooling since the specification is now WIT-based.

@abrown
Copy link
Collaborator Author

abrown commented Jul 13, 2022

cc: @brianjjones

@yamt
Copy link

yamt commented Jul 14, 2022

@abrown
Copy link
Collaborator Author

abrown commented Jul 14, 2022

That first one only does a load and we need to walk through the entire API. Would you like to take a stab at adapting the second one to WIT?

@yamt
Copy link

yamt commented Jul 15, 2022

That first one only does a load and we need to walk through the entire API. Would you like to take a stab at adapting the second one to WIT?

i agree it's better to migrate the latter one to wit.
my understanding is it's mainly about migrating wasi-nn, which is https://github.com/bytecodealliance/wasi-nn/tree/main/rust. is it right?

@yamt
Copy link

yamt commented Jul 15, 2022

Optionally, this could leverage some of the wit-bindgen tooling since the specification is not WIT-based.

do you mean s/not/now/ ?

@yamt
Copy link

yamt commented Jul 15, 2022

That first one only does a load and we need to walk through the entire API. Would you like to take a stab at adapting the second one to WIT?

my attempt
bytecodealliance/wasmtime#4451

@abrown
Copy link
Collaborator Author

abrown commented Jul 16, 2022

i agree it's better to migrate the latter one to wit. my understanding is it's mainly about migrating wasi-nn, which is https://github.com/bytecodealliance/wasi-nn/tree/main/rust. is it right?

Well, there's work to be done in Wasmtime as you saw in that PR but there is also work to be done in the bindings (e.g., Rust, as you point out). I think @bjorn3's suggestion to use the wit-bindgen macros is reasonable (for reference, see bytecodealliance/wasi-nn#64).

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

No branches or pull requests

2 participants