Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-generate wasi-types from .wit files #3177

Merged
merged 95 commits into from
Oct 10, 2022
Merged
Changes from 1 commit
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
e33496b
WIP
silwol Aug 10, 2022
f2a4b87
Generate bindings directly for now
silwol Aug 16, 2022
1a48fab
WIP
silwol Aug 16, 2022
8d36b49
WIP: something that builds with Errno from wasi-types-generated
silwol Aug 16, 2022
8fdbde4
WIP
silwol Aug 17, 2022
d1bc30d
WIP
silwol Aug 17, 2022
a54005f
WIP
silwol Aug 17, 2022
c6e2eb0
Eventtype
silwol Aug 17, 2022
6d53f23
Advice
silwol Aug 17, 2022
293c67f
WIP: Rights
silwol Aug 17, 2022
75be1d3
WIP: Eventrwflags
silwol Aug 18, 2022
40b5b53
WIP: Subcodeflags
silwol Aug 18, 2022
24f88fd
WIP: Clockid
silwol Aug 18, 2022
5207cc1
WIP: Dirent struct
silwol Aug 18, 2022
a3deb19
WIP: Fdflags
silwol Aug 18, 2022
7e8b835
WIP: Preopentype
silwol Aug 18, 2022
39fad86
WIP: Fdstat
silwol Aug 18, 2022
188d069
WIP: Fd
silwol Aug 18, 2022
06ced06
WIP
silwol Aug 19, 2022
005b05d
Sauhaufen!
silwol Aug 19, 2022
d471def
Builds again
silwol Aug 23, 2022
26f4207
Timestamp
silwol Aug 23, 2022
8f5a1a6
BusErrno
silwol Aug 23, 2022
60cbd02
Socktype
silwol Aug 24, 2022
0b86b61
Sockstatus
silwol Aug 24, 2022
7c70dcb
Sockoption
silwol Aug 24, 2022
4bb761f
Streamsecurity
silwol Aug 24, 2022
4abe73c
Addressfamily
silwol Aug 24, 2022
721ece0
Filesize
silwol Aug 24, 2022
fdb7850
Inode
silwol Aug 24, 2022
ef8021a
Device
silwol Aug 24, 2022
14f1f42
Linkcount
silwol Aug 24, 2022
9fefd22
snapshot0 Filestat
silwol Aug 25, 2022
19e979c
Filestat
silwol Aug 25, 2022
7f2bd8f
snapshot0 Whence
silwol Aug 25, 2022
a9290a5
Whence
silwol Aug 25, 2022
7c6164d
Fstflags
silwol Aug 25, 2022
aa8d6fa
Tty
silwol Aug 25, 2022
7aacc7a
Tid + Pid
silwol Aug 25, 2022
5ba7615
WIP, Temporary: reference wit-bindgen silwol/wasi-types-generation gi…
silwol Aug 26, 2022
04bddcb
Merge branch 'master' into silwol/wasi-types-generation
fschutt Aug 31, 2022
73137f5
Add wit-clean files
fschutt Sep 5, 2022
a4e7e89
Update Cargo.lock
fschutt Sep 5, 2022
00503ad
Move "wasmer" dependency out of wasi-types-generated crate
fschutt Sep 5, 2022
69e3114
Port BusDataFormat
fschutt Sep 7, 2022
8983637
Use awk instead of sed to resolve build issues in regenerate.sh
fschutt Sep 7, 2022
b485e45
Add BusEventType
fschutt Sep 7, 2022
0a9595b
Merge branch 'master' into wasi-types-generation-2
fschutt Sep 7, 2022
e7e8e9d
Fix errors in BusDataFormat
fschutt Sep 7, 2022
c1e8897
cargo fmt
fschutt Sep 7, 2022
dec63a4
Create build.rs script in wasi-types-generated to auto-generate Rust …
fschutt Sep 7, 2022
ca17477
Finish conversion to autogenerated bindings
fschutt Sep 7, 2022
2c72e6e
cargo fmt
fschutt Sep 7, 2022
cb86205
Port bus.rs to wasi-types-generated
fschutt Sep 7, 2022
d09a2ee
Serialize all wasi-types into one lib.rs file, adjust Oflags
fschutt Sep 8, 2022
1f35d34
cargo fmt
fschutt Sep 8, 2022
e318877
Start porting "net" to wit
fschutt Sep 8, 2022
4e35335
Port signal::Signal
fschutt Sep 8, 2022
daa20bf
Port "net" module to .wit (finished porting wasi-types)
fschutt Sep 8, 2022
914cbee
Merge branch 'master' into wasi-types-generation-2
fschutt Sep 8, 2022
e4d4e86
Fix make test-js
fschutt Sep 8, 2022
639dc05
License wasi-types-generated MIT, comment out build.rs/main
fschutt Sep 8, 2022
64cab33
Merge branch 'master' into wasi-types-generation-2
fschutt Sep 12, 2022
fbdec22
Added custom bindings test for wit-bindgen
fschutt Sep 12, 2022
921fac3
Remove dummy-func (which prevented proper linking) from .wit
fschutt Sep 12, 2022
17431df
Fix "make lint"
fschutt Sep 12, 2022
d2edcd7
Fix "make lint" again
fschutt Sep 12, 2022
8ce1597
Fix wasi-types-generated unit test
fschutt Sep 12, 2022
4e96969
Remove wasi_snapshot0 in favor of wasi
fschutt Sep 12, 2022
b164ea1
Remove unused imports
fschutt Sep 12, 2022
bdd5395
Fix "make lint" again
fschutt Sep 12, 2022
b98b691
Fix compilation issues on Windows
fschutt Sep 12, 2022
280b5ac
Merge branch 'master' into wasi-types-generation-2
fschutt Sep 14, 2022
063c1e7
Update wit-bindgen
fschutt Sep 14, 2022
7549676
Merge branch 'master' into wasi-types-generation-2
fschutt Sep 15, 2022
d9752a9
Update wit-bindgen again (with rev instead of branch)
fschutt Sep 15, 2022
a4e1d06
Update wit-bindgen
fschutt Sep 15, 2022
132e735
Fix dependency issue with wit-bindgen
fschutt Sep 15, 2022
7e3ca70
Use wit-bindgen dependency from crates.io
fschutt Sep 15, 2022
7343449
Update wit-bindgen version
fschutt Sep 15, 2022
9f9a0cd
Regenerate Cargo.lock
fschutt Sep 15, 2022
ac1e980
wit_bindgen_gen_rust_wasm -> wit_bindgen_rust_wasm
fschutt Sep 15, 2022
259e26c
Merge branch 'master' into wasi-types-generation-2
fschutt Sep 22, 2022
ba2606c
Remove unused code, port subscription module
fschutt Sep 22, 2022
4217cf8
Move wasi-types-generated into wasi-types
fschutt Sep 22, 2022
36db57c
cargo fmt
fschutt Sep 22, 2022
3c0386d
Fix "make lint"
fschutt Sep 23, 2022
336c4d9
Correct bitflags: u8 -> bitflags: u16 / u32 / u64
fschutt Sep 26, 2022
c445f1e
Add regex crate
fschutt Sep 26, 2022
43e9d8f
Update wasi-types generator to replace repr(u16) types
fschutt Sep 27, 2022
8340a4b
Merge branch 'master' into wasi-types-generation-2
fschutt Sep 27, 2022
c618db4
Merge branch 'master' into wasi-types-generation-2
fschutt Sep 27, 2022
1397d2f
Merge branch 'master' into wasi-types-generation-2
fschutt Sep 29, 2022
5e049b9
Add doc comment to explain wasi-generator-extra
fschutt Sep 29, 2022
7492a61
Merge branch 'master' into wasi-types-generation-2
fschutt Oct 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
WIP: Rights
  • Loading branch information
