Stream: wit-bindgen

Topic: import and export namespaces


view this post on Zulip Ryan Levick (rylev) (May 15 2023 at 12:03):

Is it required that imports and exports have the same namespace and thus cannot have share names? One common pattern for worlds will likely be "proxies" that have the same imports as exports and which simply wrap the imports in some functionality and reexport them.

view this post on Zulip Ryan Levick (rylev) (May 15 2023 at 12:06):

(this isn't a show stopped obviously, but does make things a little less nice)

view this post on Zulip Lann Martin (May 15 2023 at 14:04):

https://github.com/WebAssembly/component-model/pull/164

Recently, I've seen a few cases where the possibility of overlap between the kebab-names of imports and exports has led to additional complexity that seems unnecessary given that the whole point of...

view this post on Zulip Lann Martin (May 15 2023 at 14:04):

tldr: it makes bindings generators significantly simpler

view this post on Zulip Alex Crichton (May 15 2023 at 16:16):

note that this restriction is being lifted for importing/exporting interfaces (e.g. the proxy case) where we'll have:

world foo {
    import wasi:http/proxy
    export wasi:http/proxy
}

view this post on Zulip Alex Crichton (May 15 2023 at 16:16):

which is already possible today with import a: wasi:http/proxy and export b: wasi:http/proxy


Last updated: Dec 23 2024 at 12:05 UTC