Stream: wasm-tools

Topic: wit_component::WitPrinter vs wit_encoder


view this post on Zulip Lann Martin (Aug 29 2025 at 17:05):

Is the (apparent) duplication between wit_component::WitPrinter and wit_encoder intentional?

view this post on Zulip Alex Crichton (Aug 29 2025 at 17:15):

it is yeah, sort of reflecting the historical development trends too

view this post on Zulip Alex Crichton (Aug 29 2025 at 17:16):

they input is somewhat different where WitPrinter takes a Resolve while wit_encoder takes programmatic API-based input from callers (which may or may not be Resolve)

view this post on Zulip Lann Martin (Aug 29 2025 at 17:22):

I see; so in theory it might be nice to deduplicate the two but it would require some major refactor or gnarly AST transform?

view this post on Zulip Lann Martin (Aug 29 2025 at 17:23):

Context is https://github.com/bytecodealliance/wasm-pkg-tools/issues/172

Steps to reproduce: mkdir wit cat > wit/world.wit <<EOF package test:test; world test { include wasi:http/proxy@0.3.0-rc-2025-08-15; } EOF wkg wit fetch Expected results: wit/deps/wasi-http-0.3.0-r...

view this post on Zulip Lann Martin (Aug 29 2025 at 17:24):

Well I guess the context is I'm debugging that and got side-tracked

view this post on Zulip Alex Crichton (Aug 29 2025 at 17:42):

yeah lots of refactoring would be required


Last updated: Dec 06 2025 at 06:05 UTC