silwol committed Aug 17, 2022
commit 293c67f64b79936cf0371741ed03a95f548158f4
22 changes: 21 additions & 1 deletion lib/wasi-types-generated/src/bindings.rs
Original file line number Diff line number Diff line change
@@ -345,7 +345,7 @@ pub mod wasi_snapshot0 {
impl std::error::Error for Errno{}
wit_bindgen_wasmer::bitflags::bitflags! {
/// File descriptor rights, determining which actions may be performed.
pub struct Rights: u32 {/// The right to invoke `fd_datasync`.
pub struct Rights: u64 {/// The right to invoke `fd_datasync`.
///
/// If `rights::path_open` is set, includes the right to invoke
/// `path_open` with `fdflags::dsync`.
@@ -418,6 +418,26 @@ pub mod wasi_snapshot0 {
const POLL_FD_READWRITE = 1 << 27;
/// The right to invoke `sock_shutdown`.
const SOCK_SHUTDOWN = 1 << 28;
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
const SOCK_ACCEPT = 1 << 29;
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
const SOCK_CONNECT = 1 << 30;
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
const SOCK_LISTEN = 1 << 31;
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
const SOCK_BIND = 1 << 32;
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
const SOCK_RECV = 1 << 33;
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
const SOCK_SEND = 1 << 34;
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
const SOCK_ADDR_LOCAL = 1 << 35;
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
const SOCK_ADDR_REMOTE = 1 << 36;
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
const SOCK_RECV_FROM = 1 << 37;
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
const SOCK_SEND_TO = 1 << 38;
}
}

24 changes: 24 additions & 0 deletions lib/wasi-types-generated/src/lib.rs
Original file line number Diff line number Diff line change
@@ -23,6 +23,12 @@ unsafe impl ValueType for wasi_snapshot0::Eventtype {
fn zero_padding_bytes(&self, _bytes: &mut [MaybeUninit<u8>]) {}
}

// TODO: if necessary, must be implemented in wit-bindgen
unsafe impl ValueType for wasi_snapshot0::Rights {
#[inline]
fn zero_padding_bytes(&self, _bytes: &mut [MaybeUninit<u8>]) {}
}

// TODO: if necessary, must be implemented in wit-bindgen
unsafe impl wit_bindgen_wasmer::wasmer::FromToNativeWasmType for wasi_snapshot0::Errno {
type Native = i32;
@@ -147,3 +153,21 @@ unsafe impl wit_bindgen_wasmer::wasmer::FromToNativeWasmType for wasi_snapshot0:
false
}
}

// TODO: if necessary, must be implemented in wit-bindgen
unsafe impl wit_bindgen_wasmer::wasmer::FromToNativeWasmType for wasi_snapshot0::Rights {
type Native = i64;

fn to_native(self) -> Self::Native {
self.bits() as i64
}
fn from_native(n: Self::Native) -> Self {
Self::from_bits_truncate(n as u64)
}

#[cfg(feature = "sys")]
fn is_from_store(&self, _store: &impl wit_bindgen_wasmer::wasmer::AsStoreRef) -> bool {
// TODO: find correct implementation
false
}
}
21 changes: 21 additions & 0 deletions lib/wasi-types-generated/wit/wasi-snapshot0.wit
Original file line number Diff line number Diff line change
@@ -273,6 +273,27 @@ flags rights {
poll-fd-readwrite,
/// The right to invoke `sock_shutdown`.
sock-shutdown,

/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
sock-accept,
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
sock-connect,
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
sock-listen,
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
sock-bind,
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
sock-recv,
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
sock-send,
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
sock-addr-local,
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
sock-addr-remote,
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
sock-recv-from,
/// TODO: Found in wasmer-wasi-types, but not in wasi-snapshot0
sock-send-to,
}

// ;;; A file descriptor handle.
113 changes: 36 additions & 77 deletions lib/wasi-types/src/file.rs
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ use std::{
};
use wasmer_derive::ValueType;
use wasmer_types::ValueType;
use wasmer_wasi_types_generated::wasi_snapshot0;
use wasmer_wasi_types_generated::{wasi_filesystem, wasi_snapshot0};

pub type __wasi_device_t = u64;

@@ -122,8 +122,8 @@ unsafe impl ValueType for __wasi_prestat_t {
pub struct __wasi_fdstat_t {
pub fs_filetype: wasi_snapshot0::Filetype,
pub fs_flags: __wasi_fdflags_t,
pub fs_rights_base: __wasi_rights_t,
pub fs_rights_inheriting: __wasi_rights_t,
pub fs_rights_base: wasi_snapshot0::Rights,
pub fs_rights_inheriting: wasi_snapshot0::Rights,
}

pub type __wasi_filedelta_t = i64;
@@ -225,93 +225,52 @@ pub const __WASI_O_DIRECTORY: __wasi_oflags_t = 1 << 1;
pub const __WASI_O_EXCL: __wasi_oflags_t = 1 << 2;
pub const __WASI_O_TRUNC: __wasi_oflags_t = 1 << 3;

pub type __wasi_rights_t = u64;
pub const __WASI_RIGHT_FD_DATASYNC: __wasi_rights_t = 1 << 0;
pub const __WASI_RIGHT_FD_READ: __wasi_rights_t = 1 << 1;
pub const __WASI_RIGHT_FD_SEEK: __wasi_rights_t = 1 << 2;
pub const __WASI_RIGHT_FD_FDSTAT_SET_FLAGS: __wasi_rights_t = 1 << 3;
pub const __WASI_RIGHT_FD_SYNC: __wasi_rights_t = 1 << 4;
pub const __WASI_RIGHT_FD_TELL: __wasi_rights_t = 1 << 5;
pub const __WASI_RIGHT_FD_WRITE: __wasi_rights_t = 1 << 6;
pub const __WASI_RIGHT_FD_ADVISE: __wasi_rights_t = 1 << 7;
pub const __WASI_RIGHT_FD_ALLOCATE: __wasi_rights_t = 1 << 8;
pub const __WASI_RIGHT_PATH_CREATE_DIRECTORY: __wasi_rights_t = 1 << 9;
pub const __WASI_RIGHT_PATH_CREATE_FILE: __wasi_rights_t = 1 << 10;
pub const __WASI_RIGHT_PATH_LINK_SOURCE: __wasi_rights_t = 1 << 11;
pub const __WASI_RIGHT_PATH_LINK_TARGET: __wasi_rights_t = 1 << 12;
pub const __WASI_RIGHT_PATH_OPEN: __wasi_rights_t = 1 << 13;
pub const __WASI_RIGHT_FD_READDIR: __wasi_rights_t = 1 << 14;
pub const __WASI_RIGHT_PATH_READLINK: __wasi_rights_t = 1 << 15;
pub const __WASI_RIGHT_PATH_RENAME_SOURCE: __wasi_rights_t = 1 << 16;
pub const __WASI_RIGHT_PATH_RENAME_TARGET: __wasi_rights_t = 1 << 17;
pub const __WASI_RIGHT_PATH_FILESTAT_GET: __wasi_rights_t = 1 << 18;
pub const __WASI_RIGHT_PATH_FILESTAT_SET_SIZE: __wasi_rights_t = 1 << 19;
pub const __WASI_RIGHT_PATH_FILESTAT_SET_TIMES: __wasi_rights_t = 1 << 20;
pub const __WASI_RIGHT_FD_FILESTAT_GET: __wasi_rights_t = 1 << 21;
pub const __WASI_RIGHT_FD_FILESTAT_SET_SIZE: __wasi_rights_t = 1 << 22;
pub const __WASI_RIGHT_FD_FILESTAT_SET_TIMES: __wasi_rights_t = 1 << 23;
pub const __WASI_RIGHT_PATH_SYMLINK: __wasi_rights_t = 1 << 24;
pub const __WASI_RIGHT_PATH_REMOVE_DIRECTORY: __wasi_rights_t = 1 << 25;
pub const __WASI_RIGHT_PATH_UNLINK_FILE: __wasi_rights_t = 1 << 26;
pub const __WASI_RIGHT_POLL_FD_READWRITE: __wasi_rights_t = 1 << 27;
pub const __WASI_RIGHT_SOCK_SHUTDOWN: __wasi_rights_t = 1 << 28;
pub const __WASI_RIGHT_SOCK_ACCEPT: __wasi_rights_t = 1 << 29;
pub const __WASI_RIGHT_SOCK_CONNECT: __wasi_rights_t = 1 << 30;
pub const __WASI_RIGHT_SOCK_LISTEN: __wasi_rights_t = 1 << 31;
pub const __WASI_RIGHT_SOCK_BIND: __wasi_rights_t = 1 << 32;
pub const __WASI_RIGHT_SOCK_RECV: __wasi_rights_t = 1 << 33;
pub const __WASI_RIGHT_SOCK_SEND: __wasi_rights_t = 1 << 34;
pub const __WASI_RIGHT_SOCK_ADDR_LOCAL: __wasi_rights_t = 1 << 35;
pub const __WASI_RIGHT_SOCK_ADDR_REMOTE: __wasi_rights_t = 1 << 36;
pub const __WASI_RIGHT_SOCK_RECV_FROM: __wasi_rights_t = 1 << 37;
pub const __WASI_RIGHT_SOCK_SEND_TO: __wasi_rights_t = 1 << 38;

/// function for debugging rights issues
#[allow(dead_code)]
pub fn print_right_set(rights: __wasi_rights_t) {
pub fn print_right_set(rights: wasi_snapshot0::Rights) {
// BTreeSet for consistent order
let mut right_set = std::collections::BTreeSet::new();
for i in 0..28 {
let cur_right = rights & (1 << i);
if cur_right != 0 {
let cur_right = rights & wasi_snapshot0::Rights::from_bits(1 << i).unwrap();
if !cur_right.is_empty() {
right_set.insert(right_to_string(cur_right).unwrap_or("INVALID RIGHT"));
}
}
println!("{:#?}", right_set);
}

/// expects a single right, returns None if out of bounds or > 1 bit set
pub fn right_to_string(right: __wasi_rights_t) -> Option<&'static str> {
pub fn right_to_string(right: wasi_snapshot0::Rights) -> Option<&'static str> {
Some(match right {
__WASI_RIGHT_FD_DATASYNC => "__WASI_RIGHT_FD_DATASYNC",
__WASI_RIGHT_FD_READ => "__WASI_RIGHT_FD_READ",
__WASI_RIGHT_FD_SEEK => "__WASI_RIGHT_FD_SEEK",
__WASI_RIGHT_FD_FDSTAT_SET_FLAGS => "__WASI_RIGHT_FD_FDSTAT_SET_FLAGS",
__WASI_RIGHT_FD_SYNC => "__WASI_RIGHT_FD_SYNC",
__WASI_RIGHT_FD_TELL => "__WASI_RIGHT_FD_TELL",
__WASI_RIGHT_FD_WRITE => "__WASI_RIGHT_FD_WRITE",
__WASI_RIGHT_FD_ADVISE => "__WASI_RIGHT_FD_ADVISE",
__WASI_RIGHT_FD_ALLOCATE => "__WASI_RIGHT_FD_ALLOCATE",
__WASI_RIGHT_PATH_CREATE_DIRECTORY => "__WASI_RIGHT_PATH_CREATE_DIRECTORY",
__WASI_RIGHT_PATH_CREATE_FILE => "__WASI_RIGHT_PATH_CREATE_FILE",
__WASI_RIGHT_PATH_LINK_SOURCE => "__WASI_RIGHT_PATH_LINK_SOURCE",
__WASI_RIGHT_PATH_LINK_TARGET => "__WASI_RIGHT_PATH_LINK_TARGET",
__WASI_RIGHT_PATH_OPEN => "__WASI_RIGHT_PATH_OPEN",
__WASI_RIGHT_FD_READDIR => "__WASI_RIGHT_FD_READDIR",
__WASI_RIGHT_PATH_READLINK => "__WASI_RIGHT_PATH_READLINK",
__WASI_RIGHT_PATH_RENAME_SOURCE => "__WASI_RIGHT_PATH_RENAME_SOURCE",
__WASI_RIGHT_PATH_RENAME_TARGET => "__WASI_RIGHT_PATH_RENAME_TARGET",
__WASI_RIGHT_PATH_FILESTAT_GET => "__WASI_RIGHT_PATH_FILESTAT_GET",
__WASI_RIGHT_PATH_FILESTAT_SET_SIZE => "__WASI_RIGHT_PATH_FILESTAT_SET_SIZE",
__WASI_RIGHT_PATH_FILESTAT_SET_TIMES => "__WASI_RIGHT_PATH_FILESTAT_SET_TIMES",
__WASI_RIGHT_FD_FILESTAT_GET => "__WASI_RIGHT_FD_FILESTAT_GET",
__WASI_RIGHT_FD_FILESTAT_SET_SIZE => "__WASI_RIGHT_FD_FILESTAT_SET_SIZE",
__WASI_RIGHT_FD_FILESTAT_SET_TIMES => "__WASI_RIGHT_FD_FILESTAT_SET_TIMES",
__WASI_RIGHT_PATH_SYMLINK => "__WASI_RIGHT_PATH_SYMLINK",
__WASI_RIGHT_PATH_UNLINK_FILE => "__WASI_RIGHT_PATH_UNLINK_FILE",
__WASI_RIGHT_PATH_REMOVE_DIRECTORY => "__WASI_RIGHT_PATH_REMOVE_DIRECTORY",
__WASI_RIGHT_POLL_FD_READWRITE => "__WASI_RIGHT_POLL_FD_READWRITE",
__WASI_RIGHT_SOCK_SHUTDOWN => "__WASI_RIGHT_SOCK_SHUTDOWN",
wasi_snapshot0::Rights::FD_DATASYNC => "Rights::_FD_DATASYNC",
wasi_snapshot0::Rights::FD_READ => "Rights::FD_READ",
wasi_snapshot0::Rights::FD_SEEK => "Rights::FD_SEEK",
wasi_snapshot0::Rights::FD_FDSTAT_SET_FLAGS => "Rights::FD_FDSTAT_SET_FLAGS",
wasi_snapshot0::Rights::FD_SYNC => "Rights::FD_SYNC",
wasi_snapshot0::Rights::FD_TELL => "Rights::FD_TELL",
wasi_snapshot0::Rights::FD_WRITE => "Rights::FD_WRITE",
wasi_snapshot0::Rights::FD_ADVISE => "Rights::FD_ADVISE",
wasi_snapshot0::Rights::FD_ALLOCATE => "Rights::FD_ALLOCATE",
wasi_snapshot0::Rights::PATH_CREATE_DIRECTORY => "Rights::PATH_CREATE_DIRECTORY",
wasi_snapshot0::Rights::PATH_CREATE_FILE => "Rights::PATH_CREATE_FILE",
wasi_snapshot0::Rights::PATH_LINK_SOURCE => "Rights::PATH_LINK_SOURCE",
wasi_snapshot0::Rights::PATH_LINK_TARGET => "Rights::PATH_LINK_TARGET",
wasi_snapshot0::Rights::PATH_OPEN => "Rights::PATH_OPEN",
wasi_snapshot0::Rights::FD_READDIR => "Rights::FD_READDIR",
wasi_snapshot0::Rights::PATH_READLINK => "Rights::PATH_READLINK",
wasi_snapshot0::Rights::PATH_RENAME_SOURCE => "Rights::PATH_RENAME_SOURCE",
wasi_snapshot0::Rights::PATH_RENAME_TARGET => "Rights::PATH_RENAME_TARGET",
wasi_snapshot0::Rights::PATH_FILESTAT_GET => "Rights::PATH_FILESTAT_GET",
wasi_snapshot0::Rights::PATH_FILESTAT_SET_SIZE => "Rights::PATH_FILESTAT_SET_SIZE",
wasi_snapshot0::Rights::PATH_FILESTAT_SET_TIMES => "Rights::PATH_FILESTAT_SET_TIMES",
wasi_snapshot0::Rights::FD_FILESTAT_GET => "Rights::FD_FILESTAT_GET",
wasi_snapshot0::Rights::FD_FILESTAT_SET_SIZE => "Rights::FD_FILESTAT_SET_SIZE",
wasi_snapshot0::Rights::FD_FILESTAT_SET_TIMES => "Rights::FD_FILESTAT_SET_TIMES",
wasi_snapshot0::Rights::PATH_SYMLINK => "Rights::PATH_SYMLINK",
wasi_snapshot0::Rights::PATH_UNLINK_FILE => "Rights::PATH_UNLINK_FILE",
wasi_snapshot0::Rights::PATH_REMOVE_DIRECTORY => "Rights::PATH_REMOVE_DIRECTORY",
wasi_snapshot0::Rights::POLL_FD_READWRITE => "Rights::POLL_FD_READWRITE",
wasi_snapshot0::Rights::SOCK_SHUTDOWN => "Rights::SOCK_SHUTDOWN",
_ => return None,
})
}
Loading