bytecodealliance / wasi-nn

High-level bindings for wasi-nn system calls
Apache License 2.0
41 stars 33 forks source link

Adding new high level API #74

Closed brianjjones closed 1 year ago

brianjjones commented 1 year ago

These high level functions are intended to accomplish two things. Remove the need for the unsafe calls when using wasi-nn, and simplify using wasi-nn in general. The original low level API will remain in case anyone wants to use it, but generally users should stick to using the high level API.

The example has also been updated to use these new APIs as well.

abrown commented 1 year ago

Took a look today and I can finish this PR up later if needed:

brianjjones commented 1 year ago

Took a look today and I can finish this PR up later if needed:

* I don't think we can touch the `rust/src/generated.rs` file anymore because it is auto-generated and there's a check for that

* I also think we could go a bit more high-level than this PR (e.g., see [Provide a higher-level public API for Rust users #68](https://github.com/bytecodealliance/wasi-nn/issues/68))

Ah right, slipped my mind, which is silly since its named generated! I can easily just make a new file highlevel.rs or whatever and put it there. I can also model the API following what you've posted in the issues.

abrown commented 1 year ago

Superceded by #81.