Stream: wasmtime

Topic: ✔ parse_wit as an public fn in wit-parser


view this post on Zulip Victor Adossi (Oct 02 2023 at 18:50):

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)

view this post on Zulip Till Schneidereit (Oct 02 2023 at 20:36):

cc @Alex Crichton

view this post on Zulip Alex Crichton (Oct 02 2023 at 20:46):

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

view this post on Zulip Victor Adossi (Oct 03 2023 at 01:39):

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

view this post on Zulip Victor Adossi (Oct 04 2023 at 18:16):

Thanks for the help and speedy reviews @Alex Crichton ! going to close this one now (and rework my code to use those new functions)

view this post on Zulip Notification Bot (Oct 04 2023 at 18:16):

Victor Adossi has marked this topic as resolved.


Last updated: Oct 23 2024 at 20:03 UTC