Skip to content

wit: empty namespaces #1329

Closed
Closed

Description

@jsturtevant

What happened?

When a WIT interface name has no package namespace (e.g. a plain "exports" interface rather than wasi:http/types), the code generator produces invalid Rust paths with a leading :: separator:

// Generated (broken):
impl<I: ...> ::Types<...> for ...

// Should be:
impl<I: ...> Types<...> for ...

Steps to Reproduce

Use a WIT world with unqualified interface names (no package prefix):

world root {
  import wasi:filesystem/types@0.2.0;
  export executor;  // no package namespace
}

Expected Results

Generates valid Rust: impl<I: ...> Types<...> for ...

Actual Results

TODO: What actually happened?

Versions and Environment

Hyperlight version or commit: TODO

OS Version

Run the following to find your OS version:

Linux:

cat /etc/os-release && uname -a

Windows (PowerShell):

cmd /c ver

Hypervisor

Run the following to check hypervisor access:

Linux:

ls -la /dev/kvm /dev/mshv 2>&1; getfacl /dev/kvm /dev/mshv 2>&1; id
[ -r /dev/kvm ] && [ -w /dev/kvm ] && echo "KVM: OK" || echo "KVM: FAIL"
[ -r /dev/mshv ] && [ -w /dev/mshv ] && echo "MSHV: OK" || echo "MSHV: FAIL"

Windows (Admin PowerShell):

Get-WindowsOptionalFeature -Online | Where-Object {$_.FeatureName -match 'Hyper-V|HypervisorPlatform|VirtualMachinePlatform'} | Format-Table

Extra Info

Anything else you'd like to add?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions