-
Notifications
You must be signed in to change notification settings - Fork 163
Open
Labels
lifecycle/needs-reviewThe issue has not yet been reviewed.The issue has not yet been reviewed.
Description
What happened?
The wasm_guest_bindgen! macro in hyperlight_wasm_macro fails to compile when the WIT world includes flags type definitions (e.g. from wasi:filesystem/types@0.2.0).
Error:
error[E0277]: the trait bound `DescriptorFlags: wasmtime::component::Lower` is not satisfied
error[E0277]: the trait bound `PathFlags: wasmtime::component::Lift` is not satisfied
error[E0277]: the trait bound `OpenFlags: wasmtime::component::Lift` is not satisfied
WIT that triggers the error:
flags descriptor-flags {
read,
write,
file-integrity-sync,
data-integrity-sync,
requested-write-sync,
mutate-directory,
}
flags path-flags {
symlink-follow,
}
flags open-flags {
create,
directory,
exclusive,
truncate,
}
Steps to Reproduce
Reproduction
- Create a WIT with
wasi:filesystem/typesincludingflags descriptor-flags { ... } - Compile with
wasm-tools component wit ... -w -o world.wasm - Build with
WIT_WORLD=world.wasm cargo build -p hyperlight-wasm - Runtime sub-build fails with the
Lift/Lowererrors above
Expected Results
Without flags support, it's impossible to use wasi:filesystem with hyperlight-wasm component model support.
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 -aWindows (PowerShell):
cmd /c verHypervisor
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-TableExtra Info
Anything else you'd like to add?
hyperlight-wasm-sockets-example— works around by omittingflagsfrom WIThyperlight-wasm-http-example— avoids the issue by not importingwasi:filesystemat all
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
lifecycle/needs-reviewThe issue has not yet been reviewed.The issue has not yet been reviewed.