Stream: wasm

Topic: wit-deps vs. wit-bindgen cli


view this post on Zulip Dan Gohman (May 01 2023 at 21:39):

I'm trying to figure out the proper way to add wit-bindgen generated bindings to wasi-libc. wit-deps looks like a nice way to do it, except when I add a dependency on "https://github.com/WebAssembly/wasi-cli/archive/main.tar.gz", I get a wit directory where command.wit lives under wit/deps/cli/command.wit, and the wit-bindgen cli doesn't seem to find it there.

view this post on Zulip Dan Gohman (May 01 2023 at 21:42):

Is there an option I'm missing to populate a wit directory in a way that wit-bindgen can consume it?

view this post on Zulip Alex Crichton (May 01 2023 at 23:13):

wit-bindgen currently operates on the "main" package at all times and not one of its dependencies, but I don't think it would be too too hard in theory to plumb through a "pull the world from this dependency" option

view this post on Zulip Alex Crichton (May 01 2023 at 23:13):

basically in wit-bindgen it assumes the world-to-bindgen is in the main package, and this would be moving that to be in "some user-specified package"


Last updated: Dec 23 2024 at 13:07 UTC