wit-bindgen icon indicating copy to clipboard operation
wit-bindgen copied to clipboard

Ability to get the fully resolved name of functions and types

Open primoly opened this issue 8 months ago • 0 comments

In my experience, it is currently really difficult to get the complete, fully resolved name of a function or type. This is especially annoying when one needs not just the name itself but also the namespace. So it would be great to have the ability to get the fully resolved name of functions and types from the perspective of a world. By “fully resolved” I mean that it includes (where applicable) the package, interface and the with as renamed function/type name.

Something kind of like:

struct FullName {
    package: Option<PackageName>,
    interface: Option<String>,
    name: Option<String>,
    as_: Option<String>,
}

I haven’t completely figured out how names (and namespaces) work in Wit yet, so this may look different in practice.

primoly avatar Jun 26 '24 17:06 primoly