Hey all! I'm looking at migrating to the latest wit-bindgen/wasmtime (we've been stuck at ~August 2022 for a while), but I'm not sure how to wire everything up now - it looks like a few things have moved around and the tests for what I can find are part of a harness.
Is there an example somewhere that I can look at that shows the following?
base.wit
that's depended on by a derived.wit
that uses its types)If there's no one example, links to where I might find individual examples/where to look would also be useful.
Thanks in advance! :)
Turns out that the WASI preview2 host is a good example of how to use the new macros, so I'm no longer as lost as I was: https://github.com/bytecodealliance/preview2-prototyping/blob/main/host/src/main.rs (which answers my first three dotpoints)
It looks like the interface dependency situation is still up in the air, though (judging by https://bytecodealliance.zulipchat.com/#narrow/stream/327223-wit-bindgen/topic/status.20of.20resource). Am I correct in assuming that, at present, I'll still need to define duplicate types for each interface/world and fuse them together at the language layer?
For context, I have both internal and external dependencies to a world: I'd like to share types between the imports and exports of a world (so that I can use the same record
in a host export and a guest export), and I'd like to have a base .wit
/world that I then depend upon and extend in another project.
Last updated: Nov 22 2024 at 16:03 UTC