Hey y'all, I wanted to use the logic of parse_wit
in wasm-tools
in some code, and was hoping it might already be an export in wit-parser
.
Would adding it there as a public export (to be used as a library) be of value? I'd be happy to contribute that (mostly) copy of the code.
Separately (but similarly), the component metadata embedding logic would be great to have accessible from outside as well (i.e. an lib
export on wasm-tools
)
cc @Alex Crichton
Please do feel free to send PRs!
For parsing WIT the only gotcha there is that the support for that is split across the wit-parser
and wit-component
crates. The function you highlighted there would probably best reside in the wit-component
crate.
For metadata embedding the main guts of all that should live in wit-component
, but if you'd like to add a helper function to wit-component
the CLI calls for that as well to be exported I think that'd work well
Appreciate the bounce/forward @Till Schneidereit and thanks @Alex Crichton !
Will take this into account and send some PRs (with issues created first, so other people can chime in?) and make sure both fit into wit-component
Thanks for the help and speedy reviews @Alex Crichton ! going to close this one now (and rework my code to use those new functions)
Victor Adossi has marked this topic as resolved.
Last updated: Dec 23 2024 at 14:03 UTC