pub struct WasiP1Ctx { /* private fields */ }p1 only.Expand description
Structure containing state for WASIp1.
This structure is created through WasiCtxBuilder::build_p1 and is
configured through the various methods of WasiCtxBuilder. This structure
itself implements generated traits for WASIp1 as well as WasiView to
have access to WASIp2.
Instances of WasiP1Ctx are typically stored within the T of
Store<T>.
§Examples
use wasmtime::{Result, Linker};
use wasmtime_wasi::p1::{self, WasiP1Ctx};
use wasmtime_wasi::WasiCtxBuilder;
struct MyState {
// ... custom state as necessary ...
wasi: WasiP1Ctx,
}
impl MyState {
fn new() -> MyState {
MyState {
// .. initialize custom state if needed ..
wasi: WasiCtxBuilder::new()
.arg("./foo.wasm")
// .. more customization if necessary ..
.build_p1(),
}
}
}
fn add_to_linker(linker: &mut Linker<MyState>) -> Result<()> {
p1::add_to_linker_sync(linker, |my_state| &mut my_state.wasi)?;
Ok(())
}Trait Implementations§
Source§impl WasiSnapshotPreview1 for WasiP1Ctx
impl WasiSnapshotPreview1 for WasiP1Ctx
Source§fn fd_allocate(
&mut self,
_memory: &mut GuestMemory<'_>,
fd: Fd,
_offset: Filesize,
_len: Filesize,
) -> Result<(), Error>
fn fd_allocate( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, _offset: Filesize, _len: Filesize, ) -> Result<(), Error>
Force the allocation of space in a file.
NOTE: This is similar to posix_fallocate in POSIX.
Source§async fn fd_close(
&mut self,
_memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<(), Error>
async fn fd_close( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<(), Error>
Close a file descriptor.
NOTE: This is similar to close in POSIX.
Source§async fn fd_datasync(
&mut self,
_memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<(), Error>
async fn fd_datasync( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<(), Error>
Synchronize the data of a file to disk.
NOTE: This is similar to fdatasync in POSIX.
Source§async fn fd_fdstat_get(
&mut self,
_memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<Fdstat, Error>
async fn fd_fdstat_get( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<Fdstat, Error>
Get the attributes of a file descriptor.
NOTE: This returns similar flags to fsync(fd, F_GETFL) in POSIX, as well as additional fields.
Source§fn fd_fdstat_set_flags(
&mut self,
_memory: &mut GuestMemory<'_>,
fd: Fd,
flags: Fdflags,
) -> Result<(), Error>
fn fd_fdstat_set_flags( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, flags: Fdflags, ) -> Result<(), Error>
Adjust the flags associated with a file descriptor.
NOTE: This is similar to fcntl(fd, F_SETFL, flags) in POSIX.
Source§fn fd_fdstat_set_rights(
&mut self,
_memory: &mut GuestMemory<'_>,
fd: Fd,
_fs_rights_base: Rights,
_fs_rights_inheriting: Rights,
) -> Result<(), Error>
fn fd_fdstat_set_rights( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, _fs_rights_base: Rights, _fs_rights_inheriting: Rights, ) -> Result<(), Error>
Does not do anything if fd corresponds to a valid descriptor and returns [types::Errno::Badf] error otherwise.
Source§async fn fd_filestat_get(
&mut self,
_memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<Filestat, Error>
async fn fd_filestat_get( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<Filestat, Error>
Return the attributes of an open file.
Source§async fn fd_filestat_set_size(
&mut self,
_memory: &mut GuestMemory<'_>,
fd: Fd,
size: Filesize,
) -> Result<(), Error>
async fn fd_filestat_set_size( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, size: Filesize, ) -> Result<(), Error>
Adjust the size of an open file. If this increases the file’s size, the extra bytes are filled with zeros.
NOTE: This is similar to ftruncate in POSIX.
Source§async fn fd_filestat_set_times(
&mut self,
_memory: &mut GuestMemory<'_>,
fd: Fd,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags,
) -> Result<(), Error>
async fn fd_filestat_set_times( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, atim: Timestamp, mtim: Timestamp, fst_flags: Fstflags, ) -> Result<(), Error>
Adjust the timestamps of an open file or directory.
NOTE: This is similar to futimens in POSIX.
Source§async fn fd_read(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
iovs: IovecArray,
) -> Result<Size, Error>
async fn fd_read( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, iovs: IovecArray, ) -> Result<Size, Error>
Read from a file descriptor.
NOTE: This is similar to readv in POSIX.
Source§async fn fd_pread(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
iovs: IovecArray,
offset: Filesize,
) -> Result<Size, Error>
async fn fd_pread( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, iovs: IovecArray, offset: Filesize, ) -> Result<Size, Error>
Read from a file descriptor, without using and updating the file descriptor’s offset.
NOTE: This is similar to preadv in POSIX.
Source§async fn fd_write(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
ciovs: CiovecArray,
) -> Result<Size, Error>
async fn fd_write( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, ciovs: CiovecArray, ) -> Result<Size, Error>
Write to a file descriptor.
NOTE: This is similar to writev in POSIX.
Source§async fn fd_pwrite(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
ciovs: CiovecArray,
offset: Filesize,
) -> Result<Size, Error>
async fn fd_pwrite( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, ciovs: CiovecArray, offset: Filesize, ) -> Result<Size, Error>
Write to a file descriptor, without using and updating the file descriptor’s offset.
NOTE: This is similar to pwritev in POSIX.
Source§fn fd_prestat_get(
&mut self,
_memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<Prestat, Error>
fn fd_prestat_get( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<Prestat, Error>
Return a description of the given preopened file descriptor.
Source§fn fd_prestat_dir_name(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
path: GuestPtr<u8>,
path_max_len: Size,
) -> Result<(), Error>
fn fd_prestat_dir_name( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, path: GuestPtr<u8>, path_max_len: Size, ) -> Result<(), Error>
Return a description of the given preopened file descriptor.
Source§fn fd_renumber(
&mut self,
_memory: &mut GuestMemory<'_>,
from: Fd,
to: Fd,
) -> Result<(), Error>
fn fd_renumber( &mut self, _memory: &mut GuestMemory<'_>, from: Fd, to: Fd, ) -> Result<(), Error>
Atomically replace a file descriptor by renumbering another file descriptor.
Source§async fn fd_seek(
&mut self,
_memory: &mut GuestMemory<'_>,
fd: Fd,
offset: Filedelta,
whence: Whence,
) -> Result<Filesize, Error>
async fn fd_seek( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, offset: Filedelta, whence: Whence, ) -> Result<Filesize, Error>
Move the offset of a file descriptor.
NOTE: This is similar to lseek in POSIX.
Source§async fn fd_sync(
&mut self,
_memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<(), Error>
async fn fd_sync( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<(), Error>
Synchronize the data and metadata of a file to disk.
NOTE: This is similar to fsync in POSIX.
Source§fn fd_tell(
&mut self,
_memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<Filesize, Error>
fn fd_tell( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<Filesize, Error>
Return the current offset of a file descriptor.
NOTE: This is similar to lseek(fd, 0, SEEK_CUR) in POSIX.
Source§async fn path_filestat_get(
&mut self,
memory: &mut GuestMemory<'_>,
dirfd: Fd,
flags: Lookupflags,
path: GuestPtr<str>,
) -> Result<Filestat, Error>
async fn path_filestat_get( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, flags: Lookupflags, path: GuestPtr<str>, ) -> Result<Filestat, Error>
Return the attributes of a file or directory.
NOTE: This is similar to stat in POSIX.
Source§async fn path_filestat_set_times(
&mut self,
memory: &mut GuestMemory<'_>,
dirfd: Fd,
flags: Lookupflags,
path: GuestPtr<str>,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags,
) -> Result<(), Error>
async fn path_filestat_set_times( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, flags: Lookupflags, path: GuestPtr<str>, atim: Timestamp, mtim: Timestamp, fst_flags: Fstflags, ) -> Result<(), Error>
Adjust the timestamps of a file or directory.
NOTE: This is similar to utimensat in POSIX.
Source§async fn path_link(
&mut self,
memory: &mut GuestMemory<'_>,
src_fd: Fd,
src_flags: Lookupflags,
src_path: GuestPtr<str>,
target_fd: Fd,
target_path: GuestPtr<str>,
) -> Result<(), Error>
async fn path_link( &mut self, memory: &mut GuestMemory<'_>, src_fd: Fd, src_flags: Lookupflags, src_path: GuestPtr<str>, target_fd: Fd, target_path: GuestPtr<str>, ) -> Result<(), Error>
Create a hard link.
NOTE: This is similar to linkat in POSIX.
Source§async fn path_open(
&mut self,
memory: &mut GuestMemory<'_>,
dirfd: Fd,
dirflags: Lookupflags,
path: GuestPtr<str>,
oflags: Oflags,
fs_rights_base: Rights,
_fs_rights_inheriting: Rights,
fdflags: Fdflags,
) -> Result<Fd, Error>
async fn path_open( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, dirflags: Lookupflags, path: GuestPtr<str>, oflags: Oflags, fs_rights_base: Rights, _fs_rights_inheriting: Rights, fdflags: Fdflags, ) -> Result<Fd, Error>
Open a file or directory.
NOTE: This is similar to openat in POSIX.
Source§async fn path_readlink(
&mut self,
memory: &mut GuestMemory<'_>,
dirfd: Fd,
path: GuestPtr<str>,
buf: GuestPtr<u8>,
buf_len: Size,
) -> Result<Size, Error>
async fn path_readlink( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, path: GuestPtr<str>, buf: GuestPtr<u8>, buf_len: Size, ) -> Result<Size, Error>
Read the contents of a symbolic link.
NOTE: This is similar to readlinkat in POSIX.
Source§async fn path_rename(
&mut self,
memory: &mut GuestMemory<'_>,
src_fd: Fd,
src_path: GuestPtr<str>,
dest_fd: Fd,
dest_path: GuestPtr<str>,
) -> Result<(), Error>
async fn path_rename( &mut self, memory: &mut GuestMemory<'_>, src_fd: Fd, src_path: GuestPtr<str>, dest_fd: Fd, dest_path: GuestPtr<str>, ) -> Result<(), Error>
Rename a file or directory.
NOTE: This is similar to renameat in POSIX.
fn args_get( &mut self, memory: &mut GuestMemory<'_>, argv: GuestPtr<GuestPtr<u8>>, argv_buf: GuestPtr<u8>, ) -> Result<(), Error>
fn args_sizes_get( &mut self, _memory: &mut GuestMemory<'_>, ) -> Result<(Size, Size), Error>
fn environ_get( &mut self, memory: &mut GuestMemory<'_>, environ: GuestPtr<GuestPtr<u8>>, environ_buf: GuestPtr<u8>, ) -> Result<(), Error>
fn environ_sizes_get( &mut self, _memory: &mut GuestMemory<'_>, ) -> Result<(Size, Size), Error>
fn clock_res_get( &mut self, _memory: &mut GuestMemory<'_>, id: Clockid, ) -> Result<Timestamp, Error>
fn clock_time_get( &mut self, _memory: &mut GuestMemory<'_>, id: Clockid, _precision: Timestamp, ) -> Result<Timestamp, Error>
async fn fd_advise( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, offset: Filesize, len: Filesize, advice: Advice, ) -> Result<(), Error>
async fn fd_readdir( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, buf: GuestPtr<u8>, buf_len: Size, cookie: Dircookie, ) -> Result<Size, Error>
async fn path_create_directory( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, path: GuestPtr<str>, ) -> Result<(), Error>
async fn path_remove_directory( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, path: GuestPtr<str>, ) -> Result<(), Error>
async fn path_symlink( &mut self, memory: &mut GuestMemory<'_>, src_path: GuestPtr<str>, dirfd: Fd, dest_path: GuestPtr<str>, ) -> Result<(), Error>
async fn path_unlink_file( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, path: GuestPtr<str>, ) -> Result<(), Error>
async fn poll_oneoff( &mut self, memory: &mut GuestMemory<'_>, subs: GuestPtr<Subscription>, events: GuestPtr<Event>, nsubscriptions: Size, ) -> Result<Size, Error>
fn proc_exit( &mut self, _memory: &mut GuestMemory<'_>, status: Exitcode, ) -> Error
fn proc_raise( &mut self, _memory: &mut GuestMemory<'_>, _sig: Signal, ) -> Result<(), Error>
fn sched_yield(&mut self, _memory: &mut GuestMemory<'_>) -> Result<(), Error>
fn random_get( &mut self, memory: &mut GuestMemory<'_>, buf: GuestPtr<u8>, buf_len: Size, ) -> Result<(), Error>
fn sock_accept( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, flags: Fdflags, ) -> Result<Fd, Error>
fn sock_recv( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, ri_data: IovecArray, ri_flags: Riflags, ) -> Result<(Size, Roflags), Error>
fn sock_send( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, si_data: CiovecArray, _si_flags: Siflags, ) -> Result<Size, Error>
fn sock_shutdown( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, how: Sdflags, ) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for WasiP1Ctx
impl !RefUnwindSafe for WasiP1Ctx
impl Send for WasiP1Ctx
impl !Sync for WasiP1Ctx
impl Unpin for WasiP1Ctx
impl !UnwindSafe for WasiP1Ctx
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Pointee for T
impl<T> Pointee for T
Source§impl<T> WasiCliView for Twhere
T: WasiView,
impl<T> WasiCliView for Twhere
T: WasiView,
fn cli(&mut self) -> WasiCliCtxView<'_>
Source§impl<T> WasiClocksView for Twhere
T: WasiView,
impl<T> WasiClocksView for Twhere
T: WasiView,
fn clocks(&mut self) -> WasiClocksCtxView<'_>
Source§impl<T> WasiFilesystemView for Twhere
T: WasiView,
impl<T> WasiFilesystemView for Twhere
T: WasiView,
fn filesystem(&mut self) -> WasiFilesystemCtxView<'_>
Source§impl<T> WasiRandomView for Twhere
T: WasiView,
impl<T> WasiRandomView for Twhere
T: WasiView,
fn random(&mut self) -> &mut WasiRandomCtx
Source§impl<T> WasiSocketsView for Twhere
T: WasiView,
impl<T> WasiSocketsView for Twhere
T: WasiView,
fn sockets(&mut self) -> WasiSocketsCtxView<'_>
Source§impl<T> WasiUnstable for Twhere
T: WasiSnapshotPreview1 + Send,
impl<T> WasiUnstable for Twhere
T: WasiSnapshotPreview1 + Send,
Source§fn args_get(
&mut self,
memory: &mut GuestMemory<'_>,
argv: GuestPtr<GuestPtr<u8>>,
argv_buf: GuestPtr<u8>,
) -> Result<(), Error>
fn args_get( &mut self, memory: &mut GuestMemory<'_>, argv: GuestPtr<GuestPtr<u8>>, argv_buf: GuestPtr<u8>, ) -> Result<(), Error>
p1 only.Source§fn args_sizes_get(
&mut self,
memory: &mut GuestMemory<'_>,
) -> Result<(u32, u32), Error>
fn args_sizes_get( &mut self, memory: &mut GuestMemory<'_>, ) -> Result<(u32, u32), Error>
p1 only.Source§fn environ_get(
&mut self,
memory: &mut GuestMemory<'_>,
environ: GuestPtr<GuestPtr<u8>>,
environ_buf: GuestPtr<u8>,
) -> Result<(), Error>
fn environ_get( &mut self, memory: &mut GuestMemory<'_>, environ: GuestPtr<GuestPtr<u8>>, environ_buf: GuestPtr<u8>, ) -> Result<(), Error>
p1 only.Source§fn environ_sizes_get(
&mut self,
memory: &mut GuestMemory<'_>,
) -> Result<(u32, u32), Error>
fn environ_sizes_get( &mut self, memory: &mut GuestMemory<'_>, ) -> Result<(u32, u32), Error>
p1 only.Source§fn clock_res_get(
&mut self,
memory: &mut GuestMemory<'_>,
id: Clockid,
) -> Result<u64, Error>
fn clock_res_get( &mut self, memory: &mut GuestMemory<'_>, id: Clockid, ) -> Result<u64, Error>
p1 only.Source§fn clock_time_get(
&mut self,
memory: &mut GuestMemory<'_>,
id: Clockid,
precision: u64,
) -> Result<u64, Error>
fn clock_time_get( &mut self, memory: &mut GuestMemory<'_>, id: Clockid, precision: u64, ) -> Result<u64, Error>
p1 only.Source§async fn fd_advise(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
offset: u64,
len: u64,
advice: Advice,
) -> Result<(), Error>
async fn fd_advise( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, offset: u64, len: u64, advice: Advice, ) -> Result<(), Error>
p1 only.Source§fn fd_allocate(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
offset: u64,
len: u64,
) -> Result<(), Error>
fn fd_allocate( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, offset: u64, len: u64, ) -> Result<(), Error>
p1 only.Source§async fn fd_close(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<(), Error>
async fn fd_close( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<(), Error>
p1 only.Source§async fn fd_datasync(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<(), Error>
async fn fd_datasync( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<(), Error>
p1 only.Source§async fn fd_fdstat_get(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<Fdstat, Error>
async fn fd_fdstat_get( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<Fdstat, Error>
p1 only.Source§fn fd_fdstat_set_flags(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
flags: Fdflags,
) -> Result<(), Error>
fn fd_fdstat_set_flags( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, flags: Fdflags, ) -> Result<(), Error>
p1 only.Source§fn fd_fdstat_set_rights(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
fs_rights_base: Rights,
fs_rights_inheriting: Rights,
) -> Result<(), Error>
fn fd_fdstat_set_rights( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, fs_rights_base: Rights, fs_rights_inheriting: Rights, ) -> Result<(), Error>
p1 only.Source§async fn fd_filestat_get(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<Filestat, Error>
async fn fd_filestat_get( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<Filestat, Error>
p1 only.Source§async fn fd_filestat_set_size(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
size: u64,
) -> Result<(), Error>
async fn fd_filestat_set_size( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, size: u64, ) -> Result<(), Error>
p1 only.Source§async fn fd_filestat_set_times(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
atim: u64,
mtim: u64,
fst_flags: Fstflags,
) -> Result<(), Error>
async fn fd_filestat_set_times( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, atim: u64, mtim: u64, fst_flags: Fstflags, ) -> Result<(), Error>
p1 only.Source§async fn fd_read(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
iovs: GuestPtr<[Iovec]>,
) -> Result<u32, Error>
async fn fd_read( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, iovs: GuestPtr<[Iovec]>, ) -> Result<u32, Error>
p1 only.Source§async fn fd_pread(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
iovs: GuestPtr<[Iovec]>,
offset: u64,
) -> Result<u32, Error>
async fn fd_pread( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, iovs: GuestPtr<[Iovec]>, offset: u64, ) -> Result<u32, Error>
p1 only.Source§async fn fd_write(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
ciovs: GuestPtr<[Ciovec]>,
) -> Result<u32, Error>
async fn fd_write( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, ciovs: GuestPtr<[Ciovec]>, ) -> Result<u32, Error>
p1 only.Source§async fn fd_pwrite(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
ciovs: GuestPtr<[Ciovec]>,
offset: u64,
) -> Result<u32, Error>
async fn fd_pwrite( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, ciovs: GuestPtr<[Ciovec]>, offset: u64, ) -> Result<u32, Error>
p1 only.Source§fn fd_prestat_get(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<Prestat, Error>
fn fd_prestat_get( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<Prestat, Error>
p1 only.Source§fn fd_prestat_dir_name(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
path: GuestPtr<u8>,
path_max_len: u32,
) -> Result<(), Error>
fn fd_prestat_dir_name( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, path: GuestPtr<u8>, path_max_len: u32, ) -> Result<(), Error>
p1 only.Source§fn fd_renumber(
&mut self,
memory: &mut GuestMemory<'_>,
from: Fd,
to: Fd,
) -> Result<(), Error>
fn fd_renumber( &mut self, memory: &mut GuestMemory<'_>, from: Fd, to: Fd, ) -> Result<(), Error>
p1 only.Source§async fn fd_seek(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
offset: i64,
whence: Whence,
) -> Result<u64, Error>
async fn fd_seek( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, offset: i64, whence: Whence, ) -> Result<u64, Error>
p1 only.Source§async fn fd_sync(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<(), Error>
async fn fd_sync( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<(), Error>
p1 only.Source§fn fd_tell(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<u64, Error>
fn fd_tell( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<u64, Error>
p1 only.Source§async fn fd_readdir(
&mut self,
memory: &mut GuestMemory<'_>,
fd: Fd,
buf: GuestPtr<u8>,
buf_len: u32,
cookie: u64,
) -> Result<u32, Error>
async fn fd_readdir( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, buf: GuestPtr<u8>, buf_len: u32, cookie: u64, ) -> Result<u32, Error>
p1 only.Source§async fn path_create_directory(
&mut self,
memory: &mut GuestMemory<'_>,
dirfd: Fd,
path: GuestPtr<str>,
) -> Result<(), Error>
async fn path_create_directory( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, path: GuestPtr<str>, ) -> Result<(), Error>
p1 only.Source§async fn path_filestat_get(
&mut self,
memory: &mut GuestMemory<'_>,
dirfd: Fd,
flags: Lookupflags,
path: GuestPtr<str>,
) -> Result<Filestat, Error>
async fn path_filestat_get( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, flags: Lookupflags, path: GuestPtr<str>, ) -> Result<Filestat, Error>
p1 only.Source§async fn path_filestat_set_times(
&mut self,
memory: &mut GuestMemory<'_>,
dirfd: Fd,
flags: Lookupflags,
path: GuestPtr<str>,
atim: u64,
mtim: u64,
fst_flags: Fstflags,
) -> Result<(), Error>
async fn path_filestat_set_times( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, flags: Lookupflags, path: GuestPtr<str>, atim: u64, mtim: u64, fst_flags: Fstflags, ) -> Result<(), Error>
p1 only.Source§async fn path_link(
&mut self,
memory: &mut GuestMemory<'_>,
src_fd: Fd,
src_flags: Lookupflags,
src_path: GuestPtr<str>,
target_fd: Fd,
target_path: GuestPtr<str>,
) -> Result<(), Error>
async fn path_link( &mut self, memory: &mut GuestMemory<'_>, src_fd: Fd, src_flags: Lookupflags, src_path: GuestPtr<str>, target_fd: Fd, target_path: GuestPtr<str>, ) -> Result<(), Error>
p1 only.Source§async fn path_open(
&mut self,
memory: &mut GuestMemory<'_>,
dirfd: Fd,
dirflags: Lookupflags,
path: GuestPtr<str>,
oflags: Oflags,
fs_rights_base: Rights,
fs_rights_inheriting: Rights,
fdflags: Fdflags,
) -> Result<Fd, Error>
async fn path_open( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, dirflags: Lookupflags, path: GuestPtr<str>, oflags: Oflags, fs_rights_base: Rights, fs_rights_inheriting: Rights, fdflags: Fdflags, ) -> Result<Fd, Error>
p1 only.Source§async fn path_readlink(
&mut self,
memory: &mut GuestMemory<'_>,
dirfd: Fd,
path: GuestPtr<str>,
buf: GuestPtr<u8>,
buf_len: u32,
) -> Result<u32, Error>
async fn path_readlink( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, path: GuestPtr<str>, buf: GuestPtr<u8>, buf_len: u32, ) -> Result<u32, Error>
p1 only.Source§async fn path_remove_directory(
&mut self,
memory: &mut GuestMemory<'_>,
dirfd: Fd,
path: GuestPtr<str>,
) -> Result<(), Error>
async fn path_remove_directory( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, path: GuestPtr<str>, ) -> Result<(), Error>
p1 only.Source§async fn path_rename(
&mut self,
memory: &mut GuestMemory<'_>,
src_fd: Fd,
src_path: GuestPtr<str>,
dest_fd: Fd,
dest_path: GuestPtr<str>,
) -> Result<(), Error>
async fn path_rename( &mut self, memory: &mut GuestMemory<'_>, src_fd: Fd, src_path: GuestPtr<str>, dest_fd: Fd, dest_path: GuestPtr<str>, ) -> Result<(), Error>
p1 only.Source§async fn path_symlink(
&mut self,
memory: &mut GuestMemory<'_>,
src_path: GuestPtr<str>,
dirfd: Fd,
dest_path: GuestPtr<str>,
) -> Result<(), Error>
async fn path_symlink( &mut self, memory: &mut GuestMemory<'_>, src_path: GuestPtr<str>, dirfd: Fd, dest_path: GuestPtr<str>, ) -> Result<(), Error>
p1 only.Source§async fn path_unlink_file(
&mut self,
memory: &mut GuestMemory<'_>,
dirfd: Fd,
path: GuestPtr<str>,
) -> Result<(), Error>
async fn path_unlink_file( &mut self, memory: &mut GuestMemory<'_>, dirfd: Fd, path: GuestPtr<str>, ) -> Result<(), Error>
p1 only.Source§async fn poll_oneoff(
&mut self,
memory: &mut GuestMemory<'_>,
subs: GuestPtr<Subscription>,
events: GuestPtr<Event>,
nsubscriptions: u32,
) -> Result<u32, Error>
async fn poll_oneoff( &mut self, memory: &mut GuestMemory<'_>, subs: GuestPtr<Subscription>, events: GuestPtr<Event>, nsubscriptions: u32, ) -> Result<u32, Error>
p1 only.Source§fn proc_exit(&mut self, memory: &mut GuestMemory<'_>, status: u32) -> Error
fn proc_exit(&mut self, memory: &mut GuestMemory<'_>, status: u32) -> Error
p1 only.Source§fn proc_raise(
&mut self,
memory: &mut GuestMemory<'_>,
sig: Signal,
) -> Result<(), Error>
fn proc_raise( &mut self, memory: &mut GuestMemory<'_>, sig: Signal, ) -> Result<(), Error>
p1 only.Source§fn sched_yield(&mut self, memory: &mut GuestMemory<'_>) -> Result<(), Error>
fn sched_yield(&mut self, memory: &mut GuestMemory<'_>) -> Result<(), Error>
p1 only.Source§fn random_get(
&mut self,
memory: &mut GuestMemory<'_>,
buf: GuestPtr<u8>,
buf_len: u32,
) -> Result<(), Error>
fn random_get( &mut self, memory: &mut GuestMemory<'_>, buf: GuestPtr<u8>, buf_len: u32, ) -> Result<(), Error>
p1 only.Source§fn sock_recv(
&mut self,
_memory: &mut GuestMemory<'_>,
_fd: Fd,
_ri_data: GuestPtr<[Iovec]>,
_ri_flags: Riflags,
) -> Result<(u32, Roflags), Error>
fn sock_recv( &mut self, _memory: &mut GuestMemory<'_>, _fd: Fd, _ri_data: GuestPtr<[Iovec]>, _ri_flags: Riflags, ) -> Result<(u32, Roflags), Error>
p1 only.