Is this crate still supported? When I use the latest version of it (0.27.0) in conjunction with wasmtime 0.31.0 and wasmtime-wasi 0.31.0, I get a package version conflict:
error: failed to select a version for `wasmtime-fiber`.
... required by package `wasmtime v0.27.0`
... which satisfies dependency `wasmtime = "^0.27.0"` of package `wasmtime-rust v0.27.0`
... which satisfies dependency `wasmtime-rust = "^0.27"` of package `test-app v0.1.0 (/Users/timothypark/dev/test-app)`
versions that meet the requirements `^0.27.0` are: 0.27.0
the package `wasmtime-fiber` links to the native library `wasmtime-fiber-shims`, but it conflicts with a previous package which links to `wasmtime-fiber-shims` as well:
package `wasmtime-fiber v0.31.0`
... which satisfies dependency `wasmtime-fiber = "=0.31.0"` of package `wasmtime v0.31.0`
... which satisfies dependency `wasmtime = "^0.31"` of package `test-app v0.1.0 (/Users/tpark/dev/test-app)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='wasmtime-fiber' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.
failed to select a version for `wasmtime-fiber` which could resolve this conflict
Naturally, let me also know if I am holding it wrong? :grinning:
The wasmtime-rust
crate was a very old imagining of how the developer experience might be easier for Rust users. It was finally removed in Wasmtime PR #2942 and so it's not really supported with recent Wasmtime versions. The Wasmtime API now has Linker
which has some ergonomics around instantiating modules and getting their exports. Additionally, the witx-bindgen crate (soon to be renamed wai-bindgen
for "webassembly interface bindings generator") is the current design around using interface types such as strings.
Ok - thanks @Peter Huene for the confirmation - still lots of material floating around that references these old crates.
Yeah there was a blitz of "look at this all this cool stuff we will be able to do someday" type blog posts about two years back that is now woefully out of date with the progress being made both by Wasmtime but also with the standards body
Yes - to that - is there anything written down (or even just code samples) that single step you through how to use a .witx file to generate exports for a library and consume that with an import?
Not yet, but we're working on it!
Thanks @Till Schneidereit - if there is an issue for this that describes how you would like to land that I would be happy to help as well with a PR!
Unfortunately there isn't right now—this is still all in an exploratory stage where we're trying to figure out what the shape of things should roughly be :confused:
Last updated: Nov 22 2024 at 16:03 UTC