diff --git a/.lock b/.lock new file mode 100644 index 000000000..e69de29bb diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/async_wasi/all.html b/async_wasi/all.html new file mode 100644 index 000000000..dc25004d8 --- /dev/null +++ b/async_wasi/all.html @@ -0,0 +1 @@ +List of all items in this crate

List of all items

Structs

Enums

Unions

Traits

Functions

Type Aliases

Constants

\ No newline at end of file diff --git a/async_wasi/index.html b/async_wasi/index.html new file mode 100644 index 000000000..0457ee66a --- /dev/null +++ b/async_wasi/index.html @@ -0,0 +1,6 @@ +async_wasi - Rust

Crate async_wasi

Source
Expand description

The async-wasi crate implements WASI spec for the asynchronous scenarios.

+

See also

+ +

Re-exports§

Modules§

\ No newline at end of file diff --git a/async_wasi/sidebar-items.js b/async_wasi/sidebar-items.js new file mode 100644 index 000000000..d4c364576 --- /dev/null +++ b/async_wasi/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["snapshots"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/clock/fn.wasi_clock_res_get.html b/async_wasi/snapshots/common/clock/fn.wasi_clock_res_get.html new file mode 100644 index 000000000..018e1f5dc --- /dev/null +++ b/async_wasi/snapshots/common/clock/fn.wasi_clock_res_get.html @@ -0,0 +1 @@ +wasi_clock_res_get in async_wasi::snapshots::common::clock - Rust
async_wasi::snapshots::common::clock

Function wasi_clock_res_get

Source
pub fn wasi_clock_res_get(clock_id: Type) -> Result<u64, Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/common/clock/fn.wasi_clock_time_get.html b/async_wasi/snapshots/common/clock/fn.wasi_clock_time_get.html new file mode 100644 index 000000000..913c9d385 --- /dev/null +++ b/async_wasi/snapshots/common/clock/fn.wasi_clock_time_get.html @@ -0,0 +1,5 @@ +wasi_clock_time_get in async_wasi::snapshots::common::clock - Rust
async_wasi::snapshots::common::clock

Function wasi_clock_time_get

Source
pub fn wasi_clock_time_get(
+    ctx: &WasiCtx,
+    clock_id: Type,
+    _precision: __wasi_timestamp_t,
+) -> Result<u64, Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/common/clock/index.html b/async_wasi/snapshots/common/clock/index.html new file mode 100644 index 000000000..c70ea2974 --- /dev/null +++ b/async_wasi/snapshots/common/clock/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::clock - Rust
async_wasi::snapshots::common

Module clock

Source

Functions§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/clock/sidebar-items.js b/async_wasi/snapshots/common/clock/sidebar-items.js new file mode 100644 index 000000000..145e1b8e0 --- /dev/null +++ b/async_wasi/snapshots/common/clock/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["wasi_clock_res_get","wasi_clock_time_get"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/error/index.html b/async_wasi/snapshots/common/error/index.html new file mode 100644 index 000000000..54962e616 --- /dev/null +++ b/async_wasi/snapshots/common/error/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::error - Rust
async_wasi::snapshots::common

Module error

Source

Re-exports§

Structs§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/error/sidebar-items.js b/async_wasi/snapshots/common/error/sidebar-items.js new file mode 100644 index 000000000..773c55bf9 --- /dev/null +++ b/async_wasi/snapshots/common/error/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Errno"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/error/struct.Errno.html b/async_wasi/snapshots/common/error/struct.Errno.html new file mode 100644 index 000000000..1222cbc0c --- /dev/null +++ b/async_wasi/snapshots/common/error/struct.Errno.html @@ -0,0 +1,14 @@ +Errno in async_wasi::snapshots::common::error - Rust
async_wasi::snapshots::common::error

Struct Errno

Source
pub struct Errno(pub Type);

Tuple Fields§

§0: Type

Implementations§

Source§

impl Errno

Source

pub const __WASI_ERRNO_SUCCESS: Errno = _

Source

pub const __WASI_ERRNO_2BIG: Errno = _

Source

pub const __WASI_ERRNO_ACCES: Errno = _

Source

pub const __WASI_ERRNO_ADDRINUSE: Errno = _

Source

pub const __WASI_ERRNO_ADDRNOTAVAIL: Errno = _

Source

pub const __WASI_ERRNO_AFNOSUPPORT: Errno = _

Source

pub const __WASI_ERRNO_AGAIN: Errno = _

Source

pub const __WASI_ERRNO_ALREADY: Errno = _

Source

pub const __WASI_ERRNO_BADF: Errno = _

Source

pub const __WASI_ERRNO_BADMSG: Errno = _

Source

pub const __WASI_ERRNO_BUSY: Errno = _

Source

pub const __WASI_ERRNO_CANCELED: Errno = _

Source

pub const __WASI_ERRNO_CHILD: Errno = _

Source

pub const __WASI_ERRNO_CONNABORTED: Errno = _

Source

pub const __WASI_ERRNO_CONNREFUSED: Errno = _

Source

pub const __WASI_ERRNO_CONNRESET: Errno = _

Source

pub const __WASI_ERRNO_DEADLK: Errno = _

Source

pub const __WASI_ERRNO_DESTADDRREQ: Errno = _

Source

pub const __WASI_ERRNO_DOM: Errno = _

Source

pub const __WASI_ERRNO_DQUOT: Errno = _

Source

pub const __WASI_ERRNO_EXIST: Errno = _

Source

pub const __WASI_ERRNO_FAULT: Errno = _

Source

pub const __WASI_ERRNO_FBIG: Errno = _

Source

pub const __WASI_ERRNO_HOSTUNREACH: Errno = _

Source

pub const __WASI_ERRNO_IDRM: Errno = _

Source

pub const __WASI_ERRNO_ILSEQ: Errno = _

Source

pub const __WASI_ERRNO_INPROGRESS: Errno = _

Source

pub const __WASI_ERRNO_INTR: Errno = _

Source

pub const __WASI_ERRNO_INVAL: Errno = _

Source

pub const __WASI_ERRNO_IO: Errno = _

Source

pub const __WASI_ERRNO_ISCONN: Errno = _

Source

pub const __WASI_ERRNO_ISDIR: Errno = _

Source

pub const __WASI_ERRNO_LOOP: Errno = _

Source

pub const __WASI_ERRNO_MFILE: Errno = _

Source

pub const __WASI_ERRNO_MSGSIZE: Errno = _

Source

pub const __WASI_ERRNO_MULTIHOP: Errno = _

Source

pub const __WASI_ERRNO_NAMETOOLONG: Errno = _

Source

pub const __WASI_ERRNO_NETDOWN: Errno = _

Source

pub const __WASI_ERRNO_NETRESET: Errno = _

Source

pub const __WASI_ERRNO_NETUNREACH: Errno = _

Source

pub const __WASI_ERRNO_NFILE: Errno = _

Source

pub const __WASI_ERRNO_NOBUFS: Errno = _

Source

pub const __WASI_ERRNO_NODEV: Errno = _

Source

pub const __WASI_ERRNO_NOENT: Errno = _

Source

pub const __WASI_ERRNO_NOEXEC: Errno = _

Source

pub const __WASI_ERRNO_NOLCK: Errno = _

Source

pub const __WASI_ERRNO_NOMEM: Errno = _

Source

pub const __WASI_ERRNO_NOMSG: Errno = _

Source

pub const __WASI_ERRNO_NOPROTOOPT: Errno = _

Source

pub const __WASI_ERRNO_NOSPC: Errno = _

Source

pub const __WASI_ERRNO_NOSYS: Errno = _

Source

pub const __WASI_ERRNO_NOTCONN: Errno = _

Source

pub const __WASI_ERRNO_NOTDIR: Errno = _

Source

pub const __WASI_ERRNO_NOTEMPTY: Errno = _

Source

pub const __WASI_ERRNO_NOTRECOVERABLE: Errno = _

Source

pub const __WASI_ERRNO_NOTSOCK: Errno = _

Source

pub const __WASI_ERRNO_NOTSUP: Errno = _

Source

pub const __WASI_ERRNO_NOTTY: Errno = _

Source

pub const __WASI_ERRNO_NXIO: Errno = _

Source

pub const __WASI_ERRNO_OVERFLOW: Errno = _

Source

pub const __WASI_ERRNO_OWNERDEAD: Errno = _

Source

pub const __WASI_ERRNO_PERM: Errno = _

Source

pub const __WASI_ERRNO_PIPE: Errno = _

Source

pub const __WASI_ERRNO_PROTO: Errno = _

Source

pub const __WASI_ERRNO_PROTONOSUPPORT: Errno = _

Source

pub const __WASI_ERRNO_PROTOTYPE: Errno = _

Source

pub const __WASI_ERRNO_RANGE: Errno = _

Source

pub const __WASI_ERRNO_ROFS: Errno = _

Source

pub const __WASI_ERRNO_SPIPE: Errno = _

Source

pub const __WASI_ERRNO_SRCH: Errno = _

Source

pub const __WASI_ERRNO_STALE: Errno = _

Source

pub const __WASI_ERRNO_TIMEDOUT: Errno = _

Source

pub const __WASI_ERRNO_TXTBSY: Errno = _

Source

pub const __WASI_ERRNO_XDEV: Errno = _

Source

pub const __WASI_ERRNO_NOTCAPABLE: Errno = _

Source

pub const __WASI_ERRNO_AIADDRFAMILY: Errno = _

Source

pub const __WASI_ERRNO_AIAGAIN: Errno = _

Source

pub const __WASI_ERRNO_AIBADFLAG: Errno = _

Source

pub const __WASI_ERRNO_AIFAIL: Errno = _

Source

pub const __WASI_ERRNO_AIFAMILY: Errno = _

Source

pub const __WASI_ERRNO_AIMEMORY: Errno = _

Source

pub const __WASI_ERRNO_AINODATA: Errno = _

Source

pub const __WASI_ERRNO_AINONAME: Errno = _

Source

pub const __WASI_ERRNO_AISERVICE: Errno = _

Source

pub const __WASI_ERRNO_AISOCKTYPE: Errno = _

Source

pub const __WASI_ERRNO_AISYSTEM: Errno = _

Trait Implementations§

Source§

impl Clone for Errno

Source§

fn clone(&self) -> Errno

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Errno

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Errno

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<&Error> for Errno

Source§

fn from(e: &Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Errno

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ErrorKind> for Errno

Source§

fn from(e: ErrorKind) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for Errno

Source§

fn from(e: Type) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Errno

Source§

fn eq(&self, other: &Errno) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for Errno

Source§

impl Eq for Errno

Source§

impl StructuralPartialEq for Errno

Auto Trait Implementations§

§

impl Freeze for Errno

§

impl RefUnwindSafe for Errno

§

impl Send for Errno

§

impl Sync for Errno

§

impl Unpin for Errno

§

impl UnwindSafe for Errno

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/index.html b/async_wasi/snapshots/common/index.html new file mode 100644 index 000000000..ee19dfbe0 --- /dev/null +++ b/async_wasi/snapshots/common/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common - Rust
async_wasi::snapshots

Module common

Source

Modules§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/memory/index.html b/async_wasi/snapshots/common/memory/index.html new file mode 100644 index 000000000..4ba0bd42e --- /dev/null +++ b/async_wasi/snapshots/common/memory/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::memory - Rust
async_wasi::snapshots::common

Module memory

Source

Structs§

Traits§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/memory/sidebar-items.js b/async_wasi/snapshots/common/memory/sidebar-items.js new file mode 100644 index 000000000..3f5aa6ed7 --- /dev/null +++ b/async_wasi/snapshots/common/memory/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["WasmPtr"],"trait":["Memory"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/memory/struct.WasmPtr.html b/async_wasi/snapshots/common/memory/struct.WasmPtr.html new file mode 100644 index 000000000..f6930b087 --- /dev/null +++ b/async_wasi/snapshots/common/memory/struct.WasmPtr.html @@ -0,0 +1,18 @@ +WasmPtr in async_wasi::snapshots::common::memory - Rust
async_wasi::snapshots::common::memory

Struct WasmPtr

Source
pub struct WasmPtr<T: Sized>(pub usize, _);

Tuple Fields§

§0: usize

Implementations§

Source§

impl<T: Sized> WasmPtr<T>

Source

pub fn is_null(&self) -> bool

Trait Implementations§

Source§

impl<T: Sized> Add<usize> for WasmPtr<T>

Source§

type Output = WasmPtr<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: usize) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Clone + Sized> Clone for WasmPtr<T>

Source§

fn clone(&self) -> WasmPtr<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug + Sized> Debug for WasmPtr<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Sized> From<WasmPtr<T>> for usize

Source§

fn from(val: WasmPtr<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Sized> From<usize> for WasmPtr<T>

Source§

fn from(i: usize) -> Self

Converts to this type from the input type.
Source§

impl<T: Sized> Sub<usize> for WasmPtr<T>

Source§

type Output = WasmPtr<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: usize) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Copy + Sized> Copy for WasmPtr<T>

Auto Trait Implementations§

§

impl<T> Freeze for WasmPtr<T>

§

impl<T> RefUnwindSafe for WasmPtr<T>
where + T: RefUnwindSafe,

§

impl<T> Send for WasmPtr<T>
where + T: Send,

§

impl<T> Sync for WasmPtr<T>
where + T: Sync,

§

impl<T> Unpin for WasmPtr<T>
where + T: Unpin,

§

impl<T> UnwindSafe for WasmPtr<T>
where + T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/memory/trait.Memory.html b/async_wasi/snapshots/common/memory/trait.Memory.html new file mode 100644 index 000000000..b2a977a5a --- /dev/null +++ b/async_wasi/snapshots/common/memory/trait.Memory.html @@ -0,0 +1,53 @@ +Memory in async_wasi::snapshots::common::memory - Rust
async_wasi::snapshots::common::memory

Trait Memory

Source
pub trait Memory {
+    // Required methods
+    fn get_data<T: Sized>(&self, offset: WasmPtr<T>) -> Result<&T, Errno>;
+    fn get_slice<T: Sized>(
+        &self,
+        offset: WasmPtr<T>,
+        len: usize,
+    ) -> Result<&[T], Errno>;
+    fn get_iovec<'a>(
+        &self,
+        iovec_ptr: WasmPtr<__wasi_ciovec_t>,
+        iovec_len: __wasi_size_t,
+    ) -> Result<Vec<IoSlice<'a>>, Errno>;
+    fn mut_data<T: Sized>(
+        &mut self,
+        offset: WasmPtr<T>,
+    ) -> Result<&mut T, Errno>;
+    fn mut_slice<T: Sized>(
+        &mut self,
+        offset: WasmPtr<T>,
+        len: usize,
+    ) -> Result<&mut [T], Errno>;
+    fn mut_iovec(
+        &mut self,
+        iovec_ptr: WasmPtr<__wasi_iovec_t>,
+        iovec_len: __wasi_size_t,
+    ) -> Result<Vec<IoSliceMut<'_>>, Errno>;
+    fn write_data<T: Sized>(
+        &mut self,
+        offset: WasmPtr<T>,
+        data: T,
+    ) -> Result<(), Errno>;
+}

Required Methods§

Source

fn get_data<T: Sized>(&self, offset: WasmPtr<T>) -> Result<&T, Errno>

Source

fn get_slice<T: Sized>( + &self, + offset: WasmPtr<T>, + len: usize, +) -> Result<&[T], Errno>

Source

fn get_iovec<'a>( + &self, + iovec_ptr: WasmPtr<__wasi_ciovec_t>, + iovec_len: __wasi_size_t, +) -> Result<Vec<IoSlice<'a>>, Errno>

Source

fn mut_data<T: Sized>(&mut self, offset: WasmPtr<T>) -> Result<&mut T, Errno>

Source

fn mut_slice<T: Sized>( + &mut self, + offset: WasmPtr<T>, + len: usize, +) -> Result<&mut [T], Errno>

Source

fn mut_iovec( + &mut self, + iovec_ptr: WasmPtr<__wasi_iovec_t>, + iovec_len: __wasi_size_t, +) -> Result<Vec<IoSliceMut<'_>>, Errno>

Source

fn write_data<T: Sized>( + &mut self, + offset: WasmPtr<T>, + data: T, +) -> Result<(), Errno>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/net/async_tokio/index.html b/async_wasi/snapshots/common/net/async_tokio/index.html new file mode 100644 index 000000000..bf599d62d --- /dev/null +++ b/async_wasi/snapshots/common/net/async_tokio/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::net::async_tokio - Rust
async_wasi::snapshots::common::net

Module async_tokio

Source

Structs§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/net/async_tokio/sidebar-items.js b/async_wasi/snapshots/common/net/async_tokio/sidebar-items.js new file mode 100644 index 000000000..cc24b4fc3 --- /dev/null +++ b/async_wasi/snapshots/common/net/async_tokio/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AsyncWasiSocket"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/net/async_tokio/struct.AsyncWasiSocket.html b/async_wasi/snapshots/common/net/async_tokio/struct.AsyncWasiSocket.html new file mode 100644 index 000000000..24d78a296 --- /dev/null +++ b/async_wasi/snapshots/common/net/async_tokio/struct.AsyncWasiSocket.html @@ -0,0 +1,34 @@ +AsyncWasiSocket in async_wasi::snapshots::common::net::async_tokio - Rust
async_wasi::snapshots::common::net::async_tokio

Struct AsyncWasiSocket

Source
pub struct AsyncWasiSocket {
+    pub state: Box<WasiSocketState>,
+    /* private fields */
+}

Fields§

§state: Box<WasiSocketState>

Implementations§

Source§

impl AsyncWasiSocket

Source§

impl AsyncWasiSocket

Source

pub fn from_tcplistener( + listener: TcpListener, + state: WasiSocketState, +) -> Result<Self>

Source

pub fn from_udpsocket(socket: UdpSocket, state: WasiSocketState) -> Result<Self>

Source§

impl AsyncWasiSocket

Source

pub fn open(state: WasiSocketState) -> Result<Self>

Source

pub fn bind(&mut self, addr: SocketAddr) -> Result<()>

Source

pub fn device(&self) -> Result<Option<Vec<u8>>>

Source

pub fn bind_device(&mut self, interface: Option<&[u8]>) -> Result<()>

Source

pub fn listen(&mut self, backlog: u32) -> Result<()>

Source

pub async fn accept(&mut self) -> Result<Self>

Source

pub async fn connect(&mut self, addr: SocketAddr) -> Result<()>

Source

pub async fn recv<'a>( + &self, + bufs: &mut [IoSliceMut<'a>], + flags: c_int, +) -> Result<(usize, bool)>

Source

pub async fn recv_from<'a>( + &self, + bufs: &mut [IoSliceMut<'a>], + flags: c_int, +) -> Result<(usize, bool, Option<SocketAddr>)>

Source

pub async fn send<'a>( + &self, + bufs: &[IoSlice<'a>], + flags: c_int, +) -> Result<usize>

Source

pub async fn send_to<'a>( + &self, + bufs: &[IoSlice<'a>], + addr: SocketAddr, + flags: c_int, +) -> Result<usize>

Source

pub fn shutdown(&mut self, how: Shutdown) -> Result<()>

Source

pub fn get_peer(&mut self) -> Result<SocketAddr>

Source

pub fn get_local(&mut self) -> Result<SocketAddr>

Source

pub fn set_nonblocking(&mut self, nonblocking: bool) -> Result<()>

Source

pub fn get_nonblocking(&self) -> bool

Source

pub fn get_so_type(&self) -> (AddressFamily, SocketType)

Source

pub fn get_so_accept_conn(&self) -> Result<bool>

Source

pub fn sync_conn_state(&mut self)

Source

pub fn set_so_reuseaddr(&mut self, reuseaddr: bool) -> Result<()>

Source

pub fn get_so_reuseaddr(&self) -> bool

Source

pub fn set_so_recv_buf_size(&mut self, buf_size: usize) -> Result<()>

Source

pub fn get_so_recv_buf_size(&self) -> usize

Source

pub fn set_so_send_buf_size(&mut self, buf_size: usize) -> Result<()>

Source

pub fn get_so_send_buf_size(&mut self) -> usize

Source

pub fn set_so_recv_timeout(&mut self, timeout: Option<Duration>) -> Result<()>

Source

pub fn get_so_recv_timeout(&mut self) -> Option<Duration>

Source

pub fn set_so_send_timeout(&mut self, timeout: Option<Duration>) -> Result<()>

Source

pub fn get_so_send_timeout(&mut self) -> Option<Duration>

Source

pub fn get_so_error(&mut self) -> Result<Option<Error>>

Trait Implementations§

Source§

impl Debug for AsyncWasiSocket

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/net/enum.AddressFamily.html b/async_wasi/snapshots/common/net/enum.AddressFamily.html new file mode 100644 index 000000000..565fc3522 --- /dev/null +++ b/async_wasi/snapshots/common/net/enum.AddressFamily.html @@ -0,0 +1,16 @@ +AddressFamily in async_wasi::snapshots::common::net - Rust
async_wasi::snapshots::common::net

Enum AddressFamily

Source
pub enum AddressFamily {
+    Inet4,
+    Inet6,
+}

Variants§

§

Inet4

§

Inet6

Trait Implementations§

Source§

impl Clone for AddressFamily

Source§

fn clone(&self) -> AddressFamily

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AddressFamily

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AddressFamily

Source§

fn default() -> AddressFamily

Returns the “default value” for a type. Read more
Source§

impl Copy for AddressFamily

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/net/enum.ConnectState.html b/async_wasi/snapshots/common/net/enum.ConnectState.html new file mode 100644 index 000000000..7feb121a9 --- /dev/null +++ b/async_wasi/snapshots/common/net/enum.ConnectState.html @@ -0,0 +1,19 @@ +ConnectState in async_wasi::snapshots::common::net - Rust
async_wasi::snapshots::common::net

Enum ConnectState

Source
pub enum ConnectState {
+    Empty,
+    Listening,
+    Connected,
+    Connecting,
+}

Variants§

§

Empty

§

Listening

§

Connected

§

Connecting

Trait Implementations§

Source§

impl Clone for ConnectState

Source§

fn clone(&self) -> ConnectState

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ConnectState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ConnectState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ConnectState

Source§

fn eq(&self, other: &ConnectState) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for ConnectState

Source§

impl Eq for ConnectState

Source§

impl StructuralPartialEq for ConnectState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/net/enum.PrePoll.html b/async_wasi/snapshots/common/net/enum.PrePoll.html new file mode 100644 index 000000000..137b09956 --- /dev/null +++ b/async_wasi/snapshots/common/net/enum.PrePoll.html @@ -0,0 +1,17 @@ +PrePoll in async_wasi::snapshots::common::net - Rust
async_wasi::snapshots::common::net

Enum PrePoll

Source
pub enum PrePoll {
+    OnlyFd(Vec<SubscriptionFd>),
+    OnlyClock(SubscriptionClock),
+    ClockAndFd(SubscriptionClock, Vec<SubscriptionFd>),
+}

Variants§

Implementations§

Trait Implementations§

Source§

impl Debug for PrePoll

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/net/enum.SocketType.html b/async_wasi/snapshots/common/net/enum.SocketType.html new file mode 100644 index 000000000..09fdfa903 --- /dev/null +++ b/async_wasi/snapshots/common/net/enum.SocketType.html @@ -0,0 +1,16 @@ +SocketType in async_wasi::snapshots::common::net - Rust
async_wasi::snapshots::common::net

Enum SocketType

Source
pub enum SocketType {
+    Datagram,
+    Stream,
+}

Variants§

§

Datagram

§

Stream

Trait Implementations§

Source§

impl Clone for SocketType

Source§

fn clone(&self) -> SocketType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SocketType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SocketType

Source§

fn default() -> SocketType

Returns the “default value” for a type. Read more
Source§

impl Copy for SocketType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/net/enum.Subscription.html b/async_wasi/snapshots/common/net/enum.Subscription.html new file mode 100644 index 000000000..1f2d5fff7 --- /dev/null +++ b/async_wasi/snapshots/common/net/enum.Subscription.html @@ -0,0 +1,16 @@ +Subscription in async_wasi::snapshots::common::net - Rust
async_wasi::snapshots::common::net

Enum Subscription

Source
pub enum Subscription {
+    FD(SubscriptionFd),
+    RealClock(SubscriptionClock),
+}

Variants§

Implementations§

Trait Implementations§

Source§

impl Clone for Subscription

Source§

fn clone(&self) -> Subscription

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Subscription

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for Subscription

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/net/enum.SubscriptionFdType.html b/async_wasi/snapshots/common/net/enum.SubscriptionFdType.html new file mode 100644 index 000000000..33cee22cf --- /dev/null +++ b/async_wasi/snapshots/common/net/enum.SubscriptionFdType.html @@ -0,0 +1,20 @@ +SubscriptionFdType in async_wasi::snapshots::common::net - Rust
async_wasi::snapshots::common::net

Enum SubscriptionFdType

Source
pub enum SubscriptionFdType {
+    Read(__wasi_userdata_t),
+    Write(__wasi_userdata_t),
+    Both {
+        read: __wasi_userdata_t,
+        write: __wasi_userdata_t,
+    },
+}

Variants§

Trait Implementations§

Source§

impl Clone for SubscriptionFdType

Source§

fn clone(&self) -> SubscriptionFdType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SubscriptionFdType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for SubscriptionFdType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/net/index.html b/async_wasi/snapshots/common/net/index.html new file mode 100644 index 000000000..80efca272 --- /dev/null +++ b/async_wasi/snapshots/common/net/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::net - Rust
async_wasi::snapshots::common

Module net

Source

Re-exports§

  • pub use super::vfs::*;

Modules§

Structs§

Enums§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/net/sidebar-items.js b/async_wasi/snapshots/common/net/sidebar-items.js new file mode 100644 index 000000000..fb7b3f676 --- /dev/null +++ b/async_wasi/snapshots/common/net/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["AddressFamily","ConnectState","PrePoll","SocketType","Subscription","SubscriptionFdType"],"mod":["async_tokio"],"struct":["SubscriptionClock","SubscriptionFd","WasiSocketState"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/net/struct.SubscriptionClock.html b/async_wasi/snapshots/common/net/struct.SubscriptionClock.html new file mode 100644 index 000000000..20d847ded --- /dev/null +++ b/async_wasi/snapshots/common/net/struct.SubscriptionClock.html @@ -0,0 +1,17 @@ +SubscriptionClock in async_wasi::snapshots::common::net - Rust
async_wasi::snapshots::common::net

Struct SubscriptionClock

Source
pub struct SubscriptionClock {
+    pub timeout: Option<SystemTime>,
+    pub userdata: __wasi_userdata_t,
+    pub err: Option<Errno>,
+}

Fields§

§timeout: Option<SystemTime>§userdata: __wasi_userdata_t§err: Option<Errno>

Trait Implementations§

Source§

impl Clone for SubscriptionClock

Source§

fn clone(&self) -> SubscriptionClock

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SubscriptionClock

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for SubscriptionClock

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/net/struct.SubscriptionFd.html b/async_wasi/snapshots/common/net/struct.SubscriptionFd.html new file mode 100644 index 000000000..dbef39452 --- /dev/null +++ b/async_wasi/snapshots/common/net/struct.SubscriptionFd.html @@ -0,0 +1,16 @@ +SubscriptionFd in async_wasi::snapshots::common::net - Rust
async_wasi::snapshots::common::net

Struct SubscriptionFd

Source
pub struct SubscriptionFd {
+    pub fd: __wasi_fd_t,
+    pub type_: SubscriptionFdType,
+}

Fields§

§fd: __wasi_fd_t§type_: SubscriptionFdType

Implementations§

Source§

impl SubscriptionFd

Source

pub fn set_write(&mut self, userdata: __wasi_userdata_t)

Source

pub fn set_read(&mut self, userdata: __wasi_userdata_t)

Trait Implementations§

Source§

impl Clone for SubscriptionFd

Source§

fn clone(&self) -> SubscriptionFd

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SubscriptionFd

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for SubscriptionFd

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/net/struct.WasiSocketState.html b/async_wasi/snapshots/common/net/struct.WasiSocketState.html new file mode 100644 index 000000000..622d442b8 --- /dev/null +++ b/async_wasi/snapshots/common/net/struct.WasiSocketState.html @@ -0,0 +1,28 @@ +WasiSocketState in async_wasi::snapshots::common::net - Rust
async_wasi::snapshots::common::net

Struct WasiSocketState

Source
pub struct WasiSocketState {
Show 14 fields + pub sock_type: (AddressFamily, SocketType), + pub local_addr: Option<SocketAddr>, + pub peer_addr: Option<SocketAddr>, + pub bind_device: Vec<u8>, + pub backlog: u32, + pub shutdown: Option<Shutdown>, + pub nonblocking: bool, + pub so_reuseaddr: bool, + pub so_conn_state: ConnectState, + pub so_recv_buf_size: usize, + pub so_send_buf_size: usize, + pub so_recv_timeout: Option<Duration>, + pub so_send_timeout: Option<Duration>, + pub fs_rights: WASIRights, +
}

Fields§

§sock_type: (AddressFamily, SocketType)§local_addr: Option<SocketAddr>§peer_addr: Option<SocketAddr>§bind_device: Vec<u8>§backlog: u32§shutdown: Option<Shutdown>§nonblocking: bool§so_reuseaddr: bool§so_conn_state: ConnectState§so_recv_buf_size: usize§so_send_buf_size: usize§so_recv_timeout: Option<Duration>§so_send_timeout: Option<Duration>§fs_rights: WASIRights

Trait Implementations§

Source§

impl Clone for WasiSocketState

Source§

fn clone(&self) -> WasiSocketState

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasiSocketState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WasiSocketState

Source§

fn default() -> WasiSocketState

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/sidebar-items.js b/async_wasi/snapshots/common/sidebar-items.js new file mode 100644 index 000000000..bcf9ed0ca --- /dev/null +++ b/async_wasi/snapshots/common/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["clock","error","memory","net","types","vfs"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_address_family_t/constant.__WASI_ADDRESS_FAMILY_INET4.html b/async_wasi/snapshots/common/types/__wasi_address_family_t/constant.__WASI_ADDRESS_FAMILY_INET4.html new file mode 100644 index 000000000..8570afff8 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_address_family_t/constant.__WASI_ADDRESS_FAMILY_INET4.html @@ -0,0 +1 @@ +__WASI_ADDRESS_FAMILY_INET4 in async_wasi::snapshots::common::types::__wasi_address_family_t - Rust
async_wasi::snapshots::common::types::__wasi_address_family_t

Constant __WASI_ADDRESS_FAMILY_INET4

Source
pub const __WASI_ADDRESS_FAMILY_INET4: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_address_family_t/constant.__WASI_ADDRESS_FAMILY_INET6.html b/async_wasi/snapshots/common/types/__wasi_address_family_t/constant.__WASI_ADDRESS_FAMILY_INET6.html new file mode 100644 index 000000000..5c27d0355 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_address_family_t/constant.__WASI_ADDRESS_FAMILY_INET6.html @@ -0,0 +1 @@ +__WASI_ADDRESS_FAMILY_INET6 in async_wasi::snapshots::common::types::__wasi_address_family_t - Rust
async_wasi::snapshots::common::types::__wasi_address_family_t

Constant __WASI_ADDRESS_FAMILY_INET6

Source
pub const __WASI_ADDRESS_FAMILY_INET6: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_address_family_t/constant.__WASI_ADDRESS_FAMILY_UNSPEC.html b/async_wasi/snapshots/common/types/__wasi_address_family_t/constant.__WASI_ADDRESS_FAMILY_UNSPEC.html new file mode 100644 index 000000000..ca0afccbb --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_address_family_t/constant.__WASI_ADDRESS_FAMILY_UNSPEC.html @@ -0,0 +1 @@ +__WASI_ADDRESS_FAMILY_UNSPEC in async_wasi::snapshots::common::types::__wasi_address_family_t - Rust
async_wasi::snapshots::common::types::__wasi_address_family_t

Constant __WASI_ADDRESS_FAMILY_UNSPEC

Source
pub const __WASI_ADDRESS_FAMILY_UNSPEC: Type = 0;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_address_family_t/index.html b/async_wasi/snapshots/common/types/__wasi_address_family_t/index.html new file mode 100644 index 000000000..f3c8b1532 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_address_family_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_address_family_t - Rust
async_wasi::snapshots::common::types

Module __wasi_address_family_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_address_family_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_address_family_t/sidebar-items.js new file mode 100644 index 000000000..7ce1793ed --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_address_family_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_ADDRESS_FAMILY_INET4","__WASI_ADDRESS_FAMILY_INET6","__WASI_ADDRESS_FAMILY_UNSPEC"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_address_family_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_address_family_t/type.Type.html new file mode 100644 index 000000000..28a89a45b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_address_family_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_address_family_t - Rust
pub type Type = u8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_DONTNEED.html b/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_DONTNEED.html new file mode 100644 index 000000000..3fb3814c1 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_DONTNEED.html @@ -0,0 +1 @@ +__WASI_ADVICE_DONTNEED in async_wasi::snapshots::common::types::__wasi_advice_t - Rust
async_wasi::snapshots::common::types::__wasi_advice_t

Constant __WASI_ADVICE_DONTNEED

Source
pub const __WASI_ADVICE_DONTNEED: Type = 4;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_NOREUSE.html b/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_NOREUSE.html new file mode 100644 index 000000000..0aa75f401 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_NOREUSE.html @@ -0,0 +1 @@ +__WASI_ADVICE_NOREUSE in async_wasi::snapshots::common::types::__wasi_advice_t - Rust
async_wasi::snapshots::common::types::__wasi_advice_t

Constant __WASI_ADVICE_NOREUSE

Source
pub const __WASI_ADVICE_NOREUSE: Type = 5;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_NORMAL.html b/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_NORMAL.html new file mode 100644 index 000000000..ffd1934b1 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_NORMAL.html @@ -0,0 +1 @@ +__WASI_ADVICE_NORMAL in async_wasi::snapshots::common::types::__wasi_advice_t - Rust
async_wasi::snapshots::common::types::__wasi_advice_t

Constant __WASI_ADVICE_NORMAL

Source
pub const __WASI_ADVICE_NORMAL: Type = 0;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_RANDOM.html b/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_RANDOM.html new file mode 100644 index 000000000..39c917a81 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_RANDOM.html @@ -0,0 +1 @@ +__WASI_ADVICE_RANDOM in async_wasi::snapshots::common::types::__wasi_advice_t - Rust
async_wasi::snapshots::common::types::__wasi_advice_t

Constant __WASI_ADVICE_RANDOM

Source
pub const __WASI_ADVICE_RANDOM: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_SEQUENTIAL.html b/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_SEQUENTIAL.html new file mode 100644 index 000000000..b61bd6eec --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_SEQUENTIAL.html @@ -0,0 +1 @@ +__WASI_ADVICE_SEQUENTIAL in async_wasi::snapshots::common::types::__wasi_advice_t - Rust
async_wasi::snapshots::common::types::__wasi_advice_t

Constant __WASI_ADVICE_SEQUENTIAL

Source
pub const __WASI_ADVICE_SEQUENTIAL: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_WILLNEED.html b/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_WILLNEED.html new file mode 100644 index 000000000..8f1d1a91f --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_advice_t/constant.__WASI_ADVICE_WILLNEED.html @@ -0,0 +1 @@ +__WASI_ADVICE_WILLNEED in async_wasi::snapshots::common::types::__wasi_advice_t - Rust
async_wasi::snapshots::common::types::__wasi_advice_t

Constant __WASI_ADVICE_WILLNEED

Source
pub const __WASI_ADVICE_WILLNEED: Type = 3;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_advice_t/index.html b/async_wasi/snapshots/common/types/__wasi_advice_t/index.html new file mode 100644 index 000000000..6205cea25 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_advice_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_advice_t - Rust
async_wasi::snapshots::common::types

Module __wasi_advice_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_advice_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_advice_t/sidebar-items.js new file mode 100644 index 000000000..a495ba173 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_advice_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_ADVICE_DONTNEED","__WASI_ADVICE_NOREUSE","__WASI_ADVICE_NORMAL","__WASI_ADVICE_RANDOM","__WASI_ADVICE_SEQUENTIAL","__WASI_ADVICE_WILLNEED"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_advice_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_advice_t/type.Type.html new file mode 100644 index 000000000..db034ee6c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_advice_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_advice_t - Rust
async_wasi::snapshots::common::types::__wasi_advice_t

Type Alias Type

Source
pub type Type = u8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_ADDRCONFIG.html b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_ADDRCONFIG.html new file mode 100644 index 000000000..a69efaa0e --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_ADDRCONFIG.html @@ -0,0 +1 @@ +__WASI_AIFLAGS_AI_ADDRCONFIG in async_wasi::snapshots::common::types::__wasi_aiflags_t - Rust
async_wasi::snapshots::common::types::__wasi_aiflags_t

Constant __WASI_AIFLAGS_AI_ADDRCONFIG

Source
pub const __WASI_AIFLAGS_AI_ADDRCONFIG: Type = 64;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_ALL.html b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_ALL.html new file mode 100644 index 000000000..83cf3b557 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_ALL.html @@ -0,0 +1 @@ +__WASI_AIFLAGS_AI_ALL in async_wasi::snapshots::common::types::__wasi_aiflags_t - Rust
async_wasi::snapshots::common::types::__wasi_aiflags_t

Constant __WASI_AIFLAGS_AI_ALL

Source
pub const __WASI_AIFLAGS_AI_ALL: Type = 32;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_CANONNAME.html b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_CANONNAME.html new file mode 100644 index 000000000..c60bf5108 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_CANONNAME.html @@ -0,0 +1 @@ +__WASI_AIFLAGS_AI_CANONNAME in async_wasi::snapshots::common::types::__wasi_aiflags_t - Rust
async_wasi::snapshots::common::types::__wasi_aiflags_t

Constant __WASI_AIFLAGS_AI_CANONNAME

Source
pub const __WASI_AIFLAGS_AI_CANONNAME: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_NUMERICHOST.html b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_NUMERICHOST.html new file mode 100644 index 000000000..1016fee50 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_NUMERICHOST.html @@ -0,0 +1 @@ +__WASI_AIFLAGS_AI_NUMERICHOST in async_wasi::snapshots::common::types::__wasi_aiflags_t - Rust
async_wasi::snapshots::common::types::__wasi_aiflags_t

Constant __WASI_AIFLAGS_AI_NUMERICHOST

Source
pub const __WASI_AIFLAGS_AI_NUMERICHOST: Type = 4;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_NUMERICSERV.html b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_NUMERICSERV.html new file mode 100644 index 000000000..ecd7f7fb4 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_NUMERICSERV.html @@ -0,0 +1 @@ +__WASI_AIFLAGS_AI_NUMERICSERV in async_wasi::snapshots::common::types::__wasi_aiflags_t - Rust
async_wasi::snapshots::common::types::__wasi_aiflags_t

Constant __WASI_AIFLAGS_AI_NUMERICSERV

Source
pub const __WASI_AIFLAGS_AI_NUMERICSERV: Type = 8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_PASSIVE.html b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_PASSIVE.html new file mode 100644 index 000000000..c9ce6bc82 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_PASSIVE.html @@ -0,0 +1 @@ +__WASI_AIFLAGS_AI_PASSIVE in async_wasi::snapshots::common::types::__wasi_aiflags_t - Rust
async_wasi::snapshots::common::types::__wasi_aiflags_t

Constant __WASI_AIFLAGS_AI_PASSIVE

Source
pub const __WASI_AIFLAGS_AI_PASSIVE: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_V4MAPPED.html b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_V4MAPPED.html new file mode 100644 index 000000000..f4a6fcb61 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_aiflags_t/constant.__WASI_AIFLAGS_AI_V4MAPPED.html @@ -0,0 +1 @@ +__WASI_AIFLAGS_AI_V4MAPPED in async_wasi::snapshots::common::types::__wasi_aiflags_t - Rust
async_wasi::snapshots::common::types::__wasi_aiflags_t

Constant __WASI_AIFLAGS_AI_V4MAPPED

Source
pub const __WASI_AIFLAGS_AI_V4MAPPED: Type = 16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_aiflags_t/index.html b/async_wasi/snapshots/common/types/__wasi_aiflags_t/index.html new file mode 100644 index 000000000..9c7c4508d --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_aiflags_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_aiflags_t - Rust
async_wasi::snapshots::common::types

Module __wasi_aiflags_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_aiflags_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_aiflags_t/sidebar-items.js new file mode 100644 index 000000000..a82e2aa43 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_aiflags_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_AIFLAGS_AI_ADDRCONFIG","__WASI_AIFLAGS_AI_ALL","__WASI_AIFLAGS_AI_CANONNAME","__WASI_AIFLAGS_AI_NUMERICHOST","__WASI_AIFLAGS_AI_NUMERICSERV","__WASI_AIFLAGS_AI_PASSIVE","__WASI_AIFLAGS_AI_V4MAPPED"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_aiflags_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_aiflags_t/type.Type.html new file mode 100644 index 000000000..f097a3a4a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_aiflags_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_aiflags_t - Rust
async_wasi::snapshots::common::types::__wasi_aiflags_t

Type Alias Type

Source
pub type Type = u16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_clockid_t/constant.__WASI_CLOCKID_MONOTONIC.html b/async_wasi/snapshots/common/types/__wasi_clockid_t/constant.__WASI_CLOCKID_MONOTONIC.html new file mode 100644 index 000000000..56b98228c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_clockid_t/constant.__WASI_CLOCKID_MONOTONIC.html @@ -0,0 +1 @@ +__WASI_CLOCKID_MONOTONIC in async_wasi::snapshots::common::types::__wasi_clockid_t - Rust
async_wasi::snapshots::common::types::__wasi_clockid_t

Constant __WASI_CLOCKID_MONOTONIC

Source
pub const __WASI_CLOCKID_MONOTONIC: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_clockid_t/constant.__WASI_CLOCKID_PROCESS_CPUTIME_ID.html b/async_wasi/snapshots/common/types/__wasi_clockid_t/constant.__WASI_CLOCKID_PROCESS_CPUTIME_ID.html new file mode 100644 index 000000000..33375e533 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_clockid_t/constant.__WASI_CLOCKID_PROCESS_CPUTIME_ID.html @@ -0,0 +1 @@ +__WASI_CLOCKID_PROCESS_CPUTIME_ID in async_wasi::snapshots::common::types::__wasi_clockid_t - Rust
async_wasi::snapshots::common::types::__wasi_clockid_t

Constant __WASI_CLOCKID_PROCESS_CPUTIME_ID

Source
pub const __WASI_CLOCKID_PROCESS_CPUTIME_ID: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_clockid_t/constant.__WASI_CLOCKID_REALTIME.html b/async_wasi/snapshots/common/types/__wasi_clockid_t/constant.__WASI_CLOCKID_REALTIME.html new file mode 100644 index 000000000..a4823a15d --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_clockid_t/constant.__WASI_CLOCKID_REALTIME.html @@ -0,0 +1 @@ +__WASI_CLOCKID_REALTIME in async_wasi::snapshots::common::types::__wasi_clockid_t - Rust
async_wasi::snapshots::common::types::__wasi_clockid_t

Constant __WASI_CLOCKID_REALTIME

Source
pub const __WASI_CLOCKID_REALTIME: Type = 0;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_clockid_t/constant.__WASI_CLOCKID_THREAD_CPUTIME_ID.html b/async_wasi/snapshots/common/types/__wasi_clockid_t/constant.__WASI_CLOCKID_THREAD_CPUTIME_ID.html new file mode 100644 index 000000000..6e126d9f1 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_clockid_t/constant.__WASI_CLOCKID_THREAD_CPUTIME_ID.html @@ -0,0 +1 @@ +__WASI_CLOCKID_THREAD_CPUTIME_ID in async_wasi::snapshots::common::types::__wasi_clockid_t - Rust
async_wasi::snapshots::common::types::__wasi_clockid_t

Constant __WASI_CLOCKID_THREAD_CPUTIME_ID

Source
pub const __WASI_CLOCKID_THREAD_CPUTIME_ID: Type = 3;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_clockid_t/index.html b/async_wasi/snapshots/common/types/__wasi_clockid_t/index.html new file mode 100644 index 000000000..2ef4fc7f5 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_clockid_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_clockid_t - Rust
async_wasi::snapshots::common::types

Module __wasi_clockid_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_clockid_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_clockid_t/sidebar-items.js new file mode 100644 index 000000000..3ec1c4804 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_clockid_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_CLOCKID_MONOTONIC","__WASI_CLOCKID_PROCESS_CPUTIME_ID","__WASI_CLOCKID_REALTIME","__WASI_CLOCKID_THREAD_CPUTIME_ID"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_clockid_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_clockid_t/type.Type.html new file mode 100644 index 000000000..981dbb495 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_clockid_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_clockid_t - Rust
async_wasi::snapshots::common::types::__wasi_clockid_t

Type Alias Type

Source
pub type Type = u32;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_2BIG.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_2BIG.html new file mode 100644 index 000000000..bdb44435c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_2BIG.html @@ -0,0 +1 @@ +__WASI_ERRNO_2BIG in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_2BIG

Source
pub const __WASI_ERRNO_2BIG: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ACCES.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ACCES.html new file mode 100644 index 000000000..14e4e6510 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ACCES.html @@ -0,0 +1 @@ +__WASI_ERRNO_ACCES in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_ACCES

Source
pub const __WASI_ERRNO_ACCES: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ADDRINUSE.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ADDRINUSE.html new file mode 100644 index 000000000..48d873965 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ADDRINUSE.html @@ -0,0 +1 @@ +__WASI_ERRNO_ADDRINUSE in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_ADDRINUSE

Source
pub const __WASI_ERRNO_ADDRINUSE: Type = 3;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ADDRNOTAVAIL.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ADDRNOTAVAIL.html new file mode 100644 index 000000000..795289145 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ADDRNOTAVAIL.html @@ -0,0 +1 @@ +__WASI_ERRNO_ADDRNOTAVAIL in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_ADDRNOTAVAIL

Source
pub const __WASI_ERRNO_ADDRNOTAVAIL: Type = 4;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AFNOSUPPORT.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AFNOSUPPORT.html new file mode 100644 index 000000000..81c5836ce --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AFNOSUPPORT.html @@ -0,0 +1 @@ +__WASI_ERRNO_AFNOSUPPORT in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_AFNOSUPPORT

Source
pub const __WASI_ERRNO_AFNOSUPPORT: Type = 5;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AGAIN.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AGAIN.html new file mode 100644 index 000000000..42d56c7be --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AGAIN.html @@ -0,0 +1 @@ +__WASI_ERRNO_AGAIN in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_AGAIN

Source
pub const __WASI_ERRNO_AGAIN: Type = 6;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIADDRFAMILY.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIADDRFAMILY.html new file mode 100644 index 000000000..b45de62fc --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIADDRFAMILY.html @@ -0,0 +1 @@ +__WASI_ERRNO_AIADDRFAMILY in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_AIADDRFAMILY

Source
pub const __WASI_ERRNO_AIADDRFAMILY: Type = 77;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIAGAIN.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIAGAIN.html new file mode 100644 index 000000000..554bc8688 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIAGAIN.html @@ -0,0 +1 @@ +__WASI_ERRNO_AIAGAIN in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_AIAGAIN

Source
pub const __WASI_ERRNO_AIAGAIN: Type = 78;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIBADFLAG.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIBADFLAG.html new file mode 100644 index 000000000..e0cb691c6 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIBADFLAG.html @@ -0,0 +1 @@ +__WASI_ERRNO_AIBADFLAG in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_AIBADFLAG

Source
pub const __WASI_ERRNO_AIBADFLAG: Type = 79;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIFAIL.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIFAIL.html new file mode 100644 index 000000000..fcc766738 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIFAIL.html @@ -0,0 +1 @@ +__WASI_ERRNO_AIFAIL in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_AIFAIL

Source
pub const __WASI_ERRNO_AIFAIL: Type = 80;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIFAMILY.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIFAMILY.html new file mode 100644 index 000000000..7e0ced4e5 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIFAMILY.html @@ -0,0 +1 @@ +__WASI_ERRNO_AIFAMILY in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_AIFAMILY

Source
pub const __WASI_ERRNO_AIFAMILY: Type = 81;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIMEMORY.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIMEMORY.html new file mode 100644 index 000000000..0ab737c31 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AIMEMORY.html @@ -0,0 +1 @@ +__WASI_ERRNO_AIMEMORY in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_AIMEMORY

Source
pub const __WASI_ERRNO_AIMEMORY: Type = 82;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AINODATA.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AINODATA.html new file mode 100644 index 000000000..25bb215d9 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AINODATA.html @@ -0,0 +1 @@ +__WASI_ERRNO_AINODATA in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_AINODATA

Source
pub const __WASI_ERRNO_AINODATA: Type = 83;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AINONAME.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AINONAME.html new file mode 100644 index 000000000..b310b7188 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AINONAME.html @@ -0,0 +1 @@ +__WASI_ERRNO_AINONAME in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_AINONAME

Source
pub const __WASI_ERRNO_AINONAME: Type = 84;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AISERVICE.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AISERVICE.html new file mode 100644 index 000000000..8a6572ed5 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AISERVICE.html @@ -0,0 +1 @@ +__WASI_ERRNO_AISERVICE in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_AISERVICE

Source
pub const __WASI_ERRNO_AISERVICE: Type = 85;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AISOCKTYPE.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AISOCKTYPE.html new file mode 100644 index 000000000..fd10325c9 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AISOCKTYPE.html @@ -0,0 +1 @@ +__WASI_ERRNO_AISOCKTYPE in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_AISOCKTYPE

Source
pub const __WASI_ERRNO_AISOCKTYPE: Type = 86;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AISYSTEM.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AISYSTEM.html new file mode 100644 index 000000000..1be0e113a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_AISYSTEM.html @@ -0,0 +1 @@ +__WASI_ERRNO_AISYSTEM in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_AISYSTEM

Source
pub const __WASI_ERRNO_AISYSTEM: Type = 87;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ALREADY.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ALREADY.html new file mode 100644 index 000000000..a8cfb590c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ALREADY.html @@ -0,0 +1 @@ +__WASI_ERRNO_ALREADY in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_ALREADY

Source
pub const __WASI_ERRNO_ALREADY: Type = 7;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_BADF.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_BADF.html new file mode 100644 index 000000000..1431f5802 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_BADF.html @@ -0,0 +1 @@ +__WASI_ERRNO_BADF in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_BADF

Source
pub const __WASI_ERRNO_BADF: Type = 8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_BADMSG.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_BADMSG.html new file mode 100644 index 000000000..594f632b4 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_BADMSG.html @@ -0,0 +1 @@ +__WASI_ERRNO_BADMSG in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_BADMSG

Source
pub const __WASI_ERRNO_BADMSG: Type = 9;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_BUSY.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_BUSY.html new file mode 100644 index 000000000..5c4d6a45f --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_BUSY.html @@ -0,0 +1 @@ +__WASI_ERRNO_BUSY in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_BUSY

Source
pub const __WASI_ERRNO_BUSY: Type = 10;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CANCELED.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CANCELED.html new file mode 100644 index 000000000..283e7b65b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CANCELED.html @@ -0,0 +1 @@ +__WASI_ERRNO_CANCELED in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_CANCELED

Source
pub const __WASI_ERRNO_CANCELED: Type = 11;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CHILD.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CHILD.html new file mode 100644 index 000000000..0da3e35a3 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CHILD.html @@ -0,0 +1 @@ +__WASI_ERRNO_CHILD in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_CHILD

Source
pub const __WASI_ERRNO_CHILD: Type = 12;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CONNABORTED.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CONNABORTED.html new file mode 100644 index 000000000..a3a1b387c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CONNABORTED.html @@ -0,0 +1 @@ +__WASI_ERRNO_CONNABORTED in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_CONNABORTED

Source
pub const __WASI_ERRNO_CONNABORTED: Type = 13;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CONNREFUSED.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CONNREFUSED.html new file mode 100644 index 000000000..68fb91886 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CONNREFUSED.html @@ -0,0 +1 @@ +__WASI_ERRNO_CONNREFUSED in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_CONNREFUSED

Source
pub const __WASI_ERRNO_CONNREFUSED: Type = 14;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CONNRESET.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CONNRESET.html new file mode 100644 index 000000000..63eba894f --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_CONNRESET.html @@ -0,0 +1 @@ +__WASI_ERRNO_CONNRESET in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_CONNRESET

Source
pub const __WASI_ERRNO_CONNRESET: Type = 15;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_DEADLK.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_DEADLK.html new file mode 100644 index 000000000..98332343b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_DEADLK.html @@ -0,0 +1 @@ +__WASI_ERRNO_DEADLK in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_DEADLK

Source
pub const __WASI_ERRNO_DEADLK: Type = 16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_DESTADDRREQ.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_DESTADDRREQ.html new file mode 100644 index 000000000..f9458b32a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_DESTADDRREQ.html @@ -0,0 +1 @@ +__WASI_ERRNO_DESTADDRREQ in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_DESTADDRREQ

Source
pub const __WASI_ERRNO_DESTADDRREQ: Type = 17;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_DOM.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_DOM.html new file mode 100644 index 000000000..4a3ff1157 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_DOM.html @@ -0,0 +1 @@ +__WASI_ERRNO_DOM in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_DOM

Source
pub const __WASI_ERRNO_DOM: Type = 18;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_DQUOT.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_DQUOT.html new file mode 100644 index 000000000..fc0ecfef1 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_DQUOT.html @@ -0,0 +1 @@ +__WASI_ERRNO_DQUOT in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_DQUOT

Source
pub const __WASI_ERRNO_DQUOT: Type = 19;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_EXIST.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_EXIST.html new file mode 100644 index 000000000..182b48b40 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_EXIST.html @@ -0,0 +1 @@ +__WASI_ERRNO_EXIST in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_EXIST

Source
pub const __WASI_ERRNO_EXIST: Type = 20;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_FAULT.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_FAULT.html new file mode 100644 index 000000000..80488c833 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_FAULT.html @@ -0,0 +1 @@ +__WASI_ERRNO_FAULT in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_FAULT

Source
pub const __WASI_ERRNO_FAULT: Type = 21;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_FBIG.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_FBIG.html new file mode 100644 index 000000000..e152e14f5 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_FBIG.html @@ -0,0 +1 @@ +__WASI_ERRNO_FBIG in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_FBIG

Source
pub const __WASI_ERRNO_FBIG: Type = 22;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_HOSTUNREACH.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_HOSTUNREACH.html new file mode 100644 index 000000000..c8db1b4dd --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_HOSTUNREACH.html @@ -0,0 +1 @@ +__WASI_ERRNO_HOSTUNREACH in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_HOSTUNREACH

Source
pub const __WASI_ERRNO_HOSTUNREACH: Type = 23;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_IDRM.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_IDRM.html new file mode 100644 index 000000000..96956ba2b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_IDRM.html @@ -0,0 +1 @@ +__WASI_ERRNO_IDRM in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_IDRM

Source
pub const __WASI_ERRNO_IDRM: Type = 24;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ILSEQ.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ILSEQ.html new file mode 100644 index 000000000..ae0818d01 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ILSEQ.html @@ -0,0 +1 @@ +__WASI_ERRNO_ILSEQ in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_ILSEQ

Source
pub const __WASI_ERRNO_ILSEQ: Type = 25;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_INPROGRESS.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_INPROGRESS.html new file mode 100644 index 000000000..9dd1e5313 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_INPROGRESS.html @@ -0,0 +1 @@ +__WASI_ERRNO_INPROGRESS in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_INPROGRESS

Source
pub const __WASI_ERRNO_INPROGRESS: Type = 26;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_INTR.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_INTR.html new file mode 100644 index 000000000..2c4f252df --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_INTR.html @@ -0,0 +1 @@ +__WASI_ERRNO_INTR in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_INTR

Source
pub const __WASI_ERRNO_INTR: Type = 27;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_INVAL.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_INVAL.html new file mode 100644 index 000000000..233eeb281 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_INVAL.html @@ -0,0 +1 @@ +__WASI_ERRNO_INVAL in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_INVAL

Source
pub const __WASI_ERRNO_INVAL: Type = 28;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_IO.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_IO.html new file mode 100644 index 000000000..c8bb62a8d --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_IO.html @@ -0,0 +1 @@ +__WASI_ERRNO_IO in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_IO

Source
pub const __WASI_ERRNO_IO: Type = 29;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ISCONN.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ISCONN.html new file mode 100644 index 000000000..8beed4e46 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ISCONN.html @@ -0,0 +1 @@ +__WASI_ERRNO_ISCONN in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_ISCONN

Source
pub const __WASI_ERRNO_ISCONN: Type = 30;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ISDIR.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ISDIR.html new file mode 100644 index 000000000..36f285545 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ISDIR.html @@ -0,0 +1 @@ +__WASI_ERRNO_ISDIR in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_ISDIR

Source
pub const __WASI_ERRNO_ISDIR: Type = 31;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_LOOP.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_LOOP.html new file mode 100644 index 000000000..4a13d7cba --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_LOOP.html @@ -0,0 +1 @@ +__WASI_ERRNO_LOOP in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_LOOP

Source
pub const __WASI_ERRNO_LOOP: Type = 32;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_MFILE.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_MFILE.html new file mode 100644 index 000000000..3c20bee19 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_MFILE.html @@ -0,0 +1 @@ +__WASI_ERRNO_MFILE in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_MFILE

Source
pub const __WASI_ERRNO_MFILE: Type = 33;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_MLINK.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_MLINK.html new file mode 100644 index 000000000..d2eb3afe1 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_MLINK.html @@ -0,0 +1 @@ +__WASI_ERRNO_MLINK in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_MLINK

Source
pub const __WASI_ERRNO_MLINK: Type = 34;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_MSGSIZE.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_MSGSIZE.html new file mode 100644 index 000000000..0c27cc4a9 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_MSGSIZE.html @@ -0,0 +1 @@ +__WASI_ERRNO_MSGSIZE in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_MSGSIZE

Source
pub const __WASI_ERRNO_MSGSIZE: Type = 35;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_MULTIHOP.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_MULTIHOP.html new file mode 100644 index 000000000..1cd84b79b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_MULTIHOP.html @@ -0,0 +1 @@ +__WASI_ERRNO_MULTIHOP in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_MULTIHOP

Source
pub const __WASI_ERRNO_MULTIHOP: Type = 36;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NAMETOOLONG.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NAMETOOLONG.html new file mode 100644 index 000000000..c68bef2ca --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NAMETOOLONG.html @@ -0,0 +1 @@ +__WASI_ERRNO_NAMETOOLONG in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NAMETOOLONG

Source
pub const __WASI_ERRNO_NAMETOOLONG: Type = 37;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NETDOWN.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NETDOWN.html new file mode 100644 index 000000000..2bf7361d4 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NETDOWN.html @@ -0,0 +1 @@ +__WASI_ERRNO_NETDOWN in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NETDOWN

Source
pub const __WASI_ERRNO_NETDOWN: Type = 38;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NETRESET.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NETRESET.html new file mode 100644 index 000000000..64b8bfd01 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NETRESET.html @@ -0,0 +1 @@ +__WASI_ERRNO_NETRESET in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NETRESET

Source
pub const __WASI_ERRNO_NETRESET: Type = 39;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NETUNREACH.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NETUNREACH.html new file mode 100644 index 000000000..9e4d5e7cc --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NETUNREACH.html @@ -0,0 +1 @@ +__WASI_ERRNO_NETUNREACH in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NETUNREACH

Source
pub const __WASI_ERRNO_NETUNREACH: Type = 40;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NFILE.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NFILE.html new file mode 100644 index 000000000..d3db1c0df --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NFILE.html @@ -0,0 +1 @@ +__WASI_ERRNO_NFILE in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NFILE

Source
pub const __WASI_ERRNO_NFILE: Type = 41;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOBUFS.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOBUFS.html new file mode 100644 index 000000000..367425eeb --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOBUFS.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOBUFS in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOBUFS

Source
pub const __WASI_ERRNO_NOBUFS: Type = 42;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NODEV.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NODEV.html new file mode 100644 index 000000000..1ef5b14e2 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NODEV.html @@ -0,0 +1 @@ +__WASI_ERRNO_NODEV in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NODEV

Source
pub const __WASI_ERRNO_NODEV: Type = 43;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOENT.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOENT.html new file mode 100644 index 000000000..eda36ced1 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOENT.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOENT in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOENT

Source
pub const __WASI_ERRNO_NOENT: Type = 44;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOEXEC.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOEXEC.html new file mode 100644 index 000000000..635b7ae81 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOEXEC.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOEXEC in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOEXEC

Source
pub const __WASI_ERRNO_NOEXEC: Type = 45;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOLCK.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOLCK.html new file mode 100644 index 000000000..f6a28ae95 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOLCK.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOLCK in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOLCK

Source
pub const __WASI_ERRNO_NOLCK: Type = 46;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOLINK.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOLINK.html new file mode 100644 index 000000000..b8e92abca --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOLINK.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOLINK in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOLINK

Source
pub const __WASI_ERRNO_NOLINK: Type = 47;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOMEM.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOMEM.html new file mode 100644 index 000000000..283ad8184 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOMEM.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOMEM in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOMEM

Source
pub const __WASI_ERRNO_NOMEM: Type = 48;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOMSG.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOMSG.html new file mode 100644 index 000000000..2028c21f4 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOMSG.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOMSG in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOMSG

Source
pub const __WASI_ERRNO_NOMSG: Type = 49;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOPROTOOPT.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOPROTOOPT.html new file mode 100644 index 000000000..80ec058b7 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOPROTOOPT.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOPROTOOPT in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOPROTOOPT

Source
pub const __WASI_ERRNO_NOPROTOOPT: Type = 50;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOSPC.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOSPC.html new file mode 100644 index 000000000..d0afd2101 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOSPC.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOSPC in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOSPC

Source
pub const __WASI_ERRNO_NOSPC: Type = 51;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOSYS.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOSYS.html new file mode 100644 index 000000000..394c02477 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOSYS.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOSYS in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOSYS

Source
pub const __WASI_ERRNO_NOSYS: Type = 52;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTCAPABLE.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTCAPABLE.html new file mode 100644 index 000000000..116eeaad2 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTCAPABLE.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOTCAPABLE in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOTCAPABLE

Source
pub const __WASI_ERRNO_NOTCAPABLE: Type = 76;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTCONN.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTCONN.html new file mode 100644 index 000000000..925ebed1b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTCONN.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOTCONN in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOTCONN

Source
pub const __WASI_ERRNO_NOTCONN: Type = 53;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTDIR.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTDIR.html new file mode 100644 index 000000000..a94af9d29 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTDIR.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOTDIR in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOTDIR

Source
pub const __WASI_ERRNO_NOTDIR: Type = 54;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTEMPTY.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTEMPTY.html new file mode 100644 index 000000000..ea47c840c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTEMPTY.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOTEMPTY in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOTEMPTY

Source
pub const __WASI_ERRNO_NOTEMPTY: Type = 55;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTRECOVERABLE.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTRECOVERABLE.html new file mode 100644 index 000000000..dc1fe9eef --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTRECOVERABLE.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOTRECOVERABLE in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOTRECOVERABLE

Source
pub const __WASI_ERRNO_NOTRECOVERABLE: Type = 56;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTSOCK.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTSOCK.html new file mode 100644 index 000000000..a47f7af01 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTSOCK.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOTSOCK in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOTSOCK

Source
pub const __WASI_ERRNO_NOTSOCK: Type = 57;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTSUP.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTSUP.html new file mode 100644 index 000000000..abf3b4c28 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTSUP.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOTSUP in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOTSUP

Source
pub const __WASI_ERRNO_NOTSUP: Type = 58;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTTY.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTTY.html new file mode 100644 index 000000000..a6ed16023 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NOTTY.html @@ -0,0 +1 @@ +__WASI_ERRNO_NOTTY in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NOTTY

Source
pub const __WASI_ERRNO_NOTTY: Type = 59;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NXIO.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NXIO.html new file mode 100644 index 000000000..8040deb57 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_NXIO.html @@ -0,0 +1 @@ +__WASI_ERRNO_NXIO in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_NXIO

Source
pub const __WASI_ERRNO_NXIO: Type = 60;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_OVERFLOW.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_OVERFLOW.html new file mode 100644 index 000000000..48985fe97 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_OVERFLOW.html @@ -0,0 +1 @@ +__WASI_ERRNO_OVERFLOW in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_OVERFLOW

Source
pub const __WASI_ERRNO_OVERFLOW: Type = 61;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_OWNERDEAD.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_OWNERDEAD.html new file mode 100644 index 000000000..d94fb1575 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_OWNERDEAD.html @@ -0,0 +1 @@ +__WASI_ERRNO_OWNERDEAD in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_OWNERDEAD

Source
pub const __WASI_ERRNO_OWNERDEAD: Type = 62;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PERM.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PERM.html new file mode 100644 index 000000000..6bc87264a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PERM.html @@ -0,0 +1 @@ +__WASI_ERRNO_PERM in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_PERM

Source
pub const __WASI_ERRNO_PERM: Type = 63;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PIPE.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PIPE.html new file mode 100644 index 000000000..523d7c667 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PIPE.html @@ -0,0 +1 @@ +__WASI_ERRNO_PIPE in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_PIPE

Source
pub const __WASI_ERRNO_PIPE: Type = 64;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PROTO.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PROTO.html new file mode 100644 index 000000000..57cd4f476 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PROTO.html @@ -0,0 +1 @@ +__WASI_ERRNO_PROTO in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_PROTO

Source
pub const __WASI_ERRNO_PROTO: Type = 65;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PROTONOSUPPORT.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PROTONOSUPPORT.html new file mode 100644 index 000000000..46854f1d0 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PROTONOSUPPORT.html @@ -0,0 +1 @@ +__WASI_ERRNO_PROTONOSUPPORT in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_PROTONOSUPPORT

Source
pub const __WASI_ERRNO_PROTONOSUPPORT: Type = 66;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PROTOTYPE.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PROTOTYPE.html new file mode 100644 index 000000000..e58618014 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_PROTOTYPE.html @@ -0,0 +1 @@ +__WASI_ERRNO_PROTOTYPE in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_PROTOTYPE

Source
pub const __WASI_ERRNO_PROTOTYPE: Type = 67;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_RANGE.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_RANGE.html new file mode 100644 index 000000000..704a4d82e --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_RANGE.html @@ -0,0 +1 @@ +__WASI_ERRNO_RANGE in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_RANGE

Source
pub const __WASI_ERRNO_RANGE: Type = 68;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ROFS.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ROFS.html new file mode 100644 index 000000000..59756abe0 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_ROFS.html @@ -0,0 +1 @@ +__WASI_ERRNO_ROFS in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_ROFS

Source
pub const __WASI_ERRNO_ROFS: Type = 69;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_SPIPE.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_SPIPE.html new file mode 100644 index 000000000..3da1b8258 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_SPIPE.html @@ -0,0 +1 @@ +__WASI_ERRNO_SPIPE in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_SPIPE

Source
pub const __WASI_ERRNO_SPIPE: Type = 70;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_SRCH.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_SRCH.html new file mode 100644 index 000000000..4ad3eabef --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_SRCH.html @@ -0,0 +1 @@ +__WASI_ERRNO_SRCH in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_SRCH

Source
pub const __WASI_ERRNO_SRCH: Type = 71;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_STALE.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_STALE.html new file mode 100644 index 000000000..e6dab0e2e --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_STALE.html @@ -0,0 +1 @@ +__WASI_ERRNO_STALE in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_STALE

Source
pub const __WASI_ERRNO_STALE: Type = 72;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_SUCCESS.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_SUCCESS.html new file mode 100644 index 000000000..3c0b124a7 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_SUCCESS.html @@ -0,0 +1 @@ +__WASI_ERRNO_SUCCESS in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_SUCCESS

Source
pub const __WASI_ERRNO_SUCCESS: Type = 0;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_TIMEDOUT.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_TIMEDOUT.html new file mode 100644 index 000000000..d4bf74a23 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_TIMEDOUT.html @@ -0,0 +1 @@ +__WASI_ERRNO_TIMEDOUT in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_TIMEDOUT

Source
pub const __WASI_ERRNO_TIMEDOUT: Type = 73;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_TXTBSY.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_TXTBSY.html new file mode 100644 index 000000000..4cc744caf --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_TXTBSY.html @@ -0,0 +1 @@ +__WASI_ERRNO_TXTBSY in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_TXTBSY

Source
pub const __WASI_ERRNO_TXTBSY: Type = 74;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_XDEV.html b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_XDEV.html new file mode 100644 index 000000000..875934381 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/constant.__WASI_ERRNO_XDEV.html @@ -0,0 +1 @@ +__WASI_ERRNO_XDEV in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Constant __WASI_ERRNO_XDEV

Source
pub const __WASI_ERRNO_XDEV: Type = 75;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/index.html b/async_wasi/snapshots/common/types/__wasi_errno_t/index.html new file mode 100644 index 000000000..20694371f --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types

Module __wasi_errno_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_errno_t/sidebar-items.js new file mode 100644 index 000000000..6b291af09 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_ERRNO_2BIG","__WASI_ERRNO_ACCES","__WASI_ERRNO_ADDRINUSE","__WASI_ERRNO_ADDRNOTAVAIL","__WASI_ERRNO_AFNOSUPPORT","__WASI_ERRNO_AGAIN","__WASI_ERRNO_AIADDRFAMILY","__WASI_ERRNO_AIAGAIN","__WASI_ERRNO_AIBADFLAG","__WASI_ERRNO_AIFAIL","__WASI_ERRNO_AIFAMILY","__WASI_ERRNO_AIMEMORY","__WASI_ERRNO_AINODATA","__WASI_ERRNO_AINONAME","__WASI_ERRNO_AISERVICE","__WASI_ERRNO_AISOCKTYPE","__WASI_ERRNO_AISYSTEM","__WASI_ERRNO_ALREADY","__WASI_ERRNO_BADF","__WASI_ERRNO_BADMSG","__WASI_ERRNO_BUSY","__WASI_ERRNO_CANCELED","__WASI_ERRNO_CHILD","__WASI_ERRNO_CONNABORTED","__WASI_ERRNO_CONNREFUSED","__WASI_ERRNO_CONNRESET","__WASI_ERRNO_DEADLK","__WASI_ERRNO_DESTADDRREQ","__WASI_ERRNO_DOM","__WASI_ERRNO_DQUOT","__WASI_ERRNO_EXIST","__WASI_ERRNO_FAULT","__WASI_ERRNO_FBIG","__WASI_ERRNO_HOSTUNREACH","__WASI_ERRNO_IDRM","__WASI_ERRNO_ILSEQ","__WASI_ERRNO_INPROGRESS","__WASI_ERRNO_INTR","__WASI_ERRNO_INVAL","__WASI_ERRNO_IO","__WASI_ERRNO_ISCONN","__WASI_ERRNO_ISDIR","__WASI_ERRNO_LOOP","__WASI_ERRNO_MFILE","__WASI_ERRNO_MLINK","__WASI_ERRNO_MSGSIZE","__WASI_ERRNO_MULTIHOP","__WASI_ERRNO_NAMETOOLONG","__WASI_ERRNO_NETDOWN","__WASI_ERRNO_NETRESET","__WASI_ERRNO_NETUNREACH","__WASI_ERRNO_NFILE","__WASI_ERRNO_NOBUFS","__WASI_ERRNO_NODEV","__WASI_ERRNO_NOENT","__WASI_ERRNO_NOEXEC","__WASI_ERRNO_NOLCK","__WASI_ERRNO_NOLINK","__WASI_ERRNO_NOMEM","__WASI_ERRNO_NOMSG","__WASI_ERRNO_NOPROTOOPT","__WASI_ERRNO_NOSPC","__WASI_ERRNO_NOSYS","__WASI_ERRNO_NOTCAPABLE","__WASI_ERRNO_NOTCONN","__WASI_ERRNO_NOTDIR","__WASI_ERRNO_NOTEMPTY","__WASI_ERRNO_NOTRECOVERABLE","__WASI_ERRNO_NOTSOCK","__WASI_ERRNO_NOTSUP","__WASI_ERRNO_NOTTY","__WASI_ERRNO_NXIO","__WASI_ERRNO_OVERFLOW","__WASI_ERRNO_OWNERDEAD","__WASI_ERRNO_PERM","__WASI_ERRNO_PIPE","__WASI_ERRNO_PROTO","__WASI_ERRNO_PROTONOSUPPORT","__WASI_ERRNO_PROTOTYPE","__WASI_ERRNO_RANGE","__WASI_ERRNO_ROFS","__WASI_ERRNO_SPIPE","__WASI_ERRNO_SRCH","__WASI_ERRNO_STALE","__WASI_ERRNO_SUCCESS","__WASI_ERRNO_TIMEDOUT","__WASI_ERRNO_TXTBSY","__WASI_ERRNO_XDEV"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_errno_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_errno_t/type.Type.html new file mode 100644 index 000000000..594cb6620 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_errno_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_errno_t - Rust
async_wasi::snapshots::common::types::__wasi_errno_t

Type Alias Type

Source
pub type Type = u16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_eventrwflags_t/constant.__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP.html b/async_wasi/snapshots/common/types/__wasi_eventrwflags_t/constant.__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP.html new file mode 100644 index 000000000..73bcfa08a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_eventrwflags_t/constant.__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP.html @@ -0,0 +1 @@ +__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP in async_wasi::snapshots::common::types::__wasi_eventrwflags_t - Rust
async_wasi::snapshots::common::types::__wasi_eventrwflags_t

Constant __WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP

Source
pub const __WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_eventrwflags_t/index.html b/async_wasi/snapshots/common/types/__wasi_eventrwflags_t/index.html new file mode 100644 index 000000000..1416b2f0c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_eventrwflags_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_eventrwflags_t - Rust
async_wasi::snapshots::common::types

Module __wasi_eventrwflags_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_eventrwflags_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_eventrwflags_t/sidebar-items.js new file mode 100644 index 000000000..e727f3b0b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_eventrwflags_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_eventrwflags_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_eventrwflags_t/type.Type.html new file mode 100644 index 000000000..de1c322b9 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_eventrwflags_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_eventrwflags_t - Rust
async_wasi::snapshots::common::types::__wasi_eventrwflags_t

Type Alias Type

Source
pub type Type = u16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_eventtype_t/constant.__WASI_EVENTTYPE_CLOCK.html b/async_wasi/snapshots/common/types/__wasi_eventtype_t/constant.__WASI_EVENTTYPE_CLOCK.html new file mode 100644 index 000000000..9447d3078 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_eventtype_t/constant.__WASI_EVENTTYPE_CLOCK.html @@ -0,0 +1 @@ +__WASI_EVENTTYPE_CLOCK in async_wasi::snapshots::common::types::__wasi_eventtype_t - Rust
async_wasi::snapshots::common::types::__wasi_eventtype_t

Constant __WASI_EVENTTYPE_CLOCK

Source
pub const __WASI_EVENTTYPE_CLOCK: Type = 0;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_eventtype_t/constant.__WASI_EVENTTYPE_FD_READ.html b/async_wasi/snapshots/common/types/__wasi_eventtype_t/constant.__WASI_EVENTTYPE_FD_READ.html new file mode 100644 index 000000000..44a2eb63a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_eventtype_t/constant.__WASI_EVENTTYPE_FD_READ.html @@ -0,0 +1 @@ +__WASI_EVENTTYPE_FD_READ in async_wasi::snapshots::common::types::__wasi_eventtype_t - Rust
async_wasi::snapshots::common::types::__wasi_eventtype_t

Constant __WASI_EVENTTYPE_FD_READ

Source
pub const __WASI_EVENTTYPE_FD_READ: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_eventtype_t/constant.__WASI_EVENTTYPE_FD_WRITE.html b/async_wasi/snapshots/common/types/__wasi_eventtype_t/constant.__WASI_EVENTTYPE_FD_WRITE.html new file mode 100644 index 000000000..6ce06a3eb --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_eventtype_t/constant.__WASI_EVENTTYPE_FD_WRITE.html @@ -0,0 +1 @@ +__WASI_EVENTTYPE_FD_WRITE in async_wasi::snapshots::common::types::__wasi_eventtype_t - Rust
async_wasi::snapshots::common::types::__wasi_eventtype_t

Constant __WASI_EVENTTYPE_FD_WRITE

Source
pub const __WASI_EVENTTYPE_FD_WRITE: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_eventtype_t/index.html b/async_wasi/snapshots/common/types/__wasi_eventtype_t/index.html new file mode 100644 index 000000000..5a22136be --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_eventtype_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_eventtype_t - Rust
async_wasi::snapshots::common::types

Module __wasi_eventtype_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_eventtype_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_eventtype_t/sidebar-items.js new file mode 100644 index 000000000..133d0f73c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_eventtype_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_EVENTTYPE_CLOCK","__WASI_EVENTTYPE_FD_READ","__WASI_EVENTTYPE_FD_WRITE"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_eventtype_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_eventtype_t/type.Type.html new file mode 100644 index 000000000..435854790 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_eventtype_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_eventtype_t - Rust
async_wasi::snapshots::common::types::__wasi_eventtype_t

Type Alias Type

Source
pub type Type = u8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_APPEND.html b/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_APPEND.html new file mode 100644 index 000000000..1b1001485 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_APPEND.html @@ -0,0 +1 @@ +__WASI_FDFLAGS_APPEND in async_wasi::snapshots::common::types::__wasi_fdflags_t - Rust
async_wasi::snapshots::common::types::__wasi_fdflags_t

Constant __WASI_FDFLAGS_APPEND

Source
pub const __WASI_FDFLAGS_APPEND: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_DSYNC.html b/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_DSYNC.html new file mode 100644 index 000000000..b308f4f58 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_DSYNC.html @@ -0,0 +1 @@ +__WASI_FDFLAGS_DSYNC in async_wasi::snapshots::common::types::__wasi_fdflags_t - Rust
async_wasi::snapshots::common::types::__wasi_fdflags_t

Constant __WASI_FDFLAGS_DSYNC

Source
pub const __WASI_FDFLAGS_DSYNC: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_NONBLOCK.html b/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_NONBLOCK.html new file mode 100644 index 000000000..8daff55e8 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_NONBLOCK.html @@ -0,0 +1 @@ +__WASI_FDFLAGS_NONBLOCK in async_wasi::snapshots::common::types::__wasi_fdflags_t - Rust
async_wasi::snapshots::common::types::__wasi_fdflags_t

Constant __WASI_FDFLAGS_NONBLOCK

Source
pub const __WASI_FDFLAGS_NONBLOCK: Type = 4;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_RSYNC.html b/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_RSYNC.html new file mode 100644 index 000000000..ced843e15 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_RSYNC.html @@ -0,0 +1 @@ +__WASI_FDFLAGS_RSYNC in async_wasi::snapshots::common::types::__wasi_fdflags_t - Rust
async_wasi::snapshots::common::types::__wasi_fdflags_t

Constant __WASI_FDFLAGS_RSYNC

Source
pub const __WASI_FDFLAGS_RSYNC: Type = 8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_SYNC.html b/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_SYNC.html new file mode 100644 index 000000000..5eb038b75 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fdflags_t/constant.__WASI_FDFLAGS_SYNC.html @@ -0,0 +1 @@ +__WASI_FDFLAGS_SYNC in async_wasi::snapshots::common::types::__wasi_fdflags_t - Rust
async_wasi::snapshots::common::types::__wasi_fdflags_t

Constant __WASI_FDFLAGS_SYNC

Source
pub const __WASI_FDFLAGS_SYNC: Type = 16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fdflags_t/index.html b/async_wasi/snapshots/common/types/__wasi_fdflags_t/index.html new file mode 100644 index 000000000..276ecd046 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fdflags_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_fdflags_t - Rust
async_wasi::snapshots::common::types

Module __wasi_fdflags_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fdflags_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_fdflags_t/sidebar-items.js new file mode 100644 index 000000000..895f4a643 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fdflags_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_FDFLAGS_APPEND","__WASI_FDFLAGS_DSYNC","__WASI_FDFLAGS_NONBLOCK","__WASI_FDFLAGS_RSYNC","__WASI_FDFLAGS_SYNC"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fdflags_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_fdflags_t/type.Type.html new file mode 100644 index 000000000..d77ddfe9a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fdflags_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_fdflags_t - Rust
async_wasi::snapshots::common::types::__wasi_fdflags_t

Type Alias Type

Source
pub type Type = u16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_BLOCK_DEVICE.html b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_BLOCK_DEVICE.html new file mode 100644 index 000000000..73267bcea --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_BLOCK_DEVICE.html @@ -0,0 +1 @@ +__WASI_FILETYPE_BLOCK_DEVICE in async_wasi::snapshots::common::types::__wasi_filetype_t - Rust
async_wasi::snapshots::common::types::__wasi_filetype_t

Constant __WASI_FILETYPE_BLOCK_DEVICE

Source
pub const __WASI_FILETYPE_BLOCK_DEVICE: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_CHARACTER_DEVICE.html b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_CHARACTER_DEVICE.html new file mode 100644 index 000000000..9a0a736aa --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_CHARACTER_DEVICE.html @@ -0,0 +1 @@ +__WASI_FILETYPE_CHARACTER_DEVICE in async_wasi::snapshots::common::types::__wasi_filetype_t - Rust
async_wasi::snapshots::common::types::__wasi_filetype_t

Constant __WASI_FILETYPE_CHARACTER_DEVICE

Source
pub const __WASI_FILETYPE_CHARACTER_DEVICE: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_DIRECTORY.html b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_DIRECTORY.html new file mode 100644 index 000000000..c648a47da --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_DIRECTORY.html @@ -0,0 +1 @@ +__WASI_FILETYPE_DIRECTORY in async_wasi::snapshots::common::types::__wasi_filetype_t - Rust
async_wasi::snapshots::common::types::__wasi_filetype_t

Constant __WASI_FILETYPE_DIRECTORY

Source
pub const __WASI_FILETYPE_DIRECTORY: Type = 3;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_REGULAR_FILE.html b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_REGULAR_FILE.html new file mode 100644 index 000000000..e778ad564 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_REGULAR_FILE.html @@ -0,0 +1 @@ +__WASI_FILETYPE_REGULAR_FILE in async_wasi::snapshots::common::types::__wasi_filetype_t - Rust
async_wasi::snapshots::common::types::__wasi_filetype_t

Constant __WASI_FILETYPE_REGULAR_FILE

Source
pub const __WASI_FILETYPE_REGULAR_FILE: Type = 4;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_SOCKET_DGRAM.html b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_SOCKET_DGRAM.html new file mode 100644 index 000000000..d3683e69f --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_SOCKET_DGRAM.html @@ -0,0 +1 @@ +__WASI_FILETYPE_SOCKET_DGRAM in async_wasi::snapshots::common::types::__wasi_filetype_t - Rust
async_wasi::snapshots::common::types::__wasi_filetype_t

Constant __WASI_FILETYPE_SOCKET_DGRAM

Source
pub const __WASI_FILETYPE_SOCKET_DGRAM: Type = 5;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_SOCKET_STREAM.html b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_SOCKET_STREAM.html new file mode 100644 index 000000000..49777bed6 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_SOCKET_STREAM.html @@ -0,0 +1 @@ +__WASI_FILETYPE_SOCKET_STREAM in async_wasi::snapshots::common::types::__wasi_filetype_t - Rust
async_wasi::snapshots::common::types::__wasi_filetype_t

Constant __WASI_FILETYPE_SOCKET_STREAM

Source
pub const __WASI_FILETYPE_SOCKET_STREAM: Type = 6;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_SYMBOLIC_LINK.html b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_SYMBOLIC_LINK.html new file mode 100644 index 000000000..7e7cef28a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_SYMBOLIC_LINK.html @@ -0,0 +1 @@ +__WASI_FILETYPE_SYMBOLIC_LINK in async_wasi::snapshots::common::types::__wasi_filetype_t - Rust
async_wasi::snapshots::common::types::__wasi_filetype_t

Constant __WASI_FILETYPE_SYMBOLIC_LINK

Source
pub const __WASI_FILETYPE_SYMBOLIC_LINK: Type = 7;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_UNKNOWN.html b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_UNKNOWN.html new file mode 100644 index 000000000..6955c1f9f --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_filetype_t/constant.__WASI_FILETYPE_UNKNOWN.html @@ -0,0 +1 @@ +__WASI_FILETYPE_UNKNOWN in async_wasi::snapshots::common::types::__wasi_filetype_t - Rust
async_wasi::snapshots::common::types::__wasi_filetype_t

Constant __WASI_FILETYPE_UNKNOWN

Source
pub const __WASI_FILETYPE_UNKNOWN: Type = 0;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_filetype_t/index.html b/async_wasi/snapshots/common/types/__wasi_filetype_t/index.html new file mode 100644 index 000000000..89d808425 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_filetype_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_filetype_t - Rust
async_wasi::snapshots::common::types

Module __wasi_filetype_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_filetype_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_filetype_t/sidebar-items.js new file mode 100644 index 000000000..4a5f5be88 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_filetype_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_FILETYPE_BLOCK_DEVICE","__WASI_FILETYPE_CHARACTER_DEVICE","__WASI_FILETYPE_DIRECTORY","__WASI_FILETYPE_REGULAR_FILE","__WASI_FILETYPE_SOCKET_DGRAM","__WASI_FILETYPE_SOCKET_STREAM","__WASI_FILETYPE_SYMBOLIC_LINK","__WASI_FILETYPE_UNKNOWN"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_filetype_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_filetype_t/type.Type.html new file mode 100644 index 000000000..0f635059c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_filetype_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_filetype_t - Rust
async_wasi::snapshots::common::types::__wasi_filetype_t

Type Alias Type

Source
pub type Type = u8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fstflags_t/constant.__WASI_FSTFLAGS_ATIM.html b/async_wasi/snapshots/common/types/__wasi_fstflags_t/constant.__WASI_FSTFLAGS_ATIM.html new file mode 100644 index 000000000..299eaf2da --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fstflags_t/constant.__WASI_FSTFLAGS_ATIM.html @@ -0,0 +1 @@ +__WASI_FSTFLAGS_ATIM in async_wasi::snapshots::common::types::__wasi_fstflags_t - Rust
async_wasi::snapshots::common::types::__wasi_fstflags_t

Constant __WASI_FSTFLAGS_ATIM

Source
pub const __WASI_FSTFLAGS_ATIM: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fstflags_t/constant.__WASI_FSTFLAGS_ATIM_NOW.html b/async_wasi/snapshots/common/types/__wasi_fstflags_t/constant.__WASI_FSTFLAGS_ATIM_NOW.html new file mode 100644 index 000000000..3940fb6e5 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fstflags_t/constant.__WASI_FSTFLAGS_ATIM_NOW.html @@ -0,0 +1 @@ +__WASI_FSTFLAGS_ATIM_NOW in async_wasi::snapshots::common::types::__wasi_fstflags_t - Rust
async_wasi::snapshots::common::types::__wasi_fstflags_t

Constant __WASI_FSTFLAGS_ATIM_NOW

Source
pub const __WASI_FSTFLAGS_ATIM_NOW: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fstflags_t/constant.__WASI_FSTFLAGS_MTIM.html b/async_wasi/snapshots/common/types/__wasi_fstflags_t/constant.__WASI_FSTFLAGS_MTIM.html new file mode 100644 index 000000000..344ca1c96 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fstflags_t/constant.__WASI_FSTFLAGS_MTIM.html @@ -0,0 +1 @@ +__WASI_FSTFLAGS_MTIM in async_wasi::snapshots::common::types::__wasi_fstflags_t - Rust
async_wasi::snapshots::common::types::__wasi_fstflags_t

Constant __WASI_FSTFLAGS_MTIM

Source
pub const __WASI_FSTFLAGS_MTIM: Type = 4;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fstflags_t/constant.__WASI_FSTFLAGS_MTIM_NOW.html b/async_wasi/snapshots/common/types/__wasi_fstflags_t/constant.__WASI_FSTFLAGS_MTIM_NOW.html new file mode 100644 index 000000000..00d1d2922 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fstflags_t/constant.__WASI_FSTFLAGS_MTIM_NOW.html @@ -0,0 +1 @@ +__WASI_FSTFLAGS_MTIM_NOW in async_wasi::snapshots::common::types::__wasi_fstflags_t - Rust
async_wasi::snapshots::common::types::__wasi_fstflags_t

Constant __WASI_FSTFLAGS_MTIM_NOW

Source
pub const __WASI_FSTFLAGS_MTIM_NOW: Type = 8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fstflags_t/index.html b/async_wasi/snapshots/common/types/__wasi_fstflags_t/index.html new file mode 100644 index 000000000..2b13f8359 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fstflags_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_fstflags_t - Rust
async_wasi::snapshots::common::types

Module __wasi_fstflags_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fstflags_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_fstflags_t/sidebar-items.js new file mode 100644 index 000000000..8fc2b91f9 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fstflags_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_FSTFLAGS_ATIM","__WASI_FSTFLAGS_ATIM_NOW","__WASI_FSTFLAGS_MTIM","__WASI_FSTFLAGS_MTIM_NOW"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_fstflags_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_fstflags_t/type.Type.html new file mode 100644 index 000000000..c58148c42 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_fstflags_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_fstflags_t - Rust
async_wasi::snapshots::common::types::__wasi_fstflags_t

Type Alias Type

Source
pub type Type = u16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_lookupflags_t/constant.__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW.html b/async_wasi/snapshots/common/types/__wasi_lookupflags_t/constant.__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW.html new file mode 100644 index 000000000..09c4121ed --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_lookupflags_t/constant.__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW.html @@ -0,0 +1 @@ +__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW in async_wasi::snapshots::common::types::__wasi_lookupflags_t - Rust
async_wasi::snapshots::common::types::__wasi_lookupflags_t

Constant __WASI_LOOKUPFLAGS_SYMLINK_FOLLOW

Source
pub const __WASI_LOOKUPFLAGS_SYMLINK_FOLLOW: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_lookupflags_t/index.html b/async_wasi/snapshots/common/types/__wasi_lookupflags_t/index.html new file mode 100644 index 000000000..b6f110798 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_lookupflags_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_lookupflags_t - Rust
async_wasi::snapshots::common::types

Module __wasi_lookupflags_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_lookupflags_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_lookupflags_t/sidebar-items.js new file mode 100644 index 000000000..6283c5dbe --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_lookupflags_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_lookupflags_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_lookupflags_t/type.Type.html new file mode 100644 index 000000000..628a6de71 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_lookupflags_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_lookupflags_t - Rust
async_wasi::snapshots::common::types::__wasi_lookupflags_t

Type Alias Type

Source
pub type Type = u32;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_oflags_t/constant.__WASI_OFLAGS_CREAT.html b/async_wasi/snapshots/common/types/__wasi_oflags_t/constant.__WASI_OFLAGS_CREAT.html new file mode 100644 index 000000000..04abbbd7a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_oflags_t/constant.__WASI_OFLAGS_CREAT.html @@ -0,0 +1 @@ +__WASI_OFLAGS_CREAT in async_wasi::snapshots::common::types::__wasi_oflags_t - Rust
async_wasi::snapshots::common::types::__wasi_oflags_t

Constant __WASI_OFLAGS_CREAT

Source
pub const __WASI_OFLAGS_CREAT: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_oflags_t/constant.__WASI_OFLAGS_DIRECTORY.html b/async_wasi/snapshots/common/types/__wasi_oflags_t/constant.__WASI_OFLAGS_DIRECTORY.html new file mode 100644 index 000000000..c51dbabb5 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_oflags_t/constant.__WASI_OFLAGS_DIRECTORY.html @@ -0,0 +1 @@ +__WASI_OFLAGS_DIRECTORY in async_wasi::snapshots::common::types::__wasi_oflags_t - Rust
async_wasi::snapshots::common::types::__wasi_oflags_t

Constant __WASI_OFLAGS_DIRECTORY

Source
pub const __WASI_OFLAGS_DIRECTORY: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_oflags_t/constant.__WASI_OFLAGS_EXCL.html b/async_wasi/snapshots/common/types/__wasi_oflags_t/constant.__WASI_OFLAGS_EXCL.html new file mode 100644 index 000000000..d899c54ad --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_oflags_t/constant.__WASI_OFLAGS_EXCL.html @@ -0,0 +1 @@ +__WASI_OFLAGS_EXCL in async_wasi::snapshots::common::types::__wasi_oflags_t - Rust
async_wasi::snapshots::common::types::__wasi_oflags_t

Constant __WASI_OFLAGS_EXCL

Source
pub const __WASI_OFLAGS_EXCL: Type = 4;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_oflags_t/constant.__WASI_OFLAGS_TRUNC.html b/async_wasi/snapshots/common/types/__wasi_oflags_t/constant.__WASI_OFLAGS_TRUNC.html new file mode 100644 index 000000000..9610e6c09 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_oflags_t/constant.__WASI_OFLAGS_TRUNC.html @@ -0,0 +1 @@ +__WASI_OFLAGS_TRUNC in async_wasi::snapshots::common::types::__wasi_oflags_t - Rust
async_wasi::snapshots::common::types::__wasi_oflags_t

Constant __WASI_OFLAGS_TRUNC

Source
pub const __WASI_OFLAGS_TRUNC: Type = 8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_oflags_t/index.html b/async_wasi/snapshots/common/types/__wasi_oflags_t/index.html new file mode 100644 index 000000000..eb0080d80 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_oflags_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_oflags_t - Rust
async_wasi::snapshots::common::types

Module __wasi_oflags_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_oflags_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_oflags_t/sidebar-items.js new file mode 100644 index 000000000..d8f7d2b50 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_oflags_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_OFLAGS_CREAT","__WASI_OFLAGS_DIRECTORY","__WASI_OFLAGS_EXCL","__WASI_OFLAGS_TRUNC"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_oflags_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_oflags_t/type.Type.html new file mode 100644 index 000000000..e79712689 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_oflags_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_oflags_t - Rust
async_wasi::snapshots::common::types::__wasi_oflags_t

Type Alias Type

Source
pub type Type = u16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_preopentype_t/constant.__WASI_PREOPENTYPE_DIR.html b/async_wasi/snapshots/common/types/__wasi_preopentype_t/constant.__WASI_PREOPENTYPE_DIR.html new file mode 100644 index 000000000..1eaa906ed --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_preopentype_t/constant.__WASI_PREOPENTYPE_DIR.html @@ -0,0 +1 @@ +__WASI_PREOPENTYPE_DIR in async_wasi::snapshots::common::types::__wasi_preopentype_t - Rust
async_wasi::snapshots::common::types::__wasi_preopentype_t

Constant __WASI_PREOPENTYPE_DIR

Source
pub const __WASI_PREOPENTYPE_DIR: Type = 0;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_preopentype_t/index.html b/async_wasi/snapshots/common/types/__wasi_preopentype_t/index.html new file mode 100644 index 000000000..f6b12ab2f --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_preopentype_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_preopentype_t - Rust
async_wasi::snapshots::common::types

Module __wasi_preopentype_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_preopentype_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_preopentype_t/sidebar-items.js new file mode 100644 index 000000000..3d9512be9 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_preopentype_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_PREOPENTYPE_DIR"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_preopentype_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_preopentype_t/type.Type.html new file mode 100644 index 000000000..607c60554 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_preopentype_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_preopentype_t - Rust
async_wasi::snapshots::common::types::__wasi_preopentype_t

Type Alias Type

Source
pub type Type = u8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_protocol_t/constant.__WASI_PROTOCOL_IPPROTO_IP.html b/async_wasi/snapshots/common/types/__wasi_protocol_t/constant.__WASI_PROTOCOL_IPPROTO_IP.html new file mode 100644 index 000000000..f192b4370 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_protocol_t/constant.__WASI_PROTOCOL_IPPROTO_IP.html @@ -0,0 +1 @@ +__WASI_PROTOCOL_IPPROTO_IP in async_wasi::snapshots::common::types::__wasi_protocol_t - Rust
async_wasi::snapshots::common::types::__wasi_protocol_t

Constant __WASI_PROTOCOL_IPPROTO_IP

Source
pub const __WASI_PROTOCOL_IPPROTO_IP: Type = 0;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_protocol_t/constant.__WASI_PROTOCOL_IPPROTO_TCP.html b/async_wasi/snapshots/common/types/__wasi_protocol_t/constant.__WASI_PROTOCOL_IPPROTO_TCP.html new file mode 100644 index 000000000..cf12e9f74 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_protocol_t/constant.__WASI_PROTOCOL_IPPROTO_TCP.html @@ -0,0 +1 @@ +__WASI_PROTOCOL_IPPROTO_TCP in async_wasi::snapshots::common::types::__wasi_protocol_t - Rust
async_wasi::snapshots::common::types::__wasi_protocol_t

Constant __WASI_PROTOCOL_IPPROTO_TCP

Source
pub const __WASI_PROTOCOL_IPPROTO_TCP: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_protocol_t/constant.__WASI_PROTOCOL_IPPROTO_UDP.html b/async_wasi/snapshots/common/types/__wasi_protocol_t/constant.__WASI_PROTOCOL_IPPROTO_UDP.html new file mode 100644 index 000000000..083a145b8 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_protocol_t/constant.__WASI_PROTOCOL_IPPROTO_UDP.html @@ -0,0 +1 @@ +__WASI_PROTOCOL_IPPROTO_UDP in async_wasi::snapshots::common::types::__wasi_protocol_t - Rust
async_wasi::snapshots::common::types::__wasi_protocol_t

Constant __WASI_PROTOCOL_IPPROTO_UDP

Source
pub const __WASI_PROTOCOL_IPPROTO_UDP: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_protocol_t/index.html b/async_wasi/snapshots/common/types/__wasi_protocol_t/index.html new file mode 100644 index 000000000..ddc6f5934 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_protocol_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_protocol_t - Rust
async_wasi::snapshots::common::types

Module __wasi_protocol_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_protocol_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_protocol_t/sidebar-items.js new file mode 100644 index 000000000..cfdd59f4b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_protocol_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_PROTOCOL_IPPROTO_IP","__WASI_PROTOCOL_IPPROTO_TCP","__WASI_PROTOCOL_IPPROTO_UDP"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_protocol_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_protocol_t/type.Type.html new file mode 100644 index 000000000..9e9050293 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_protocol_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_protocol_t - Rust
async_wasi::snapshots::common::types::__wasi_protocol_t

Type Alias Type

Source
pub type Type = u8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_riflags_t/constant.__WASI_RIFLAGS_RECV_PEEK.html b/async_wasi/snapshots/common/types/__wasi_riflags_t/constant.__WASI_RIFLAGS_RECV_PEEK.html new file mode 100644 index 000000000..ada6d274b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_riflags_t/constant.__WASI_RIFLAGS_RECV_PEEK.html @@ -0,0 +1 @@ +__WASI_RIFLAGS_RECV_PEEK in async_wasi::snapshots::common::types::__wasi_riflags_t - Rust
async_wasi::snapshots::common::types::__wasi_riflags_t

Constant __WASI_RIFLAGS_RECV_PEEK

Source
pub const __WASI_RIFLAGS_RECV_PEEK: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_riflags_t/constant.__WASI_RIFLAGS_RECV_WAITALL.html b/async_wasi/snapshots/common/types/__wasi_riflags_t/constant.__WASI_RIFLAGS_RECV_WAITALL.html new file mode 100644 index 000000000..6a3564ccc --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_riflags_t/constant.__WASI_RIFLAGS_RECV_WAITALL.html @@ -0,0 +1 @@ +__WASI_RIFLAGS_RECV_WAITALL in async_wasi::snapshots::common::types::__wasi_riflags_t - Rust
async_wasi::snapshots::common::types::__wasi_riflags_t

Constant __WASI_RIFLAGS_RECV_WAITALL

Source
pub const __WASI_RIFLAGS_RECV_WAITALL: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_riflags_t/index.html b/async_wasi/snapshots/common/types/__wasi_riflags_t/index.html new file mode 100644 index 000000000..0a8fd2ebc --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_riflags_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_riflags_t - Rust
async_wasi::snapshots::common::types

Module __wasi_riflags_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_riflags_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_riflags_t/sidebar-items.js new file mode 100644 index 000000000..6c582eba0 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_riflags_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_RIFLAGS_RECV_PEEK","__WASI_RIFLAGS_RECV_WAITALL"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_riflags_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_riflags_t/type.Type.html new file mode 100644 index 000000000..f552ab8a9 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_riflags_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_riflags_t - Rust
async_wasi::snapshots::common::types::__wasi_riflags_t

Type Alias Type

Source
pub type Type = u16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_ADVISE.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_ADVISE.html new file mode 100644 index 000000000..72c567702 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_ADVISE.html @@ -0,0 +1 @@ +__WASI_RIGHTS_FD_ADVISE in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_FD_ADVISE

Source
pub const __WASI_RIGHTS_FD_ADVISE: Type = 128;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_ALLOCATE.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_ALLOCATE.html new file mode 100644 index 000000000..aa0289cf9 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_ALLOCATE.html @@ -0,0 +1 @@ +__WASI_RIGHTS_FD_ALLOCATE in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_FD_ALLOCATE

Source
pub const __WASI_RIGHTS_FD_ALLOCATE: Type = 256;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_DATASYNC.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_DATASYNC.html new file mode 100644 index 000000000..f8608d559 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_DATASYNC.html @@ -0,0 +1 @@ +__WASI_RIGHTS_FD_DATASYNC in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_FD_DATASYNC

Source
pub const __WASI_RIGHTS_FD_DATASYNC: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS.html new file mode 100644 index 000000000..0372862a3 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS.html @@ -0,0 +1 @@ +__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS

Source
pub const __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS: Type = 8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_FILESTAT_GET.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_FILESTAT_GET.html new file mode 100644 index 000000000..100e8e2d5 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_FILESTAT_GET.html @@ -0,0 +1 @@ +__WASI_RIGHTS_FD_FILESTAT_GET in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_FD_FILESTAT_GET

Source
pub const __WASI_RIGHTS_FD_FILESTAT_GET: Type = 2097152;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_FILESTAT_SET_SIZE.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_FILESTAT_SET_SIZE.html new file mode 100644 index 000000000..68752af97 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_FILESTAT_SET_SIZE.html @@ -0,0 +1 @@ +__WASI_RIGHTS_FD_FILESTAT_SET_SIZE in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_FD_FILESTAT_SET_SIZE

Source
pub const __WASI_RIGHTS_FD_FILESTAT_SET_SIZE: Type = 4194304;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_FILESTAT_SET_TIMES.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_FILESTAT_SET_TIMES.html new file mode 100644 index 000000000..a857f7dae --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_FILESTAT_SET_TIMES.html @@ -0,0 +1 @@ +__WASI_RIGHTS_FD_FILESTAT_SET_TIMES in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_FD_FILESTAT_SET_TIMES

Source
pub const __WASI_RIGHTS_FD_FILESTAT_SET_TIMES: Type = 8388608;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_READ.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_READ.html new file mode 100644 index 000000000..e4b0d666a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_READ.html @@ -0,0 +1 @@ +__WASI_RIGHTS_FD_READ in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_FD_READ

Source
pub const __WASI_RIGHTS_FD_READ: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_READDIR.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_READDIR.html new file mode 100644 index 000000000..f2f7fc31e --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_READDIR.html @@ -0,0 +1 @@ +__WASI_RIGHTS_FD_READDIR in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_FD_READDIR

Source
pub const __WASI_RIGHTS_FD_READDIR: Type = 16384;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_SEEK.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_SEEK.html new file mode 100644 index 000000000..7f87fbee3 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_SEEK.html @@ -0,0 +1 @@ +__WASI_RIGHTS_FD_SEEK in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_FD_SEEK

Source
pub const __WASI_RIGHTS_FD_SEEK: Type = 4;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_SYNC.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_SYNC.html new file mode 100644 index 000000000..eaf4ccbf3 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_SYNC.html @@ -0,0 +1 @@ +__WASI_RIGHTS_FD_SYNC in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_FD_SYNC

Source
pub const __WASI_RIGHTS_FD_SYNC: Type = 16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_TELL.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_TELL.html new file mode 100644 index 000000000..718a4c6df --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_TELL.html @@ -0,0 +1 @@ +__WASI_RIGHTS_FD_TELL in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_FD_TELL

Source
pub const __WASI_RIGHTS_FD_TELL: Type = 32;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_WRITE.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_WRITE.html new file mode 100644 index 000000000..d5158688c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_FD_WRITE.html @@ -0,0 +1 @@ +__WASI_RIGHTS_FD_WRITE in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_FD_WRITE

Source
pub const __WASI_RIGHTS_FD_WRITE: Type = 64;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_CREATE_DIRECTORY.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_CREATE_DIRECTORY.html new file mode 100644 index 000000000..347873ef7 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_CREATE_DIRECTORY.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_CREATE_DIRECTORY in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_CREATE_DIRECTORY

Source
pub const __WASI_RIGHTS_PATH_CREATE_DIRECTORY: Type = 512;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_CREATE_FILE.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_CREATE_FILE.html new file mode 100644 index 000000000..44df9c016 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_CREATE_FILE.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_CREATE_FILE in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_CREATE_FILE

Source
pub const __WASI_RIGHTS_PATH_CREATE_FILE: Type = 1024;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_FILESTAT_GET.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_FILESTAT_GET.html new file mode 100644 index 000000000..cfcbaa254 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_FILESTAT_GET.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_FILESTAT_GET in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_FILESTAT_GET

Source
pub const __WASI_RIGHTS_PATH_FILESTAT_GET: Type = 262144;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE.html new file mode 100644 index 000000000..99985b7c5 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_FILESTAT_SET_SIZE

Source
pub const __WASI_RIGHTS_PATH_FILESTAT_SET_SIZE: Type = 524288;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES.html new file mode 100644 index 000000000..848711e7a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_FILESTAT_SET_TIMES

Source
pub const __WASI_RIGHTS_PATH_FILESTAT_SET_TIMES: Type = 1048576;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_LINK_SOURCE.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_LINK_SOURCE.html new file mode 100644 index 000000000..48a702eec --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_LINK_SOURCE.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_LINK_SOURCE in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_LINK_SOURCE

Source
pub const __WASI_RIGHTS_PATH_LINK_SOURCE: Type = 2048;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_LINK_TARGET.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_LINK_TARGET.html new file mode 100644 index 000000000..9d6fe767b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_LINK_TARGET.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_LINK_TARGET in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_LINK_TARGET

Source
pub const __WASI_RIGHTS_PATH_LINK_TARGET: Type = 4096;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_OPEN.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_OPEN.html new file mode 100644 index 000000000..ea8e44eae --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_OPEN.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_OPEN in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_OPEN

Source
pub const __WASI_RIGHTS_PATH_OPEN: Type = 8192;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_READLINK.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_READLINK.html new file mode 100644 index 000000000..8659d7cb2 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_READLINK.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_READLINK in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_READLINK

Source
pub const __WASI_RIGHTS_PATH_READLINK: Type = 32768;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_REMOVE_DIRECTORY.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_REMOVE_DIRECTORY.html new file mode 100644 index 000000000..8f2c1e6c2 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_REMOVE_DIRECTORY.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_REMOVE_DIRECTORY in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_REMOVE_DIRECTORY

Source
pub const __WASI_RIGHTS_PATH_REMOVE_DIRECTORY: Type = 33554432;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_RENAME_SOURCE.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_RENAME_SOURCE.html new file mode 100644 index 000000000..5b40394e5 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_RENAME_SOURCE.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_RENAME_SOURCE in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_RENAME_SOURCE

Source
pub const __WASI_RIGHTS_PATH_RENAME_SOURCE: Type = 65536;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_RENAME_TARGET.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_RENAME_TARGET.html new file mode 100644 index 000000000..fe44ddd67 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_RENAME_TARGET.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_RENAME_TARGET in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_RENAME_TARGET

Source
pub const __WASI_RIGHTS_PATH_RENAME_TARGET: Type = 131072;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_SYMLINK.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_SYMLINK.html new file mode 100644 index 000000000..bb9ce2739 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_SYMLINK.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_SYMLINK in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_SYMLINK

Source
pub const __WASI_RIGHTS_PATH_SYMLINK: Type = 16777216;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_UNLINK_FILE.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_UNLINK_FILE.html new file mode 100644 index 000000000..a0b9954a5 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_PATH_UNLINK_FILE.html @@ -0,0 +1 @@ +__WASI_RIGHTS_PATH_UNLINK_FILE in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_PATH_UNLINK_FILE

Source
pub const __WASI_RIGHTS_PATH_UNLINK_FILE: Type = 67108864;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_POLL_FD_READWRITE.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_POLL_FD_READWRITE.html new file mode 100644 index 000000000..8f544e615 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_POLL_FD_READWRITE.html @@ -0,0 +1 @@ +__WASI_RIGHTS_POLL_FD_READWRITE in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_POLL_FD_READWRITE

Source
pub const __WASI_RIGHTS_POLL_FD_READWRITE: Type = 134217728;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_BIND.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_BIND.html new file mode 100644 index 000000000..40e670a44 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_BIND.html @@ -0,0 +1 @@ +__WASI_RIGHTS_SOCK_BIND in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_SOCK_BIND

Source
pub const __WASI_RIGHTS_SOCK_BIND: Type = 2147483648;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_CLOSE.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_CLOSE.html new file mode 100644 index 000000000..c830f03de --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_CLOSE.html @@ -0,0 +1 @@ +__WASI_RIGHTS_SOCK_CLOSE in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_SOCK_CLOSE

Source
pub const __WASI_RIGHTS_SOCK_CLOSE: Type = 1073741824;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_OPEN.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_OPEN.html new file mode 100644 index 000000000..dbe5352ef --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_OPEN.html @@ -0,0 +1 @@ +__WASI_RIGHTS_SOCK_OPEN in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_SOCK_OPEN

Source
pub const __WASI_RIGHTS_SOCK_OPEN: Type = 536870912;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_RECV.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_RECV.html new file mode 100644 index 000000000..cbdb52c1c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_RECV.html @@ -0,0 +1 @@ +__WASI_RIGHTS_SOCK_RECV in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_SOCK_RECV

Source
pub const __WASI_RIGHTS_SOCK_RECV: Type = 4294967296;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_RECV_FROM.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_RECV_FROM.html new file mode 100644 index 000000000..80c153af6 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_RECV_FROM.html @@ -0,0 +1 @@ +__WASI_RIGHTS_SOCK_RECV_FROM in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_SOCK_RECV_FROM

Source
pub const __WASI_RIGHTS_SOCK_RECV_FROM: Type = 8589934592;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_SEND.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_SEND.html new file mode 100644 index 000000000..653d4a438 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_SEND.html @@ -0,0 +1 @@ +__WASI_RIGHTS_SOCK_SEND in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_SOCK_SEND

Source
pub const __WASI_RIGHTS_SOCK_SEND: Type = 17179869184;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_SEND_TO.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_SEND_TO.html new file mode 100644 index 000000000..8cc4e4802 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_SEND_TO.html @@ -0,0 +1 @@ +__WASI_RIGHTS_SOCK_SEND_TO in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_SOCK_SEND_TO

Source
pub const __WASI_RIGHTS_SOCK_SEND_TO: Type = 34359738368;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_SHUTDOWN.html b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_SHUTDOWN.html new file mode 100644 index 000000000..23c0c6612 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/constant.__WASI_RIGHTS_SOCK_SHUTDOWN.html @@ -0,0 +1 @@ +__WASI_RIGHTS_SOCK_SHUTDOWN in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Constant __WASI_RIGHTS_SOCK_SHUTDOWN

Source
pub const __WASI_RIGHTS_SOCK_SHUTDOWN: Type = 268435456;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/index.html b/async_wasi/snapshots/common/types/__wasi_rights_t/index.html new file mode 100644 index 000000000..764930bba --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types

Module __wasi_rights_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_rights_t/sidebar-items.js new file mode 100644 index 000000000..e35cbc9f0 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_RIGHTS_FD_ADVISE","__WASI_RIGHTS_FD_ALLOCATE","__WASI_RIGHTS_FD_DATASYNC","__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS","__WASI_RIGHTS_FD_FILESTAT_GET","__WASI_RIGHTS_FD_FILESTAT_SET_SIZE","__WASI_RIGHTS_FD_FILESTAT_SET_TIMES","__WASI_RIGHTS_FD_READ","__WASI_RIGHTS_FD_READDIR","__WASI_RIGHTS_FD_SEEK","__WASI_RIGHTS_FD_SYNC","__WASI_RIGHTS_FD_TELL","__WASI_RIGHTS_FD_WRITE","__WASI_RIGHTS_PATH_CREATE_DIRECTORY","__WASI_RIGHTS_PATH_CREATE_FILE","__WASI_RIGHTS_PATH_FILESTAT_GET","__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE","__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES","__WASI_RIGHTS_PATH_LINK_SOURCE","__WASI_RIGHTS_PATH_LINK_TARGET","__WASI_RIGHTS_PATH_OPEN","__WASI_RIGHTS_PATH_READLINK","__WASI_RIGHTS_PATH_REMOVE_DIRECTORY","__WASI_RIGHTS_PATH_RENAME_SOURCE","__WASI_RIGHTS_PATH_RENAME_TARGET","__WASI_RIGHTS_PATH_SYMLINK","__WASI_RIGHTS_PATH_UNLINK_FILE","__WASI_RIGHTS_POLL_FD_READWRITE","__WASI_RIGHTS_SOCK_BIND","__WASI_RIGHTS_SOCK_CLOSE","__WASI_RIGHTS_SOCK_OPEN","__WASI_RIGHTS_SOCK_RECV","__WASI_RIGHTS_SOCK_RECV_FROM","__WASI_RIGHTS_SOCK_SEND","__WASI_RIGHTS_SOCK_SEND_TO","__WASI_RIGHTS_SOCK_SHUTDOWN"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_rights_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_rights_t/type.Type.html new file mode 100644 index 000000000..7c7f5bfc2 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_rights_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_rights_t - Rust
async_wasi::snapshots::common::types::__wasi_rights_t

Type Alias Type

Source
pub type Type = u64;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_roflags_t/constant.__WASI_ROFLAGS_RECV_DATA_TRUNCATED.html b/async_wasi/snapshots/common/types/__wasi_roflags_t/constant.__WASI_ROFLAGS_RECV_DATA_TRUNCATED.html new file mode 100644 index 000000000..5efbd6180 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_roflags_t/constant.__WASI_ROFLAGS_RECV_DATA_TRUNCATED.html @@ -0,0 +1 @@ +__WASI_ROFLAGS_RECV_DATA_TRUNCATED in async_wasi::snapshots::common::types::__wasi_roflags_t - Rust
async_wasi::snapshots::common::types::__wasi_roflags_t

Constant __WASI_ROFLAGS_RECV_DATA_TRUNCATED

Source
pub const __WASI_ROFLAGS_RECV_DATA_TRUNCATED: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_roflags_t/index.html b/async_wasi/snapshots/common/types/__wasi_roflags_t/index.html new file mode 100644 index 000000000..cc83f22f2 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_roflags_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_roflags_t - Rust
async_wasi::snapshots::common::types

Module __wasi_roflags_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_roflags_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_roflags_t/sidebar-items.js new file mode 100644 index 000000000..29c5c8683 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_roflags_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_ROFLAGS_RECV_DATA_TRUNCATED"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_roflags_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_roflags_t/type.Type.html new file mode 100644 index 000000000..526d3874f --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_roflags_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_roflags_t - Rust
async_wasi::snapshots::common::types::__wasi_roflags_t

Type Alias Type

Source
pub type Type = u16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sdflags_t/constant.__WASI_SDFLAGS_RD.html b/async_wasi/snapshots/common/types/__wasi_sdflags_t/constant.__WASI_SDFLAGS_RD.html new file mode 100644 index 000000000..fc3f4399b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sdflags_t/constant.__WASI_SDFLAGS_RD.html @@ -0,0 +1 @@ +__WASI_SDFLAGS_RD in async_wasi::snapshots::common::types::__wasi_sdflags_t - Rust
async_wasi::snapshots::common::types::__wasi_sdflags_t

Constant __WASI_SDFLAGS_RD

Source
pub const __WASI_SDFLAGS_RD: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sdflags_t/constant.__WASI_SDFLAGS_WR.html b/async_wasi/snapshots/common/types/__wasi_sdflags_t/constant.__WASI_SDFLAGS_WR.html new file mode 100644 index 000000000..eacdd4d3a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sdflags_t/constant.__WASI_SDFLAGS_WR.html @@ -0,0 +1 @@ +__WASI_SDFLAGS_WR in async_wasi::snapshots::common::types::__wasi_sdflags_t - Rust
async_wasi::snapshots::common::types::__wasi_sdflags_t

Constant __WASI_SDFLAGS_WR

Source
pub const __WASI_SDFLAGS_WR: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sdflags_t/index.html b/async_wasi/snapshots/common/types/__wasi_sdflags_t/index.html new file mode 100644 index 000000000..f2402988b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sdflags_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_sdflags_t - Rust
async_wasi::snapshots::common::types

Module __wasi_sdflags_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sdflags_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_sdflags_t/sidebar-items.js new file mode 100644 index 000000000..e9a418e39 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sdflags_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_SDFLAGS_RD","__WASI_SDFLAGS_WR"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sdflags_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_sdflags_t/type.Type.html new file mode 100644 index 000000000..b5cf7e80b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sdflags_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_sdflags_t - Rust
async_wasi::snapshots::common::types::__wasi_sdflags_t

Type Alias Type

Source
pub type Type = u8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_ABRT.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_ABRT.html new file mode 100644 index 000000000..5be98ff9c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_ABRT.html @@ -0,0 +1 @@ +__WASI_SIGNAL_ABRT in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_ABRT

Source
pub const __WASI_SIGNAL_ABRT: Type = 6;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_ALRM.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_ALRM.html new file mode 100644 index 000000000..f5b745f0d --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_ALRM.html @@ -0,0 +1 @@ +__WASI_SIGNAL_ALRM in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_ALRM

Source
pub const __WASI_SIGNAL_ALRM: Type = 14;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_BUS.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_BUS.html new file mode 100644 index 000000000..9f2ca2fec --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_BUS.html @@ -0,0 +1 @@ +__WASI_SIGNAL_BUS in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_BUS

Source
pub const __WASI_SIGNAL_BUS: Type = 7;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_CHLD.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_CHLD.html new file mode 100644 index 000000000..2f67a1fe1 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_CHLD.html @@ -0,0 +1 @@ +__WASI_SIGNAL_CHLD in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_CHLD

Source
pub const __WASI_SIGNAL_CHLD: Type = 16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_CONT.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_CONT.html new file mode 100644 index 000000000..92af1fe32 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_CONT.html @@ -0,0 +1 @@ +__WASI_SIGNAL_CONT in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_CONT

Source
pub const __WASI_SIGNAL_CONT: Type = 17;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_FPE.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_FPE.html new file mode 100644 index 000000000..244c860cc --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_FPE.html @@ -0,0 +1 @@ +__WASI_SIGNAL_FPE in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_FPE

Source
pub const __WASI_SIGNAL_FPE: Type = 8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_HUP.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_HUP.html new file mode 100644 index 000000000..d860f386f --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_HUP.html @@ -0,0 +1 @@ +__WASI_SIGNAL_HUP in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_HUP

Source
pub const __WASI_SIGNAL_HUP: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_ILL.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_ILL.html new file mode 100644 index 000000000..ab70eed1c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_ILL.html @@ -0,0 +1 @@ +__WASI_SIGNAL_ILL in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_ILL

Source
pub const __WASI_SIGNAL_ILL: Type = 4;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_INT.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_INT.html new file mode 100644 index 000000000..82c23b7ce --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_INT.html @@ -0,0 +1 @@ +__WASI_SIGNAL_INT in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_INT

Source
pub const __WASI_SIGNAL_INT: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_KILL.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_KILL.html new file mode 100644 index 000000000..0b2c2c971 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_KILL.html @@ -0,0 +1 @@ +__WASI_SIGNAL_KILL in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_KILL

Source
pub const __WASI_SIGNAL_KILL: Type = 9;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_NONE.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_NONE.html new file mode 100644 index 000000000..9d3432e98 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_NONE.html @@ -0,0 +1 @@ +__WASI_SIGNAL_NONE in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_NONE

Source
pub const __WASI_SIGNAL_NONE: Type = 0;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_PIPE.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_PIPE.html new file mode 100644 index 000000000..880cd06bd --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_PIPE.html @@ -0,0 +1 @@ +__WASI_SIGNAL_PIPE in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_PIPE

Source
pub const __WASI_SIGNAL_PIPE: Type = 13;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_POLL.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_POLL.html new file mode 100644 index 000000000..05fd6ec22 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_POLL.html @@ -0,0 +1 @@ +__WASI_SIGNAL_POLL in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_POLL

Source
pub const __WASI_SIGNAL_POLL: Type = 28;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_PROF.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_PROF.html new file mode 100644 index 000000000..766464a7b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_PROF.html @@ -0,0 +1 @@ +__WASI_SIGNAL_PROF in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_PROF

Source
pub const __WASI_SIGNAL_PROF: Type = 26;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_PWR.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_PWR.html new file mode 100644 index 000000000..bf6bab156 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_PWR.html @@ -0,0 +1 @@ +__WASI_SIGNAL_PWR in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_PWR

Source
pub const __WASI_SIGNAL_PWR: Type = 29;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_QUIT.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_QUIT.html new file mode 100644 index 000000000..34970ba43 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_QUIT.html @@ -0,0 +1 @@ +__WASI_SIGNAL_QUIT in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_QUIT

Source
pub const __WASI_SIGNAL_QUIT: Type = 3;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_SEGV.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_SEGV.html new file mode 100644 index 000000000..260115adc --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_SEGV.html @@ -0,0 +1 @@ +__WASI_SIGNAL_SEGV in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_SEGV

Source
pub const __WASI_SIGNAL_SEGV: Type = 11;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_STOP.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_STOP.html new file mode 100644 index 000000000..56f38195f --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_STOP.html @@ -0,0 +1 @@ +__WASI_SIGNAL_STOP in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_STOP

Source
pub const __WASI_SIGNAL_STOP: Type = 18;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_SYS.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_SYS.html new file mode 100644 index 000000000..3e1ae348e --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_SYS.html @@ -0,0 +1 @@ +__WASI_SIGNAL_SYS in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_SYS

Source
pub const __WASI_SIGNAL_SYS: Type = 30;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TERM.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TERM.html new file mode 100644 index 000000000..380d607eb --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TERM.html @@ -0,0 +1 @@ +__WASI_SIGNAL_TERM in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_TERM

Source
pub const __WASI_SIGNAL_TERM: Type = 15;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TRAP.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TRAP.html new file mode 100644 index 000000000..6ab89e2ef --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TRAP.html @@ -0,0 +1 @@ +__WASI_SIGNAL_TRAP in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_TRAP

Source
pub const __WASI_SIGNAL_TRAP: Type = 5;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TSTP.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TSTP.html new file mode 100644 index 000000000..6a3360d4a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TSTP.html @@ -0,0 +1 @@ +__WASI_SIGNAL_TSTP in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_TSTP

Source
pub const __WASI_SIGNAL_TSTP: Type = 19;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TTIN.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TTIN.html new file mode 100644 index 000000000..0955181fb --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TTIN.html @@ -0,0 +1 @@ +__WASI_SIGNAL_TTIN in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_TTIN

Source
pub const __WASI_SIGNAL_TTIN: Type = 20;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TTOU.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TTOU.html new file mode 100644 index 000000000..0409f3789 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_TTOU.html @@ -0,0 +1 @@ +__WASI_SIGNAL_TTOU in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_TTOU

Source
pub const __WASI_SIGNAL_TTOU: Type = 21;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_URG.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_URG.html new file mode 100644 index 000000000..46ce112d5 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_URG.html @@ -0,0 +1 @@ +__WASI_SIGNAL_URG in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_URG

Source
pub const __WASI_SIGNAL_URG: Type = 22;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_USR1.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_USR1.html new file mode 100644 index 000000000..b6d4ebc20 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_USR1.html @@ -0,0 +1 @@ +__WASI_SIGNAL_USR1 in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_USR1

Source
pub const __WASI_SIGNAL_USR1: Type = 10;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_USR2.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_USR2.html new file mode 100644 index 000000000..2f9d0a11c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_USR2.html @@ -0,0 +1 @@ +__WASI_SIGNAL_USR2 in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_USR2

Source
pub const __WASI_SIGNAL_USR2: Type = 12;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_VTALRM.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_VTALRM.html new file mode 100644 index 000000000..ac5a730a2 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_VTALRM.html @@ -0,0 +1 @@ +__WASI_SIGNAL_VTALRM in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_VTALRM

Source
pub const __WASI_SIGNAL_VTALRM: Type = 25;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_WINCH.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_WINCH.html new file mode 100644 index 000000000..1b3776fb2 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_WINCH.html @@ -0,0 +1 @@ +__WASI_SIGNAL_WINCH in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_WINCH

Source
pub const __WASI_SIGNAL_WINCH: Type = 27;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_XCPU.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_XCPU.html new file mode 100644 index 000000000..24c1de1e5 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_XCPU.html @@ -0,0 +1 @@ +__WASI_SIGNAL_XCPU in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_XCPU

Source
pub const __WASI_SIGNAL_XCPU: Type = 23;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_XFSZ.html b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_XFSZ.html new file mode 100644 index 000000000..5e7eeb936 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/constant.__WASI_SIGNAL_XFSZ.html @@ -0,0 +1 @@ +__WASI_SIGNAL_XFSZ in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Constant __WASI_SIGNAL_XFSZ

Source
pub const __WASI_SIGNAL_XFSZ: Type = 24;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/index.html b/async_wasi/snapshots/common/types/__wasi_signal_t/index.html new file mode 100644 index 000000000..7456d2546 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types

Module __wasi_signal_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_signal_t/sidebar-items.js new file mode 100644 index 000000000..6cc3a0d51 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_SIGNAL_ABRT","__WASI_SIGNAL_ALRM","__WASI_SIGNAL_BUS","__WASI_SIGNAL_CHLD","__WASI_SIGNAL_CONT","__WASI_SIGNAL_FPE","__WASI_SIGNAL_HUP","__WASI_SIGNAL_ILL","__WASI_SIGNAL_INT","__WASI_SIGNAL_KILL","__WASI_SIGNAL_NONE","__WASI_SIGNAL_PIPE","__WASI_SIGNAL_POLL","__WASI_SIGNAL_PROF","__WASI_SIGNAL_PWR","__WASI_SIGNAL_QUIT","__WASI_SIGNAL_SEGV","__WASI_SIGNAL_STOP","__WASI_SIGNAL_SYS","__WASI_SIGNAL_TERM","__WASI_SIGNAL_TRAP","__WASI_SIGNAL_TSTP","__WASI_SIGNAL_TTIN","__WASI_SIGNAL_TTOU","__WASI_SIGNAL_URG","__WASI_SIGNAL_USR1","__WASI_SIGNAL_USR2","__WASI_SIGNAL_VTALRM","__WASI_SIGNAL_WINCH","__WASI_SIGNAL_XCPU","__WASI_SIGNAL_XFSZ"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_signal_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_signal_t/type.Type.html new file mode 100644 index 000000000..7e6b8c6b6 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_signal_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_signal_t - Rust
async_wasi::snapshots::common::types::__wasi_signal_t

Type Alias Type

Source
pub type Type = u8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_level_t/constant.__WASI_SOCK_OPT_LEVEL_SOL_SOCKET.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_level_t/constant.__WASI_SOCK_OPT_LEVEL_SOL_SOCKET.html new file mode 100644 index 000000000..2cd795094 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_level_t/constant.__WASI_SOCK_OPT_LEVEL_SOL_SOCKET.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_LEVEL_SOL_SOCKET in async_wasi::snapshots::common::types::__wasi_sock_opt_level_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_level_t

Constant __WASI_SOCK_OPT_LEVEL_SOL_SOCKET

Source
pub const __WASI_SOCK_OPT_LEVEL_SOL_SOCKET: Type = 0;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_level_t/index.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_level_t/index.html new file mode 100644 index 000000000..ce04b2664 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_level_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_sock_opt_level_t - Rust
async_wasi::snapshots::common::types

Module __wasi_sock_opt_level_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_level_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_sock_opt_level_t/sidebar-items.js new file mode 100644 index 000000000..a864e4fc0 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_level_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_SOCK_OPT_LEVEL_SOL_SOCKET"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_level_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_level_t/type.Type.html new file mode 100644 index 000000000..ec0e4086a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_level_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_sock_opt_level_t - Rust
pub type Type = u32;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_ACCEPTCONN.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_ACCEPTCONN.html new file mode 100644 index 000000000..3eab2d992 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_ACCEPTCONN.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_ACCEPTCONN in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_ACCEPTCONN

Source
pub const __WASI_SOCK_OPT_SO_ACCEPTCONN: Type = 13;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_BINDTODEVICE.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_BINDTODEVICE.html new file mode 100644 index 000000000..8e9c33a43 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_BINDTODEVICE.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_BINDTODEVICE in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_BINDTODEVICE

Source
pub const __WASI_SOCK_OPT_SO_BINDTODEVICE: Type = 14;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_BROADCAST.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_BROADCAST.html new file mode 100644 index 000000000..6029fce23 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_BROADCAST.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_BROADCAST in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_BROADCAST

Source
pub const __WASI_SOCK_OPT_SO_BROADCAST: Type = 4;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_DONTROUTE.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_DONTROUTE.html new file mode 100644 index 000000000..be6bec478 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_DONTROUTE.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_DONTROUTE in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_DONTROUTE

Source
pub const __WASI_SOCK_OPT_SO_DONTROUTE: Type = 3;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_ERROR.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_ERROR.html new file mode 100644 index 000000000..b644009ba --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_ERROR.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_ERROR in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_ERROR

Source
pub const __WASI_SOCK_OPT_SO_ERROR: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_KEEPALIVE.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_KEEPALIVE.html new file mode 100644 index 000000000..dec3e391b --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_KEEPALIVE.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_KEEPALIVE in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_KEEPALIVE

Source
pub const __WASI_SOCK_OPT_SO_KEEPALIVE: Type = 7;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_LINGER.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_LINGER.html new file mode 100644 index 000000000..c1e549c81 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_LINGER.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_LINGER in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_LINGER

Source
pub const __WASI_SOCK_OPT_SO_LINGER: Type = 9;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_OOBINLINE.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_OOBINLINE.html new file mode 100644 index 000000000..aa3c11bf1 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_OOBINLINE.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_OOBINLINE in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_OOBINLINE

Source
pub const __WASI_SOCK_OPT_SO_OOBINLINE: Type = 8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_RCVBUF.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_RCVBUF.html new file mode 100644 index 000000000..139e186b8 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_RCVBUF.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_RCVBUF in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_RCVBUF

Source
pub const __WASI_SOCK_OPT_SO_RCVBUF: Type = 6;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_RCVLOWAT.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_RCVLOWAT.html new file mode 100644 index 000000000..61a671ce6 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_RCVLOWAT.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_RCVLOWAT in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_RCVLOWAT

Source
pub const __WASI_SOCK_OPT_SO_RCVLOWAT: Type = 10;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_RCVTIMEO.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_RCVTIMEO.html new file mode 100644 index 000000000..e83608e0a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_RCVTIMEO.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_RCVTIMEO in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_RCVTIMEO

Source
pub const __WASI_SOCK_OPT_SO_RCVTIMEO: Type = 11;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_REUSEADDR.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_REUSEADDR.html new file mode 100644 index 000000000..670ad07fc --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_REUSEADDR.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_REUSEADDR in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_REUSEADDR

Source
pub const __WASI_SOCK_OPT_SO_REUSEADDR: Type = 0;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_SNDBUF.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_SNDBUF.html new file mode 100644 index 000000000..9c8523465 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_SNDBUF.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_SNDBUF in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_SNDBUF

Source
pub const __WASI_SOCK_OPT_SO_SNDBUF: Type = 5;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_SNDTIMEO.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_SNDTIMEO.html new file mode 100644 index 000000000..803e81af9 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_SNDTIMEO.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_SNDTIMEO in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_SNDTIMEO

Source
pub const __WASI_SOCK_OPT_SO_SNDTIMEO: Type = 12;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_TYPE.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_TYPE.html new file mode 100644 index 000000000..d20f1e4a1 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/constant.__WASI_SOCK_OPT_SO_TYPE.html @@ -0,0 +1 @@ +__WASI_SOCK_OPT_SO_TYPE in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Constant __WASI_SOCK_OPT_SO_TYPE

Source
pub const __WASI_SOCK_OPT_SO_TYPE: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/index.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/index.html new file mode 100644 index 000000000..6ab1192c2 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types

Module __wasi_sock_opt_so_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/sidebar-items.js new file mode 100644 index 000000000..65a863f8d --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_SOCK_OPT_SO_ACCEPTCONN","__WASI_SOCK_OPT_SO_BINDTODEVICE","__WASI_SOCK_OPT_SO_BROADCAST","__WASI_SOCK_OPT_SO_DONTROUTE","__WASI_SOCK_OPT_SO_ERROR","__WASI_SOCK_OPT_SO_KEEPALIVE","__WASI_SOCK_OPT_SO_LINGER","__WASI_SOCK_OPT_SO_OOBINLINE","__WASI_SOCK_OPT_SO_RCVBUF","__WASI_SOCK_OPT_SO_RCVLOWAT","__WASI_SOCK_OPT_SO_RCVTIMEO","__WASI_SOCK_OPT_SO_REUSEADDR","__WASI_SOCK_OPT_SO_SNDBUF","__WASI_SOCK_OPT_SO_SNDTIMEO","__WASI_SOCK_OPT_SO_TYPE"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/type.Type.html new file mode 100644 index 000000000..d28f61008 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_opt_so_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_sock_opt_so_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_opt_so_t

Type Alias Type

Source
pub type Type = u32;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_type_t/constant.__WASI_SOCK_TYPE_SOCK_ANY.html b/async_wasi/snapshots/common/types/__wasi_sock_type_t/constant.__WASI_SOCK_TYPE_SOCK_ANY.html new file mode 100644 index 000000000..37c3048dc --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_type_t/constant.__WASI_SOCK_TYPE_SOCK_ANY.html @@ -0,0 +1 @@ +__WASI_SOCK_TYPE_SOCK_ANY in async_wasi::snapshots::common::types::__wasi_sock_type_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_type_t

Constant __WASI_SOCK_TYPE_SOCK_ANY

Source
pub const __WASI_SOCK_TYPE_SOCK_ANY: Type = 0;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_type_t/constant.__WASI_SOCK_TYPE_SOCK_DGRAM.html b/async_wasi/snapshots/common/types/__wasi_sock_type_t/constant.__WASI_SOCK_TYPE_SOCK_DGRAM.html new file mode 100644 index 000000000..a6ada1073 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_type_t/constant.__WASI_SOCK_TYPE_SOCK_DGRAM.html @@ -0,0 +1 @@ +__WASI_SOCK_TYPE_SOCK_DGRAM in async_wasi::snapshots::common::types::__wasi_sock_type_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_type_t

Constant __WASI_SOCK_TYPE_SOCK_DGRAM

Source
pub const __WASI_SOCK_TYPE_SOCK_DGRAM: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_type_t/constant.__WASI_SOCK_TYPE_SOCK_STREAM.html b/async_wasi/snapshots/common/types/__wasi_sock_type_t/constant.__WASI_SOCK_TYPE_SOCK_STREAM.html new file mode 100644 index 000000000..400796b60 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_type_t/constant.__WASI_SOCK_TYPE_SOCK_STREAM.html @@ -0,0 +1 @@ +__WASI_SOCK_TYPE_SOCK_STREAM in async_wasi::snapshots::common::types::__wasi_sock_type_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_type_t

Constant __WASI_SOCK_TYPE_SOCK_STREAM

Source
pub const __WASI_SOCK_TYPE_SOCK_STREAM: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_type_t/index.html b/async_wasi/snapshots/common/types/__wasi_sock_type_t/index.html new file mode 100644 index 000000000..517bc623f --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_type_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_sock_type_t - Rust
async_wasi::snapshots::common::types

Module __wasi_sock_type_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_type_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_sock_type_t/sidebar-items.js new file mode 100644 index 000000000..8a2e6cbaa --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_type_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_SOCK_TYPE_SOCK_ANY","__WASI_SOCK_TYPE_SOCK_DGRAM","__WASI_SOCK_TYPE_SOCK_STREAM"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_sock_type_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_sock_type_t/type.Type.html new file mode 100644 index 000000000..f81c9d84a --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_sock_type_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_sock_type_t - Rust
async_wasi::snapshots::common::types::__wasi_sock_type_t

Type Alias Type

Source
pub type Type = u8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_subclockflags_t/constant.__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME.html b/async_wasi/snapshots/common/types/__wasi_subclockflags_t/constant.__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME.html new file mode 100644 index 000000000..764b2dd26 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_subclockflags_t/constant.__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME.html @@ -0,0 +1 @@ +__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME in async_wasi::snapshots::common::types::__wasi_subclockflags_t - Rust
async_wasi::snapshots::common::types::__wasi_subclockflags_t

Constant __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME

Source
pub const __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_subclockflags_t/index.html b/async_wasi/snapshots/common/types/__wasi_subclockflags_t/index.html new file mode 100644 index 000000000..00d958bf3 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_subclockflags_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_subclockflags_t - Rust
async_wasi::snapshots::common::types

Module __wasi_subclockflags_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_subclockflags_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_subclockflags_t/sidebar-items.js new file mode 100644 index 000000000..e13ee2ff7 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_subclockflags_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_subclockflags_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_subclockflags_t/type.Type.html new file mode 100644 index 000000000..8e6827cbf --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_subclockflags_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_subclockflags_t - Rust
pub type Type = u16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_whence_t/constant.__WASI_WHENCE_CUR.html b/async_wasi/snapshots/common/types/__wasi_whence_t/constant.__WASI_WHENCE_CUR.html new file mode 100644 index 000000000..c2d819276 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_whence_t/constant.__WASI_WHENCE_CUR.html @@ -0,0 +1 @@ +__WASI_WHENCE_CUR in async_wasi::snapshots::common::types::__wasi_whence_t - Rust
async_wasi::snapshots::common::types::__wasi_whence_t

Constant __WASI_WHENCE_CUR

Source
pub const __WASI_WHENCE_CUR: Type = 1;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_whence_t/constant.__WASI_WHENCE_END.html b/async_wasi/snapshots/common/types/__wasi_whence_t/constant.__WASI_WHENCE_END.html new file mode 100644 index 000000000..96acec907 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_whence_t/constant.__WASI_WHENCE_END.html @@ -0,0 +1 @@ +__WASI_WHENCE_END in async_wasi::snapshots::common::types::__wasi_whence_t - Rust
async_wasi::snapshots::common::types::__wasi_whence_t

Constant __WASI_WHENCE_END

Source
pub const __WASI_WHENCE_END: Type = 2;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_whence_t/constant.__WASI_WHENCE_SET.html b/async_wasi/snapshots/common/types/__wasi_whence_t/constant.__WASI_WHENCE_SET.html new file mode 100644 index 000000000..2cb2cc0dc --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_whence_t/constant.__WASI_WHENCE_SET.html @@ -0,0 +1 @@ +__WASI_WHENCE_SET in async_wasi::snapshots::common::types::__wasi_whence_t - Rust
async_wasi::snapshots::common::types::__wasi_whence_t

Constant __WASI_WHENCE_SET

Source
pub const __WASI_WHENCE_SET: Type = 0;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_whence_t/index.html b/async_wasi/snapshots/common/types/__wasi_whence_t/index.html new file mode 100644 index 000000000..8f9bcee0c --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_whence_t/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types::__wasi_whence_t - Rust
async_wasi::snapshots::common::types

Module __wasi_whence_t

Source

Constants§

Type Aliases§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_whence_t/sidebar-items.js b/async_wasi/snapshots/common/types/__wasi_whence_t/sidebar-items.js new file mode 100644 index 000000000..c845ef40f --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_whence_t/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["__WASI_WHENCE_CUR","__WASI_WHENCE_END","__WASI_WHENCE_SET"],"type":["Type"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/__wasi_whence_t/type.Type.html b/async_wasi/snapshots/common/types/__wasi_whence_t/type.Type.html new file mode 100644 index 000000000..2268a4290 --- /dev/null +++ b/async_wasi/snapshots/common/types/__wasi_whence_t/type.Type.html @@ -0,0 +1 @@ +Type in async_wasi::snapshots::common::types::__wasi_whence_t - Rust
async_wasi::snapshots::common::types::__wasi_whence_t

Type Alias Type

Source
pub type Type = u8;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/index.html b/async_wasi/snapshots/common/types/index.html new file mode 100644 index 000000000..789a381e0 --- /dev/null +++ b/async_wasi/snapshots/common/types/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common

Module types

Source

Modules§

Structs§

Type Aliases§

Unions§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/sidebar-items.js b/async_wasi/snapshots/common/types/sidebar-items.js new file mode 100644 index 000000000..6bfa25ac0 --- /dev/null +++ b/async_wasi/snapshots/common/types/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["__wasi_address_family_t","__wasi_advice_t","__wasi_aiflags_t","__wasi_clockid_t","__wasi_errno_t","__wasi_eventrwflags_t","__wasi_eventtype_t","__wasi_fdflags_t","__wasi_filetype_t","__wasi_fstflags_t","__wasi_lookupflags_t","__wasi_oflags_t","__wasi_preopentype_t","__wasi_protocol_t","__wasi_riflags_t","__wasi_rights_t","__wasi_roflags_t","__wasi_sdflags_t","__wasi_signal_t","__wasi_sock_opt_level_t","__wasi_sock_opt_so_t","__wasi_sock_type_t","__wasi_subclockflags_t","__wasi_whence_t"],"struct":["__wasi_address_t","__wasi_addrinfo_t","__wasi_ciovec_t","__wasi_dirent_t","__wasi_event_fd_readwrite_t","__wasi_event_t","__wasi_fdstat_t","__wasi_filestat_t","__wasi_iovec_t","__wasi_prestat_dir_t","__wasi_prestat_t","__wasi_sockaddr_in_t","__wasi_sockaddr_t","__wasi_subscription_clock_t","__wasi_subscription_fd_readwrite_t","__wasi_subscription_t","__wasi_subscription_u_t","__wasi_timeval"],"type":["__int32_t","__int64_t","__uint16_t","__uint32_t","__uint64_t","__uint8_t","__wasi_device_t","__wasi_dircookie_t","__wasi_dirnamlen_t","__wasi_exitcode_t","__wasi_fd_t","__wasi_filedelta_t","__wasi_filesize_t","__wasi_inode_t","__wasi_linkcount_t","__wasi_siflags_t","__wasi_size_t","__wasi_sock_d_t","__wasi_timestamp_t","__wasi_userdata_t","const_uint8_t_ptr","uint8_t_ptr"],"union":["__wasi_prestat_u_t","__wasi_subscription_u_u_t"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_address_t.html b/async_wasi/snapshots/common/types/struct.__wasi_address_t.html new file mode 100644 index 000000000..0ea2508b5 --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_address_t.html @@ -0,0 +1,16 @@ +__wasi_address_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_address_t

Source
#[repr(C)]
pub struct __wasi_address_t { + pub buf: uint8_t_ptr, + pub buf_len: __wasi_size_t, +}

Fields§

§buf: uint8_t_ptr§buf_len: __wasi_size_t

Trait Implementations§

Source§

impl Clone for __wasi_address_t

Source§

fn clone(&self) -> __wasi_address_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_address_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_address_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_addrinfo_t.html b/async_wasi/snapshots/common/types/struct.__wasi_addrinfo_t.html new file mode 100644 index 000000000..0405a3b76 --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_addrinfo_t.html @@ -0,0 +1,23 @@ +__wasi_addrinfo_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_addrinfo_t

Source
#[repr(C)]
pub struct __wasi_addrinfo_t { + pub ai_flags: Type, + pub ai_family: Type, + pub ai_socktype: Type, + pub ai_protocol: Type, + pub ai_addrlen: __wasi_size_t, + pub ai_addr: uint8_t_ptr, + pub ai_canonname: uint8_t_ptr, + pub ai_canonname_len: __wasi_size_t, + pub ai_next: uint8_t_ptr, +}

Fields§

§ai_flags: Type§ai_family: Type§ai_socktype: Type§ai_protocol: Type§ai_addrlen: __wasi_size_t§ai_addr: uint8_t_ptr§ai_canonname: uint8_t_ptr§ai_canonname_len: __wasi_size_t§ai_next: uint8_t_ptr

Trait Implementations§

Source§

impl Clone for __wasi_addrinfo_t

Source§

fn clone(&self) -> __wasi_addrinfo_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_addrinfo_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_addrinfo_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_ciovec_t.html b/async_wasi/snapshots/common/types/struct.__wasi_ciovec_t.html new file mode 100644 index 000000000..12f707f71 --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_ciovec_t.html @@ -0,0 +1,16 @@ +__wasi_ciovec_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_ciovec_t

Source
#[repr(C)]
pub struct __wasi_ciovec_t { + pub buf: const_uint8_t_ptr, + pub buf_len: __wasi_size_t, +}

Fields§

§buf: const_uint8_t_ptr§buf_len: __wasi_size_t

Trait Implementations§

Source§

impl Clone for __wasi_ciovec_t

Source§

fn clone(&self) -> __wasi_ciovec_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_ciovec_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_ciovec_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_dirent_t.html b/async_wasi/snapshots/common/types/struct.__wasi_dirent_t.html new file mode 100644 index 000000000..460c746fe --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_dirent_t.html @@ -0,0 +1,18 @@ +__wasi_dirent_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_dirent_t

Source
#[repr(C)]
pub struct __wasi_dirent_t { + pub d_next: __wasi_dircookie_t, + pub d_ino: __wasi_inode_t, + pub d_namlen: __wasi_dirnamlen_t, + pub d_type: Type, +}

Fields§

§d_next: __wasi_dircookie_t§d_ino: __wasi_inode_t§d_namlen: __wasi_dirnamlen_t§d_type: Type

Trait Implementations§

Source§

impl Clone for __wasi_dirent_t

Source§

fn clone(&self) -> __wasi_dirent_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_dirent_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&ReaddirEntity> for __wasi_dirent_t

Source§

fn from(ent: &ReaddirEntity) -> Self

Converts to this type from the input type.
Source§

impl Copy for __wasi_dirent_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_event_fd_readwrite_t.html b/async_wasi/snapshots/common/types/struct.__wasi_event_fd_readwrite_t.html new file mode 100644 index 000000000..75e49f69b --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_event_fd_readwrite_t.html @@ -0,0 +1,16 @@ +__wasi_event_fd_readwrite_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_event_fd_readwrite_t

Source
#[repr(C)]
pub struct __wasi_event_fd_readwrite_t { + pub nbytes: __wasi_filesize_t, + pub flags: Type, +}

Fields§

§nbytes: __wasi_filesize_t§flags: Type

Trait Implementations§

Source§

impl Clone for __wasi_event_fd_readwrite_t

Source§

fn clone(&self) -> __wasi_event_fd_readwrite_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_event_fd_readwrite_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_event_fd_readwrite_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_event_t.html b/async_wasi/snapshots/common/types/struct.__wasi_event_t.html new file mode 100644 index 000000000..940f087aa --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_event_t.html @@ -0,0 +1,18 @@ +__wasi_event_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_event_t

Source
#[repr(C)]
pub struct __wasi_event_t { + pub userdata: __wasi_userdata_t, + pub error: Type, + pub type_: Type, + pub fd_readwrite: __wasi_event_fd_readwrite_t, +}

Fields§

§userdata: __wasi_userdata_t§error: Type§type_: Type§fd_readwrite: __wasi_event_fd_readwrite_t

Trait Implementations§

Source§

impl Clone for __wasi_event_t

Source§

fn clone(&self) -> __wasi_event_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_event_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_event_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_fdstat_t.html b/async_wasi/snapshots/common/types/struct.__wasi_fdstat_t.html new file mode 100644 index 000000000..2e04b4a65 --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_fdstat_t.html @@ -0,0 +1,18 @@ +__wasi_fdstat_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_fdstat_t

Source
#[repr(C)]
pub struct __wasi_fdstat_t { + pub fs_filetype: Type, + pub fs_flags: Type, + pub fs_rights_base: Type, + pub fs_rights_inheriting: Type, +}

Fields§

§fs_filetype: Type§fs_flags: Type§fs_rights_base: Type§fs_rights_inheriting: Type

Trait Implementations§

Source§

impl Clone for __wasi_fdstat_t

Source§

fn clone(&self) -> __wasi_fdstat_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_fdstat_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&FdStat> for __wasi_fdstat_t

Source§

fn from(fdstat: &FdStat) -> __wasi_fdstat_t

Converts to this type from the input type.
Source§

impl From<FdStat> for __wasi_fdstat_t

Source§

fn from(fdstat: FdStat) -> __wasi_fdstat_t

Converts to this type from the input type.
Source§

impl Copy for __wasi_fdstat_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_filestat_t.html b/async_wasi/snapshots/common/types/struct.__wasi_filestat_t.html new file mode 100644 index 000000000..586333580 --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_filestat_t.html @@ -0,0 +1,22 @@ +__wasi_filestat_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_filestat_t

Source
#[repr(C)]
pub struct __wasi_filestat_t { + pub dev: __wasi_device_t, + pub ino: __wasi_inode_t, + pub filetype: Type, + pub nlink: __wasi_linkcount_t, + pub size: __wasi_filesize_t, + pub atim: __wasi_timestamp_t, + pub mtim: __wasi_timestamp_t, + pub ctim: __wasi_timestamp_t, +}

Fields§

§dev: __wasi_device_t§ino: __wasi_inode_t§filetype: Type§nlink: __wasi_linkcount_t§size: __wasi_filesize_t§atim: __wasi_timestamp_t§mtim: __wasi_timestamp_t§ctim: __wasi_timestamp_t

Trait Implementations§

Source§

impl Clone for __wasi_filestat_t

Source§

fn clone(&self) -> __wasi_filestat_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_filestat_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<(u64, Filestat)> for __wasi_filestat_t

Source§

fn from((dev, stat): (u64, Filestat)) -> Self

Converts to this type from the input type.
Source§

impl From<Filestat> for __wasi_filestat_t

Source§

fn from(stat: Filestat) -> __wasi_filestat_t

Converts to this type from the input type.
Source§

impl Copy for __wasi_filestat_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_iovec_t.html b/async_wasi/snapshots/common/types/struct.__wasi_iovec_t.html new file mode 100644 index 000000000..373d98874 --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_iovec_t.html @@ -0,0 +1,16 @@ +__wasi_iovec_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_iovec_t

Source
#[repr(C)]
pub struct __wasi_iovec_t { + pub buf: uint8_t_ptr, + pub buf_len: __wasi_size_t, +}

Fields§

§buf: uint8_t_ptr§buf_len: __wasi_size_t

Trait Implementations§

Source§

impl Clone for __wasi_iovec_t

Source§

fn clone(&self) -> __wasi_iovec_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_iovec_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_iovec_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_prestat_dir_t.html b/async_wasi/snapshots/common/types/struct.__wasi_prestat_dir_t.html new file mode 100644 index 000000000..60e3d9ca6 --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_prestat_dir_t.html @@ -0,0 +1,15 @@ +__wasi_prestat_dir_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_prestat_dir_t

Source
#[repr(C)]
pub struct __wasi_prestat_dir_t { + pub pr_name_len: __wasi_size_t, +}

Fields§

§pr_name_len: __wasi_size_t

Trait Implementations§

Source§

impl Clone for __wasi_prestat_dir_t

Source§

fn clone(&self) -> __wasi_prestat_dir_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_prestat_dir_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_prestat_dir_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_prestat_t.html b/async_wasi/snapshots/common/types/struct.__wasi_prestat_t.html new file mode 100644 index 000000000..f082575c0 --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_prestat_t.html @@ -0,0 +1,16 @@ +__wasi_prestat_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_prestat_t

Source
#[repr(C)]
pub struct __wasi_prestat_t { + pub tag: Type, + pub u: __wasi_prestat_u_t, +}

Fields§

§tag: Type§u: __wasi_prestat_u_t

Trait Implementations§

Source§

impl Clone for __wasi_prestat_t

Source§

fn clone(&self) -> __wasi_prestat_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_prestat_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_prestat_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_sockaddr_in_t.html b/async_wasi/snapshots/common/types/struct.__wasi_sockaddr_in_t.html new file mode 100644 index 000000000..5e1c90127 --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_sockaddr_in_t.html @@ -0,0 +1,19 @@ +__wasi_sockaddr_in_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_sockaddr_in_t

Source
#[repr(C)]
pub struct __wasi_sockaddr_in_t { + pub sin_family: Type, + pub sin_port: u16, + pub sin_addr: __wasi_address_t, + pub sin_zero_len: __wasi_size_t, + pub sin_zero: uint8_t_ptr, +}

Fields§

§sin_family: Type§sin_port: u16§sin_addr: __wasi_address_t§sin_zero_len: __wasi_size_t§sin_zero: uint8_t_ptr

Trait Implementations§

Source§

impl Clone for __wasi_sockaddr_in_t

Source§

fn clone(&self) -> __wasi_sockaddr_in_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_sockaddr_in_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_sockaddr_in_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_sockaddr_t.html b/async_wasi/snapshots/common/types/struct.__wasi_sockaddr_t.html new file mode 100644 index 000000000..6fe0813ba --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_sockaddr_t.html @@ -0,0 +1,17 @@ +__wasi_sockaddr_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_sockaddr_t

Source
#[repr(C)]
pub struct __wasi_sockaddr_t { + pub sa_family: Type, + pub sa_data_len: __wasi_size_t, + pub sa_data: uint8_t_ptr, +}

Fields§

§sa_family: Type§sa_data_len: __wasi_size_t§sa_data: uint8_t_ptr

Trait Implementations§

Source§

impl Clone for __wasi_sockaddr_t

Source§

fn clone(&self) -> __wasi_sockaddr_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_sockaddr_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_sockaddr_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_subscription_clock_t.html b/async_wasi/snapshots/common/types/struct.__wasi_subscription_clock_t.html new file mode 100644 index 000000000..410d0bba1 --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_subscription_clock_t.html @@ -0,0 +1,18 @@ +__wasi_subscription_clock_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_subscription_clock_t

Source
#[repr(C)]
pub struct __wasi_subscription_clock_t { + pub id: Type, + pub timeout: __wasi_timestamp_t, + pub precision: __wasi_timestamp_t, + pub flags: Type, +}

Fields§

§id: Type§timeout: __wasi_timestamp_t§precision: __wasi_timestamp_t§flags: Type

Trait Implementations§

Source§

impl Clone for __wasi_subscription_clock_t

Source§

fn clone(&self) -> __wasi_subscription_clock_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_subscription_clock_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_subscription_clock_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_subscription_fd_readwrite_t.html b/async_wasi/snapshots/common/types/struct.__wasi_subscription_fd_readwrite_t.html new file mode 100644 index 000000000..b9633b84d --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_subscription_fd_readwrite_t.html @@ -0,0 +1,15 @@ +__wasi_subscription_fd_readwrite_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_subscription_fd_readwrite_t

Source
#[repr(C)]
pub struct __wasi_subscription_fd_readwrite_t { + pub file_descriptor: __wasi_fd_t, +}

Fields§

§file_descriptor: __wasi_fd_t

Trait Implementations§

Source§

impl Clone for __wasi_subscription_fd_readwrite_t

Source§

fn clone(&self) -> __wasi_subscription_fd_readwrite_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_subscription_fd_readwrite_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_subscription_fd_readwrite_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_subscription_t.html b/async_wasi/snapshots/common/types/struct.__wasi_subscription_t.html new file mode 100644 index 000000000..67e3f7dd1 --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_subscription_t.html @@ -0,0 +1,16 @@ +__wasi_subscription_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_subscription_t

Source
#[repr(C)]
pub struct __wasi_subscription_t { + pub userdata: __wasi_userdata_t, + pub u: __wasi_subscription_u_t, +}

Fields§

§userdata: __wasi_userdata_t§u: __wasi_subscription_u_t

Trait Implementations§

Source§

impl Clone for __wasi_subscription_t

Source§

fn clone(&self) -> __wasi_subscription_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_subscription_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_subscription_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_subscription_u_t.html b/async_wasi/snapshots/common/types/struct.__wasi_subscription_u_t.html new file mode 100644 index 000000000..80aa21747 --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_subscription_u_t.html @@ -0,0 +1,16 @@ +__wasi_subscription_u_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_subscription_u_t

Source
#[repr(C)]
pub struct __wasi_subscription_u_t { + pub tag: Type, + pub u: __wasi_subscription_u_u_t, +}

Fields§

§tag: Type§u: __wasi_subscription_u_u_t

Trait Implementations§

Source§

impl Clone for __wasi_subscription_u_t

Source§

fn clone(&self) -> __wasi_subscription_u_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_subscription_u_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_subscription_u_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/struct.__wasi_timeval.html b/async_wasi/snapshots/common/types/struct.__wasi_timeval.html new file mode 100644 index 000000000..861f44fa1 --- /dev/null +++ b/async_wasi/snapshots/common/types/struct.__wasi_timeval.html @@ -0,0 +1,16 @@ +__wasi_timeval in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Struct __wasi_timeval

Source
#[repr(C)]
pub struct __wasi_timeval { + pub tv_sec: i64, + pub tv_usec: i64, +}

Fields§

§tv_sec: i64§tv_usec: i64

Trait Implementations§

Source§

impl Clone for __wasi_timeval

Source§

fn clone(&self) -> __wasi_timeval

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for __wasi_timeval

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__int32_t.html b/async_wasi/snapshots/common/types/type.__int32_t.html new file mode 100644 index 000000000..66fb9b77a --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__int32_t.html @@ -0,0 +1 @@ +__int32_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __int32_t

Source
pub type __int32_t = c_int;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__int64_t.html b/async_wasi/snapshots/common/types/type.__int64_t.html new file mode 100644 index 000000000..4ec3b48e1 --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__int64_t.html @@ -0,0 +1 @@ +__int64_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __int64_t

Source
pub type __int64_t = c_long;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__uint16_t.html b/async_wasi/snapshots/common/types/type.__uint16_t.html new file mode 100644 index 000000000..179cdd0da --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__uint16_t.html @@ -0,0 +1 @@ +__uint16_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __uint16_t

Source
pub type __uint16_t = c_ushort;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__uint32_t.html b/async_wasi/snapshots/common/types/type.__uint32_t.html new file mode 100644 index 000000000..435524474 --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__uint32_t.html @@ -0,0 +1 @@ +__uint32_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __uint32_t

Source
pub type __uint32_t = c_uint;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__uint64_t.html b/async_wasi/snapshots/common/types/type.__uint64_t.html new file mode 100644 index 000000000..5c9a2af17 --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__uint64_t.html @@ -0,0 +1 @@ +__uint64_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __uint64_t

Source
pub type __uint64_t = c_ulong;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__uint8_t.html b/async_wasi/snapshots/common/types/type.__uint8_t.html new file mode 100644 index 000000000..2cb607c0d --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__uint8_t.html @@ -0,0 +1 @@ +__uint8_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __uint8_t

Source
pub type __uint8_t = c_uchar;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_device_t.html b/async_wasi/snapshots/common/types/type.__wasi_device_t.html new file mode 100644 index 000000000..09f6cf1c9 --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_device_t.html @@ -0,0 +1 @@ +__wasi_device_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_device_t

Source
pub type __wasi_device_t = u64;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_dircookie_t.html b/async_wasi/snapshots/common/types/type.__wasi_dircookie_t.html new file mode 100644 index 000000000..d6f253689 --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_dircookie_t.html @@ -0,0 +1 @@ +__wasi_dircookie_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_dircookie_t

Source
pub type __wasi_dircookie_t = u64;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_dirnamlen_t.html b/async_wasi/snapshots/common/types/type.__wasi_dirnamlen_t.html new file mode 100644 index 000000000..831277ed5 --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_dirnamlen_t.html @@ -0,0 +1 @@ +__wasi_dirnamlen_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_dirnamlen_t

Source
pub type __wasi_dirnamlen_t = u32;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_exitcode_t.html b/async_wasi/snapshots/common/types/type.__wasi_exitcode_t.html new file mode 100644 index 000000000..b442e5c95 --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_exitcode_t.html @@ -0,0 +1 @@ +__wasi_exitcode_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_exitcode_t

Source
pub type __wasi_exitcode_t = u32;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_fd_t.html b/async_wasi/snapshots/common/types/type.__wasi_fd_t.html new file mode 100644 index 000000000..99d55da4f --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_fd_t.html @@ -0,0 +1 @@ +__wasi_fd_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_fd_t

Source
pub type __wasi_fd_t = i32;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_filedelta_t.html b/async_wasi/snapshots/common/types/type.__wasi_filedelta_t.html new file mode 100644 index 000000000..83e710e40 --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_filedelta_t.html @@ -0,0 +1 @@ +__wasi_filedelta_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_filedelta_t

Source
pub type __wasi_filedelta_t = i64;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_filesize_t.html b/async_wasi/snapshots/common/types/type.__wasi_filesize_t.html new file mode 100644 index 000000000..17b45659f --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_filesize_t.html @@ -0,0 +1 @@ +__wasi_filesize_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_filesize_t

Source
pub type __wasi_filesize_t = u64;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_inode_t.html b/async_wasi/snapshots/common/types/type.__wasi_inode_t.html new file mode 100644 index 000000000..06ac2d95b --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_inode_t.html @@ -0,0 +1 @@ +__wasi_inode_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_inode_t

Source
pub type __wasi_inode_t = u64;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_linkcount_t.html b/async_wasi/snapshots/common/types/type.__wasi_linkcount_t.html new file mode 100644 index 000000000..4733024d7 --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_linkcount_t.html @@ -0,0 +1 @@ +__wasi_linkcount_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_linkcount_t

Source
pub type __wasi_linkcount_t = u64;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_siflags_t.html b/async_wasi/snapshots/common/types/type.__wasi_siflags_t.html new file mode 100644 index 000000000..1ac96333f --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_siflags_t.html @@ -0,0 +1 @@ +__wasi_siflags_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_siflags_t

Source
pub type __wasi_siflags_t = u16;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_size_t.html b/async_wasi/snapshots/common/types/type.__wasi_size_t.html new file mode 100644 index 000000000..507603b29 --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_size_t.html @@ -0,0 +1 @@ +__wasi_size_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_size_t

Source
pub type __wasi_size_t = u32;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_sock_d_t.html b/async_wasi/snapshots/common/types/type.__wasi_sock_d_t.html new file mode 100644 index 000000000..e92a18f8d --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_sock_d_t.html @@ -0,0 +1 @@ +__wasi_sock_d_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_sock_d_t

Source
pub type __wasi_sock_d_t = __wasi_fd_t;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_timestamp_t.html b/async_wasi/snapshots/common/types/type.__wasi_timestamp_t.html new file mode 100644 index 000000000..c05fd845e --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_timestamp_t.html @@ -0,0 +1 @@ +__wasi_timestamp_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_timestamp_t

Source
pub type __wasi_timestamp_t = u64;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.__wasi_userdata_t.html b/async_wasi/snapshots/common/types/type.__wasi_userdata_t.html new file mode 100644 index 000000000..3013254de --- /dev/null +++ b/async_wasi/snapshots/common/types/type.__wasi_userdata_t.html @@ -0,0 +1 @@ +__wasi_userdata_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias __wasi_userdata_t

Source
pub type __wasi_userdata_t = u64;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.const_uint8_t_ptr.html b/async_wasi/snapshots/common/types/type.const_uint8_t_ptr.html new file mode 100644 index 000000000..b0a027fcb --- /dev/null +++ b/async_wasi/snapshots/common/types/type.const_uint8_t_ptr.html @@ -0,0 +1 @@ +const_uint8_t_ptr in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias const_uint8_t_ptr

Source
pub type const_uint8_t_ptr = u32;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/type.uint8_t_ptr.html b/async_wasi/snapshots/common/types/type.uint8_t_ptr.html new file mode 100644 index 000000000..faced26a9 --- /dev/null +++ b/async_wasi/snapshots/common/types/type.uint8_t_ptr.html @@ -0,0 +1 @@ +uint8_t_ptr in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Type Alias uint8_t_ptr

Source
pub type uint8_t_ptr = u32;
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/union.__wasi_prestat_u_t.html b/async_wasi/snapshots/common/types/union.__wasi_prestat_u_t.html new file mode 100644 index 000000000..5e67a68c3 --- /dev/null +++ b/async_wasi/snapshots/common/types/union.__wasi_prestat_u_t.html @@ -0,0 +1,16 @@ +__wasi_prestat_u_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Union __wasi_prestat_u_t

Source
#[repr(C)]
+pub union __wasi_prestat_u_t {
+    pub dir: __wasi_prestat_dir_t,
+}

Fields§

§dir: __wasi_prestat_dir_t

Trait Implementations§

Source§

impl Clone for __wasi_prestat_u_t

Source§

fn clone(&self) -> __wasi_prestat_u_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_prestat_u_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_prestat_u_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/types/union.__wasi_subscription_u_u_t.html b/async_wasi/snapshots/common/types/union.__wasi_subscription_u_u_t.html new file mode 100644 index 000000000..584c4e9ec --- /dev/null +++ b/async_wasi/snapshots/common/types/union.__wasi_subscription_u_u_t.html @@ -0,0 +1,18 @@ +__wasi_subscription_u_u_t in async_wasi::snapshots::common::types - Rust
async_wasi::snapshots::common::types

Union __wasi_subscription_u_u_t

Source
#[repr(C)]
+pub union __wasi_subscription_u_u_t {
+    pub clock: __wasi_subscription_clock_t,
+    pub fd_read: __wasi_subscription_fd_readwrite_t,
+    pub fd_write: __wasi_subscription_fd_readwrite_t,
+}

Fields§

§clock: __wasi_subscription_clock_t§fd_read: __wasi_subscription_fd_readwrite_t§fd_write: __wasi_subscription_fd_readwrite_t

Trait Implementations§

Source§

impl Clone for __wasi_subscription_u_u_t

Source§

fn clone(&self) -> __wasi_subscription_u_u_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wasi_subscription_u_u_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wasi_subscription_u_u_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/enum.Advice.html b/async_wasi/snapshots/common/vfs/enum.Advice.html new file mode 100644 index 000000000..6d7dfa0ff --- /dev/null +++ b/async_wasi/snapshots/common/vfs/enum.Advice.html @@ -0,0 +1,20 @@ +Advice in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Enum Advice

Source
pub enum Advice {
+    Normal,
+    Sequential,
+    Random,
+    WillNeed,
+    DontNeed,
+    NoReuse,
+}

Variants§

§

Normal

§

Sequential

§

Random

§

WillNeed

§

DontNeed

§

NoReuse

Trait Implementations§

Source§

impl Clone for Advice

Source§

fn clone(&self) -> Advice

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Advice

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Advice

§

impl RefUnwindSafe for Advice

§

impl Send for Advice

§

impl Sync for Advice

§

impl Unpin for Advice

§

impl UnwindSafe for Advice

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/enum.SystemTimeSpec.html b/async_wasi/snapshots/common/vfs/enum.SystemTimeSpec.html new file mode 100644 index 000000000..9ae5227c3 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/enum.SystemTimeSpec.html @@ -0,0 +1,14 @@ +SystemTimeSpec in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Enum SystemTimeSpec

Source
pub enum SystemTimeSpec {
+    SymbolicNow,
+    Absolute(Duration),
+}

Variants§

§

SymbolicNow

§

Absolute(Duration)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/impls/index.html b/async_wasi/snapshots/common/vfs/impls/index.html new file mode 100644 index 000000000..34561001b --- /dev/null +++ b/async_wasi/snapshots/common/vfs/impls/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::vfs::impls - Rust
async_wasi::snapshots::common::vfs

Module impls

Source

Structs§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/impls/sidebar-items.js b/async_wasi/snapshots/common/vfs/impls/sidebar-items.js new file mode 100644 index 000000000..1d5635ffb --- /dev/null +++ b/async_wasi/snapshots/common/vfs/impls/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["MemoryDir","MemoryFile"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/impls/struct.MemoryDir.html b/async_wasi/snapshots/common/vfs/impls/struct.MemoryDir.html new file mode 100644 index 000000000..359ba2ba3 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/impls/struct.MemoryDir.html @@ -0,0 +1,32 @@ +MemoryDir in async_wasi::snapshots::common::vfs::impls - Rust
async_wasi::snapshots::common::vfs::impls

Struct MemoryDir

Source
pub struct MemoryDir { /* private fields */ }

Trait Implementations§

Source§

impl Debug for MemoryDir

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for MemoryDir

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl WasiDir for MemoryDir

Source§

fn get_readdir(&self, start: u64) -> Result<Vec<(String, u64, FileType)>, Errno>

Source§

fn fd_readdir( + &self, + cursor: usize, + write_buf: &mut [u8], +) -> Result<usize, Errno>

Source§

impl WasiNode for MemoryDir

Source§

fn fd_fdstat_get(&self) -> Result<FdStat, Errno>

Source§

fn fd_filestat_get(&self) -> Result<Filestat, Errno>

Source§

fn fd_filestat_set_size(&mut self, size: __wasi_filesize_t) -> Result<(), Errno>

Source§

fn fd_filestat_set_times( + &mut self, + atim: __wasi_timestamp_t, + mtim: __wasi_timestamp_t, + fst_flags: Type, +) -> Result<(), Errno>

Source§

fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno>

Source§

fn fd_fdstat_set_rights( + &mut self, + fs_rights_base: WASIRights, + fs_rights_inheriting: WASIRights, +) -> Result<(), Errno>

Source§

impl WasiVirtualDir for MemoryDir

Source§

fn create(ino: usize) -> Self

Source§

fn add_sub_dir<P: AsRef<Path>>( + &mut self, + path: &P, + ino: usize, +) -> Result<(), Errno>

Source§

fn remove_sub_dir<P: AsRef<Path>>(&mut self, path: &P) -> Result<(), Errno>

Source§

fn find_inode<P: AsRef<Path>>(&self, path: &P) -> Option<usize>

Source§

fn is_empty(&self) -> bool

Source§

fn is_open(&self) -> bool

Source§

fn open(&mut self)

Source§

fn close(&mut self) -> usize

Source§

fn mark_remove(&mut self)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/impls/struct.MemoryFile.html b/async_wasi/snapshots/common/vfs/impls/struct.MemoryFile.html new file mode 100644 index 000000000..4cfc5171d --- /dev/null +++ b/async_wasi/snapshots/common/vfs/impls/struct.MemoryFile.html @@ -0,0 +1,41 @@ +MemoryFile in async_wasi::snapshots::common::vfs::impls - Rust
async_wasi::snapshots::common::vfs::impls

Struct MemoryFile

Source
pub struct MemoryFile { /* private fields */ }

Trait Implementations§

Source§

impl Debug for MemoryFile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for MemoryFile

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl From<Vec<u8>> for MemoryFile

Source§

fn from(value: Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl WasiFile for MemoryFile

Source§

fn fd_read(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Errno>

Source§

fn fd_pread( + &mut self, + bufs: &mut [IoSliceMut<'_>], + offset: __wasi_filesize_t, +) -> Result<usize, Errno>

Source§

fn fd_write(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Errno>

Source§

fn fd_pwrite( + &mut self, + bufs: &[IoSlice<'_>], + offset: __wasi_filesize_t, +) -> Result<usize, Errno>

Source§

fn fd_seek( + &mut self, + offset: __wasi_filedelta_t, + whence: Type, +) -> Result<__wasi_filesize_t, Errno>

Source§

fn fd_tell(&mut self) -> Result<__wasi_filesize_t, Errno>

Source§

fn fd_advise( + &mut self, + offset: __wasi_filesize_t, + len: __wasi_filesize_t, + advice: Advice, +) -> Result<(), Errno>

Source§

fn fd_allocate( + &mut self, + offset: __wasi_filesize_t, + len: __wasi_filesize_t, +) -> Result<(), Errno>

Source§

fn fd_datasync(&mut self) -> Result<(), Errno>

Source§

fn fd_sync(&mut self) -> Result<(), Errno>

Source§

impl WasiNode for MemoryFile

Source§

fn fd_fdstat_get(&self) -> Result<FdStat, Errno>

Source§

fn fd_filestat_get(&self) -> Result<Filestat, Errno>

Source§

fn fd_filestat_set_size(&mut self, size: __wasi_filesize_t) -> Result<(), Errno>

Source§

fn fd_filestat_set_times( + &mut self, + atim: __wasi_timestamp_t, + mtim: __wasi_timestamp_t, + fst_flags: Type, +) -> Result<(), Errno>

Source§

fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno>

Source§

fn fd_fdstat_set_rights( + &mut self, + fs_rights_base: WASIRights, + fs_rights_inheriting: WASIRights, +) -> Result<(), Errno>

Source§

impl WasiVirtualFile for MemoryFile

Source§

fn create(ino: usize) -> Self

Source§

fn set_ino(&mut self, ino: usize)

Source§

fn is_open(&self) -> bool

Source§

fn open(&mut self)

Source§

fn close(&mut self) -> usize

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/index.html b/async_wasi/snapshots/common/vfs/index.html new file mode 100644 index 000000000..74fd91e1b --- /dev/null +++ b/async_wasi/snapshots/common/vfs/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common

Module vfs

Source

Modules§

Structs§

Enums§

Traits§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/sidebar-items.js b/async_wasi/snapshots/common/vfs/sidebar-items.js new file mode 100644 index 000000000..9692ce29a --- /dev/null +++ b/async_wasi/snapshots/common/vfs/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Advice","SystemTimeSpec"],"mod":["impls","virtual_sys"],"struct":["FdFlags","FdStat","FileType","Filestat","Lookupflags","OFlags","ReaddirEntity","RiFlags","RoFlags","SdFlags","SiFlags","WASIRights"],"trait":["WasiDir","WasiFile","WasiFileSys","WasiNode"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/struct.FdFlags.html b/async_wasi/snapshots/common/vfs/struct.FdFlags.html new file mode 100644 index 000000000..b488a2324 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/struct.FdFlags.html @@ -0,0 +1,68 @@ +FdFlags in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Struct FdFlags

Source
pub struct FdFlags(/* private fields */);

Implementations§

Source§

impl FdFlags

Source

pub const APPEND: Self = _

Source

pub const DSYNC: Self = _

Source

pub const NONBLOCK: Self = _

Source

pub const RSYNC: Self = _

Source

pub const SYNC: Self = _

Source§

impl FdFlags

Source

pub const fn empty() -> Self

Get a flags value with all bits unset.

+
Source

pub const fn all() -> Self

Get a flags value with all known bits set.

+
Source

pub const fn bits(&self) -> Type

Get the underlying bits value.

+

The returned value is exactly the bits set in this flags value.

+
Source

pub const fn from_bits(bits: Type) -> Option<Self>

Convert from a bits value.

+

This method will return None if any unknown bits are set.

+
Source

pub const fn from_bits_truncate(bits: Type) -> Self

Convert from a bits value, unsetting any unknown bits.

+
Source

pub const fn from_bits_retain(bits: Type) -> Self

Convert from a bits value exactly.

+
Source

pub fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set.

+

This method will return None if name is empty or doesn’t +correspond to any named flag.

+
Source

pub const fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.

+
Source

pub const fn is_all(&self) -> bool

Whether all known bits in this flags value are set.

+
Source

pub const fn intersects(&self, other: Self) -> bool

Whether any set bits in a source flags value are also set in a target flags value.

+
Source

pub const fn contains(&self, other: Self) -> bool

Whether all set bits in a source flags value are also set in a target flags value.

+
Source

pub fn insert(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source

pub fn remove(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +remove won’t truncate other, but the ! operator will.

+
Source

pub fn toggle(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub fn set(&mut self, other: Self, value: bool)

Call insert when value is true or remove when value is false.

+
Source

pub const fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source

pub const fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source

pub const fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source

pub const fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub const fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

impl FdFlags

Source

pub const fn iter(&self) -> Iter<FdFlags>

Yield a set of contained flags values.

+

Each yielded flags value will correspond to a defined named flag. Any unknown bits +will be yielded together as a final flags value.

+
Source

pub const fn iter_names(&self) -> IterNames<FdFlags>

Yield a set of contained named flags values.

+

This method is like iter, except only yields bits in contained named flags. +Any unknown bits, or bits not corresponding to a contained flag will not be yielded.

+

Trait Implementations§

Source§

impl Binary for FdFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd for FdFlags

Source§

fn bitand(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source§

type Output = FdFlags

The resulting type after applying the & operator.
Source§

impl BitAndAssign for FdFlags

Source§

fn bitand_assign(&mut self, other: Self)

The bitwise and (&) of the bits in two flags values.

+
Source§

impl BitOr for FdFlags

Source§

fn bitor(self, other: FdFlags) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source§

type Output = FdFlags

The resulting type after applying the | operator.
Source§

impl BitOrAssign for FdFlags

Source§

fn bitor_assign(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source§

impl BitXor for FdFlags

Source§

fn bitxor(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

type Output = FdFlags

The resulting type after applying the ^ operator.
Source§

impl BitXorAssign for FdFlags

Source§

fn bitxor_assign(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

impl Clone for FdFlags

Source§

fn clone(&self) -> FdFlags

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FdFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Extend<FdFlags> for FdFlags

Source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

The bitwise or (|) of the bits in each flags value.

+
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Flags for FdFlags

Source§

const FLAGS: &'static [Flag<FdFlags>] = _

The set of defined flags.
Source§

type Bits = u16

The underlying bits type.
Source§

fn bits(&self) -> Type

Get the underlying bits value. Read more
Source§

fn from_bits_retain(bits: Type) -> FdFlags

Convert from a bits value exactly.
§

fn empty() -> Self

Get a flags value with all bits unset.
§

fn all() -> Self

Get a flags value with all known bits set.
§

fn from_bits(bits: Self::Bits) -> Option<Self>

Convert from a bits value. Read more
§

fn from_bits_truncate(bits: Self::Bits) -> Self

Convert from a bits value, unsetting any unknown bits.
§

fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set. Read more
§

fn iter(&self) -> Iter<Self>

Yield a set of contained flags values. Read more
§

fn iter_names(&self) -> IterNames<Self>

Yield a set of contained named flags values. Read more
§

fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.
§

fn is_all(&self) -> bool

Whether all known bits in this flags value are set.
§

fn intersects(&self, other: Self) -> bool
where + Self: Sized,

Whether any set bits in a source flags value are also set in a target flags value.
§

fn contains(&self, other: Self) -> bool
where + Self: Sized,

Whether all set bits in a source flags value are also set in a target flags value.
§

fn insert(&mut self, other: Self)
where + Self: Sized,

The bitwise or (|) of the bits in two flags values.
§

fn remove(&mut self, other: Self)
where + Self: Sized,

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn toggle(&mut self, other: Self)
where + Self: Sized,

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn set(&mut self, other: Self, value: bool)
where + Self: Sized,

Call [Flags::insert] when value is true or [Flags::remove] when value is false.
§

fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.
§

fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.
§

fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§

impl FromIterator<FdFlags> for FdFlags

Source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

The bitwise or (|) of the bits in each flags value.

+
Source§

impl IntoIterator for FdFlags

Source§

type Item = FdFlags

The type of the elements being iterated over.
Source§

type IntoIter = Iter<FdFlags>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for FdFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Not for FdFlags

Source§

fn not(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

type Output = FdFlags

The resulting type after applying the ! operator.
Source§

impl Octal for FdFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PublicFlags for FdFlags

Source§

type Primitive = u16

The type of the underlying storage.
Source§

type Internal = InternalBitFlags

The type of the internal field on the generated flags type.
Source§

impl Sub for FdFlags

Source§

fn sub(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

type Output = FdFlags

The resulting type after applying the - operator.
Source§

impl SubAssign for FdFlags

Source§

fn sub_assign(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

impl UpperHex for FdFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/struct.FdStat.html b/async_wasi/snapshots/common/vfs/struct.FdStat.html new file mode 100644 index 000000000..b7fc36290 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/struct.FdStat.html @@ -0,0 +1,18 @@ +FdStat in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Struct FdStat

Source
pub struct FdStat {
+    pub filetype: FileType,
+    pub fs_rights_base: WASIRights,
+    pub fs_rights_inheriting: WASIRights,
+    pub flags: FdFlags,
+}

Fields§

§filetype: FileType§fs_rights_base: WASIRights§fs_rights_inheriting: WASIRights§flags: FdFlags

Trait Implementations§

Source§

impl Clone for FdStat

Source§

fn clone(&self) -> FdStat

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FdStat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&FdStat> for __wasi_fdstat_t

Source§

fn from(fdstat: &FdStat) -> __wasi_fdstat_t

Converts to this type from the input type.
Source§

impl From<FdStat> for __wasi_fdstat_t

Source§

fn from(fdstat: FdStat) -> __wasi_fdstat_t

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for FdStat

§

impl RefUnwindSafe for FdStat

§

impl Send for FdStat

§

impl Sync for FdStat

§

impl Unpin for FdStat

§

impl UnwindSafe for FdStat

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/struct.FileType.html b/async_wasi/snapshots/common/vfs/struct.FileType.html new file mode 100644 index 000000000..f74192d8c --- /dev/null +++ b/async_wasi/snapshots/common/vfs/struct.FileType.html @@ -0,0 +1,14 @@ +FileType in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Struct FileType

Source
pub struct FileType(pub Type);

Tuple Fields§

§0: Type

Implementations§

Trait Implementations§

Source§

impl Clone for FileType

Source§

fn clone(&self) -> FileType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FileType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for FileType

Source§

fn eq(&self, other: &FileType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for FileType

Source§

impl Eq for FileType

Source§

impl StructuralPartialEq for FileType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/struct.Filestat.html b/async_wasi/snapshots/common/vfs/struct.Filestat.html new file mode 100644 index 000000000..de3864d83 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/struct.Filestat.html @@ -0,0 +1,22 @@ +Filestat in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Struct Filestat

Source
pub struct Filestat {
+    pub filetype: FileType,
+    pub inode: u64,
+    pub nlink: u64,
+    pub size: u64,
+    pub atim: Option<SystemTime>,
+    pub mtim: Option<SystemTime>,
+    pub ctim: Option<SystemTime>,
+}

Fields§

§filetype: FileType§inode: u64§nlink: u64§size: u64§atim: Option<SystemTime>§mtim: Option<SystemTime>§ctim: Option<SystemTime>

Trait Implementations§

Source§

impl Clone for Filestat

Source§

fn clone(&self) -> Filestat

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Filestat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Filestat> for __wasi_filestat_t

Source§

fn from(stat: Filestat) -> __wasi_filestat_t

Converts to this type from the input type.
Source§

impl PartialEq for Filestat

Source§

fn eq(&self, other: &Filestat) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for Filestat

Source§

impl StructuralPartialEq for Filestat

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/struct.Lookupflags.html b/async_wasi/snapshots/common/vfs/struct.Lookupflags.html new file mode 100644 index 000000000..3a319569f --- /dev/null +++ b/async_wasi/snapshots/common/vfs/struct.Lookupflags.html @@ -0,0 +1,66 @@ +Lookupflags in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Struct Lookupflags

Source
pub struct Lookupflags(/* private fields */);

Implementations§

Source§

impl Lookupflags

Source§

impl Lookupflags

Source

pub const fn empty() -> Self

Get a flags value with all bits unset.

+
Source

pub const fn all() -> Self

Get a flags value with all known bits set.

+
Source

pub const fn bits(&self) -> Type

Get the underlying bits value.

+

The returned value is exactly the bits set in this flags value.

+
Source

pub const fn from_bits(bits: Type) -> Option<Self>

Convert from a bits value.

+

This method will return None if any unknown bits are set.

+
Source

pub const fn from_bits_truncate(bits: Type) -> Self

Convert from a bits value, unsetting any unknown bits.

+
Source

pub const fn from_bits_retain(bits: Type) -> Self

Convert from a bits value exactly.

+
Source

pub fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set.

+

This method will return None if name is empty or doesn’t +correspond to any named flag.

+
Source

pub const fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.

+
Source

pub const fn is_all(&self) -> bool

Whether all known bits in this flags value are set.

+
Source

pub const fn intersects(&self, other: Self) -> bool

Whether any set bits in a source flags value are also set in a target flags value.

+
Source

pub const fn contains(&self, other: Self) -> bool

Whether all set bits in a source flags value are also set in a target flags value.

+
Source

pub fn insert(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source

pub fn remove(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +remove won’t truncate other, but the ! operator will.

+
Source

pub fn toggle(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub fn set(&mut self, other: Self, value: bool)

Call insert when value is true or remove when value is false.

+
Source

pub const fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source

pub const fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source

pub const fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source

pub const fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub const fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

impl Lookupflags

Source

pub const fn iter(&self) -> Iter<Lookupflags>

Yield a set of contained flags values.

+

Each yielded flags value will correspond to a defined named flag. Any unknown bits +will be yielded together as a final flags value.

+
Source

pub const fn iter_names(&self) -> IterNames<Lookupflags>

Yield a set of contained named flags values.

+

This method is like iter, except only yields bits in contained named flags. +Any unknown bits, or bits not corresponding to a contained flag will not be yielded.

+

Trait Implementations§

Source§

impl Binary for Lookupflags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd for Lookupflags

Source§

fn bitand(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source§

type Output = Lookupflags

The resulting type after applying the & operator.
Source§

impl BitAndAssign for Lookupflags

Source§

fn bitand_assign(&mut self, other: Self)

The bitwise and (&) of the bits in two flags values.

+
Source§

impl BitOr for Lookupflags

Source§

fn bitor(self, other: Lookupflags) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source§

type Output = Lookupflags

The resulting type after applying the | operator.
Source§

impl BitOrAssign for Lookupflags

Source§

fn bitor_assign(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source§

impl BitXor for Lookupflags

Source§

fn bitxor(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

type Output = Lookupflags

The resulting type after applying the ^ operator.
Source§

impl BitXorAssign for Lookupflags

Source§

fn bitxor_assign(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

impl Extend<Lookupflags> for Lookupflags

Source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

The bitwise or (|) of the bits in each flags value.

+
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Flags for Lookupflags

Source§

const FLAGS: &'static [Flag<Lookupflags>] = _

The set of defined flags.
Source§

type Bits = u32

The underlying bits type.
Source§

fn bits(&self) -> Type

Get the underlying bits value. Read more
Source§

fn from_bits_retain(bits: Type) -> Lookupflags

Convert from a bits value exactly.
§

fn empty() -> Self

Get a flags value with all bits unset.
§

fn all() -> Self

Get a flags value with all known bits set.
§

fn from_bits(bits: Self::Bits) -> Option<Self>

Convert from a bits value. Read more
§

fn from_bits_truncate(bits: Self::Bits) -> Self

Convert from a bits value, unsetting any unknown bits.
§

fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set. Read more
§

fn iter(&self) -> Iter<Self>

Yield a set of contained flags values. Read more
§

fn iter_names(&self) -> IterNames<Self>

Yield a set of contained named flags values. Read more
§

fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.
§

fn is_all(&self) -> bool

Whether all known bits in this flags value are set.
§

fn intersects(&self, other: Self) -> bool
where + Self: Sized,

Whether any set bits in a source flags value are also set in a target flags value.
§

fn contains(&self, other: Self) -> bool
where + Self: Sized,

Whether all set bits in a source flags value are also set in a target flags value.
§

fn insert(&mut self, other: Self)
where + Self: Sized,

The bitwise or (|) of the bits in two flags values.
§

fn remove(&mut self, other: Self)
where + Self: Sized,

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn toggle(&mut self, other: Self)
where + Self: Sized,

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn set(&mut self, other: Self, value: bool)
where + Self: Sized,

Call [Flags::insert] when value is true or [Flags::remove] when value is false.
§

fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.
§

fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.
§

fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§

impl FromIterator<Lookupflags> for Lookupflags

Source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

The bitwise or (|) of the bits in each flags value.

+
Source§

impl IntoIterator for Lookupflags

Source§

type Item = Lookupflags

The type of the elements being iterated over.
Source§

type IntoIter = Iter<Lookupflags>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for Lookupflags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Not for Lookupflags

Source§

fn not(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

type Output = Lookupflags

The resulting type after applying the ! operator.
Source§

impl Octal for Lookupflags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PublicFlags for Lookupflags

Source§

type Primitive = u32

The type of the underlying storage.
Source§

type Internal = InternalBitFlags

The type of the internal field on the generated flags type.
Source§

impl Sub for Lookupflags

Source§

fn sub(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

type Output = Lookupflags

The resulting type after applying the - operator.
Source§

impl SubAssign for Lookupflags

Source§

fn sub_assign(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

impl UpperHex for Lookupflags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/struct.OFlags.html b/async_wasi/snapshots/common/vfs/struct.OFlags.html new file mode 100644 index 000000000..717ea177c --- /dev/null +++ b/async_wasi/snapshots/common/vfs/struct.OFlags.html @@ -0,0 +1,68 @@ +OFlags in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Struct OFlags

Source
pub struct OFlags(/* private fields */);

Implementations§

Source§

impl OFlags

Source

pub const CREATE: Self = _

Source

pub const DIRECTORY: Self = _

Source

pub const EXCLUSIVE: Self = _

Source

pub const TRUNCATE: Self = _

Source§

impl OFlags

Source

pub const fn empty() -> Self

Get a flags value with all bits unset.

+
Source

pub const fn all() -> Self

Get a flags value with all known bits set.

+
Source

pub const fn bits(&self) -> Type

Get the underlying bits value.

+

The returned value is exactly the bits set in this flags value.

+
Source

pub const fn from_bits(bits: Type) -> Option<Self>

Convert from a bits value.

+

This method will return None if any unknown bits are set.

+
Source

pub const fn from_bits_truncate(bits: Type) -> Self

Convert from a bits value, unsetting any unknown bits.

+
Source

pub const fn from_bits_retain(bits: Type) -> Self

Convert from a bits value exactly.

+
Source

pub fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set.

+

This method will return None if name is empty or doesn’t +correspond to any named flag.

+
Source

pub const fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.

+
Source

pub const fn is_all(&self) -> bool

Whether all known bits in this flags value are set.

+
Source

pub const fn intersects(&self, other: Self) -> bool

Whether any set bits in a source flags value are also set in a target flags value.

+
Source

pub const fn contains(&self, other: Self) -> bool

Whether all set bits in a source flags value are also set in a target flags value.

+
Source

pub fn insert(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source

pub fn remove(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +remove won’t truncate other, but the ! operator will.

+
Source

pub fn toggle(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub fn set(&mut self, other: Self, value: bool)

Call insert when value is true or remove when value is false.

+
Source

pub const fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source

pub const fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source

pub const fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source

pub const fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub const fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

impl OFlags

Source

pub const fn iter(&self) -> Iter<OFlags>

Yield a set of contained flags values.

+

Each yielded flags value will correspond to a defined named flag. Any unknown bits +will be yielded together as a final flags value.

+
Source

pub const fn iter_names(&self) -> IterNames<OFlags>

Yield a set of contained named flags values.

+

This method is like iter, except only yields bits in contained named flags. +Any unknown bits, or bits not corresponding to a contained flag will not be yielded.

+

Trait Implementations§

Source§

impl Binary for OFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd for OFlags

Source§

fn bitand(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source§

type Output = OFlags

The resulting type after applying the & operator.
Source§

impl BitAndAssign for OFlags

Source§

fn bitand_assign(&mut self, other: Self)

The bitwise and (&) of the bits in two flags values.

+
Source§

impl BitOr for OFlags

Source§

fn bitor(self, other: OFlags) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source§

type Output = OFlags

The resulting type after applying the | operator.
Source§

impl BitOrAssign for OFlags

Source§

fn bitor_assign(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source§

impl BitXor for OFlags

Source§

fn bitxor(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

type Output = OFlags

The resulting type after applying the ^ operator.
Source§

impl BitXorAssign for OFlags

Source§

fn bitxor_assign(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

impl Clone for OFlags

Source§

fn clone(&self) -> OFlags

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Extend<OFlags> for OFlags

Source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

The bitwise or (|) of the bits in each flags value.

+
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Flags for OFlags

Source§

const FLAGS: &'static [Flag<OFlags>] = _

The set of defined flags.
Source§

type Bits = u16

The underlying bits type.
Source§

fn bits(&self) -> Type

Get the underlying bits value. Read more
Source§

fn from_bits_retain(bits: Type) -> OFlags

Convert from a bits value exactly.
§

fn empty() -> Self

Get a flags value with all bits unset.
§

fn all() -> Self

Get a flags value with all known bits set.
§

fn from_bits(bits: Self::Bits) -> Option<Self>

Convert from a bits value. Read more
§

fn from_bits_truncate(bits: Self::Bits) -> Self

Convert from a bits value, unsetting any unknown bits.
§

fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set. Read more
§

fn iter(&self) -> Iter<Self>

Yield a set of contained flags values. Read more
§

fn iter_names(&self) -> IterNames<Self>

Yield a set of contained named flags values. Read more
§

fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.
§

fn is_all(&self) -> bool

Whether all known bits in this flags value are set.
§

fn intersects(&self, other: Self) -> bool
where + Self: Sized,

Whether any set bits in a source flags value are also set in a target flags value.
§

fn contains(&self, other: Self) -> bool
where + Self: Sized,

Whether all set bits in a source flags value are also set in a target flags value.
§

fn insert(&mut self, other: Self)
where + Self: Sized,

The bitwise or (|) of the bits in two flags values.
§

fn remove(&mut self, other: Self)
where + Self: Sized,

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn toggle(&mut self, other: Self)
where + Self: Sized,

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn set(&mut self, other: Self, value: bool)
where + Self: Sized,

Call [Flags::insert] when value is true or [Flags::remove] when value is false.
§

fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.
§

fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.
§

fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§

impl FromIterator<OFlags> for OFlags

Source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

The bitwise or (|) of the bits in each flags value.

+
Source§

impl IntoIterator for OFlags

Source§

type Item = OFlags

The type of the elements being iterated over.
Source§

type IntoIter = Iter<OFlags>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for OFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Not for OFlags

Source§

fn not(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

type Output = OFlags

The resulting type after applying the ! operator.
Source§

impl Octal for OFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PublicFlags for OFlags

Source§

type Primitive = u16

The type of the underlying storage.
Source§

type Internal = InternalBitFlags

The type of the internal field on the generated flags type.
Source§

impl Sub for OFlags

Source§

fn sub(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

type Output = OFlags

The resulting type after applying the - operator.
Source§

impl SubAssign for OFlags

Source§

fn sub_assign(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

impl UpperHex for OFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for OFlags

§

impl RefUnwindSafe for OFlags

§

impl Send for OFlags

§

impl Sync for OFlags

§

impl Unpin for OFlags

§

impl UnwindSafe for OFlags

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/struct.ReaddirEntity.html b/async_wasi/snapshots/common/vfs/struct.ReaddirEntity.html new file mode 100644 index 000000000..acf864c14 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/struct.ReaddirEntity.html @@ -0,0 +1,16 @@ +ReaddirEntity in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Struct ReaddirEntity

Source
pub struct ReaddirEntity {
+    pub next: u64,
+    pub inode: u64,
+    pub name: String,
+    pub filetype: FileType,
+}

Fields§

§next: u64§inode: u64§name: String§filetype: FileType

Trait Implementations§

Source§

impl From<&ReaddirEntity> for __wasi_dirent_t

Source§

fn from(ent: &ReaddirEntity) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/struct.RiFlags.html b/async_wasi/snapshots/common/vfs/struct.RiFlags.html new file mode 100644 index 000000000..998f058e7 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/struct.RiFlags.html @@ -0,0 +1,66 @@ +RiFlags in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Struct RiFlags

Source
pub struct RiFlags(/* private fields */);

Implementations§

Source§

impl RiFlags

Source

pub const RECV_PEEK: Self = _

Source

pub const RECV_WAITALL: Self = _

Source§

impl RiFlags

Source

pub const fn empty() -> Self

Get a flags value with all bits unset.

+
Source

pub const fn all() -> Self

Get a flags value with all known bits set.

+
Source

pub const fn bits(&self) -> Type

Get the underlying bits value.

+

The returned value is exactly the bits set in this flags value.

+
Source

pub const fn from_bits(bits: Type) -> Option<Self>

Convert from a bits value.

+

This method will return None if any unknown bits are set.

+
Source

pub const fn from_bits_truncate(bits: Type) -> Self

Convert from a bits value, unsetting any unknown bits.

+
Source

pub const fn from_bits_retain(bits: Type) -> Self

Convert from a bits value exactly.

+
Source

pub fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set.

+

This method will return None if name is empty or doesn’t +correspond to any named flag.

+
Source

pub const fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.

+
Source

pub const fn is_all(&self) -> bool

Whether all known bits in this flags value are set.

+
Source

pub const fn intersects(&self, other: Self) -> bool

Whether any set bits in a source flags value are also set in a target flags value.

+
Source

pub const fn contains(&self, other: Self) -> bool

Whether all set bits in a source flags value are also set in a target flags value.

+
Source

pub fn insert(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source

pub fn remove(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +remove won’t truncate other, but the ! operator will.

+
Source

pub fn toggle(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub fn set(&mut self, other: Self, value: bool)

Call insert when value is true or remove when value is false.

+
Source

pub const fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source

pub const fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source

pub const fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source

pub const fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub const fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

impl RiFlags

Source

pub const fn iter(&self) -> Iter<RiFlags>

Yield a set of contained flags values.

+

Each yielded flags value will correspond to a defined named flag. Any unknown bits +will be yielded together as a final flags value.

+
Source

pub const fn iter_names(&self) -> IterNames<RiFlags>

Yield a set of contained named flags values.

+

This method is like iter, except only yields bits in contained named flags. +Any unknown bits, or bits not corresponding to a contained flag will not be yielded.

+

Trait Implementations§

Source§

impl Binary for RiFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd for RiFlags

Source§

fn bitand(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source§

type Output = RiFlags

The resulting type after applying the & operator.
Source§

impl BitAndAssign for RiFlags

Source§

fn bitand_assign(&mut self, other: Self)

The bitwise and (&) of the bits in two flags values.

+
Source§

impl BitOr for RiFlags

Source§

fn bitor(self, other: RiFlags) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source§

type Output = RiFlags

The resulting type after applying the | operator.
Source§

impl BitOrAssign for RiFlags

Source§

fn bitor_assign(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source§

impl BitXor for RiFlags

Source§

fn bitxor(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

type Output = RiFlags

The resulting type after applying the ^ operator.
Source§

impl BitXorAssign for RiFlags

Source§

fn bitxor_assign(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

impl Extend<RiFlags> for RiFlags

Source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

The bitwise or (|) of the bits in each flags value.

+
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Flags for RiFlags

Source§

const FLAGS: &'static [Flag<RiFlags>] = _

The set of defined flags.
Source§

type Bits = u16

The underlying bits type.
Source§

fn bits(&self) -> Type

Get the underlying bits value. Read more
Source§

fn from_bits_retain(bits: Type) -> RiFlags

Convert from a bits value exactly.
§

fn empty() -> Self

Get a flags value with all bits unset.
§

fn all() -> Self

Get a flags value with all known bits set.
§

fn from_bits(bits: Self::Bits) -> Option<Self>

Convert from a bits value. Read more
§

fn from_bits_truncate(bits: Self::Bits) -> Self

Convert from a bits value, unsetting any unknown bits.
§

fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set. Read more
§

fn iter(&self) -> Iter<Self>

Yield a set of contained flags values. Read more
§

fn iter_names(&self) -> IterNames<Self>

Yield a set of contained named flags values. Read more
§

fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.
§

fn is_all(&self) -> bool

Whether all known bits in this flags value are set.
§

fn intersects(&self, other: Self) -> bool
where + Self: Sized,

Whether any set bits in a source flags value are also set in a target flags value.
§

fn contains(&self, other: Self) -> bool
where + Self: Sized,

Whether all set bits in a source flags value are also set in a target flags value.
§

fn insert(&mut self, other: Self)
where + Self: Sized,

The bitwise or (|) of the bits in two flags values.
§

fn remove(&mut self, other: Self)
where + Self: Sized,

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn toggle(&mut self, other: Self)
where + Self: Sized,

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn set(&mut self, other: Self, value: bool)
where + Self: Sized,

Call [Flags::insert] when value is true or [Flags::remove] when value is false.
§

fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.
§

fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.
§

fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§

impl FromIterator<RiFlags> for RiFlags

Source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

The bitwise or (|) of the bits in each flags value.

+
Source§

impl IntoIterator for RiFlags

Source§

type Item = RiFlags

The type of the elements being iterated over.
Source§

type IntoIter = Iter<RiFlags>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for RiFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Not for RiFlags

Source§

fn not(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

type Output = RiFlags

The resulting type after applying the ! operator.
Source§

impl Octal for RiFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PublicFlags for RiFlags

Source§

type Primitive = u16

The type of the underlying storage.
Source§

type Internal = InternalBitFlags

The type of the internal field on the generated flags type.
Source§

impl Sub for RiFlags

Source§

fn sub(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

type Output = RiFlags

The resulting type after applying the - operator.
Source§

impl SubAssign for RiFlags

Source§

fn sub_assign(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

impl UpperHex for RiFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/struct.RoFlags.html b/async_wasi/snapshots/common/vfs/struct.RoFlags.html new file mode 100644 index 000000000..d571cd1a2 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/struct.RoFlags.html @@ -0,0 +1,66 @@ +RoFlags in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Struct RoFlags

Source
pub struct RoFlags(/* private fields */);

Implementations§

Source§

impl RoFlags

Source

pub const RECV_DATA_TRUNCATED: Self = _

Source§

impl RoFlags

Source

pub const fn empty() -> Self

Get a flags value with all bits unset.

+
Source

pub const fn all() -> Self

Get a flags value with all known bits set.

+
Source

pub const fn bits(&self) -> Type

Get the underlying bits value.

+

The returned value is exactly the bits set in this flags value.

+
Source

pub const fn from_bits(bits: Type) -> Option<Self>

Convert from a bits value.

+

This method will return None if any unknown bits are set.

+
Source

pub const fn from_bits_truncate(bits: Type) -> Self

Convert from a bits value, unsetting any unknown bits.

+
Source

pub const fn from_bits_retain(bits: Type) -> Self

Convert from a bits value exactly.

+
Source

pub fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set.

+

This method will return None if name is empty or doesn’t +correspond to any named flag.

+
Source

pub const fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.

+
Source

pub const fn is_all(&self) -> bool

Whether all known bits in this flags value are set.

+
Source

pub const fn intersects(&self, other: Self) -> bool

Whether any set bits in a source flags value are also set in a target flags value.

+
Source

pub const fn contains(&self, other: Self) -> bool

Whether all set bits in a source flags value are also set in a target flags value.

+
Source

pub fn insert(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source

pub fn remove(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +remove won’t truncate other, but the ! operator will.

+
Source

pub fn toggle(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub fn set(&mut self, other: Self, value: bool)

Call insert when value is true or remove when value is false.

+
Source

pub const fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source

pub const fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source

pub const fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source

pub const fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub const fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

impl RoFlags

Source

pub const fn iter(&self) -> Iter<RoFlags>

Yield a set of contained flags values.

+

Each yielded flags value will correspond to a defined named flag. Any unknown bits +will be yielded together as a final flags value.

+
Source

pub const fn iter_names(&self) -> IterNames<RoFlags>

Yield a set of contained named flags values.

+

This method is like iter, except only yields bits in contained named flags. +Any unknown bits, or bits not corresponding to a contained flag will not be yielded.

+

Trait Implementations§

Source§

impl Binary for RoFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd for RoFlags

Source§

fn bitand(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source§

type Output = RoFlags

The resulting type after applying the & operator.
Source§

impl BitAndAssign for RoFlags

Source§

fn bitand_assign(&mut self, other: Self)

The bitwise and (&) of the bits in two flags values.

+
Source§

impl BitOr for RoFlags

Source§

fn bitor(self, other: RoFlags) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source§

type Output = RoFlags

The resulting type after applying the | operator.
Source§

impl BitOrAssign for RoFlags

Source§

fn bitor_assign(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source§

impl BitXor for RoFlags

Source§

fn bitxor(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

type Output = RoFlags

The resulting type after applying the ^ operator.
Source§

impl BitXorAssign for RoFlags

Source§

fn bitxor_assign(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

impl Extend<RoFlags> for RoFlags

Source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

The bitwise or (|) of the bits in each flags value.

+
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Flags for RoFlags

Source§

const FLAGS: &'static [Flag<RoFlags>] = _

The set of defined flags.
Source§

type Bits = u16

The underlying bits type.
Source§

fn bits(&self) -> Type

Get the underlying bits value. Read more
Source§

fn from_bits_retain(bits: Type) -> RoFlags

Convert from a bits value exactly.
§

fn empty() -> Self

Get a flags value with all bits unset.
§

fn all() -> Self

Get a flags value with all known bits set.
§

fn from_bits(bits: Self::Bits) -> Option<Self>

Convert from a bits value. Read more
§

fn from_bits_truncate(bits: Self::Bits) -> Self

Convert from a bits value, unsetting any unknown bits.
§

fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set. Read more
§

fn iter(&self) -> Iter<Self>

Yield a set of contained flags values. Read more
§

fn iter_names(&self) -> IterNames<Self>

Yield a set of contained named flags values. Read more
§

fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.
§

fn is_all(&self) -> bool

Whether all known bits in this flags value are set.
§

fn intersects(&self, other: Self) -> bool
where + Self: Sized,

Whether any set bits in a source flags value are also set in a target flags value.
§

fn contains(&self, other: Self) -> bool
where + Self: Sized,

Whether all set bits in a source flags value are also set in a target flags value.
§

fn insert(&mut self, other: Self)
where + Self: Sized,

The bitwise or (|) of the bits in two flags values.
§

fn remove(&mut self, other: Self)
where + Self: Sized,

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn toggle(&mut self, other: Self)
where + Self: Sized,

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn set(&mut self, other: Self, value: bool)
where + Self: Sized,

Call [Flags::insert] when value is true or [Flags::remove] when value is false.
§

fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.
§

fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.
§

fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§

impl FromIterator<RoFlags> for RoFlags

Source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

The bitwise or (|) of the bits in each flags value.

+
Source§

impl IntoIterator for RoFlags

Source§

type Item = RoFlags

The type of the elements being iterated over.
Source§

type IntoIter = Iter<RoFlags>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for RoFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Not for RoFlags

Source§

fn not(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

type Output = RoFlags

The resulting type after applying the ! operator.
Source§

impl Octal for RoFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PublicFlags for RoFlags

Source§

type Primitive = u16

The type of the underlying storage.
Source§

type Internal = InternalBitFlags

The type of the internal field on the generated flags type.
Source§

impl Sub for RoFlags

Source§

fn sub(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

type Output = RoFlags

The resulting type after applying the - operator.
Source§

impl SubAssign for RoFlags

Source§

fn sub_assign(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

impl UpperHex for RoFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/struct.SdFlags.html b/async_wasi/snapshots/common/vfs/struct.SdFlags.html new file mode 100644 index 000000000..ee8787f11 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/struct.SdFlags.html @@ -0,0 +1,67 @@ +SdFlags in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Struct SdFlags

Source
pub struct SdFlags(/* private fields */);

Implementations§

Source§

impl SdFlags

Source

pub const RD: Self = _

Source

pub const WR: Self = _

Source§

impl SdFlags

Source

pub const fn empty() -> Self

Get a flags value with all bits unset.

+
Source

pub const fn all() -> Self

Get a flags value with all known bits set.

+
Source

pub const fn bits(&self) -> Type

Get the underlying bits value.

+

The returned value is exactly the bits set in this flags value.

+
Source

pub const fn from_bits(bits: Type) -> Option<Self>

Convert from a bits value.

+

This method will return None if any unknown bits are set.

+
Source

pub const fn from_bits_truncate(bits: Type) -> Self

Convert from a bits value, unsetting any unknown bits.

+
Source

pub const fn from_bits_retain(bits: Type) -> Self

Convert from a bits value exactly.

+
Source

pub fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set.

+

This method will return None if name is empty or doesn’t +correspond to any named flag.

+
Source

pub const fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.

+
Source

pub const fn is_all(&self) -> bool

Whether all known bits in this flags value are set.

+
Source

pub const fn intersects(&self, other: Self) -> bool

Whether any set bits in a source flags value are also set in a target flags value.

+
Source

pub const fn contains(&self, other: Self) -> bool

Whether all set bits in a source flags value are also set in a target flags value.

+
Source

pub fn insert(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source

pub fn remove(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +remove won’t truncate other, but the ! operator will.

+
Source

pub fn toggle(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub fn set(&mut self, other: Self, value: bool)

Call insert when value is true or remove when value is false.

+
Source

pub const fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source

pub const fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source

pub const fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source

pub const fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub const fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

impl SdFlags

Source

pub const fn iter(&self) -> Iter<SdFlags>

Yield a set of contained flags values.

+

Each yielded flags value will correspond to a defined named flag. Any unknown bits +will be yielded together as a final flags value.

+
Source

pub const fn iter_names(&self) -> IterNames<SdFlags>

Yield a set of contained named flags values.

+

This method is like iter, except only yields bits in contained named flags. +Any unknown bits, or bits not corresponding to a contained flag will not be yielded.

+

Trait Implementations§

Source§

impl Binary for SdFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd for SdFlags

Source§

fn bitand(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source§

type Output = SdFlags

The resulting type after applying the & operator.
Source§

impl BitAndAssign for SdFlags

Source§

fn bitand_assign(&mut self, other: Self)

The bitwise and (&) of the bits in two flags values.

+
Source§

impl BitOr for SdFlags

Source§

fn bitor(self, other: SdFlags) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source§

type Output = SdFlags

The resulting type after applying the | operator.
Source§

impl BitOrAssign for SdFlags

Source§

fn bitor_assign(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source§

impl BitXor for SdFlags

Source§

fn bitxor(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

type Output = SdFlags

The resulting type after applying the ^ operator.
Source§

impl BitXorAssign for SdFlags

Source§

fn bitxor_assign(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

impl Extend<SdFlags> for SdFlags

Source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

The bitwise or (|) of the bits in each flags value.

+
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Flags for SdFlags

Source§

const FLAGS: &'static [Flag<SdFlags>] = _

The set of defined flags.
Source§

type Bits = u8

The underlying bits type.
Source§

fn bits(&self) -> Type

Get the underlying bits value. Read more
Source§

fn from_bits_retain(bits: Type) -> SdFlags

Convert from a bits value exactly.
§

fn empty() -> Self

Get a flags value with all bits unset.
§

fn all() -> Self

Get a flags value with all known bits set.
§

fn from_bits(bits: Self::Bits) -> Option<Self>

Convert from a bits value. Read more
§

fn from_bits_truncate(bits: Self::Bits) -> Self

Convert from a bits value, unsetting any unknown bits.
§

fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set. Read more
§

fn iter(&self) -> Iter<Self>

Yield a set of contained flags values. Read more
§

fn iter_names(&self) -> IterNames<Self>

Yield a set of contained named flags values. Read more
§

fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.
§

fn is_all(&self) -> bool

Whether all known bits in this flags value are set.
§

fn intersects(&self, other: Self) -> bool
where + Self: Sized,

Whether any set bits in a source flags value are also set in a target flags value.
§

fn contains(&self, other: Self) -> bool
where + Self: Sized,

Whether all set bits in a source flags value are also set in a target flags value.
§

fn insert(&mut self, other: Self)
where + Self: Sized,

The bitwise or (|) of the bits in two flags values.
§

fn remove(&mut self, other: Self)
where + Self: Sized,

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn toggle(&mut self, other: Self)
where + Self: Sized,

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn set(&mut self, other: Self, value: bool)
where + Self: Sized,

Call [Flags::insert] when value is true or [Flags::remove] when value is false.
§

fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.
§

fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.
§

fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§

impl From<SdFlags> for Shutdown

Source§

fn from(val: SdFlags) -> Self

Converts to this type from the input type.
Source§

impl FromIterator<SdFlags> for SdFlags

Source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

The bitwise or (|) of the bits in each flags value.

+
Source§

impl IntoIterator for SdFlags

Source§

type Item = SdFlags

The type of the elements being iterated over.
Source§

type IntoIter = Iter<SdFlags>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for SdFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Not for SdFlags

Source§

fn not(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

type Output = SdFlags

The resulting type after applying the ! operator.
Source§

impl Octal for SdFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for SdFlags

Source§

fn eq(&self, other: &SdFlags) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PublicFlags for SdFlags

Source§

type Primitive = u8

The type of the underlying storage.
Source§

type Internal = InternalBitFlags

The type of the internal field on the generated flags type.
Source§

impl Sub for SdFlags

Source§

fn sub(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

type Output = SdFlags

The resulting type after applying the - operator.
Source§

impl SubAssign for SdFlags

Source§

fn sub_assign(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

impl UpperHex for SdFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl StructuralPartialEq for SdFlags

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/struct.SiFlags.html b/async_wasi/snapshots/common/vfs/struct.SiFlags.html new file mode 100644 index 000000000..1c6e0a109 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/struct.SiFlags.html @@ -0,0 +1,66 @@ +SiFlags in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Struct SiFlags

Source
pub struct SiFlags(/* private fields */);

Implementations§

Source§

impl SiFlags

Source

pub const fn empty() -> Self

Get a flags value with all bits unset.

+
Source

pub const fn all() -> Self

Get a flags value with all known bits set.

+
Source

pub const fn bits(&self) -> __wasi_siflags_t

Get the underlying bits value.

+

The returned value is exactly the bits set in this flags value.

+
Source

pub const fn from_bits(bits: __wasi_siflags_t) -> Option<Self>

Convert from a bits value.

+

This method will return None if any unknown bits are set.

+
Source

pub const fn from_bits_truncate(bits: __wasi_siflags_t) -> Self

Convert from a bits value, unsetting any unknown bits.

+
Source

pub const fn from_bits_retain(bits: __wasi_siflags_t) -> Self

Convert from a bits value exactly.

+
Source

pub fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set.

+

This method will return None if name is empty or doesn’t +correspond to any named flag.

+
Source

pub const fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.

+
Source

pub const fn is_all(&self) -> bool

Whether all known bits in this flags value are set.

+
Source

pub const fn intersects(&self, other: Self) -> bool

Whether any set bits in a source flags value are also set in a target flags value.

+
Source

pub const fn contains(&self, other: Self) -> bool

Whether all set bits in a source flags value are also set in a target flags value.

+
Source

pub fn insert(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source

pub fn remove(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +remove won’t truncate other, but the ! operator will.

+
Source

pub fn toggle(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub fn set(&mut self, other: Self, value: bool)

Call insert when value is true or remove when value is false.

+
Source

pub const fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source

pub const fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source

pub const fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source

pub const fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub const fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

impl SiFlags

Source

pub const fn iter(&self) -> Iter<SiFlags>

Yield a set of contained flags values.

+

Each yielded flags value will correspond to a defined named flag. Any unknown bits +will be yielded together as a final flags value.

+
Source

pub const fn iter_names(&self) -> IterNames<SiFlags>

Yield a set of contained named flags values.

+

This method is like iter, except only yields bits in contained named flags. +Any unknown bits, or bits not corresponding to a contained flag will not be yielded.

+

Trait Implementations§

Source§

impl Binary for SiFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd for SiFlags

Source§

fn bitand(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source§

type Output = SiFlags

The resulting type after applying the & operator.
Source§

impl BitAndAssign for SiFlags

Source§

fn bitand_assign(&mut self, other: Self)

The bitwise and (&) of the bits in two flags values.

+
Source§

impl BitOr for SiFlags

Source§

fn bitor(self, other: SiFlags) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source§

type Output = SiFlags

The resulting type after applying the | operator.
Source§

impl BitOrAssign for SiFlags

Source§

fn bitor_assign(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source§

impl BitXor for SiFlags

Source§

fn bitxor(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

type Output = SiFlags

The resulting type after applying the ^ operator.
Source§

impl BitXorAssign for SiFlags

Source§

fn bitxor_assign(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

impl Extend<SiFlags> for SiFlags

Source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

The bitwise or (|) of the bits in each flags value.

+
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Flags for SiFlags

Source§

const FLAGS: &'static [Flag<SiFlags>] = _

The set of defined flags.
Source§

type Bits = u16

The underlying bits type.
Source§

fn bits(&self) -> __wasi_siflags_t

Get the underlying bits value. Read more
Source§

fn from_bits_retain(bits: __wasi_siflags_t) -> SiFlags

Convert from a bits value exactly.
§

fn empty() -> Self

Get a flags value with all bits unset.
§

fn all() -> Self

Get a flags value with all known bits set.
§

fn from_bits(bits: Self::Bits) -> Option<Self>

Convert from a bits value. Read more
§

fn from_bits_truncate(bits: Self::Bits) -> Self

Convert from a bits value, unsetting any unknown bits.
§

fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set. Read more
§

fn iter(&self) -> Iter<Self>

Yield a set of contained flags values. Read more
§

fn iter_names(&self) -> IterNames<Self>

Yield a set of contained named flags values. Read more
§

fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.
§

fn is_all(&self) -> bool

Whether all known bits in this flags value are set.
§

fn intersects(&self, other: Self) -> bool
where + Self: Sized,

Whether any set bits in a source flags value are also set in a target flags value.
§

fn contains(&self, other: Self) -> bool
where + Self: Sized,

Whether all set bits in a source flags value are also set in a target flags value.
§

fn insert(&mut self, other: Self)
where + Self: Sized,

The bitwise or (|) of the bits in two flags values.
§

fn remove(&mut self, other: Self)
where + Self: Sized,

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn toggle(&mut self, other: Self)
where + Self: Sized,

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn set(&mut self, other: Self, value: bool)
where + Self: Sized,

Call [Flags::insert] when value is true or [Flags::remove] when value is false.
§

fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.
§

fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.
§

fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§

impl FromIterator<SiFlags> for SiFlags

Source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

The bitwise or (|) of the bits in each flags value.

+
Source§

impl IntoIterator for SiFlags

Source§

type Item = SiFlags

The type of the elements being iterated over.
Source§

type IntoIter = Iter<SiFlags>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for SiFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Not for SiFlags

Source§

fn not(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

type Output = SiFlags

The resulting type after applying the ! operator.
Source§

impl Octal for SiFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PublicFlags for SiFlags

Source§

type Primitive = u16

The type of the underlying storage.
Source§

type Internal = InternalBitFlags

The type of the internal field on the generated flags type.
Source§

impl Sub for SiFlags

Source§

fn sub(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

type Output = SiFlags

The resulting type after applying the - operator.
Source§

impl SubAssign for SiFlags

Source§

fn sub_assign(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

impl UpperHex for SiFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/struct.WASIRights.html b/async_wasi/snapshots/common/vfs/struct.WASIRights.html new file mode 100644 index 000000000..fa5c7b95e --- /dev/null +++ b/async_wasi/snapshots/common/vfs/struct.WASIRights.html @@ -0,0 +1,68 @@ +WASIRights in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Struct WASIRights

Source
pub struct WASIRights(/* private fields */);

Implementations§

Source§

impl WASIRights

Source

pub const FD_DATASYNC: Self = _

Source

pub const FD_READ: Self = _

Source

pub const FD_SEEK: Self = _

Source

pub const FD_FDSTAT_SET_FLAGS: Self = _

Source

pub const FD_SYNC: Self = _

Source

pub const FD_TELL: Self = _

Source

pub const FD_WRITE: Self = _

Source

pub const FD_ADVISE: Self = _

Source

pub const FD_ALLOCATE: Self = _

Source

pub const PATH_CREATE_DIRECTORY: Self = _

Source

pub const PATH_CREATE_FILE: Self = _

Source

pub const PATH_OPEN: Self = _

Source

pub const FD_READDIR: Self = _

Source

pub const PATH_RENAME_SOURCE: Self = _

Source

pub const PATH_RENAME_TARGET: Self = _

Source

pub const PATH_FILESTAT_GET: Self = _

Source

pub const PATH_FILESTAT_SET_SIZE: Self = _

Source

pub const PATH_FILESTAT_SET_TIMES: Self = _

Source

pub const FD_FILESTAT_GET: Self = _

Source

pub const FD_FILESTAT_SET_SIZE: Self = _

Source

pub const FD_FILESTAT_SET_TIMES: Self = _

Source

pub const PATH_REMOVE_DIRECTORY: Self = _

Source

pub const POLL_FD_READWRITE: Self = _

Source

pub const SOCK_SHUTDOWN: Self = _

Source

pub const SOCK_OPEN: Self = _

Source

pub const SOCK_CLOSE: Self = _

Source

pub const SOCK_BIND: Self = _

Source

pub const SOCK_RECV: Self = _

Source

pub const SOCK_RECV_FROM: Self = _

Source

pub const SOCK_SEND: Self = _

Source

pub const SOCK_SEND_TO: Self = _

Source§

impl WASIRights

Source

pub const fn empty() -> Self

Get a flags value with all bits unset.

+
Source

pub const fn all() -> Self

Get a flags value with all known bits set.

+
Source

pub const fn bits(&self) -> Type

Get the underlying bits value.

+

The returned value is exactly the bits set in this flags value.

+
Source

pub const fn from_bits(bits: Type) -> Option<Self>

Convert from a bits value.

+

This method will return None if any unknown bits are set.

+
Source

pub const fn from_bits_truncate(bits: Type) -> Self

Convert from a bits value, unsetting any unknown bits.

+
Source

pub const fn from_bits_retain(bits: Type) -> Self

Convert from a bits value exactly.

+
Source

pub fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set.

+

This method will return None if name is empty or doesn’t +correspond to any named flag.

+
Source

pub const fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.

+
Source

pub const fn is_all(&self) -> bool

Whether all known bits in this flags value are set.

+
Source

pub const fn intersects(&self, other: Self) -> bool

Whether any set bits in a source flags value are also set in a target flags value.

+
Source

pub const fn contains(&self, other: Self) -> bool

Whether all set bits in a source flags value are also set in a target flags value.

+
Source

pub fn insert(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source

pub fn remove(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +remove won’t truncate other, but the ! operator will.

+
Source

pub fn toggle(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub fn set(&mut self, other: Self, value: bool)

Call insert when value is true or remove when value is false.

+
Source

pub const fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source

pub const fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source

pub const fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source

pub const fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source

pub const fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

impl WASIRights

Source

pub const fn iter(&self) -> Iter<WASIRights>

Yield a set of contained flags values.

+

Each yielded flags value will correspond to a defined named flag. Any unknown bits +will be yielded together as a final flags value.

+
Source

pub const fn iter_names(&self) -> IterNames<WASIRights>

Yield a set of contained named flags values.

+

This method is like iter, except only yields bits in contained named flags. +Any unknown bits, or bits not corresponding to a contained flag will not be yielded.

+
Source§

impl WASIRights

Source

pub fn fd_all() -> Self

Source

pub fn dir_all() -> Self

Source

pub fn can(&self, other: Self) -> Result<(), Errno>

Trait Implementations§

Source§

impl Binary for WASIRights

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd for WASIRights

Source§

fn bitand(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
Source§

type Output = WASIRights

The resulting type after applying the & operator.
Source§

impl BitAndAssign for WASIRights

Source§

fn bitand_assign(&mut self, other: Self)

The bitwise and (&) of the bits in two flags values.

+
Source§

impl BitOr for WASIRights

Source§

fn bitor(self, other: WASIRights) -> Self

The bitwise or (|) of the bits in two flags values.

+
Source§

type Output = WASIRights

The resulting type after applying the | operator.
Source§

impl BitOrAssign for WASIRights

Source§

fn bitor_assign(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

+
Source§

impl BitXor for WASIRights

Source§

fn bitxor(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

type Output = WASIRights

The resulting type after applying the ^ operator.
Source§

impl BitXorAssign for WASIRights

Source§

fn bitxor_assign(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
Source§

impl Clone for WASIRights

Source§

fn clone(&self) -> WASIRights

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WASIRights

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WASIRights

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Extend<WASIRights> for WASIRights

Source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

The bitwise or (|) of the bits in each flags value.

+
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Flags for WASIRights

Source§

const FLAGS: &'static [Flag<WASIRights>] = _

The set of defined flags.
Source§

type Bits = u64

The underlying bits type.
Source§

fn bits(&self) -> Type

Get the underlying bits value. Read more
Source§

fn from_bits_retain(bits: Type) -> WASIRights

Convert from a bits value exactly.
§

fn empty() -> Self

Get a flags value with all bits unset.
§

fn all() -> Self

Get a flags value with all known bits set.
§

fn from_bits(bits: Self::Bits) -> Option<Self>

Convert from a bits value. Read more
§

fn from_bits_truncate(bits: Self::Bits) -> Self

Convert from a bits value, unsetting any unknown bits.
§

fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set. Read more
§

fn iter(&self) -> Iter<Self>

Yield a set of contained flags values. Read more
§

fn iter_names(&self) -> IterNames<Self>

Yield a set of contained named flags values. Read more
§

fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.
§

fn is_all(&self) -> bool

Whether all known bits in this flags value are set.
§

fn intersects(&self, other: Self) -> bool
where + Self: Sized,

Whether any set bits in a source flags value are also set in a target flags value.
§

fn contains(&self, other: Self) -> bool
where + Self: Sized,

Whether all set bits in a source flags value are also set in a target flags value.
§

fn insert(&mut self, other: Self)
where + Self: Sized,

The bitwise or (|) of the bits in two flags values.
§

fn remove(&mut self, other: Self)
where + Self: Sized,

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn toggle(&mut self, other: Self)
where + Self: Sized,

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn set(&mut self, other: Self, value: bool)
where + Self: Sized,

Call [Flags::insert] when value is true or [Flags::remove] when value is false.
§

fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.
§

fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.
§

fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!). Read more
§

fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.
§

fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§

impl FromIterator<WASIRights> for WASIRights

Source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

The bitwise or (|) of the bits in each flags value.

+
Source§

impl IntoIterator for WASIRights

Source§

type Item = WASIRights

The type of the elements being iterated over.
Source§

type IntoIter = Iter<WASIRights>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for WASIRights

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Not for WASIRights

Source§

fn not(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
Source§

type Output = WASIRights

The resulting type after applying the ! operator.
Source§

impl Octal for WASIRights

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PublicFlags for WASIRights

Source§

type Primitive = u64

The type of the underlying storage.
Source§

type Internal = InternalBitFlags

The type of the internal field on the generated flags type.
Source§

impl Sub for WASIRights

Source§

fn sub(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

type Output = WASIRights

The resulting type after applying the - operator.
Source§

impl SubAssign for WASIRights

Source§

fn sub_assign(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+

This method is not equivalent to self & !other when other has unknown bits set. +difference won’t truncate other, but the ! operator will.

+
Source§

impl UpperHex for WASIRights

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/trait.WasiDir.html b/async_wasi/snapshots/common/vfs/trait.WasiDir.html new file mode 100644 index 000000000..7799983be --- /dev/null +++ b/async_wasi/snapshots/common/vfs/trait.WasiDir.html @@ -0,0 +1,18 @@ +WasiDir in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Trait WasiDir

Source
pub trait WasiDir: WasiNode {
+    // Required method
+    fn get_readdir(
+        &self,
+        start: u64,
+    ) -> Result<Vec<(String, u64, FileType)>, Errno>;
+
+    // Provided method
+    fn fd_readdir(
+        &self,
+        cursor: usize,
+        write_buf: &mut [u8],
+    ) -> Result<usize, Errno> { ... }
+}

Required Methods§

Source

fn get_readdir(&self, start: u64) -> Result<Vec<(String, u64, FileType)>, Errno>

Provided Methods§

Source

fn fd_readdir( + &self, + cursor: usize, + write_buf: &mut [u8], +) -> Result<usize, Errno>

Implementors§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/trait.WasiFile.html b/async_wasi/snapshots/common/vfs/trait.WasiFile.html new file mode 100644 index 000000000..cb01c47ca --- /dev/null +++ b/async_wasi/snapshots/common/vfs/trait.WasiFile.html @@ -0,0 +1,57 @@ +WasiFile in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Trait WasiFile

Source
pub trait WasiFile: WasiNode {
+    // Required methods
+    fn fd_read(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Errno>;
+    fn fd_pread(
+        &mut self,
+        bufs: &mut [IoSliceMut<'_>],
+        offset: __wasi_filesize_t,
+    ) -> Result<usize, Errno>;
+    fn fd_write(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Errno>;
+    fn fd_pwrite(
+        &mut self,
+        bufs: &[IoSlice<'_>],
+        offset: __wasi_filesize_t,
+    ) -> Result<usize, Errno>;
+    fn fd_seek(
+        &mut self,
+        offset: __wasi_filedelta_t,
+        whence: Type,
+    ) -> Result<__wasi_filesize_t, Errno>;
+    fn fd_tell(&mut self) -> Result<__wasi_filesize_t, Errno>;
+
+    // Provided methods
+    fn fd_advise(
+        &mut self,
+        offset: __wasi_filesize_t,
+        len: __wasi_filesize_t,
+        advice: Advice,
+    ) -> Result<(), Errno> { ... }
+    fn fd_allocate(
+        &mut self,
+        offset: __wasi_filesize_t,
+        len: __wasi_filesize_t,
+    ) -> Result<(), Errno> { ... }
+    fn fd_datasync(&mut self) -> Result<(), Errno> { ... }
+    fn fd_sync(&mut self) -> Result<(), Errno> { ... }
+}

Required Methods§

Source

fn fd_read(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Errno>

Source

fn fd_pread( + &mut self, + bufs: &mut [IoSliceMut<'_>], + offset: __wasi_filesize_t, +) -> Result<usize, Errno>

Source

fn fd_write(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Errno>

Source

fn fd_pwrite( + &mut self, + bufs: &[IoSlice<'_>], + offset: __wasi_filesize_t, +) -> Result<usize, Errno>

Source

fn fd_seek( + &mut self, + offset: __wasi_filedelta_t, + whence: Type, +) -> Result<__wasi_filesize_t, Errno>

Source

fn fd_tell(&mut self) -> Result<__wasi_filesize_t, Errno>

Provided Methods§

Source

fn fd_advise( + &mut self, + offset: __wasi_filesize_t, + len: __wasi_filesize_t, + advice: Advice, +) -> Result<(), Errno>

Source

fn fd_allocate( + &mut self, + offset: __wasi_filesize_t, + len: __wasi_filesize_t, +) -> Result<(), Errno>

Source

fn fd_datasync(&mut self) -> Result<(), Errno>

Source

fn fd_sync(&mut self) -> Result<(), Errno>

Implementors§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/trait.WasiFileSys.html b/async_wasi/snapshots/common/vfs/trait.WasiFileSys.html new file mode 100644 index 000000000..dce8e639f --- /dev/null +++ b/async_wasi/snapshots/common/vfs/trait.WasiFileSys.html @@ -0,0 +1,98 @@ +WasiFileSys in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Trait WasiFileSys

Source
pub trait WasiFileSys {
+    type Index: Sized;
+
+
Show 14 methods // Required methods + fn path_open( + &mut self, + dir_ino: Self::Index, + path: &str, + oflags: OFlags, + fs_rights_base: WASIRights, + fs_rights_inheriting: WASIRights, + fdflags: FdFlags, + ) -> Result<Self::Index, Errno>; + fn path_rename( + &mut self, + old_dir: Self::Index, + old_path: &str, + new_dir: Self::Index, + new_path: &str, + ) -> Result<(), Errno>; + fn path_create_directory( + &mut self, + dir_ino: Self::Index, + path: &str, + ) -> Result<(), Errno>; + fn path_remove_directory( + &mut self, + dir_ino: Self::Index, + path: &str, + ) -> Result<(), Errno>; + fn path_unlink_file( + &mut self, + dir_ino: Self::Index, + path: &str, + ) -> Result<(), Errno>; + fn path_link_file( + &mut self, + old_dir: Self::Index, + old_path: &str, + new_dir: Self::Index, + new_path: &str, + ) -> Result<(), Errno>; + fn path_filestat_get( + &self, + dir_ino: Self::Index, + path: &str, + follow_symlinks: bool, + ) -> Result<Filestat, Errno>; + fn get_mut_inode(&mut self, ino: usize) -> Result<&mut dyn WasiNode, Errno>; + fn get_inode(&self, ino: usize) -> Result<&dyn WasiNode, Errno>; + fn get_mut_file(&mut self, ino: usize) -> Result<&mut dyn WasiFile, Errno>; + fn get_file(&self, ino: usize) -> Result<&dyn WasiFile, Errno>; + fn get_mut_dir(&mut self, ino: usize) -> Result<&mut dyn WasiDir, Errno>; + fn get_dir(&self, ino: usize) -> Result<&dyn WasiDir, Errno>; + + // Provided method + fn fclose(&mut self, ino: Self::Index) -> Result<(), Errno> { ... } +
}

Required Associated Types§

Required Methods§

Source

fn path_open( + &mut self, + dir_ino: Self::Index, + path: &str, + oflags: OFlags, + fs_rights_base: WASIRights, + fs_rights_inheriting: WASIRights, + fdflags: FdFlags, +) -> Result<Self::Index, Errno>

Source

fn path_rename( + &mut self, + old_dir: Self::Index, + old_path: &str, + new_dir: Self::Index, + new_path: &str, +) -> Result<(), Errno>

Source

fn path_create_directory( + &mut self, + dir_ino: Self::Index, + path: &str, +) -> Result<(), Errno>

Source

fn path_remove_directory( + &mut self, + dir_ino: Self::Index, + path: &str, +) -> Result<(), Errno>

Source

fn path_filestat_get( + &self, + dir_ino: Self::Index, + path: &str, + follow_symlinks: bool, +) -> Result<Filestat, Errno>

Source

fn get_mut_inode(&mut self, ino: usize) -> Result<&mut dyn WasiNode, Errno>

Source

fn get_inode(&self, ino: usize) -> Result<&dyn WasiNode, Errno>

Source

fn get_mut_file(&mut self, ino: usize) -> Result<&mut dyn WasiFile, Errno>

Source

fn get_file(&self, ino: usize) -> Result<&dyn WasiFile, Errno>

Source

fn get_mut_dir(&mut self, ino: usize) -> Result<&mut dyn WasiDir, Errno>

Source

fn get_dir(&self, ino: usize) -> Result<&dyn WasiDir, Errno>

Provided Methods§

Source

fn fclose(&mut self, ino: Self::Index) -> Result<(), Errno>

Implementors§

Source§

impl WasiFileSys for DiskFileSys

Source§

impl<D: WasiVirtualDir, F: WasiVirtualFile> WasiFileSys for WasiVirtualSys<D, F>

Source§

impl<IN, OUT, ERR> WasiFileSys for StdioSys<IN, OUT, ERR>
where + IN: Read, + OUT: Write, + ERR: Write,

\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/trait.WasiNode.html b/async_wasi/snapshots/common/vfs/trait.WasiNode.html new file mode 100644 index 000000000..c85be5e80 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/trait.WasiNode.html @@ -0,0 +1,32 @@ +WasiNode in async_wasi::snapshots::common::vfs - Rust
async_wasi::snapshots::common::vfs

Trait WasiNode

Source
pub trait WasiNode {
+    // Required methods
+    fn fd_fdstat_get(&self) -> Result<FdStat, Errno>;
+    fn fd_filestat_get(&self) -> Result<Filestat, Errno>;
+    fn fd_filestat_set_size(
+        &mut self,
+        size: __wasi_filesize_t,
+    ) -> Result<(), Errno>;
+    fn fd_filestat_set_times(
+        &mut self,
+        atim: __wasi_timestamp_t,
+        mtim: __wasi_timestamp_t,
+        fst_flags: Type,
+    ) -> Result<(), Errno>;
+
+    // Provided methods
+    fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno> { ... }
+    fn fd_fdstat_set_rights(
+        &mut self,
+        fs_rights_base: WASIRights,
+        fs_rights_inheriting: WASIRights,
+    ) -> Result<(), Errno> { ... }
+}

Required Methods§

Provided Methods§

Source

fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno>

Source

fn fd_fdstat_set_rights( + &mut self, + fs_rights_base: WASIRights, + fs_rights_inheriting: WASIRights, +) -> Result<(), Errno>

Implementors§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/virtual_sys/enum.DiskInode.html b/async_wasi/snapshots/common/vfs/virtual_sys/enum.DiskInode.html new file mode 100644 index 000000000..51aa63371 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/virtual_sys/enum.DiskInode.html @@ -0,0 +1,23 @@ +DiskInode in async_wasi::snapshots::common::vfs::virtual_sys - Rust
async_wasi::snapshots::common::vfs::virtual_sys

Enum DiskInode

Source
pub enum DiskInode {
+    Dir(DiskDir),
+    File(DiskFile),
+}

Variants§

Trait Implementations§

Source§

impl WasiNode for DiskInode

Source§

fn fd_fdstat_get(&self) -> Result<FdStat, Errno>

Source§

fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno>

Source§

fn fd_fdstat_set_rights( + &mut self, + fs_rights_base: WASIRights, + fs_rights_inheriting: WASIRights, +) -> Result<(), Errno>

Source§

fn fd_filestat_get(&self) -> Result<Filestat, Errno>

Source§

fn fd_filestat_set_size(&mut self, size: __wasi_filesize_t) -> Result<(), Errno>

Source§

fn fd_filestat_set_times( + &mut self, + atim: __wasi_timestamp_t, + mtim: __wasi_timestamp_t, + fst_flags: Type, +) -> Result<(), Errno>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/virtual_sys/enum.Inode.html b/async_wasi/snapshots/common/vfs/virtual_sys/enum.Inode.html new file mode 100644 index 000000000..9f139b195 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/virtual_sys/enum.Inode.html @@ -0,0 +1,35 @@ +Inode in async_wasi::snapshots::common::vfs::virtual_sys - Rust
async_wasi::snapshots::common::vfs::virtual_sys

Enum Inode

Source
pub enum Inode<D: WasiVirtualDir, F: WasiVirtualFile> {
+    Dir(D),
+    File(F),
+}

Variants§

§

Dir(D)

§

File(F)

Trait Implementations§

Source§

impl<D: WasiVirtualDir, F: WasiVirtualFile> WasiNode for Inode<D, F>

Source§

fn fd_fdstat_get(&self) -> Result<FdStat, Errno>

Source§

fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno>

Source§

fn fd_fdstat_set_rights( + &mut self, + fs_rights_base: WASIRights, + fs_rights_inheriting: WASIRights, +) -> Result<(), Errno>

Source§

fn fd_filestat_get(&self) -> Result<Filestat, Errno>

Source§

fn fd_filestat_set_size(&mut self, size: __wasi_filesize_t) -> Result<(), Errno>

Source§

fn fd_filestat_set_times( + &mut self, + atim: __wasi_timestamp_t, + mtim: __wasi_timestamp_t, + fst_flags: Type, +) -> Result<(), Errno>

Auto Trait Implementations§

§

impl<D, F> Freeze for Inode<D, F>
where + D: Freeze, + F: Freeze,

§

impl<D, F> RefUnwindSafe for Inode<D, F>
where + D: RefUnwindSafe, + F: RefUnwindSafe,

§

impl<D, F> Send for Inode<D, F>
where + D: Send, + F: Send,

§

impl<D, F> Sync for Inode<D, F>
where + D: Sync, + F: Sync,

§

impl<D, F> Unpin for Inode<D, F>
where + D: Unpin, + F: Unpin,

§

impl<D, F> UnwindSafe for Inode<D, F>
where + D: UnwindSafe, + F: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/virtual_sys/index.html b/async_wasi/snapshots/common/vfs/virtual_sys/index.html new file mode 100644 index 000000000..0a3c0ceec --- /dev/null +++ b/async_wasi/snapshots/common/vfs/virtual_sys/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::common::vfs::virtual_sys - Rust
async_wasi::snapshots::common::vfs

Module virtual_sys

Source

Structs§

Enums§

Traits§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/virtual_sys/sidebar-items.js b/async_wasi/snapshots/common/vfs/virtual_sys/sidebar-items.js new file mode 100644 index 000000000..f2aebb1d0 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/virtual_sys/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["DiskInode","Inode"],"struct":["DiskDir","DiskFile","DiskFileSys","InPipline","OutPipeline","StdioSys","WasiVirtualSys"],"trait":["WasiVirtualDir","WasiVirtualFile"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/virtual_sys/struct.DiskDir.html b/async_wasi/snapshots/common/vfs/virtual_sys/struct.DiskDir.html new file mode 100644 index 000000000..f76199173 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/virtual_sys/struct.DiskDir.html @@ -0,0 +1,31 @@ +DiskDir in async_wasi::snapshots::common::vfs::virtual_sys - Rust
async_wasi::snapshots::common::vfs::virtual_sys

Struct DiskDir

Source
pub struct DiskDir {
+    pub real_path: PathBuf,
+    pub dir_rights: WASIRights,
+    pub file_rights: WASIRights,
+}

Fields§

§real_path: PathBuf§dir_rights: WASIRights§file_rights: WASIRights

Implementations§

Source§

impl DiskDir

Source

pub fn get_absolutize_path<P: AsRef<Path>>( + &self, + sub_path: &P, +) -> Result<PathBuf, Errno>

Trait Implementations§

Source§

impl Debug for DiskDir

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl WasiDir for DiskDir

Source§

fn get_readdir(&self, index: u64) -> Result<Vec<(String, u64, FileType)>, Errno>

Source§

fn fd_readdir( + &self, + cursor: usize, + write_buf: &mut [u8], +) -> Result<usize, Errno>

Source§

impl WasiNode for DiskDir

Source§

fn fd_fdstat_get(&self) -> Result<FdStat, Errno>

Source§

fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno>

Source§

fn fd_fdstat_set_rights( + &mut self, + fs_rights_base: WASIRights, + fs_rights_inheriting: WASIRights, +) -> Result<(), Errno>

Source§

fn fd_filestat_get(&self) -> Result<Filestat, Errno>

Source§

fn fd_filestat_set_size(&mut self, size: __wasi_filesize_t) -> Result<(), Errno>

Source§

fn fd_filestat_set_times( + &mut self, + atim: __wasi_timestamp_t, + mtim: __wasi_timestamp_t, + fst_flags: Type, +) -> Result<(), Errno>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/virtual_sys/struct.DiskFile.html b/async_wasi/snapshots/common/vfs/virtual_sys/struct.DiskFile.html new file mode 100644 index 000000000..b18ee72be --- /dev/null +++ b/async_wasi/snapshots/common/vfs/virtual_sys/struct.DiskFile.html @@ -0,0 +1,45 @@ +DiskFile in async_wasi::snapshots::common::vfs::virtual_sys - Rust
async_wasi::snapshots::common::vfs::virtual_sys

Struct DiskFile

Source
pub struct DiskFile {
+    pub fd: File,
+    pub flags: FdFlags,
+    pub right: WASIRights,
+}

Fields§

§fd: File§flags: FdFlags§right: WASIRights

Trait Implementations§

Source§

impl Debug for DiskFile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl WasiFile for DiskFile

Source§

fn fd_advise( + &mut self, + offset: __wasi_filesize_t, + len: __wasi_filesize_t, + advice: Advice, +) -> Result<(), Errno>

Source§

fn fd_allocate( + &mut self, + offset: __wasi_filesize_t, + len: __wasi_filesize_t, +) -> Result<(), Errno>

Source§

fn fd_datasync(&mut self) -> Result<(), Errno>

Source§

fn fd_sync(&mut self) -> Result<(), Errno>

Source§

fn fd_read(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Errno>

Source§

fn fd_pread( + &mut self, + bufs: &mut [IoSliceMut<'_>], + offset: __wasi_filesize_t, +) -> Result<usize, Errno>

Source§

fn fd_write(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Errno>

Source§

fn fd_pwrite( + &mut self, + bufs: &[IoSlice<'_>], + offset: __wasi_filesize_t, +) -> Result<usize, Errno>

Source§

fn fd_seek( + &mut self, + offset: __wasi_filedelta_t, + whence: Type, +) -> Result<__wasi_filesize_t, Errno>

Source§

fn fd_tell(&mut self) -> Result<__wasi_filesize_t, Errno>

Source§

impl WasiNode for DiskFile

Source§

fn fd_fdstat_get(&self) -> Result<FdStat, Errno>

Source§

fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno>

Source§

fn fd_fdstat_set_rights( + &mut self, + fs_rights_base: WASIRights, + _fs_rights_inheriting: WASIRights, +) -> Result<(), Errno>

Source§

fn fd_filestat_get(&self) -> Result<Filestat, Errno>

Source§

fn fd_filestat_set_size(&mut self, size: __wasi_filesize_t) -> Result<(), Errno>

Source§

fn fd_filestat_set_times( + &mut self, + atim: __wasi_timestamp_t, + mtim: __wasi_timestamp_t, + fst_flags: Type, +) -> Result<(), Errno>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/virtual_sys/struct.DiskFileSys.html b/async_wasi/snapshots/common/vfs/virtual_sys/struct.DiskFileSys.html new file mode 100644 index 000000000..b6320510c --- /dev/null +++ b/async_wasi/snapshots/common/vfs/virtual_sys/struct.DiskFileSys.html @@ -0,0 +1,51 @@ +DiskFileSys in async_wasi::snapshots::common::vfs::virtual_sys - Rust
async_wasi::snapshots::common::vfs::virtual_sys

Struct DiskFileSys

Source
pub struct DiskFileSys { /* private fields */ }

Implementations§

Source§

impl DiskFileSys

Source

pub fn new(host_path: PathBuf) -> Result<Self>

Source

pub fn get_absolutize_path<P: AsRef<Path>>( + &self, + sub_path: &P, +) -> Result<PathBuf, Errno>

Trait Implementations§

Source§

impl WasiFileSys for DiskFileSys

Source§

type Index = usize

Source§

fn path_open( + &mut self, + dir_ino: Self::Index, + path: &str, + oflags: OFlags, + fs_rights_base: WASIRights, + fs_rights_inheriting: WASIRights, + fdflags: FdFlags, +) -> Result<Self::Index, Errno>

Source§

fn path_rename( + &mut self, + old_dir: usize, + old_path: &str, + new_dir: usize, + new_path: &str, +) -> Result<(), Errno>

Source§

fn path_create_directory( + &mut self, + dir_ino: Self::Index, + path: &str, +) -> Result<(), Errno>

Source§

fn path_remove_directory( + &mut self, + dir_ino: Self::Index, + path: &str, +) -> Result<(), Errno>

Source§

fn path_filestat_get( + &self, + dir_ino: Self::Index, + path: &str, + follow_symlinks: bool, +) -> Result<Filestat, Errno>

Source§

fn fclose(&mut self, ino: Self::Index) -> Result<(), Errno>

Source§

fn get_mut_inode(&mut self, ino: usize) -> Result<&mut dyn WasiNode, Errno>

Source§

fn get_inode(&self, ino: usize) -> Result<&dyn WasiNode, Errno>

Source§

fn get_mut_file(&mut self, ino: usize) -> Result<&mut dyn WasiFile, Errno>

Source§

fn get_file(&self, ino: usize) -> Result<&dyn WasiFile, Errno>

Source§

fn get_mut_dir(&mut self, ino: usize) -> Result<&mut dyn WasiDir, Errno>

Source§

fn get_dir(&self, ino: usize) -> Result<&dyn WasiDir, Errno>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/virtual_sys/struct.InPipline.html b/async_wasi/snapshots/common/vfs/virtual_sys/struct.InPipline.html new file mode 100644 index 000000000..2fc6699f1 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/virtual_sys/struct.InPipline.html @@ -0,0 +1,47 @@ +InPipline in async_wasi::snapshots::common::vfs::virtual_sys - Rust
async_wasi::snapshots::common::vfs::virtual_sys

Struct InPipline

Source
pub struct InPipline<R: Read>(/* private fields */);

Trait Implementations§

Source§

impl<R: Read> From<R> for InPipline<R>

Source§

fn from(value: R) -> Self

Converts to this type from the input type.
Source§

impl<R: Read> WasiFile for InPipline<R>

Source§

fn fd_advise( + &mut self, + offset: __wasi_filesize_t, + len: __wasi_filesize_t, + advice: Advice, +) -> Result<(), Errno>

Source§

fn fd_allocate( + &mut self, + offset: __wasi_filesize_t, + len: __wasi_filesize_t, +) -> Result<(), Errno>

Source§

fn fd_datasync(&mut self) -> Result<(), Errno>

Source§

fn fd_sync(&mut self) -> Result<(), Errno>

Source§

fn fd_read(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Errno>

Source§

fn fd_pread( + &mut self, + bufs: &mut [IoSliceMut<'_>], + offset: __wasi_filesize_t, +) -> Result<usize, Errno>

Source§

fn fd_write(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Errno>

Source§

fn fd_pwrite( + &mut self, + bufs: &[IoSlice<'_>], + offset: __wasi_filesize_t, +) -> Result<usize, Errno>

Source§

fn fd_seek( + &mut self, + offset: __wasi_filedelta_t, + whence: Type, +) -> Result<__wasi_filesize_t, Errno>

Source§

fn fd_tell(&mut self) -> Result<__wasi_filesize_t, Errno>

Source§

impl<R: Read> WasiNode for InPipline<R>

Source§

fn fd_fdstat_get(&self) -> Result<FdStat, Errno>

Source§

fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno>

Source§

fn fd_fdstat_set_rights( + &mut self, + fs_rights_base: WASIRights, + _fs_rights_inheriting: WASIRights, +) -> Result<(), Errno>

Source§

fn fd_filestat_get(&self) -> Result<Filestat, Errno>

Source§

fn fd_filestat_set_size(&mut self, size: __wasi_filesize_t) -> Result<(), Errno>

Source§

fn fd_filestat_set_times( + &mut self, + atim: __wasi_timestamp_t, + mtim: __wasi_timestamp_t, + fst_flags: Type, +) -> Result<(), Errno>

Auto Trait Implementations§

§

impl<R> Freeze for InPipline<R>
where + R: Freeze,

§

impl<R> RefUnwindSafe for InPipline<R>
where + R: RefUnwindSafe,

§

impl<R> Send for InPipline<R>
where + R: Send,

§

impl<R> Sync for InPipline<R>
where + R: Sync,

§

impl<R> Unpin for InPipline<R>
where + R: Unpin,

§

impl<R> UnwindSafe for InPipline<R>
where + R: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/virtual_sys/struct.OutPipeline.html b/async_wasi/snapshots/common/vfs/virtual_sys/struct.OutPipeline.html new file mode 100644 index 000000000..5b07596bc --- /dev/null +++ b/async_wasi/snapshots/common/vfs/virtual_sys/struct.OutPipeline.html @@ -0,0 +1,47 @@ +OutPipeline in async_wasi::snapshots::common::vfs::virtual_sys - Rust
async_wasi::snapshots::common::vfs::virtual_sys

Struct OutPipeline

Source
pub struct OutPipeline<W: Write>(/* private fields */);

Trait Implementations§

Source§

impl<W: Write> From<W> for OutPipeline<W>

Source§

fn from(value: W) -> Self

Converts to this type from the input type.
Source§

impl<W: Write> WasiFile for OutPipeline<W>

Source§

fn fd_advise( + &mut self, + offset: __wasi_filesize_t, + len: __wasi_filesize_t, + advice: Advice, +) -> Result<(), Errno>

Source§

fn fd_allocate( + &mut self, + offset: __wasi_filesize_t, + len: __wasi_filesize_t, +) -> Result<(), Errno>

Source§

fn fd_datasync(&mut self) -> Result<(), Errno>

Source§

fn fd_sync(&mut self) -> Result<(), Errno>

Source§

fn fd_read(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Errno>

Source§

fn fd_pread( + &mut self, + bufs: &mut [IoSliceMut<'_>], + offset: __wasi_filesize_t, +) -> Result<usize, Errno>

Source§

fn fd_write(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Errno>

Source§

fn fd_pwrite( + &mut self, + bufs: &[IoSlice<'_>], + offset: __wasi_filesize_t, +) -> Result<usize, Errno>

Source§

fn fd_seek( + &mut self, + offset: __wasi_filedelta_t, + whence: Type, +) -> Result<__wasi_filesize_t, Errno>

Source§

fn fd_tell(&mut self) -> Result<__wasi_filesize_t, Errno>

Source§

impl<W: Write> WasiNode for OutPipeline<W>

Source§

fn fd_fdstat_get(&self) -> Result<FdStat, Errno>

Source§

fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno>

Source§

fn fd_fdstat_set_rights( + &mut self, + fs_rights_base: WASIRights, + _fs_rights_inheriting: WASIRights, +) -> Result<(), Errno>

Source§

fn fd_filestat_get(&self) -> Result<Filestat, Errno>

Source§

fn fd_filestat_set_size(&mut self, size: __wasi_filesize_t) -> Result<(), Errno>

Source§

fn fd_filestat_set_times( + &mut self, + atim: __wasi_timestamp_t, + mtim: __wasi_timestamp_t, + fst_flags: Type, +) -> Result<(), Errno>

Auto Trait Implementations§

§

impl<W> Freeze for OutPipeline<W>
where + W: Freeze,

§

impl<W> RefUnwindSafe for OutPipeline<W>
where + W: RefUnwindSafe,

§

impl<W> Send for OutPipeline<W>
where + W: Send,

§

impl<W> Sync for OutPipeline<W>
where + W: Sync,

§

impl<W> Unpin for OutPipeline<W>
where + W: Unpin,

§

impl<W> UnwindSafe for OutPipeline<W>
where + W: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/virtual_sys/struct.StdioSys.html b/async_wasi/snapshots/common/vfs/virtual_sys/struct.StdioSys.html new file mode 100644 index 000000000..3f7eeea52 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/virtual_sys/struct.StdioSys.html @@ -0,0 +1,75 @@ +StdioSys in async_wasi::snapshots::common::vfs::virtual_sys - Rust
async_wasi::snapshots::common::vfs::virtual_sys

Struct StdioSys

Source
pub struct StdioSys<IN, OUT, ERR>
where + IN: Read, + OUT: Write, + ERR: Write,
{ /* private fields */ }

Implementations§

Source§

impl<IN, OUT, ERR> StdioSys<IN, OUT, ERR>
where + IN: Read, + OUT: Write, + ERR: Write,

Source

pub fn new(stdin: IN, stdout: OUT, stderr: ERR) -> Self

Trait Implementations§

Source§

impl<IN, OUT, ERR> WasiFileSys for StdioSys<IN, OUT, ERR>
where + IN: Read, + OUT: Write, + ERR: Write,

Source§

type Index = usize

Source§

fn path_open( + &mut self, + dir_ino: usize, + path: &str, + oflags: OFlags, + fs_rights_base: WASIRights, + fs_rights_inheriting: WASIRights, + fdflags: FdFlags, +) -> Result<Self::Index, Errno>

Source§

fn path_rename( + &mut self, + old_dir: usize, + old_path: &str, + new_dir: usize, + new_path: &str, +) -> Result<(), Errno>

Source§

fn path_create_directory( + &mut self, + dir_ino: usize, + path: &str, +) -> Result<(), Errno>

Source§

fn path_remove_directory( + &mut self, + dir_ino: usize, + path: &str, +) -> Result<(), Errno>

Source§

fn path_filestat_get( + &self, + dir_ino: usize, + path: &str, + follow_symlinks: bool, +) -> Result<Filestat, Errno>

Source§

fn get_mut_inode(&mut self, ino: usize) -> Result<&mut dyn WasiNode, Errno>

Source§

fn get_inode(&self, ino: usize) -> Result<&dyn WasiNode, Errno>

Source§

fn get_mut_file(&mut self, ino: usize) -> Result<&mut dyn WasiFile, Errno>

Source§

fn get_file(&self, ino: usize) -> Result<&dyn WasiFile, Errno>

Source§

fn get_mut_dir(&mut self, ino: usize) -> Result<&mut dyn WasiDir, Errno>

Source§

fn get_dir(&self, ino: usize) -> Result<&dyn WasiDir, Errno>

Source§

fn fclose(&mut self, ino: Self::Index) -> Result<(), Errno>

Auto Trait Implementations§

§

impl<IN, OUT, ERR> Freeze for StdioSys<IN, OUT, ERR>
where + IN: Freeze, + OUT: Freeze, + ERR: Freeze,

§

impl<IN, OUT, ERR> RefUnwindSafe for StdioSys<IN, OUT, ERR>
where + IN: RefUnwindSafe, + OUT: RefUnwindSafe, + ERR: RefUnwindSafe,

§

impl<IN, OUT, ERR> Send for StdioSys<IN, OUT, ERR>
where + IN: Send, + OUT: Send, + ERR: Send,

§

impl<IN, OUT, ERR> Sync for StdioSys<IN, OUT, ERR>
where + IN: Sync, + OUT: Sync, + ERR: Sync,

§

impl<IN, OUT, ERR> Unpin for StdioSys<IN, OUT, ERR>
where + IN: Unpin, + OUT: Unpin, + ERR: Unpin,

§

impl<IN, OUT, ERR> UnwindSafe for StdioSys<IN, OUT, ERR>
where + IN: UnwindSafe, + OUT: UnwindSafe, + ERR: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/virtual_sys/struct.WasiVirtualSys.html b/async_wasi/snapshots/common/vfs/virtual_sys/struct.WasiVirtualSys.html new file mode 100644 index 000000000..dc8df0e59 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/virtual_sys/struct.WasiVirtualSys.html @@ -0,0 +1,75 @@ +WasiVirtualSys in async_wasi::snapshots::common::vfs::virtual_sys - Rust
async_wasi::snapshots::common::vfs::virtual_sys

Struct WasiVirtualSys

Source
pub struct WasiVirtualSys<D: WasiVirtualDir, F: WasiVirtualFile> { /* private fields */ }

Implementations§

Source§

impl<D: WasiVirtualDir, F: WasiVirtualFile> WasiVirtualSys<D, F>

Source

pub fn new() -> Self

Source

pub fn create_file<P: AsRef<Path>>( + &mut self, + dir_ino: usize, + path: &P, + new_file: F, +) -> Result<usize, Errno>

Source

pub fn find_inode_index<P: AsRef<Path>>( + &self, + dir_ino: usize, + path: &P, +) -> Result<usize, Errno>

Source

pub fn create_file_inode<P: AsRef<Path>>( + &mut self, + dir_ino: usize, + path: &P, +) -> Result<usize, Errno>

Source

pub fn create_dir_inode<P: AsRef<Path>>( + &mut self, + dir_ino: usize, + path: &P, +) -> Result<usize, Errno>

Trait Implementations§

Source§

impl<D: WasiVirtualDir, F: WasiVirtualFile> Default for WasiVirtualSys<D, F>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<D: WasiVirtualDir, F: WasiVirtualFile> WasiFileSys for WasiVirtualSys<D, F>

Source§

type Index = usize

Source§

fn path_open( + &mut self, + dir_ino: Self::Index, + path: &str, + oflags: OFlags, + fs_rights_base: WASIRights, + fs_rights_inheriting: WASIRights, + fdflags: FdFlags, +) -> Result<usize, Errno>

Source§

fn path_rename( + &mut self, + old_dir: usize, + old_path: &str, + new_dir: usize, + new_path: &str, +) -> Result<(), Errno>

Source§

fn path_create_directory( + &mut self, + dir_ino: Self::Index, + path: &str, +) -> Result<(), Errno>

Source§

fn fclose(&mut self, ino: Self::Index) -> Result<(), Errno>

Source§

fn path_remove_directory( + &mut self, + dir_ino: Self::Index, + path: &str, +) -> Result<(), Errno>

Source§

fn path_filestat_get( + &self, + dir_ino: Self::Index, + path: &str, + follow_symlinks: bool, +) -> Result<Filestat, Errno>

Source§

fn get_mut_inode(&mut self, ino: usize) -> Result<&mut dyn WasiNode, Errno>

Source§

fn get_inode(&self, ino: usize) -> Result<&dyn WasiNode, Errno>

Source§

fn get_mut_file(&mut self, ino: usize) -> Result<&mut dyn WasiFile, Errno>

Source§

fn get_file(&self, ino: usize) -> Result<&dyn WasiFile, Errno>

Source§

fn get_mut_dir(&mut self, ino: usize) -> Result<&mut dyn WasiDir, Errno>

Source§

fn get_dir(&self, ino: usize) -> Result<&dyn WasiDir, Errno>

Auto Trait Implementations§

§

impl<D, F> Freeze for WasiVirtualSys<D, F>

§

impl<D, F> RefUnwindSafe for WasiVirtualSys<D, F>
where + D: RefUnwindSafe, + F: RefUnwindSafe,

§

impl<D, F> Send for WasiVirtualSys<D, F>
where + D: Send, + F: Send,

§

impl<D, F> Sync for WasiVirtualSys<D, F>
where + D: Sync, + F: Sync,

§

impl<D, F> Unpin for WasiVirtualSys<D, F>
where + D: Unpin, + F: Unpin,

§

impl<D, F> UnwindSafe for WasiVirtualSys<D, F>
where + D: UnwindSafe, + F: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/virtual_sys/trait.WasiVirtualDir.html b/async_wasi/snapshots/common/vfs/virtual_sys/trait.WasiVirtualDir.html new file mode 100644 index 000000000..158e7d733 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/virtual_sys/trait.WasiVirtualDir.html @@ -0,0 +1,30 @@ +WasiVirtualDir in async_wasi::snapshots::common::vfs::virtual_sys - Rust
async_wasi::snapshots::common::vfs::virtual_sys

Trait WasiVirtualDir

Source
pub trait WasiVirtualDir: WasiDir {
+    // Required methods
+    fn create(ino: usize) -> Self;
+    fn add_sub_dir<P: AsRef<Path>>(
+        &mut self,
+        path: &P,
+        ino: usize,
+    ) -> Result<(), Errno>;
+    fn remove_sub_dir<P: AsRef<Path>>(&mut self, path: &P) -> Result<(), Errno>;
+    fn link_inode<P: AsRef<Path>>(
+        &mut self,
+        path: &P,
+        ino: usize,
+    ) -> Result<(), Errno>;
+    fn unlink_inode<P: AsRef<Path>>(&mut self, path: &P) -> Result<(), Errno>;
+    fn find_inode<P: AsRef<Path>>(&self, path: &P) -> Option<usize>;
+    fn is_empty(&self) -> bool;
+    fn is_open(&self) -> bool;
+    fn open(&mut self);
+    fn close(&mut self) -> usize;
+    fn mark_remove(&mut self);
+}

Required Methods§

Source

fn create(ino: usize) -> Self

Source

fn add_sub_dir<P: AsRef<Path>>( + &mut self, + path: &P, + ino: usize, +) -> Result<(), Errno>

Source

fn remove_sub_dir<P: AsRef<Path>>(&mut self, path: &P) -> Result<(), Errno>

Source

fn find_inode<P: AsRef<Path>>(&self, path: &P) -> Option<usize>

Source

fn is_empty(&self) -> bool

Source

fn is_open(&self) -> bool

Source

fn open(&mut self)

Source

fn close(&mut self) -> usize

Source

fn mark_remove(&mut self)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/async_wasi/snapshots/common/vfs/virtual_sys/trait.WasiVirtualFile.html b/async_wasi/snapshots/common/vfs/virtual_sys/trait.WasiVirtualFile.html new file mode 100644 index 000000000..10bf028b1 --- /dev/null +++ b/async_wasi/snapshots/common/vfs/virtual_sys/trait.WasiVirtualFile.html @@ -0,0 +1,10 @@ +WasiVirtualFile in async_wasi::snapshots::common::vfs::virtual_sys - Rust
async_wasi::snapshots::common::vfs::virtual_sys

Trait WasiVirtualFile

Source
pub trait WasiVirtualFile: WasiFile {
+    // Required methods
+    fn create(ino: usize) -> Self;
+    fn set_ino(&mut self, ino: usize);
+    fn inc_link(&mut self) -> Result<usize, Errno>;
+    fn dec_link(&mut self) -> Result<usize, Errno>;
+    fn is_open(&self) -> bool;
+    fn open(&mut self);
+    fn close(&mut self) -> usize;
+}

Required Methods§

Source

fn create(ino: usize) -> Self

Source

fn set_ino(&mut self, ino: usize)

Source

fn is_open(&self) -> bool

Source

fn open(&mut self)

Source

fn close(&mut self) -> usize

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/async_wasi/snapshots/env/enum.VFD.html b/async_wasi/snapshots/env/enum.VFD.html new file mode 100644 index 000000000..29f26c3bb --- /dev/null +++ b/async_wasi/snapshots/env/enum.VFD.html @@ -0,0 +1,17 @@ +VFD in async_wasi::snapshots::env - Rust
async_wasi::snapshots::env

Enum VFD

Source
pub enum VFD {
+    Inode {
+        dev: usize,
+        ino: usize,
+    },
+    AsyncSocket(AsyncWasiSocket),
+}

Variants§

§

Inode

Fields

§dev: usize
§ino: usize
§

AsyncSocket(AsyncWasiSocket)

Implementations§

Source§

impl VFD

Source

pub fn is_socket(&self) -> bool

Source

pub fn is_inode(&self) -> bool

Trait Implementations§

Source§

impl Debug for VFD

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for VFD

§

impl !RefUnwindSafe for VFD

§

impl Send for VFD

§

impl Sync for VFD

§

impl Unpin for VFD

§

impl !UnwindSafe for VFD

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/env/index.html b/async_wasi/snapshots/env/index.html new file mode 100644 index 000000000..a0903d61f --- /dev/null +++ b/async_wasi/snapshots/env/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::env - Rust
async_wasi::snapshots

Module env

Source

Re-exports§

  • pub use super::common::error::Errno;
  • pub use super::common::types as wasi_types;
  • pub use super::common::vfs;
  • pub use super::common::net::async_tokio::AsyncWasiSocket;

Structs§

Enums§

Traits§

\ No newline at end of file diff --git a/async_wasi/snapshots/env/sidebar-items.js b/async_wasi/snapshots/env/sidebar-items.js new file mode 100644 index 000000000..33fa9a7a0 --- /dev/null +++ b/async_wasi/snapshots/env/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["VFD"],"struct":["VFS"],"trait":["AsyncVM"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/env/struct.VFS.html b/async_wasi/snapshots/env/struct.VFS.html new file mode 100644 index 000000000..f192b24fe --- /dev/null +++ b/async_wasi/snapshots/env/struct.VFS.html @@ -0,0 +1,58 @@ +VFS in async_wasi::snapshots::env - Rust
async_wasi::snapshots::env

Struct VFS

Source
pub struct VFS { /* private fields */ }

Implementations§

Source§

impl VFS

Source

pub fn new_with_stdio<IN, OUT, ERR>(stdio_sys: StdioSys<IN, OUT, ERR>) -> Self
where + IN: Read + Send + Sync + 'static, + OUT: Write + Send + Sync + 'static, + ERR: Write + Send + Sync + 'static,

Source

pub fn new() -> Self

Source

pub fn mount_file_sys( + &mut self, + path: &str, + file_sys: Box<dyn WasiFileSys<Index = usize> + Send + Sync>, +)

Source§

impl VFS

Source

pub fn path_open( + &mut self, + dirfd: usize, + path: &str, + oflags: OFlags, + fs_rights_base: WASIRights, + fs_rights_inheriting: WASIRights, + fdflags: FdFlags, +) -> Result<usize, Errno>

Source

pub fn path_rename( + &mut self, + old_dir_fd: usize, + old_path: &str, + new_dir_fd: usize, + new_path: &str, +) -> Result<(), Errno>

Source

pub fn fd_preopen_get(&mut self, fd: usize) -> Result<String, Errno>

Source

pub fn fd_renumber(&mut self, _from: usize, _to: usize) -> Result<(), Errno>

Source

pub fn fd_advise( + &mut self, + _fd: usize, + _offset: __wasi_filesize_t, + _len: __wasi_filesize_t, + _advice: Type, +) -> Result<(), Errno>

Source

pub fn fd_close(&mut self, fd: usize) -> Result<(), Errno>

Source

pub fn path_filestat_get( + &self, + dir_fd: usize, + path: &str, + follow_symlinks: bool, +) -> Result<(u64, Filestat), Errno>

Source

pub fn path_create_directory( + &mut self, + dir_fd: usize, + path: &str, +) -> Result<(), Errno>

Source

pub fn path_remove_directory( + &mut self, + dir_fd: usize, + path: &str, +) -> Result<(), Errno>

Source

pub fn get_mut_inode(&mut self, fd: usize) -> Result<&mut dyn WasiNode, Errno>

Source

pub fn get_inode(&self, fd: usize) -> Result<&dyn WasiNode, Errno>

Source

pub fn get_mut_file(&mut self, fd: usize) -> Result<&mut dyn WasiFile, Errno>

Source

pub fn get_file(&self, fd: usize) -> Result<&dyn WasiFile, Errno>

Source

pub fn get_mut_dir(&mut self, fd: usize) -> Result<&mut dyn WasiDir, Errno>

Source

pub fn get_dir(&self, fd: usize) -> Result<&dyn WasiDir, Errno>

Source

pub fn get_mut_socket( + &mut self, + fd: usize, +) -> Result<&mut AsyncWasiSocket, Errno>

Source

pub fn get_socket(&self, fd: usize) -> Result<&AsyncWasiSocket, Errno>

Source

pub fn insert_socket(&mut self, s: AsyncWasiSocket) -> Result<usize, Errno>

Trait Implementations§

Source§

impl Debug for VFS

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for VFS

§

impl !RefUnwindSafe for VFS

§

impl Send for VFS

§

impl Sync for VFS

§

impl Unpin for VFS

§

impl !UnwindSafe for VFS

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/env/trait.AsyncVM.html b/async_wasi/snapshots/env/trait.AsyncVM.html new file mode 100644 index 000000000..a01aa7cb3 --- /dev/null +++ b/async_wasi/snapshots/env/trait.AsyncVM.html @@ -0,0 +1,4 @@ +AsyncVM in async_wasi::snapshots::env - Rust
async_wasi::snapshots::env

Trait AsyncVM

Source
pub trait AsyncVM: Send + Sync {
+    // Required method
+    fn yield_now(&mut self) -> Result<(), Errno>;
+}

Required Methods§

Source

fn yield_now(&mut self) -> Result<(), Errno>

Implementors§

\ No newline at end of file diff --git a/async_wasi/snapshots/index.html b/async_wasi/snapshots/index.html new file mode 100644 index 000000000..2a8201914 --- /dev/null +++ b/async_wasi/snapshots/index.html @@ -0,0 +1 @@ +async_wasi::snapshots - Rust
async_wasi

Module snapshots

Source

Modules§

Structs§

\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_poll/fn.poll_oneoff.html b/async_wasi/snapshots/preview_1/async_poll/fn.poll_oneoff.html new file mode 100644 index 000000000..c71475a3a --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_poll/fn.poll_oneoff.html @@ -0,0 +1,8 @@ +poll_oneoff in async_wasi::snapshots::preview_1::async_poll - Rust
async_wasi::snapshots::preview_1::async_poll

Function poll_oneoff

Source
pub async fn poll_oneoff<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    in_ptr: WasmPtr<__wasi_subscription_t>,
+    out_ptr: WasmPtr<__wasi_event_t>,
+    nsubscriptions: __wasi_size_t,
+    revents_num_ptr: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_poll/index.html b/async_wasi/snapshots/preview_1/async_poll/index.html new file mode 100644 index 000000000..7d0929ac7 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_poll/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::preview_1::async_poll - Rust
async_wasi::snapshots::preview_1

Module async_poll

Source

Functions§

\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_poll/sidebar-items.js b/async_wasi/snapshots/preview_1/async_poll/sidebar-items.js new file mode 100644 index 000000000..b649bdd80 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_poll/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["poll_oneoff"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/addrinfo/enum.AddressFamily.html b/async_wasi/snapshots/preview_1/async_socket/addrinfo/enum.AddressFamily.html new file mode 100644 index 000000000..23e729bed --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/addrinfo/enum.AddressFamily.html @@ -0,0 +1,17 @@ +AddressFamily in async_wasi::snapshots::preview_1::async_socket::addrinfo - Rust
async_wasi::snapshots::preview_1::async_socket::addrinfo

Enum AddressFamily

Source
#[repr(align(1), u8)]
pub enum AddressFamily { + Unspec = 0, + Inet4 = 1, + Inet6 = 2, +}

Variants§

§

Unspec = 0

§

Inet4 = 1

§

Inet6 = 2

Trait Implementations§

Source§

impl Clone for AddressFamily

Source§

fn clone(&self) -> AddressFamily

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AddressFamily

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for AddressFamily

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/addrinfo/fn.sock_getaddrinfo.html b/async_wasi/snapshots/preview_1/async_socket/addrinfo/fn.sock_getaddrinfo.html new file mode 100644 index 000000000..fe2315d11 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/addrinfo/fn.sock_getaddrinfo.html @@ -0,0 +1,12 @@ +sock_getaddrinfo in async_wasi::snapshots::preview_1::async_socket::addrinfo - Rust
async_wasi::snapshots::preview_1::async_socket::addrinfo

Function sock_getaddrinfo

Source
pub fn sock_getaddrinfo<M: Memory>(
+    _ctx: &mut WasiCtx,
+    mem: &mut M,
+    node: WasmPtr<u8>,
+    node_len: u32,
+    _server: WasmPtr<u8>,
+    _server_len: u32,
+    _hint: WasmPtr<()>,
+    res: WasmPtr<u32>,
+    max_len: u32,
+    res_len: WasmPtr<u32>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/addrinfo/index.html b/async_wasi/snapshots/preview_1/async_socket/addrinfo/index.html new file mode 100644 index 000000000..ff8367c45 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/addrinfo/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::preview_1::async_socket::addrinfo - Rust
async_wasi::snapshots::preview_1::async_socket

Module addrinfo

Source

Structs§

Enums§

Functions§

\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/addrinfo/sidebar-items.js b/async_wasi/snapshots/preview_1/async_socket/addrinfo/sidebar-items.js new file mode 100644 index 000000000..43158e545 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/addrinfo/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["AddressFamily"],"fn":["sock_getaddrinfo"],"struct":["WasiAddrinfo","WasiSockaddr"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/addrinfo/struct.WasiAddrinfo.html b/async_wasi/snapshots/preview_1/async_socket/addrinfo/struct.WasiAddrinfo.html new file mode 100644 index 000000000..7192f2e1d --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/addrinfo/struct.WasiAddrinfo.html @@ -0,0 +1,23 @@ +WasiAddrinfo in async_wasi::snapshots::preview_1::async_socket::addrinfo - Rust
async_wasi::snapshots::preview_1::async_socket::addrinfo

Struct WasiAddrinfo

Source
#[repr(C, packed(4))]
pub struct WasiAddrinfo { + pub ai_flags: u16, + pub ai_family: AddressFamily, + pub ai_socktype: u8, + pub ai_protocol: u8, + pub ai_addrlen: u32, + pub ai_addr: u32, + pub ai_canonname: u32, + pub ai_canonnamelen: u32, + pub ai_next: u32, +}

Fields§

§ai_flags: u16§ai_family: AddressFamily§ai_socktype: u8§ai_protocol: u8§ai_addrlen: u32§ai_addr: u32§ai_canonname: u32§ai_canonnamelen: u32§ai_next: u32

Trait Implementations§

Source§

impl Clone for WasiAddrinfo

Source§

fn clone(&self) -> WasiAddrinfo

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasiAddrinfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/addrinfo/struct.WasiSockaddr.html b/async_wasi/snapshots/preview_1/async_socket/addrinfo/struct.WasiSockaddr.html new file mode 100644 index 000000000..b8776b7da --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/addrinfo/struct.WasiSockaddr.html @@ -0,0 +1,17 @@ +WasiSockaddr in async_wasi::snapshots::preview_1::async_socket::addrinfo - Rust
async_wasi::snapshots::preview_1::async_socket::addrinfo

Struct WasiSockaddr

Source
#[repr(C)]
pub struct WasiSockaddr { + pub family: AddressFamily, + pub sa_data_len: u32, + pub sa_data: u32, +}

Fields§

§family: AddressFamily§sa_data_len: u32§sa_data: u32

Trait Implementations§

Source§

impl Clone for WasiSockaddr

Source§

fn clone(&self) -> WasiSockaddr

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasiSockaddr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_accept.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_accept.html new file mode 100644 index 000000000..e4f1d9c52 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_accept.html @@ -0,0 +1,6 @@ +sock_accept in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_accept

Source
pub async fn sock_accept<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    ro_fd_ptr: WasmPtr<__wasi_fd_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_bind.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_bind.html new file mode 100644 index 000000000..4a588ad11 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_bind.html @@ -0,0 +1,7 @@ +sock_bind in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_bind

Source
pub fn sock_bind<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    fd: __wasi_fd_t,
+    addr_ptr: WasmPtr<__wasi_address_t>,
+    port: u32,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_connect.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_connect.html new file mode 100644 index 000000000..0906ba229 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_connect.html @@ -0,0 +1,7 @@ +sock_connect in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_connect

Source
pub async fn sock_connect<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    fd: __wasi_fd_t,
+    addr_ptr: WasmPtr<__wasi_address_t>,
+    port: u32,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_getlocaladdr.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_getlocaladdr.html new file mode 100644 index 000000000..2f7ec31a3 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_getlocaladdr.html @@ -0,0 +1,8 @@ +sock_getlocaladdr in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_getlocaladdr

Source
pub fn sock_getlocaladdr<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    wasi_addr_ptr: WasmPtr<__wasi_address_t>,
+    addr_type: WasmPtr<u32>,
+    port_ptr: WasmPtr<u32>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_getpeeraddr.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_getpeeraddr.html new file mode 100644 index 000000000..5627ea3d9 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_getpeeraddr.html @@ -0,0 +1,8 @@ +sock_getpeeraddr in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_getpeeraddr

Source
pub fn sock_getpeeraddr<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    wasi_addr_ptr: WasmPtr<__wasi_address_t>,
+    addr_type: WasmPtr<u32>,
+    port_ptr: WasmPtr<u32>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_getsockopt.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_getsockopt.html new file mode 100644 index 000000000..33ec92a4f --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_getsockopt.html @@ -0,0 +1,9 @@ +sock_getsockopt in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_getsockopt

Source
pub fn sock_getsockopt<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    level: Type,
+    name: Type,
+    flag: WasmPtr<i32>,
+    flag_size_ptr: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_listen.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_listen.html new file mode 100644 index 000000000..cb2485138 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_listen.html @@ -0,0 +1,6 @@ +sock_listen in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_listen

Source
pub fn sock_listen<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    backlog: u32,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_lookup_ip.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_lookup_ip.html new file mode 100644 index 000000000..a6b734bda --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_lookup_ip.html @@ -0,0 +1,10 @@ +sock_lookup_ip in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_lookup_ip

Source
pub async fn sock_lookup_ip<M: Memory>(
+    _ctx: &mut WasiCtx,
+    mem: &mut M,
+    host_name_ptr: WasmPtr<u8>,
+    host_name_len: __wasi_size_t,
+    lookup_type: Type,
+    addr_buf: WasmPtr<u8>,
+    addr_buf_max_len: __wasi_size_t,
+    raddr_num_ptr: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_open.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_open.html new file mode 100644 index 000000000..3026cfd23 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_open.html @@ -0,0 +1,7 @@ +sock_open in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_open

Source
pub fn sock_open<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    af: Type,
+    ty: Type,
+    ro_fd_ptr: WasmPtr<__wasi_fd_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_recv.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_recv.html new file mode 100644 index 000000000..5a3f6f6d3 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_recv.html @@ -0,0 +1,10 @@ +sock_recv in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_recv

Source
pub async fn sock_recv<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf_ptr: WasmPtr<__wasi_iovec_t>,
+    buf_len: __wasi_size_t,
+    flags: Type,
+    ro_data_len_ptr: WasmPtr<__wasi_size_t>,
+    ro_flags_ptr: WasmPtr<Type>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_recv_from.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_recv_from.html new file mode 100644 index 000000000..0f078767f --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_recv_from.html @@ -0,0 +1,12 @@ +sock_recv_from in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_recv_from

Source
pub async fn sock_recv_from<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf_ptr: WasmPtr<__wasi_iovec_t>,
+    buf_len: __wasi_size_t,
+    wasi_addr_ptr: WasmPtr<__wasi_address_t>,
+    flags: Type,
+    port_ptr: WasmPtr<u32>,
+    ro_data_len_ptr: WasmPtr<__wasi_size_t>,
+    ro_flags_ptr: WasmPtr<Type>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_send.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_send.html new file mode 100644 index 000000000..63f1db491 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_send.html @@ -0,0 +1,9 @@ +sock_send in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_send

Source
pub async fn sock_send<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf_ptr: WasmPtr<__wasi_ciovec_t>,
+    buf_len: __wasi_size_t,
+    _flags: __wasi_siflags_t,
+    send_len_ptr: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_send_to.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_send_to.html new file mode 100644 index 000000000..a0f4b8dd5 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_send_to.html @@ -0,0 +1,11 @@ +sock_send_to in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_send_to

Source
pub async fn sock_send_to<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf_ptr: WasmPtr<__wasi_ciovec_t>,
+    buf_len: __wasi_size_t,
+    wasi_addr_ptr: WasmPtr<__wasi_address_t>,
+    port: u32,
+    _flags: __wasi_siflags_t,
+    send_len_ptr: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_setsockopt.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_setsockopt.html new file mode 100644 index 000000000..359cb3ea1 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_setsockopt.html @@ -0,0 +1,9 @@ +sock_setsockopt in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_setsockopt

Source
pub fn sock_setsockopt<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    fd: __wasi_fd_t,
+    level: Type,
+    name: Type,
+    flag: WasmPtr<i32>,
+    flag_size: __wasi_size_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/fn.sock_shutdown.html b/async_wasi/snapshots/preview_1/async_socket/fn.sock_shutdown.html new file mode 100644 index 000000000..11e024452 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/fn.sock_shutdown.html @@ -0,0 +1,6 @@ +sock_shutdown in async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1::async_socket

Function sock_shutdown

Source
pub fn sock_shutdown<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    how: Type,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/index.html b/async_wasi/snapshots/preview_1/async_socket/index.html new file mode 100644 index 000000000..dfe911039 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::preview_1::async_socket - Rust
async_wasi::snapshots::preview_1

Module async_socket

Source

Modules§

Functions§

\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/async_socket/sidebar-items.js b/async_wasi/snapshots/preview_1/async_socket/sidebar-items.js new file mode 100644 index 000000000..e5d1cce92 --- /dev/null +++ b/async_wasi/snapshots/preview_1/async_socket/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["sock_accept","sock_bind","sock_connect","sock_getlocaladdr","sock_getpeeraddr","sock_getsockopt","sock_listen","sock_lookup_ip","sock_open","sock_recv","sock_recv_from","sock_send","sock_send_to","sock_setsockopt","sock_shutdown"],"mod":["addrinfo"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.args_get.html b/async_wasi/snapshots/preview_1/fn.args_get.html new file mode 100644 index 000000000..039e8cd78 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.args_get.html @@ -0,0 +1,6 @@ +args_get in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function args_get

Source
pub fn args_get<M: Memory>(
+    ctx: &WasiCtx,
+    mem: &mut M,
+    argv: WasmPtr<__wasi_size_t>,
+    argv_buf: WasmPtr<u8>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.args_sizes_get.html b/async_wasi/snapshots/preview_1/fn.args_sizes_get.html new file mode 100644 index 000000000..85e034f09 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.args_sizes_get.html @@ -0,0 +1,6 @@ +args_sizes_get in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function args_sizes_get

Source
pub fn args_sizes_get<M: Memory>(
+    ctx: &WasiCtx,
+    mem: &mut M,
+    argc: WasmPtr<__wasi_size_t>,
+    argv_buf_size: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.clock_res_get.html b/async_wasi/snapshots/preview_1/fn.clock_res_get.html new file mode 100644 index 000000000..2a6f83052 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.clock_res_get.html @@ -0,0 +1,6 @@ +clock_res_get in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function clock_res_get

Source
pub fn clock_res_get<M: Memory>(
+    _ctx: &mut WasiCtx,
+    mem: &mut M,
+    clock_id: Type,
+    resolution_ptr: WasmPtr<__wasi_timestamp_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.clock_time_get.html b/async_wasi/snapshots/preview_1/fn.clock_time_get.html new file mode 100644 index 000000000..4975b94a0 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.clock_time_get.html @@ -0,0 +1,7 @@ +clock_time_get in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function clock_time_get

Source
pub fn clock_time_get<M: Memory>(
+    ctx: &WasiCtx,
+    mem: &mut M,
+    clock_id: Type,
+    precision: __wasi_timestamp_t,
+    time_ptr: WasmPtr<__wasi_timestamp_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.environ_get.html b/async_wasi/snapshots/preview_1/fn.environ_get.html new file mode 100644 index 000000000..9cc75aaf9 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.environ_get.html @@ -0,0 +1,6 @@ +environ_get in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function environ_get

Source
pub fn environ_get<M: Memory>(
+    ctx: &WasiCtx,
+    mem: &mut M,
+    environ: WasmPtr<__wasi_size_t>,
+    environ_buf: WasmPtr<u8>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.environ_sizes_get.html b/async_wasi/snapshots/preview_1/fn.environ_sizes_get.html new file mode 100644 index 000000000..b6888cc30 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.environ_sizes_get.html @@ -0,0 +1,6 @@ +environ_sizes_get in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function environ_sizes_get

Source
pub fn environ_sizes_get<M: Memory>(
+    ctx: &WasiCtx,
+    mem: &mut M,
+    environ_count: WasmPtr<__wasi_size_t>,
+    environ_buf_size: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_advise.html b/async_wasi/snapshots/preview_1/fn.fd_advise.html new file mode 100644 index 000000000..bc4d49664 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_advise.html @@ -0,0 +1,8 @@ +fd_advise in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_advise

Source
pub fn fd_advise<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    offset: __wasi_filesize_t,
+    len: __wasi_filesize_t,
+    advice: Type,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_allocate.html b/async_wasi/snapshots/preview_1/fn.fd_allocate.html new file mode 100644 index 000000000..9be7a3c77 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_allocate.html @@ -0,0 +1,7 @@ +fd_allocate in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_allocate

Source
pub fn fd_allocate<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    offset: __wasi_filesize_t,
+    len: __wasi_filesize_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_close.html b/async_wasi/snapshots/preview_1/fn.fd_close.html new file mode 100644 index 000000000..a140e7064 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_close.html @@ -0,0 +1,5 @@ +fd_close in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_close

Source
pub fn fd_close<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_datasync.html b/async_wasi/snapshots/preview_1/fn.fd_datasync.html new file mode 100644 index 000000000..e53a9bc1d --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_datasync.html @@ -0,0 +1,5 @@ +fd_datasync in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_datasync

Source
pub fn fd_datasync<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_fdstat_get.html b/async_wasi/snapshots/preview_1/fn.fd_fdstat_get.html new file mode 100644 index 000000000..fbc4f456e --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_fdstat_get.html @@ -0,0 +1,6 @@ +fd_fdstat_get in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_fdstat_get

Source
pub fn fd_fdstat_get<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf_ptr: WasmPtr<__wasi_fdstat_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_fdstat_set_flags.html b/async_wasi/snapshots/preview_1/fn.fd_fdstat_set_flags.html new file mode 100644 index 000000000..3f2d823be --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_fdstat_set_flags.html @@ -0,0 +1,6 @@ +fd_fdstat_set_flags in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_fdstat_set_flags

Source
pub fn fd_fdstat_set_flags<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    flags: Type,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_fdstat_set_rights.html b/async_wasi/snapshots/preview_1/fn.fd_fdstat_set_rights.html new file mode 100644 index 000000000..d8ba2ee8c --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_fdstat_set_rights.html @@ -0,0 +1,7 @@ +fd_fdstat_set_rights in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_fdstat_set_rights

Source
pub fn fd_fdstat_set_rights<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    fs_rights_base: Type,
+    fs_rights_inheriting: Type,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_filestat_get.html b/async_wasi/snapshots/preview_1/fn.fd_filestat_get.html new file mode 100644 index 000000000..b21595fc5 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_filestat_get.html @@ -0,0 +1,6 @@ +fd_filestat_get in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_filestat_get

Source
pub fn fd_filestat_get<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf: WasmPtr<__wasi_filestat_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_filestat_set_size.html b/async_wasi/snapshots/preview_1/fn.fd_filestat_set_size.html new file mode 100644 index 000000000..36085b061 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_filestat_set_size.html @@ -0,0 +1,6 @@ +fd_filestat_set_size in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_filestat_set_size

Source
pub fn fd_filestat_set_size<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    st_size: __wasi_filesize_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_filestat_set_times.html b/async_wasi/snapshots/preview_1/fn.fd_filestat_set_times.html new file mode 100644 index 000000000..0334a8b09 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_filestat_set_times.html @@ -0,0 +1,8 @@ +fd_filestat_set_times in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_filestat_set_times

Source
pub fn fd_filestat_set_times<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    st_atim: __wasi_timestamp_t,
+    st_mtim: __wasi_timestamp_t,
+    fst_flags: Type,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_pread.html b/async_wasi/snapshots/preview_1/fn.fd_pread.html new file mode 100644 index 000000000..59cad9332 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_pread.html @@ -0,0 +1,9 @@ +fd_pread in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_pread

Source
pub fn fd_pread<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    iovs: WasmPtr<__wasi_iovec_t>,
+    iovs_len: __wasi_size_t,
+    offset: __wasi_filesize_t,
+    nread: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_prestat_dir_name.html b/async_wasi/snapshots/preview_1/fn.fd_prestat_dir_name.html new file mode 100644 index 000000000..0ac27b0c7 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_prestat_dir_name.html @@ -0,0 +1,7 @@ +fd_prestat_dir_name in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_prestat_dir_name

Source
pub fn fd_prestat_dir_name<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    path_buf_ptr: WasmPtr<u8>,
+    path_max_len: __wasi_size_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_prestat_get.html b/async_wasi/snapshots/preview_1/fn.fd_prestat_get.html new file mode 100644 index 000000000..f02a33382 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_prestat_get.html @@ -0,0 +1,6 @@ +fd_prestat_get in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_prestat_get

Source
pub fn fd_prestat_get<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    prestat_ptr: WasmPtr<__wasi_prestat_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_pwrite.html b/async_wasi/snapshots/preview_1/fn.fd_pwrite.html new file mode 100644 index 000000000..a6d05e61f --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_pwrite.html @@ -0,0 +1,9 @@ +fd_pwrite in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_pwrite

Source
pub fn fd_pwrite<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    iovs: WasmPtr<__wasi_ciovec_t>,
+    iovs_len: __wasi_size_t,
+    offset: __wasi_filesize_t,
+    nwritten: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_read.html b/async_wasi/snapshots/preview_1/fn.fd_read.html new file mode 100644 index 000000000..c2dac950a --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_read.html @@ -0,0 +1,8 @@ +fd_read in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_read

Source
pub fn fd_read<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    iovs: WasmPtr<__wasi_iovec_t>,
+    iovs_len: __wasi_size_t,
+    nread: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_readdir.html b/async_wasi/snapshots/preview_1/fn.fd_readdir.html new file mode 100644 index 000000000..548f77225 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_readdir.html @@ -0,0 +1,9 @@ +fd_readdir in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_readdir

Source
pub fn fd_readdir<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf: WasmPtr<u8>,
+    buf_len: __wasi_size_t,
+    cookie: __wasi_dircookie_t,
+    bufused_ptr: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_renumber.html b/async_wasi/snapshots/preview_1/fn.fd_renumber.html new file mode 100644 index 000000000..d901ecb97 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_renumber.html @@ -0,0 +1,6 @@ +fd_renumber in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_renumber

Source
pub fn fd_renumber<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    from: __wasi_fd_t,
+    to: __wasi_fd_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_seek.html b/async_wasi/snapshots/preview_1/fn.fd_seek.html new file mode 100644 index 000000000..b723fcf55 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_seek.html @@ -0,0 +1,8 @@ +fd_seek in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_seek

Source
pub fn fd_seek<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    offset: __wasi_filedelta_t,
+    whence: Type,
+    newoffset_ptr: WasmPtr<__wasi_filesize_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_sync.html b/async_wasi/snapshots/preview_1/fn.fd_sync.html new file mode 100644 index 000000000..440fb9d2d --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_sync.html @@ -0,0 +1,5 @@ +fd_sync in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_sync

Source
pub fn fd_sync<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_tell.html b/async_wasi/snapshots/preview_1/fn.fd_tell.html new file mode 100644 index 000000000..fd5249fea --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_tell.html @@ -0,0 +1,6 @@ +fd_tell in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_tell

Source
pub fn fd_tell<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    offset: WasmPtr<__wasi_filesize_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.fd_write.html b/async_wasi/snapshots/preview_1/fn.fd_write.html new file mode 100644 index 000000000..ceb8d82df --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.fd_write.html @@ -0,0 +1,8 @@ +fd_write in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function fd_write

Source
pub fn fd_write<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    iovs: WasmPtr<__wasi_ciovec_t>,
+    iovs_len: __wasi_size_t,
+    nwritten: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.path_create_directory.html b/async_wasi/snapshots/preview_1/fn.path_create_directory.html new file mode 100644 index 000000000..a6a493abe --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.path_create_directory.html @@ -0,0 +1,7 @@ +path_create_directory in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function path_create_directory

Source
pub fn path_create_directory<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    dirfd: __wasi_fd_t,
+    path_ptr: WasmPtr<u8>,
+    path_len: __wasi_size_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.path_filestat_get.html b/async_wasi/snapshots/preview_1/fn.path_filestat_get.html new file mode 100644 index 000000000..d52572cd7 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.path_filestat_get.html @@ -0,0 +1,9 @@ +path_filestat_get in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function path_filestat_get

Source
pub fn path_filestat_get<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    dirfd: __wasi_fd_t,
+    flags: Type,
+    path_ptr: WasmPtr<u8>,
+    path_len: __wasi_size_t,
+    file_stat_ptr: WasmPtr<__wasi_filestat_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.path_filestat_set_times.html b/async_wasi/snapshots/preview_1/fn.path_filestat_set_times.html new file mode 100644 index 000000000..a32366d2c --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.path_filestat_set_times.html @@ -0,0 +1,11 @@ +path_filestat_set_times in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function path_filestat_set_times

Source
pub fn path_filestat_set_times<M: Memory>(
+    _ctx: &mut WasiCtx,
+    _mem: &mut M,
+    _dirfd: __wasi_fd_t,
+    _flags: Type,
+    _path: WasmPtr<u8>,
+    _path_len: __wasi_size_t,
+    _st_atim: __wasi_timestamp_t,
+    _st_mtim: __wasi_timestamp_t,
+    _fst_flags: Type,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.path_link.html b/async_wasi/snapshots/preview_1/fn.path_link.html new file mode 100644 index 000000000..3dd1488ba --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.path_link.html @@ -0,0 +1,11 @@ +path_link in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function path_link

Source
pub fn path_link<M: Memory>(
+    _ctx: &mut WasiCtx,
+    _mem: &mut M,
+    _old_fd: __wasi_fd_t,
+    _old_flags: Type,
+    _old_path: WasmPtr<u8>,
+    _old_path_len: __wasi_size_t,
+    _new_fd: __wasi_fd_t,
+    _new_path: WasmPtr<u8>,
+    _new_path_len: __wasi_size_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.path_open.html b/async_wasi/snapshots/preview_1/fn.path_open.html new file mode 100644 index 000000000..de082078d --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.path_open.html @@ -0,0 +1,13 @@ +path_open in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function path_open

Source
pub fn path_open<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    dirfd: __wasi_fd_t,
+    _dirflags: Type,
+    path: WasmPtr<u8>,
+    path_len: __wasi_size_t,
+    o_flags: Type,
+    fs_rights_base: Type,
+    fs_rights_inheriting: Type,
+    fs_flags: Type,
+    fd_ptr: WasmPtr<__wasi_fd_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.path_readlink.html b/async_wasi/snapshots/preview_1/fn.path_readlink.html new file mode 100644 index 000000000..42351f807 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.path_readlink.html @@ -0,0 +1,10 @@ +path_readlink in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function path_readlink

Source
pub fn path_readlink<M: Memory>(
+    _ctx: &mut WasiCtx,
+    _mem: &mut M,
+    _dir_fd: __wasi_fd_t,
+    _path: WasmPtr<u8>,
+    _path_len: __wasi_size_t,
+    _buf: WasmPtr<u8>,
+    _buf_len: __wasi_size_t,
+    _buf_used: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.path_remove_directory.html b/async_wasi/snapshots/preview_1/fn.path_remove_directory.html new file mode 100644 index 000000000..7ec9b8cc1 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.path_remove_directory.html @@ -0,0 +1,7 @@ +path_remove_directory in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function path_remove_directory

Source
pub fn path_remove_directory<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    dirfd: __wasi_fd_t,
+    path_ptr: WasmPtr<u8>,
+    path_len: __wasi_size_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.path_rename.html b/async_wasi/snapshots/preview_1/fn.path_rename.html new file mode 100644 index 000000000..850ec8ac6 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.path_rename.html @@ -0,0 +1,10 @@ +path_rename in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function path_rename

Source
pub fn path_rename<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    old_fd: __wasi_fd_t,
+    old_path: WasmPtr<u8>,
+    old_path_len: __wasi_size_t,
+    new_fd: __wasi_fd_t,
+    new_path: WasmPtr<u8>,
+    new_path_len: __wasi_size_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.path_symlink.html b/async_wasi/snapshots/preview_1/fn.path_symlink.html new file mode 100644 index 000000000..3afc27502 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.path_symlink.html @@ -0,0 +1,9 @@ +path_symlink in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function path_symlink

Source
pub fn path_symlink<M: Memory>(
+    _ctx: &mut WasiCtx,
+    _mem: &mut M,
+    _old_path: WasmPtr<u8>,
+    _old_path_len: __wasi_size_t,
+    _fd: __wasi_fd_t,
+    _new_path: WasmPtr<u8>,
+    _new_path_len: __wasi_size_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.path_unlink_file.html b/async_wasi/snapshots/preview_1/fn.path_unlink_file.html new file mode 100644 index 000000000..925a1895b --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.path_unlink_file.html @@ -0,0 +1,7 @@ +path_unlink_file in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function path_unlink_file

Source
pub fn path_unlink_file<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    dirfd: __wasi_fd_t,
+    path_ptr: WasmPtr<u8>,
+    path_len: __wasi_size_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.proc_exit.html b/async_wasi/snapshots/preview_1/fn.proc_exit.html new file mode 100644 index 000000000..4bddb6ac9 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.proc_exit.html @@ -0,0 +1,5 @@ +proc_exit in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function proc_exit

Source
pub fn proc_exit<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    code: __wasi_exitcode_t,
+)
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.proc_raise.html b/async_wasi/snapshots/preview_1/fn.proc_raise.html new file mode 100644 index 000000000..59c79c1df --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.proc_raise.html @@ -0,0 +1,5 @@ +proc_raise in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function proc_raise

Source
pub fn proc_raise<M: Memory>(
+    _ctx: &mut WasiCtx,
+    _mem: &mut M,
+    _sig: Type,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.random_get.html b/async_wasi/snapshots/preview_1/fn.random_get.html new file mode 100644 index 000000000..71c4ffc6f --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.random_get.html @@ -0,0 +1,6 @@ +random_get in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function random_get

Source
pub fn random_get<M: Memory>(
+    _ctx: &mut WasiCtx,
+    mem: &mut M,
+    buf: WasmPtr<u8>,
+    buf_len: __wasi_size_t,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/fn.sched_yield.html b/async_wasi/snapshots/preview_1/fn.sched_yield.html new file mode 100644 index 000000000..491335ae7 --- /dev/null +++ b/async_wasi/snapshots/preview_1/fn.sched_yield.html @@ -0,0 +1,4 @@ +sched_yield in async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots::preview_1

Function sched_yield

Source
pub fn sched_yield<VM: AsyncVM>(
+    _ctx: &mut WasiCtx,
+    vm: &mut VM,
+) -> Result<(), Errno>
\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/index.html b/async_wasi/snapshots/preview_1/index.html new file mode 100644 index 000000000..03171b716 --- /dev/null +++ b/async_wasi/snapshots/preview_1/index.html @@ -0,0 +1 @@ +async_wasi::snapshots::preview_1 - Rust
async_wasi::snapshots

Module preview_1

Source

Modules§

Functions§

\ No newline at end of file diff --git a/async_wasi/snapshots/preview_1/sidebar-items.js b/async_wasi/snapshots/preview_1/sidebar-items.js new file mode 100644 index 000000000..7e79f7f5f --- /dev/null +++ b/async_wasi/snapshots/preview_1/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["args_get","args_sizes_get","clock_res_get","clock_time_get","environ_get","environ_sizes_get","fd_advise","fd_allocate","fd_close","fd_datasync","fd_fdstat_get","fd_fdstat_set_flags","fd_fdstat_set_rights","fd_filestat_get","fd_filestat_set_size","fd_filestat_set_times","fd_pread","fd_prestat_dir_name","fd_prestat_get","fd_pwrite","fd_read","fd_readdir","fd_renumber","fd_seek","fd_sync","fd_tell","fd_write","path_create_directory","path_filestat_get","path_filestat_set_times","path_link","path_open","path_readlink","path_remove_directory","path_rename","path_symlink","path_unlink_file","proc_exit","proc_raise","random_get","sched_yield"],"mod":["async_poll","async_socket"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/sidebar-items.js b/async_wasi/snapshots/sidebar-items.js new file mode 100644 index 000000000..f138095f2 --- /dev/null +++ b/async_wasi/snapshots/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["common","env","preview_1"],"struct":["WasiCtx"]}; \ No newline at end of file diff --git a/async_wasi/snapshots/struct.WasiCtx.html b/async_wasi/snapshots/struct.WasiCtx.html new file mode 100644 index 000000000..737a31e92 --- /dev/null +++ b/async_wasi/snapshots/struct.WasiCtx.html @@ -0,0 +1,20 @@ +WasiCtx in async_wasi::snapshots - Rust
async_wasi::snapshots

Struct WasiCtx

Source
pub struct WasiCtx {
+    pub args: Vec<String>,
+    pub exit_code: u32,
+    /* private fields */
+}

Fields§

§args: Vec<String>§exit_code: u32

Implementations§

Source§

impl WasiCtx

Source

pub fn new() -> Self

Source

pub fn create_with_vfs(vfs: VFS) -> Self

Source

pub fn mount_file_sys( + &mut self, + guest_path: &str, + file_sys: Box<dyn WasiFileSys<Index = usize> + Send + Sync>, +)

Source

pub fn push_arg(&mut self, arg: String)

Source

pub fn push_args(&mut self, args: Vec<String>)

Source

pub fn push_env(&mut self, env: String)

The format of the env argument should be “KEY=VALUE”

+
Source

pub fn push_envs(&mut self, envs: Vec<String>)

Trait Implementations§

Source§

impl Debug for WasiCtx

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WasiCtx

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crates.js b/crates.js new file mode 100644 index 000000000..cb20a5c97 --- /dev/null +++ b/crates.js @@ -0,0 +1,2 @@ +window.ALL_CRATES = ["async_wasi","wasmedge_macro","wasmedge_sdk","wasmedge_sys","wasmedge_types"]; +//{"start":21,"fragment_lengths":[12,17,15,15,17]} \ No newline at end of file diff --git a/help.html b/help.html new file mode 100644 index 000000000..46850bff7 --- /dev/null +++ b/help.html @@ -0,0 +1 @@ +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/search-index.js b/search-index.js new file mode 100644 index 000000000..93e444320 --- /dev/null +++ b/search-index.js @@ -0,0 +1,4 @@ +var searchIndex = new Map(JSON.parse('[["async_wasi",{"t":"ECFONNCNNCONNNNNCNNNNNNNCCCCCCHHFTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTNNNNNNNNNNNNNNNNNNEKFNNNNNNNNNMMMNNMMMNNNNNMGPPGPPPPPPPPPPGPPGPGFFGFPCOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNONNNNNNNNNOOONNOOOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNOOOFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNIIIIIICFFCCFCIIFICFFCCIICFIIFCCIFICCCFFUCCCCCICIICCCFFCFFFFUIFICOOOOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNIOOOOOOOOOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOONNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNNNNNNNNNNNNNNOOOIOOISSSISSSSSSISSSSSSSISSSSISSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSISISSSISSSSSISSSSSSSSISSSSISISSSSISISSSISSISSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSISISSISSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSISISSSSSSSSSSSSSSSISSSISISSSTPGTTTTTTPTTTTTTTTTTTTTTFFFFRFTPPFTTTTTTTTTTTTTTTTTTTTTPFFFTTTTTTTTTTTTTFPFPGTTFTKKKKPNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNMMMMMMNMNMMOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOMMMMMMMCOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOONNNNNNNNMMMMMMMNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPFFFGPPFGFFKKFMNNNNNNNNNNNNNNNNNNMMMMNNNMNONNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOMNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNMMMMMNNNMMNNNNNNNNNNNNNNNNNNNNNOMOMNNNNNNNNNNNNNNNNNNNNNNNNNNNMPKEEPGFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNEEMOOHHCCHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHCHHHHHHHHHHHHHHHGPPPFFOOOOOOOOONNNNNNNNNNNNNNNONNNNNNNNNOOHNNNNNNNNNNNN","n":["WasiCtx","snapshots","WasiCtx","args","borrow","borrow_mut","common","create_with_vfs","default","env","exit_code","fmt","from","into","mount_file_sys","new","preview_1","push_arg","push_args","push_env","push_envs","try_from","try_into","type_id","clock","error","memory","net","types","vfs","wasi_clock_res_get","wasi_clock_time_get","Errno","__WASI_ERRNO_2BIG","__WASI_ERRNO_ACCES","__WASI_ERRNO_ADDRINUSE","__WASI_ERRNO_ADDRNOTAVAIL","__WASI_ERRNO_AFNOSUPPORT","__WASI_ERRNO_AGAIN","__WASI_ERRNO_AIADDRFAMILY","__WASI_ERRNO_AIAGAIN","__WASI_ERRNO_AIBADFLAG","__WASI_ERRNO_AIFAIL","__WASI_ERRNO_AIFAMILY","__WASI_ERRNO_AIMEMORY","__WASI_ERRNO_AINODATA","__WASI_ERRNO_AINONAME","__WASI_ERRNO_AISERVICE","__WASI_ERRNO_AISOCKTYPE","__WASI_ERRNO_AISYSTEM","__WASI_ERRNO_ALREADY","__WASI_ERRNO_BADF","__WASI_ERRNO_BADMSG","__WASI_ERRNO_BUSY","__WASI_ERRNO_CANCELED","__WASI_ERRNO_CHILD","__WASI_ERRNO_CONNABORTED","__WASI_ERRNO_CONNREFUSED","__WASI_ERRNO_CONNRESET","__WASI_ERRNO_DEADLK","__WASI_ERRNO_DESTADDRREQ","__WASI_ERRNO_DOM","__WASI_ERRNO_DQUOT","__WASI_ERRNO_EXIST","__WASI_ERRNO_FAULT","__WASI_ERRNO_FBIG","__WASI_ERRNO_HOSTUNREACH","__WASI_ERRNO_IDRM","__WASI_ERRNO_ILSEQ","__WASI_ERRNO_INPROGRESS","__WASI_ERRNO_INTR","__WASI_ERRNO_INVAL","__WASI_ERRNO_IO","__WASI_ERRNO_ISCONN","__WASI_ERRNO_ISDIR","__WASI_ERRNO_LOOP","__WASI_ERRNO_MFILE","__WASI_ERRNO_MLINK","__WASI_ERRNO_MSGSIZE","__WASI_ERRNO_MULTIHOP","__WASI_ERRNO_NAMETOOLONG","__WASI_ERRNO_NETDOWN","__WASI_ERRNO_NETRESET","__WASI_ERRNO_NETUNREACH","__WASI_ERRNO_NFILE","__WASI_ERRNO_NOBUFS","__WASI_ERRNO_NODEV","__WASI_ERRNO_NOENT","__WASI_ERRNO_NOEXEC","__WASI_ERRNO_NOLCK","__WASI_ERRNO_NOLINK","__WASI_ERRNO_NOMEM","__WASI_ERRNO_NOMSG","__WASI_ERRNO_NOPROTOOPT","__WASI_ERRNO_NOSPC","__WASI_ERRNO_NOSYS","__WASI_ERRNO_NOTCAPABLE","__WASI_ERRNO_NOTCONN","__WASI_ERRNO_NOTDIR","__WASI_ERRNO_NOTEMPTY","__WASI_ERRNO_NOTRECOVERABLE","__WASI_ERRNO_NOTSOCK","__WASI_ERRNO_NOTSUP","__WASI_ERRNO_NOTTY","__WASI_ERRNO_NXIO","__WASI_ERRNO_OVERFLOW","__WASI_ERRNO_OWNERDEAD","__WASI_ERRNO_PERM","__WASI_ERRNO_PIPE","__WASI_ERRNO_PROTO","__WASI_ERRNO_PROTONOSUPPORT","__WASI_ERRNO_PROTOTYPE","__WASI_ERRNO_RANGE","__WASI_ERRNO_ROFS","__WASI_ERRNO_SPIPE","__WASI_ERRNO_SRCH","__WASI_ERRNO_STALE","__WASI_ERRNO_SUCCESS","__WASI_ERRNO_TIMEDOUT","__WASI_ERRNO_TXTBSY","__WASI_ERRNO_XDEV","borrow","borrow_mut","clone","clone_into","clone_to_uninit","default","eq","fmt","from","","","","","into","to_owned","try_from","try_into","type_id","wasi_errno","Memory","WasmPtr","add","borrow","borrow_mut","clone","clone_into","clone_to_uninit","fmt","from","","get_data","get_iovec","get_slice","into","is_null","mut_data","mut_iovec","mut_slice","sub","to_owned","try_from","try_into","type_id","write_data","AddressFamily","Both","ClockAndFd","ConnectState","Connected","Connecting","Datagram","Empty","FD","Inet4","Inet6","Listening","OnlyClock","OnlyFd","PrePoll","Read","RealClock","SocketType","Stream","Subscription","SubscriptionClock","SubscriptionFd","SubscriptionFdType","WasiSocketState","Write","async_tokio","backlog","bind_device","borrow","","","","","","","","","borrow_mut","","","","","","","","","clone","","","","","","","","clone_into","","","","","","","","clone_to_uninit","","","","","","","","default","","","","eq","err","fd","fmt","","","","","","","","","from","","","","","","","","","","from_wasi_subscription","fs_rights","into","","","","","","","","","local_addr","nonblocking","peer_addr","set_read","set_write","shutdown","so_conn_state","so_recv_buf_size","so_recv_timeout","so_reuseaddr","so_send_buf_size","so_send_timeout","sock_type","timeout","to_owned","","","","","","","","try_from","","","","","","","","","try_into","","","","","","","","","type_","type_id","","","","","","","","","userdata","read","write","AsyncWasiSocket","accept","bind","bind_device","borrow","borrow_mut","connect","device","fd_fdstat_get","fmt","from","from_tcplistener","from_udpsocket","get_local","get_nonblocking","get_peer","get_so_accept_conn","get_so_error","get_so_recv_buf_size","get_so_recv_timeout","get_so_reuseaddr","get_so_send_buf_size","get_so_send_timeout","get_so_type","into","listen","open","recv","recv_from","send","send_to","set_nonblocking","set_so_recv_buf_size","set_so_recv_timeout","set_so_reuseaddr","set_so_send_buf_size","set_so_send_timeout","shutdown","state","sync_conn_state","try_from","try_into","type_id","__int32_t","__int64_t","__uint16_t","__uint32_t","__uint64_t","__uint8_t","__wasi_address_family_t","__wasi_address_t","__wasi_addrinfo_t","__wasi_advice_t","__wasi_aiflags_t","__wasi_ciovec_t","__wasi_clockid_t","__wasi_device_t","__wasi_dircookie_t","__wasi_dirent_t","__wasi_dirnamlen_t","__wasi_errno_t","__wasi_event_fd_readwrite_t","__wasi_event_t","__wasi_eventrwflags_t","__wasi_eventtype_t","__wasi_exitcode_t","__wasi_fd_t","__wasi_fdflags_t","__wasi_fdstat_t","__wasi_filedelta_t","__wasi_filesize_t","__wasi_filestat_t","__wasi_filetype_t","__wasi_fstflags_t","__wasi_inode_t","__wasi_iovec_t","__wasi_linkcount_t","__wasi_lookupflags_t","__wasi_oflags_t","__wasi_preopentype_t","__wasi_prestat_dir_t","__wasi_prestat_t","__wasi_prestat_u_t","__wasi_protocol_t","__wasi_riflags_t","__wasi_rights_t","__wasi_roflags_t","__wasi_sdflags_t","__wasi_siflags_t","__wasi_signal_t","__wasi_size_t","__wasi_sock_d_t","__wasi_sock_opt_level_t","__wasi_sock_opt_so_t","__wasi_sock_type_t","__wasi_sockaddr_in_t","__wasi_sockaddr_t","__wasi_subclockflags_t","__wasi_subscription_clock_t","__wasi_subscription_fd_readwrite_t","__wasi_subscription_t","__wasi_subscription_u_t","__wasi_subscription_u_u_t","__wasi_timestamp_t","__wasi_timeval","__wasi_userdata_t","__wasi_whence_t","ai_addr","ai_addrlen","ai_canonname","ai_canonname_len","ai_family","ai_flags","ai_next","ai_protocol","ai_socktype","atim","borrow","","","","","","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","","","","","","buf","","","buf_len","","","clock","clone","","","","","","","","","","","","","","","","","","","","clone_into","","","","","","","","","","","","","","","","","","","","clone_to_uninit","","","","","","","","","","","","","","","","","","","","const_uint8_t_ptr","ctim","d_ino","d_namlen","d_next","d_type","dev","dir","error","fd_read","fd_readwrite","fd_write","file_descriptor","filetype","flags","","fmt","","","","","","","","","","","","","","","","","","","from","","","","","","","","","","","","","","","","","","","","","","","","","fs_filetype","fs_flags","fs_rights_base","fs_rights_inheriting","id","ino","into","","","","","","","","","","","","","","","","","","","","mtim","nbytes","nlink","pr_name_len","precision","sa_data","sa_data_len","sa_family","sin_addr","sin_family","sin_port","sin_zero","sin_zero_len","size","tag","","timeout","to_owned","","","","","","","","","","","","","","","","","","","","try_from","","","","","","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","","","","","","tv_sec","tv_usec","type_","type_id","","","","","","","","","","","","","","","","","","","","u","","","uint8_t_ptr","userdata","","Type","__WASI_ADDRESS_FAMILY_INET4","__WASI_ADDRESS_FAMILY_INET6","__WASI_ADDRESS_FAMILY_UNSPEC","Type","__WASI_ADVICE_DONTNEED","__WASI_ADVICE_NOREUSE","__WASI_ADVICE_NORMAL","__WASI_ADVICE_RANDOM","__WASI_ADVICE_SEQUENTIAL","__WASI_ADVICE_WILLNEED","Type","__WASI_AIFLAGS_AI_ADDRCONFIG","__WASI_AIFLAGS_AI_ALL","__WASI_AIFLAGS_AI_CANONNAME","__WASI_AIFLAGS_AI_NUMERICHOST","__WASI_AIFLAGS_AI_NUMERICSERV","__WASI_AIFLAGS_AI_PASSIVE","__WASI_AIFLAGS_AI_V4MAPPED","Type","__WASI_CLOCKID_MONOTONIC","__WASI_CLOCKID_PROCESS_CPUTIME_ID","__WASI_CLOCKID_REALTIME","__WASI_CLOCKID_THREAD_CPUTIME_ID","Type","__WASI_ERRNO_2BIG","__WASI_ERRNO_ACCES","__WASI_ERRNO_ADDRINUSE","__WASI_ERRNO_ADDRNOTAVAIL","__WASI_ERRNO_AFNOSUPPORT","__WASI_ERRNO_AGAIN","__WASI_ERRNO_AIADDRFAMILY","__WASI_ERRNO_AIAGAIN","__WASI_ERRNO_AIBADFLAG","__WASI_ERRNO_AIFAIL","__WASI_ERRNO_AIFAMILY","__WASI_ERRNO_AIMEMORY","__WASI_ERRNO_AINODATA","__WASI_ERRNO_AINONAME","__WASI_ERRNO_AISERVICE","__WASI_ERRNO_AISOCKTYPE","__WASI_ERRNO_AISYSTEM","__WASI_ERRNO_ALREADY","__WASI_ERRNO_BADF","__WASI_ERRNO_BADMSG","__WASI_ERRNO_BUSY","__WASI_ERRNO_CANCELED","__WASI_ERRNO_CHILD","__WASI_ERRNO_CONNABORTED","__WASI_ERRNO_CONNREFUSED","__WASI_ERRNO_CONNRESET","__WASI_ERRNO_DEADLK","__WASI_ERRNO_DESTADDRREQ","__WASI_ERRNO_DOM","__WASI_ERRNO_DQUOT","__WASI_ERRNO_EXIST","__WASI_ERRNO_FAULT","__WASI_ERRNO_FBIG","__WASI_ERRNO_HOSTUNREACH","__WASI_ERRNO_IDRM","__WASI_ERRNO_ILSEQ","__WASI_ERRNO_INPROGRESS","__WASI_ERRNO_INTR","__WASI_ERRNO_INVAL","__WASI_ERRNO_IO","__WASI_ERRNO_ISCONN","__WASI_ERRNO_ISDIR","__WASI_ERRNO_LOOP","__WASI_ERRNO_MFILE","__WASI_ERRNO_MLINK","__WASI_ERRNO_MSGSIZE","__WASI_ERRNO_MULTIHOP","__WASI_ERRNO_NAMETOOLONG","__WASI_ERRNO_NETDOWN","__WASI_ERRNO_NETRESET","__WASI_ERRNO_NETUNREACH","__WASI_ERRNO_NFILE","__WASI_ERRNO_NOBUFS","__WASI_ERRNO_NODEV","__WASI_ERRNO_NOENT","__WASI_ERRNO_NOEXEC","__WASI_ERRNO_NOLCK","__WASI_ERRNO_NOLINK","__WASI_ERRNO_NOMEM","__WASI_ERRNO_NOMSG","__WASI_ERRNO_NOPROTOOPT","__WASI_ERRNO_NOSPC","__WASI_ERRNO_NOSYS","__WASI_ERRNO_NOTCAPABLE","__WASI_ERRNO_NOTCONN","__WASI_ERRNO_NOTDIR","__WASI_ERRNO_NOTEMPTY","__WASI_ERRNO_NOTRECOVERABLE","__WASI_ERRNO_NOTSOCK","__WASI_ERRNO_NOTSUP","__WASI_ERRNO_NOTTY","__WASI_ERRNO_NXIO","__WASI_ERRNO_OVERFLOW","__WASI_ERRNO_OWNERDEAD","__WASI_ERRNO_PERM","__WASI_ERRNO_PIPE","__WASI_ERRNO_PROTO","__WASI_ERRNO_PROTONOSUPPORT","__WASI_ERRNO_PROTOTYPE","__WASI_ERRNO_RANGE","__WASI_ERRNO_ROFS","__WASI_ERRNO_SPIPE","__WASI_ERRNO_SRCH","__WASI_ERRNO_STALE","__WASI_ERRNO_SUCCESS","__WASI_ERRNO_TIMEDOUT","__WASI_ERRNO_TXTBSY","__WASI_ERRNO_XDEV","Type","__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP","Type","__WASI_EVENTTYPE_CLOCK","__WASI_EVENTTYPE_FD_READ","__WASI_EVENTTYPE_FD_WRITE","Type","__WASI_FDFLAGS_APPEND","__WASI_FDFLAGS_DSYNC","__WASI_FDFLAGS_NONBLOCK","__WASI_FDFLAGS_RSYNC","__WASI_FDFLAGS_SYNC","Type","__WASI_FILETYPE_BLOCK_DEVICE","__WASI_FILETYPE_CHARACTER_DEVICE","__WASI_FILETYPE_DIRECTORY","__WASI_FILETYPE_REGULAR_FILE","__WASI_FILETYPE_SOCKET_DGRAM","__WASI_FILETYPE_SOCKET_STREAM","__WASI_FILETYPE_SYMBOLIC_LINK","__WASI_FILETYPE_UNKNOWN","Type","__WASI_FSTFLAGS_ATIM","__WASI_FSTFLAGS_ATIM_NOW","__WASI_FSTFLAGS_MTIM","__WASI_FSTFLAGS_MTIM_NOW","Type","__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW","Type","__WASI_OFLAGS_CREAT","__WASI_OFLAGS_DIRECTORY","__WASI_OFLAGS_EXCL","__WASI_OFLAGS_TRUNC","Type","__WASI_PREOPENTYPE_DIR","Type","__WASI_PROTOCOL_IPPROTO_IP","__WASI_PROTOCOL_IPPROTO_TCP","__WASI_PROTOCOL_IPPROTO_UDP","Type","__WASI_RIFLAGS_RECV_PEEK","__WASI_RIFLAGS_RECV_WAITALL","Type","__WASI_RIGHTS_FD_ADVISE","__WASI_RIGHTS_FD_ALLOCATE","__WASI_RIGHTS_FD_DATASYNC","__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS","__WASI_RIGHTS_FD_FILESTAT_GET","__WASI_RIGHTS_FD_FILESTAT_SET_SIZE","__WASI_RIGHTS_FD_FILESTAT_SET_TIMES","__WASI_RIGHTS_FD_READ","__WASI_RIGHTS_FD_READDIR","__WASI_RIGHTS_FD_SEEK","__WASI_RIGHTS_FD_SYNC","__WASI_RIGHTS_FD_TELL","__WASI_RIGHTS_FD_WRITE","__WASI_RIGHTS_PATH_CREATE_DIRECTORY","__WASI_RIGHTS_PATH_CREATE_FILE","__WASI_RIGHTS_PATH_FILESTAT_GET","__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE","__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES","__WASI_RIGHTS_PATH_LINK_SOURCE","__WASI_RIGHTS_PATH_LINK_TARGET","__WASI_RIGHTS_PATH_OPEN","__WASI_RIGHTS_PATH_READLINK","__WASI_RIGHTS_PATH_REMOVE_DIRECTORY","__WASI_RIGHTS_PATH_RENAME_SOURCE","__WASI_RIGHTS_PATH_RENAME_TARGET","__WASI_RIGHTS_PATH_SYMLINK","__WASI_RIGHTS_PATH_UNLINK_FILE","__WASI_RIGHTS_POLL_FD_READWRITE","__WASI_RIGHTS_SOCK_BIND","__WASI_RIGHTS_SOCK_CLOSE","__WASI_RIGHTS_SOCK_OPEN","__WASI_RIGHTS_SOCK_RECV","__WASI_RIGHTS_SOCK_RECV_FROM","__WASI_RIGHTS_SOCK_SEND","__WASI_RIGHTS_SOCK_SEND_TO","__WASI_RIGHTS_SOCK_SHUTDOWN","Type","__WASI_ROFLAGS_RECV_DATA_TRUNCATED","Type","__WASI_SDFLAGS_RD","__WASI_SDFLAGS_WR","Type","__WASI_SIGNAL_ABRT","__WASI_SIGNAL_ALRM","__WASI_SIGNAL_BUS","__WASI_SIGNAL_CHLD","__WASI_SIGNAL_CONT","__WASI_SIGNAL_FPE","__WASI_SIGNAL_HUP","__WASI_SIGNAL_ILL","__WASI_SIGNAL_INT","__WASI_SIGNAL_KILL","__WASI_SIGNAL_NONE","__WASI_SIGNAL_PIPE","__WASI_SIGNAL_POLL","__WASI_SIGNAL_PROF","__WASI_SIGNAL_PWR","__WASI_SIGNAL_QUIT","__WASI_SIGNAL_SEGV","__WASI_SIGNAL_STOP","__WASI_SIGNAL_SYS","__WASI_SIGNAL_TERM","__WASI_SIGNAL_TRAP","__WASI_SIGNAL_TSTP","__WASI_SIGNAL_TTIN","__WASI_SIGNAL_TTOU","__WASI_SIGNAL_URG","__WASI_SIGNAL_USR1","__WASI_SIGNAL_USR2","__WASI_SIGNAL_VTALRM","__WASI_SIGNAL_WINCH","__WASI_SIGNAL_XCPU","__WASI_SIGNAL_XFSZ","Type","__WASI_SOCK_OPT_LEVEL_SOL_SOCKET","Type","__WASI_SOCK_OPT_SO_ACCEPTCONN","__WASI_SOCK_OPT_SO_BINDTODEVICE","__WASI_SOCK_OPT_SO_BROADCAST","__WASI_SOCK_OPT_SO_DONTROUTE","__WASI_SOCK_OPT_SO_ERROR","__WASI_SOCK_OPT_SO_KEEPALIVE","__WASI_SOCK_OPT_SO_LINGER","__WASI_SOCK_OPT_SO_OOBINLINE","__WASI_SOCK_OPT_SO_RCVBUF","__WASI_SOCK_OPT_SO_RCVLOWAT","__WASI_SOCK_OPT_SO_RCVTIMEO","__WASI_SOCK_OPT_SO_REUSEADDR","__WASI_SOCK_OPT_SO_SNDBUF","__WASI_SOCK_OPT_SO_SNDTIMEO","__WASI_SOCK_OPT_SO_TYPE","Type","__WASI_SOCK_TYPE_SOCK_ANY","__WASI_SOCK_TYPE_SOCK_DGRAM","__WASI_SOCK_TYPE_SOCK_STREAM","Type","__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME","Type","__WASI_WHENCE_CUR","__WASI_WHENCE_END","__WASI_WHENCE_SET","APPEND","Absolute","Advice","BLOCK_DEVICE","CHARACTER_DEVICE","CREATE","DIRECTORY","","DSYNC","DontNeed","EXCLUSIVE","FD_ADVISE","FD_ALLOCATE","FD_DATASYNC","FD_FDSTAT_SET_FLAGS","FD_FILESTAT_GET","FD_FILESTAT_SET_SIZE","FD_FILESTAT_SET_TIMES","FD_READ","FD_READDIR","FD_SEEK","FD_SYNC","FD_TELL","FD_WRITE","FdFlags","FdStat","FileType","Filestat","Index","Lookupflags","NONBLOCK","NoReuse","Normal","OFlags","PATH_CREATE_DIRECTORY","PATH_CREATE_FILE","PATH_FILESTAT_GET","PATH_FILESTAT_SET_SIZE","PATH_FILESTAT_SET_TIMES","PATH_LINK_SOURCE","PATH_LINK_TARGET","PATH_OPEN","PATH_READLINK","PATH_REMOVE_DIRECTORY","PATH_RENAME_SOURCE","PATH_RENAME_TARGET","PATH_SYMLINK","PATH_UNLINK_FILE","POLL_FD_READWRITE","RD","RECV_DATA_TRUNCATED","RECV_PEEK","RECV_WAITALL","REGULAR_FILE","RSYNC","Random","ReaddirEntity","RiFlags","RoFlags","SOCKET_DGRAM","SOCKET_STREAM","SOCK_BIND","SOCK_CLOSE","SOCK_OPEN","SOCK_RECV","SOCK_RECV_FROM","SOCK_SEND","SOCK_SEND_TO","SOCK_SHUTDOWN","SYMBOLIC_LINK","SYMLINK_FOLLOW","SYNC","SdFlags","Sequential","SiFlags","SymbolicNow","SystemTimeSpec","TRUNCATE","UNKNOWN","WASIRights","WR","WasiDir","WasiFile","WasiFileSys","WasiNode","WillNeed","all","","","","","","","","atim","bitand","","","","","","","","bitand_assign","","","","","","","","bitor","","","","","","","","bitor_assign","","","","","","","","bits","","","","","","","","","","","","","","","","bitxor","","","","","","","","bitxor_assign","","","","","","","","borrow","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","can","clone","","","","","","","clone_into","","","","","","","clone_to_uninit","","","","","","","complement","","","","","","","","contains","","","","","","","","ctim","default","difference","","","","","","","","dir_all","empty","","","","","","","","eq","","","extend","","","","","","","","fclose","fd_advise","fd_all","fd_allocate","fd_datasync","fd_fdstat_get","fd_fdstat_set_flags","fd_fdstat_set_rights","fd_filestat_get","fd_filestat_set_size","fd_filestat_set_times","fd_pread","fd_pwrite","fd_read","fd_readdir","fd_seek","fd_sync","fd_tell","fd_write","filetype","","","flags","fmt","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","from","","","","","","","","","","","","","","from_bits","","","","","","","","from_bits_retain","","","","","","","","","","","","","","","","from_bits_truncate","","","","","","","","from_iter","","","","","","","","from_name","","","","","","","","fs_rights_base","fs_rights_inheriting","get_dir","get_file","get_inode","get_mut_dir","get_mut_file","get_mut_inode","get_readdir","impls","inode","","insert","","","","","","","","intersection","","","","","","","","intersects","","","","","","","","into","","","","","","","","","","","","","","into_iter","","","","","","","","is_all","","","","","","","","is_empty","","","","","","","","iter","","","","","","","","iter_names","","","","","","","","mtim","name","next","nlink","not","","","","","","","","path_create_directory","path_filestat_get","path_link_file","path_open","path_remove_directory","path_rename","path_unlink_file","remove","","","","","","","","set","","","","","","","","size","sub","","","","","","","","sub_assign","","","","","","","","symmetric_difference","","","","","","","","to_owned","","","","","","","toggle","","","","","","","","try_from","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","type_id","","","","","","","","","","","","","","union","","","","","","","","virtual_sys","MemoryDir","MemoryFile","add_sub_dir","borrow","","borrow_mut","","close","","create","","dec_link","drop","","fd_fdstat_get","","fd_filestat_get","","fd_filestat_set_size","","fd_filestat_set_times","","fd_pread","fd_pwrite","fd_read","fd_seek","fd_tell","fd_write","find_inode","fmt","","from","","","get_readdir","inc_link","into","","is_empty","is_open","","link_inode","mark_remove","open","","remove_sub_dir","set_ino","try_from","","try_into","","type_id","","unlink_inode","Dir","","DiskDir","DiskFile","DiskFileSys","DiskInode","File","","InPipline","Inode","OutPipeline","StdioSys","WasiVirtualDir","WasiVirtualFile","WasiVirtualSys","add_sub_dir","borrow","","","","","","","","","borrow_mut","","","","","","","","","close","","create","","create_dir_inode","create_file","create_file_inode","dec_link","default","dir_rights","fclose","","fd","fd_advise","","","fd_allocate","","","fd_datasync","","","fd_fdstat_get","","","","","","fd_fdstat_set_flags","","","","","","fd_fdstat_set_rights","","","","","","fd_filestat_get","","","","","","fd_filestat_set_size","","","","","","fd_filestat_set_times","","","","","","fd_pread","","","fd_pwrite","","","fd_read","","","fd_seek","","","fd_sync","","","fd_tell","","","fd_write","","","file_rights","find_inode","find_inode_index","flags","fmt","","from","","","","","","","","","","","get_absolutize_path","","get_dir","","","get_file","","","get_inode","","","get_mut_dir","","","get_mut_file","","","get_mut_inode","","","get_readdir","inc_link","into","","","","","","","","","is_empty","is_open","","link_inode","mark_remove","new","","","open","","path_create_directory","","","path_filestat_get","","","path_link_file","","","path_open","","","path_remove_directory","","","path_rename","","","path_unlink_file","","","real_path","remove_sub_dir","right","set_ino","try_from","","","","","","","","","try_into","","","","","","","","","type_id","","","","","","","","","unlink_inode","AsyncSocket","AsyncVM","AsyncWasiSocket","Errno","Inode","VFD","VFS","borrow","","borrow_mut","","fd_advise","fd_close","fd_preopen_get","fd_renumber","fmt","","from","","get_dir","get_file","get_inode","get_mut_dir","get_mut_file","get_mut_inode","get_mut_socket","get_socket","insert_socket","into","","is_inode","is_socket","mount_file_sys","new","new_with_stdio","path_create_directory","path_filestat_get","path_open","path_remove_directory","path_rename","path_unlink_file","try_from","","try_into","","type_id","","vfs","wasi_types","yield_now","dev","ino","args_get","args_sizes_get","async_poll","async_socket","clock_res_get","clock_time_get","environ_get","environ_sizes_get","fd_advise","fd_allocate","fd_close","fd_datasync","fd_fdstat_get","fd_fdstat_set_flags","fd_fdstat_set_rights","fd_filestat_get","fd_filestat_set_size","fd_filestat_set_times","fd_pread","fd_prestat_dir_name","fd_prestat_get","fd_pwrite","fd_read","fd_readdir","fd_renumber","fd_seek","fd_sync","fd_tell","fd_write","path_create_directory","path_filestat_get","path_filestat_set_times","path_link","path_open","path_readlink","path_remove_directory","path_rename","path_symlink","path_unlink_file","proc_exit","proc_raise","random_get","sched_yield","poll_oneoff","addrinfo","sock_accept","sock_bind","sock_connect","sock_getlocaladdr","sock_getpeeraddr","sock_getsockopt","sock_listen","sock_lookup_ip","sock_open","sock_recv","sock_recv_from","sock_send","sock_send_to","sock_setsockopt","sock_shutdown","AddressFamily","Inet4","Inet6","Unspec","WasiAddrinfo","WasiSockaddr","ai_addr","ai_addrlen","ai_canonname","ai_canonnamelen","ai_family","ai_flags","ai_next","ai_protocol","ai_socktype","borrow","","","borrow_mut","","","clone","","","clone_into","","","clone_to_uninit","","","family","fmt","","","from","","","into","","","sa_data","sa_data_len","sock_getaddrinfo","to_owned","","","try_from","","","try_into","","","type_id","",""],"q":[[0,"async_wasi"],[2,"async_wasi::snapshots"],[24,"async_wasi::snapshots::common"],[30,"async_wasi::snapshots::common::clock"],[32,"async_wasi::snapshots::common::error"],[140,"async_wasi::snapshots::common::memory"],[165,"async_wasi::snapshots::common::net"],[323,"async_wasi::snapshots::common::net::SubscriptionFdType"],[325,"async_wasi::snapshots::common::net::async_tokio"],[368,"async_wasi::snapshots::common::types"],[741,"async_wasi::snapshots::common::types::__wasi_address_family_t"],[745,"async_wasi::snapshots::common::types::__wasi_advice_t"],[752,"async_wasi::snapshots::common::types::__wasi_aiflags_t"],[760,"async_wasi::snapshots::common::types::__wasi_clockid_t"],[765,"async_wasi::snapshots::common::types::__wasi_errno_t"],[854,"async_wasi::snapshots::common::types::__wasi_eventrwflags_t"],[856,"async_wasi::snapshots::common::types::__wasi_eventtype_t"],[860,"async_wasi::snapshots::common::types::__wasi_fdflags_t"],[866,"async_wasi::snapshots::common::types::__wasi_filetype_t"],[875,"async_wasi::snapshots::common::types::__wasi_fstflags_t"],[880,"async_wasi::snapshots::common::types::__wasi_lookupflags_t"],[882,"async_wasi::snapshots::common::types::__wasi_oflags_t"],[887,"async_wasi::snapshots::common::types::__wasi_preopentype_t"],[889,"async_wasi::snapshots::common::types::__wasi_protocol_t"],[893,"async_wasi::snapshots::common::types::__wasi_riflags_t"],[896,"async_wasi::snapshots::common::types::__wasi_rights_t"],[933,"async_wasi::snapshots::common::types::__wasi_roflags_t"],[935,"async_wasi::snapshots::common::types::__wasi_sdflags_t"],[938,"async_wasi::snapshots::common::types::__wasi_signal_t"],[970,"async_wasi::snapshots::common::types::__wasi_sock_opt_level_t"],[972,"async_wasi::snapshots::common::types::__wasi_sock_opt_so_t"],[988,"async_wasi::snapshots::common::types::__wasi_sock_type_t"],[992,"async_wasi::snapshots::common::types::__wasi_subclockflags_t"],[994,"async_wasi::snapshots::common::types::__wasi_whence_t"],[998,"async_wasi::snapshots::common::vfs"],[1593,"async_wasi::snapshots::common::vfs::impls"],[1647,"async_wasi::snapshots::common::vfs::virtual_sys"],[1871,"async_wasi::snapshots::env"],[1921,"async_wasi::snapshots::env::VFD"],[1923,"async_wasi::snapshots::preview_1"],[1966,"async_wasi::snapshots::preview_1::async_poll"],[1967,"async_wasi::snapshots::preview_1::async_socket"],[1983,"async_wasi::snapshots::preview_1::async_socket::addrinfo"],[2038,"core::fmt"],[2039,"alloc::boxed"],[2040,"alloc::string"],[2041,"alloc::vec"],[2042,"core::result"],[2043,"core::any"],[2044,"std::io::error"],[2045,"core::marker"],[2046,"core::clone"],[2047,"std::io"],[2048,"core::net::socket_addr"],[2049,"core::option"],[2050,"std::net::tcp"],[2051,"std::net::udp"],[2052,"core::time"],[2053,"libc::unix"],[2054,"std::net"],[2055,"core::iter::traits::collect"],[2056,"bitflags::iter"],[2057,"std::path"],[2058,"core::convert"]],"i":"```h00`00`000000`0000000`````````Bb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000```C`00000000Cj0011000111110`E`Eh`Dl0Dj1EfDh0344`51`2`````5`Dn013406EbEd473562810473562810435628104356281043562601356281047356281044772356281047222112222222203562810435628104735628104713562810470AAn0`En00000000000000000000000000000000000000000````````````````````````````````````````````````````````````````Hn00000000GjDdClGfGh4GlGnH`HbHdHfEjHhHjHl?I`IbIdIfDdClGfGhGjGlGnH`HbHdHfEjHhHjHlHnI`IbIdIfDdCl9109<10GfGhGjGlGnH`HbHdHfEjHhHjHlHnI`IbIdIfDdClGfGhGjGlGnH`HbHdHfEjHhHjHlHnI`IbIdIfDdClGfGhGjGlGnH`HbHdHfEjHhHjHlHnI`IbIdIf`?Gf000Gj4?Gf0>>>Gj00Gl?>=<;:9876543IfGh000H`4DdCl7365Gn3HbHdHfEjHhHjHlHnI`IbIdIfGjGl15H`888999992<40DdClGfGh65Gn5HbHdHfEjHhHjHlHnI`IbIdIfDdClGfGhGjGlGnH`HbHdHfEjHhHjHlHnI`IbIdIfDdClGfGhGjGlGnH`HbHdHfEjHhHjHlHnI`IbIdIf00=DdClGfGhGjGlGnH`HbHdHfEjHhHjHlHnI`IbIdIf981`=8`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````IlAB``Kl0Jf103Kn1Jh000000000000````A``622`111111111111111InJdJb0795```77444444447Jj:`6`9`78`3````6:3J`23861Ij<5134972<5134972<5134972<5134972<<55113344997722<5134972<5134972;IhFf2<>7356;94:=102<>7356;94:902<>;9:02<>;9:02<>;9:>7356;94>7356;9429>7356;949>7356;942<7>7356;948Lf:00Lj00000111Ln2222435335?Il0000;;;;77779999::::?????=====8888>AB`657Kl2=9;>Jb0115544Jj093J`23761:4023761:4023761>>A`00000<`IhIj=7356:94=7356:94=7356:94<1Ff1<>8467;:59>8467;:5>8467;:5>8467;:5>8467;:5>8467;:51221>8467;:53333333>8467;:5>8467;:51>8467;:5>8467;:5>8467;:501<>;:9>8467;:5=201<>8467;:59=201<>8467;:59=201<>8467;:59>8467;:5```MhMn10101010010101010100000010100110011011101100101011ObOd````10```````N`2Nd2NfNhNlOjOfO`9685432107Nb80777072761541541541:95421:95421:95421:95421:95421:95421541541541541541541541287121:79655443216276376376376376376320:7965432188088763807637637637637637637632810:79654321:79654321:796543218On```0``f101000001010000000000111000000000010101``A@dABb0`````````````````````````````````````````````````````````````AAh00``AAl000000001AAj1201201201201020120120100`201201201201","f":"````{b{{b{c}}}{}}{{{b{d}}}{{b{dc}}}{}}`{fh}{{}h}``{{{b{h}}{b{dj}}}l}{cc{}}{{}c{}}{{{b{dh}}{b{n}}{Ab{A`}}}Ad}4`{{{b{dh}}Af}Ad}{{{b{dh}}{Ah{Af}}}Ad}10{c{{Aj{e}}}{}{}}{{}{{Aj{c}}}{}}{bAl}``````{An{{Aj{B`Bb}}}}{{{b{h}}AnBd}{{Aj{B`Bb}}}}`````````````````````````````````````````````````````````````````````````````````````````>={{{b{Bb}}}Bb}{{b{b{dc}}}Ad{}}{{bBf}Ad}{{}Bb}{{{b{Bb}}{b{Bb}}}Bh}{{{b{Bb}}{b{dj}}}l}?{BjBb}{BlBb}{{{b{Bn}}}Bb}{BnBb}{{}c{}}{bc{}}{c{{Aj{e}}}{}{}}{{}{{Aj{c}}}{}}{bAl}```{{{C`{c}}Cb}eCd{}}{b{{b{c}}}{}}{{{b{d}}}{{b{dc}}}{}}{{{b{{C`{c}}}}}{{C`{c}}}{CfCd}}{{b{b{dc}}}Ad{}}{{bBf}Ad}{{{b{{C`{c}}}}{b{dj}}}l{ChCd}}{Cb{{C`{c}}}Cd}{cc{}}{{{b{Cj}}{C`{c}}}{{Aj{{b{c}}Bb}}}Cd}{{{b{Cj}}{C`{Cl}}Cn}{{Aj{{Ah{D`}}Bb}}}}{{{b{Cj}}{C`{c}}Cb}{{Aj{{b{{Db{c}}}}Bb}}}Cd}{{}c{}}{{{b{{C`{c}}}}}BhCd}{{{b{dCj}}{C`{c}}}{{Aj{{b{dc}}Bb}}}Cd}{{{b{dCj}}{C`{Dd}}Cn}{{Aj{{Ah{Df}}Bb}}}}{{{b{dCj}}{C`{c}}Cb}{{Aj{{b{d{Db{c}}}}Bb}}}Cd}{{{C`{c}}Cb}eCd{}}{bc{}}{c{{Aj{e}}}{}{}}{{}{{Aj{c}}}{}}{bAl}{{{b{dCj}}{C`{c}}c}{{Aj{AdBb}}}Cd}````````````````````````````{b{{b{c}}}{}}00000000{{{b{d}}}{{b{dc}}}{}}00000000{{{b{Dh}}}Dh}{{{b{Dj}}}Dj}{{{b{Dl}}}Dl}{{{b{Dn}}}Dn}{{{b{E`}}}E`}{{{b{Eb}}}Eb}{{{b{Ed}}}Ed}{{{b{Ef}}}Ef}{{b{b{dc}}}Ad{}}0000000{{bBf}Ad}0000000{{}Dh}{{}Dj}{{}Dl}{{}Dn}{{{b{Dl}}{b{Dl}}}Bh}``{{{b{Dh}}{b{dj}}}l}{{{b{Dj}}{b{dj}}}l}{{{b{Dl}}{b{dj}}}l}{{{b{Dn}}{b{dj}}}l}{{{b{E`}}{b{dj}}}l}{{{b{Eb}}{b{dj}}}l}{{{b{Ed}}{b{dj}}}l}{{{b{Ef}}{b{dj}}}l}{{{b{Eh}}{b{dj}}}l}{cc{}}000000{{{b{Ej}}}{{Aj{EfBb}}}}11{{{b{{Db{Ej}}}}}{{Aj{EhBb}}}}`{{}c{}}00000000```{{{b{dEb}}El}Ad}0`````````{bc{}}0000000{c{{Aj{e}}}{}{}}00000000{{}{{Aj{c}}}{}}00000000`{bAl}00000000````{{{b{dEn}}}{{F`{En}}}}{{{b{dEn}}Fb}{{F`{Ad}}}}{{{b{dEn}}{Fd{{b{{Db{Bf}}}}}}}{{F`{Ad}}}}{b{{b{c}}}{}}{{{b{d}}}{{b{dc}}}{}}3{{{b{En}}}{{F`{{Fd{{Ah{Bf}}}}}}}}{{{b{En}}}{{Aj{FfBb}}}}{{{b{En}}{b{dj}}}l}{cc{}}{{FhDn}{{F`{En}}}}{{FjDn}{{F`{En}}}}{{{b{dEn}}}{{F`{Fb}}}}{{{b{En}}}Bh}1{{{b{En}}}{{F`{Bh}}}}{{{b{dEn}}}{{F`{{Fd{Bn}}}}}}{{{b{En}}}Cb}{{{b{dEn}}}{{Fd{Fl}}}}4{{{b{dEn}}}Cb}1{{{b{En}}}{{Fn{DhDj}}}}{{}c{}}{{{b{dEn}}G`}{{F`{Ad}}}}{Dn{{F`{En}}}}{{{b{En}}{b{d{Db{Df}}}}Gb}{{F`{{Fn{CbBh}}}}}}{{{b{En}}{b{d{Db{Df}}}}Gb}{{F`{{Fn{CbBh{Fd{Fb}}}}}}}}{{{b{En}}{b{{Db{D`}}}}Gb}{{F`{Cb}}}}{{{b{En}}{b{{Db{D`}}}}FbGb}{{F`{Cb}}}}{{{b{dEn}}Bh}{{F`{Ad}}}}{{{b{dEn}}Cb}{{F`{Ad}}}}{{{b{dEn}}{Fd{Fl}}}{{F`{Ad}}}}210{{{b{dEn}}Gd}{{F`{Ad}}}}`{{{b{dEn}}}Ad}{c{{Aj{e}}}{}{}}{{}{{Aj{c}}}{}}{bAl}``````````````````````````````````````````````````````````````````````````{b{{b{c}}}{}}0000000000000000000{{{b{d}}}{{b{dc}}}{}}0000000000000000000```````{{{b{Dd}}}Dd}{{{b{Cl}}}Cl}{{{b{Gf}}}Gf}{{{b{Gh}}}Gh}{{{b{Gj}}}Gj}{{{b{Gl}}}Gl}{{{b{Gn}}}Gn}{{{b{H`}}}H`}{{{b{Hb}}}Hb}{{{b{Hd}}}Hd}{{{b{Hf}}}Hf}{{{b{Ej}}}Ej}{{{b{Hh}}}Hh}{{{b{Hj}}}Hj}{{{b{Hl}}}Hl}{{{b{Hn}}}Hn}{{{b{I`}}}I`}{{{b{Ib}}}Ib}{{{b{Id}}}Id}{{{b{If}}}If}{{b{b{dc}}}Ad{}}0000000000000000000{{bBf}Ad}0000000000000000000````````````````{{{b{Dd}}{b{dj}}}l}{{{b{Cl}}{b{dj}}}l}{{{b{Gf}}{b{dj}}}l}{{{b{Gh}}{b{dj}}}l}{{{b{Gj}}{b{dj}}}l}{{{b{Gl}}{b{dj}}}l}{{{b{Gn}}{b{dj}}}l}{{{b{H`}}{b{dj}}}l}{{{b{Hb}}{b{dj}}}l}{{{b{Hd}}{b{dj}}}l}{{{b{Hf}}{b{dj}}}l}{{{b{Ej}}{b{dj}}}l}{{{b{Hh}}{b{dj}}}l}{{{b{Hj}}{b{dj}}}l}{{{b{Hl}}{b{dj}}}l}{{{b{Hn}}{b{dj}}}l}{{{b{I`}}{b{dj}}}l}{{{b{Ib}}{b{dj}}}l}{{{b{Id}}{b{dj}}}l}{cc{}}00{{{b{Ih}}}Gf}1{{{b{Ff}}}Gh}{FfGh}{{{Fn{B`Ij}}}Gj}4{IjGj}555555555555555``````{{}c{}}0000000000000000000`````````````````{bc{}}0000000000000000000{c{{Aj{e}}}{}{}}0000000000000000000{{}{{Aj{c}}}{}}0000000000000000000```{bAl}0000000000000000000`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````{{}Il}{{}In}{{}J`}{{}Jb}{{}Jd}{{}Jf}{{}Jh}{{}Jj}`{{IlIl}Il}{{InIn}In}{{J`J`}J`}{{JbJb}Jb}{{JdJd}Jd}{{JfJf}Jf}{{JhJh}Jh}{{JjJj}Jj}{{{b{dIl}}Il}Ad}{{{b{dIn}}In}Ad}{{{b{dJ`}}J`}Ad}{{{b{dJb}}Jb}Ad}{{{b{dJd}}Jd}Ad}{{{b{dJf}}Jf}Ad}{{{b{dJh}}Jh}Ad}{{{b{dJj}}Jj}Ad}?>=<;:9876543210{{{b{Il}}}Jl}0{{{b{In}}}Jn}0{{{b{J`}}}K`}0{{{b{Jb}}}Kb}0{{{b{Jd}}}Kd}0{{{b{Jf}}}Kf}0{{{b{Jh}}}Kh}0{{{b{Jj}}}Kj}0{{IlIl}Il}{{InIn}In}{{J`J`}J`}{{JbJb}Jb}{{JdJd}Jd}{{JfJf}Jf}{{JhJh}Jh}{{JjJj}Jj}{{{b{dIl}}Il}Ad}{{{b{dIn}}In}Ad}{{{b{dJ`}}J`}Ad}{{{b{dJb}}Jb}Ad}{{{b{dJd}}Jd}Ad}{{{b{dJf}}Jf}Ad}{{{b{dJh}}Jh}Ad}{{{b{dJj}}Jj}Ad}{b{{b{c}}}{}}0000000000000{{{b{d}}}{{b{dc}}}{}}0000000000000{{{b{Jh}}Jh}{{Aj{AdBb}}}}{{{b{Ff}}}Ff}{{{b{Ij}}}Ij}{{{b{Kl}}}Kl}{{{b{Il}}}Il}{{{b{Jf}}}Jf}{{{b{Jh}}}Jh}{{{b{Kn}}}Kn}{{b{b{dc}}}Ad{}}000000{{bBf}Ad}000000{IlIl}{InIn}{J`J`}{JbJb}{JdJd}{JfJf}{JhJh}{JjJj}{{{b{Il}}Il}Bh}{{{b{In}}In}Bh}{{{b{J`}}J`}Bh}{{{b{Jb}}Jb}Bh}{{{b{Jd}}Jd}Bh}{{{b{Jf}}Jf}Bh}{{{b{Jh}}Jh}Bh}{{{b{Jj}}Jj}Bh}`{{}Jh}{{IlIl}Il}{{InIn}In}{{J`J`}J`}{{JbJb}Jb}{{JdJd}Jd}{{JfJf}Jf}{{JhJh}Jh}{{JjJj}Jj}8{{}Il}{{}In}{{}J`}{{}Jb}{{}Jd}{{}Jf}>{{}Jj}{{{b{Ij}}{b{Ij}}}Bh}{{{b{Kl}}{b{Kl}}}Bh}{{{b{In}}{b{In}}}Bh}{{{b{dIl}}c}Ad{{Lb{}{{L`{Il}}}}}}{{{b{dIn}}c}Ad{{Lb{}{{L`{In}}}}}}{{{b{dJ`}}c}Ad{{Lb{}{{L`{J`}}}}}}{{{b{dJb}}c}Ad{{Lb{}{{L`{Jb}}}}}}{{{b{dJd}}c}Ad{{Lb{}{{L`{Jd}}}}}}{{{b{dJf}}c}Ad{{Lb{}{{L`{Jf}}}}}}{{{b{dJh}}c}Ad{{Lb{}{{L`{Jh}}}}}}{{{b{dJj}}c}Ad{{Lb{}{{L`{Jj}}}}}}{{{b{d{A`{}{{Ld{c}}}}}}c}{{Aj{AdBb}}}Cd}{{{b{dLf}}LhLhKn}{{Aj{AdBb}}}}{{}Jh}{{{b{dLf}}LhLh}{{Aj{AdBb}}}}{{{b{dLf}}}{{Aj{AdBb}}}}{{{b{Lj}}}{{Aj{FfBb}}}}{{{b{dLj}}Il}{{Aj{AdBb}}}}{{{b{dLj}}JhJh}{{Aj{AdBb}}}}{{{b{Lj}}}{{Aj{IjBb}}}}{{{b{dLj}}Lh}{{Aj{AdBb}}}}{{{b{dLj}}BdBdLl}{{Aj{AdBb}}}}{{{b{dLf}}{b{d{Db{Df}}}}Lh}{{Aj{CbBb}}}}{{{b{dLf}}{b{{Db{D`}}}}Lh}{{Aj{CbBb}}}}{{{b{dLf}}{b{d{Db{Df}}}}}{{Aj{CbBb}}}}{{{b{Ln}}Cb{b{d{Db{Bf}}}}}{{Aj{CbBb}}}}{{{b{dLf}}M`Mb}{{Aj{LhBb}}}};{{{b{dLf}}}{{Aj{LhBb}}}}{{{b{dLf}}{b{{Db{D`}}}}}{{Aj{CbBb}}}}````{{{b{Ff}}{b{dj}}}l}{{{b{Ij}}{b{dj}}}l}{{{b{Kl}}{b{dj}}}l}{{{b{Il}}{b{dj}}}l}0000{{{b{In}}{b{dj}}}l}000{{{b{J`}}{b{dj}}}l}000{{{b{Jb}}{b{dj}}}l}000{{{b{Jd}}{b{dj}}}l}000{{{b{Jf}}{b{dj}}}l}0000{{{b{Jh}}{b{dj}}}l}0000{{{b{Jj}}{b{dj}}}l}000{{{b{Kn}}{b{dj}}}l}{cc{}}0000000000000{Jl{{Fd{Il}}}}{Jn{{Fd{In}}}}{K`{{Fd{J`}}}}{Kb{{Fd{Jb}}}}{Kd{{Fd{Jd}}}}{Kf{{Fd{Jf}}}}{Kh{{Fd{Jh}}}}{Kj{{Fd{Jj}}}}{JlIl}0{JnIn}0{K`J`}0{KbJb}0{KdJd}0{KfJf}0{KhJh}0{KjJj}076543210{cIl{{Lb{}{{L`{Il}}}}}}{cIn{{Lb{}{{L`{In}}}}}}{cJ`{{Lb{}{{L`{J`}}}}}}{cJb{{Lb{}{{L`{Jb}}}}}}{cJd{{Lb{}{{L`{Jd}}}}}}{cJf{{Lb{}{{L`{Jf}}}}}}{cJh{{Lb{}{{L`{Jh}}}}}}{cJj{{Lb{}{{L`{Jj}}}}}}{{{b{n}}}{{Fd{Il}}}}{{{b{n}}}{{Fd{In}}}}{{{b{n}}}{{Fd{J`}}}}{{{b{n}}}{{Fd{Jb}}}}{{{b{n}}}{{Fd{Jd}}}}{{{b{n}}}{{Fd{Jf}}}}{{{b{n}}}{{Fd{Jh}}}}{{{b{n}}}{{Fd{Jj}}}}``{{{b{{A`{}{{Ld{c}}}}}}Cb}{{Aj{{b{Ln}}Bb}}}Cd}{{{b{{A`{}{{Ld{c}}}}}}Cb}{{Aj{{b{Lf}}Bb}}}Cd}{{{b{{A`{}{{Ld{c}}}}}}Cb}{{Aj{{b{Lj}}Bb}}}Cd}{{{b{d{A`{}{{Ld{c}}}}}}Cb}{{Aj{{b{dLn}}Bb}}}Cd}{{{b{d{A`{}{{Ld{c}}}}}}Cb}{{Aj{{b{dLf}}Bb}}}Cd}{{{b{d{A`{}{{Ld{c}}}}}}Cb}{{Aj{{b{dLj}}Bb}}}Cd}{{{b{Ln}}B`}{{Aj{{Ah{{Fn{AfB`Kl}}}}Bb}}}}```{{{b{dIl}}Il}Ad}{{{b{dIn}}In}Ad}{{{b{dJ`}}J`}Ad}{{{b{dJb}}Jb}Ad}{{{b{dJd}}Jd}Ad}{{{b{dJf}}Jf}Ad}{{{b{dJh}}Jh}Ad}{{{b{dJj}}Jj}Ad}{{IlIl}Il}{{InIn}In}{{J`J`}J`}{{JbJb}Jb}{{JdJd}Jd}{{JfJf}Jf}{{JhJh}Jh}{{JjJj}Jj}{{{b{Il}}Il}Bh}{{{b{In}}In}Bh}{{{b{J`}}J`}Bh}{{{b{Jb}}Jb}Bh}{{{b{Jd}}Jd}Bh}{{{b{Jf}}Jf}Bh}{{{b{Jh}}Jh}Bh}{{{b{Jj}}Jj}Bh}{{}c{}}0000000000000{Ilc{}}{Inc{}}{J`c{}}{Jbc{}}{Jdc{}}{Jfc{}}{Jhc{}}{Jjc{}}{{{b{Il}}}Bh}{{{b{In}}}Bh}{{{b{J`}}}Bh}{{{b{Jb}}}Bh}{{{b{Jd}}}Bh}{{{b{Jf}}}Bh}{{{b{Jh}}}Bh}{{{b{Jj}}}Bh}76543210{{{b{Il}}}{{Md{Il}}}}{{{b{In}}}{{Md{In}}}}{{{b{J`}}}{{Md{J`}}}}{{{b{Jb}}}{{Md{Jb}}}}{{{b{Jd}}}{{Md{Jd}}}}{{{b{Jf}}}{{Md{Jf}}}}{{{b{Jh}}}{{Md{Jh}}}}{{{b{Jj}}}{{Md{Jj}}}}{{{b{Il}}}{{Mf{Il}}}}{{{b{In}}}{{Mf{In}}}}{{{b{J`}}}{{Mf{J`}}}}{{{b{Jb}}}{{Mf{Jb}}}}{{{b{Jd}}}{{Mf{Jd}}}}{{{b{Jf}}}{{Mf{Jf}}}}{{{b{Jh}}}{{Mf{Jh}}}}{{{b{Jj}}}{{Mf{Jj}}}}````{IlIl}{InIn}{J`J`}{JbJb}{JdJd}{JfJf}{JhJh}{JjJj}{{{b{d{A`{}{{Ld{c}}}}}}c{b{n}}}{{Aj{AdBb}}}Cd}{{{b{{A`{}{{Ld{c}}}}}}c{b{n}}Bh}{{Aj{IjBb}}}Cd}{{{b{d{A`{}{{Ld{c}}}}}}c{b{n}}c{b{n}}}{{Aj{AdBb}}}Cd}{{{b{d{A`{}{{Ld{c}}}}}}c{b{n}}JfJhJhIl}{{Aj{cBb}}}Cd}313{{{b{dIl}}Il}Ad}{{{b{dIn}}In}Ad}{{{b{dJ`}}J`}Ad}{{{b{dJb}}Jb}Ad}{{{b{dJd}}Jd}Ad}{{{b{dJf}}Jf}Ad}{{{b{dJh}}Jh}Ad}{{{b{dJj}}Jj}Ad}{{{b{dIl}}IlBh}Ad}{{{b{dIn}}InBh}Ad}{{{b{dJ`}}J`Bh}Ad}{{{b{dJb}}JbBh}Ad}{{{b{dJd}}JdBh}Ad}{{{b{dJf}}JfBh}Ad}{{{b{dJh}}JhBh}Ad}{{{b{dJj}}JjBh}Ad}`{{IlIl}Il}{{InIn}In}{{J`J`}J`}{{JbJb}Jb}{{JdJd}Jd}{{JfJf}Jf}{{JhJh}Jh}{{JjJj}Jj}{{{b{dIl}}Il}Ad}{{{b{dIn}}In}Ad}{{{b{dJ`}}J`}Ad}{{{b{dJb}}Jb}Ad}{{{b{dJd}}Jd}Ad}{{{b{dJf}}Jf}Ad}{{{b{dJh}}Jh}Ad}{{{b{dJj}}Jj}Ad}?>=<;:98{bc{}}00000087654321{c{{Aj{e}}}{}{}}0000000000000{{}{{Aj{c}}}{}}0000000000000{bAl}0000000000000{{IlIl}Il}{{InIn}In}{{J`J`}J`}{{JbJb}Jb}{{JdJd}Jd}{{JfJf}Jf}{{JhJh}Jh}{{JjJj}Jj}```{{{b{dMh}}{b{c}}Cb}{{Aj{AdBb}}}{{Ml{Mj}}}}{b{{b{c}}}{}}0{{{b{d}}}{{b{dc}}}{}}0{{{b{dMn}}}Cb}{{{b{dMh}}}Cb}{CbMn}{CbMh}{{{b{dMn}}}{{Aj{CbBb}}}}{{{b{dMn}}}Ad}{{{b{dMh}}}Ad}{{{b{Mn}}}{{Aj{FfBb}}}}{{{b{Mh}}}{{Aj{FfBb}}}}{{{b{Mn}}}{{Aj{IjBb}}}}{{{b{Mh}}}{{Aj{IjBb}}}}{{{b{dMn}}Lh}{{Aj{AdBb}}}}{{{b{dMh}}Lh}{{Aj{AdBb}}}}{{{b{dMn}}BdBdLl}{{Aj{AdBb}}}}{{{b{dMh}}BdBdLl}{{Aj{AdBb}}}}{{{b{dMn}}{b{d{Db{Df}}}}Lh}{{Aj{CbBb}}}}{{{b{dMn}}{b{{Db{D`}}}}Lh}{{Aj{CbBb}}}}{{{b{dMn}}{b{d{Db{Df}}}}}{{Aj{CbBb}}}}{{{b{dMn}}M`Mb}{{Aj{LhBb}}}}{{{b{dMn}}}{{Aj{LhBb}}}}{{{b{dMn}}{b{{Db{D`}}}}}{{Aj{CbBb}}}}{{{b{Mh}}{b{c}}}{{Fd{Cb}}}{{Ml{Mj}}}}{{{b{Mn}}{b{dj}}}l}{{{b{Mh}}{b{dj}}}l}{cc{}}{{{Ah{Bf}}}Mn}1{{{b{Mh}}B`}{{Aj{{Ah{{Fn{AfB`Kl}}}}Bb}}}}{{{b{dMn}}}{{Aj{CbBb}}}}{{}c{}}0{{{b{Mh}}}Bh}{{{b{Mn}}}Bh}1{{{b{dMh}}{b{c}}Cb}{{Aj{AdBb}}}{{Ml{Mj}}}}{{{b{dMh}}}Ad}{{{b{dMn}}}Ad}1{{{b{dMh}}{b{c}}}{{Aj{AdBb}}}{{Ml{Mj}}}}{{{b{dMn}}Cb}Ad}{c{{Aj{e}}}{}{}}0{{}{{Aj{c}}}{}}0{bAl}04```````````````{{{b{dN`}}{b{c}}Cb}{{Aj{AdBb}}}{{Ml{Mj}}}}{b{{b{c}}}{}}00000000{{{b{d}}}{{b{dc}}}{}}00000000{{{b{dN`}}}Cb}{{{b{dNb}}}Cb}{CbN`}{CbNb}{{{b{d{Nd{ce}}}}Cb{b{g}}}{{Aj{CbBb}}}N`Nb{{Ml{Mj}}}}{{{b{d{Nd{ce}}}}Cb{b{g}}e}{{Aj{CbBb}}}N`Nb{{Ml{Mj}}}}1{{{b{dNb}}}{{Aj{CbBb}}}}{{}{{Nd{ce}}}N`Nb}`{{{b{d{Nd{ce}}}}g}{{Aj{AdBb}}}N`Nb{}}{{{b{dNf}}c}{{Aj{AdBb}}}{}}`{{{b{d{Nh{c}}}}LhLhKn}{{Aj{AdBb}}}Nj}{{{b{d{Nl{c}}}}LhLhKn}{{Aj{AdBb}}}Nn}{{{b{dO`}}LhLhKn}{{Aj{AdBb}}}}{{{b{d{Nh{c}}}}LhLh}{{Aj{AdBb}}}Nj}{{{b{d{Nl{c}}}}LhLh}{{Aj{AdBb}}}Nn}{{{b{dO`}}LhLh}{{Aj{AdBb}}}}{{{b{d{Nh{c}}}}}{{Aj{AdBb}}}Nj}{{{b{d{Nl{c}}}}}{{Aj{AdBb}}}Nn}{{{b{dO`}}}{{Aj{AdBb}}}}{{{b{{Ob{ce}}}}}{{Aj{FfBb}}}N`Nb}{{{b{Od}}}{{Aj{FfBb}}}}{{{b{{Nh{c}}}}}{{Aj{FfBb}}}Nj}{{{b{{Nl{c}}}}}{{Aj{FfBb}}}Nn}{{{b{Of}}}{{Aj{FfBb}}}}{{{b{O`}}}{{Aj{FfBb}}}}{{{b{d{Ob{ce}}}}Il}{{Aj{AdBb}}}N`Nb}{{{b{dOd}}Il}{{Aj{AdBb}}}}{{{b{d{Nh{c}}}}Il}{{Aj{AdBb}}}Nj}{{{b{d{Nl{c}}}}Il}{{Aj{AdBb}}}Nn}{{{b{dOf}}Il}{{Aj{AdBb}}}}{{{b{dO`}}Il}{{Aj{AdBb}}}}{{{b{d{Ob{ce}}}}JhJh}{{Aj{AdBb}}}N`Nb}{{{b{dOd}}JhJh}{{Aj{AdBb}}}}{{{b{d{Nh{c}}}}JhJh}{{Aj{AdBb}}}Nj}{{{b{d{Nl{c}}}}JhJh}{{Aj{AdBb}}}Nn}{{{b{dOf}}JhJh}{{Aj{AdBb}}}}{{{b{dO`}}JhJh}{{Aj{AdBb}}}}{{{b{{Ob{ce}}}}}{{Aj{IjBb}}}N`Nb}{{{b{Od}}}{{Aj{IjBb}}}}{{{b{{Nh{c}}}}}{{Aj{IjBb}}}Nj}{{{b{{Nl{c}}}}}{{Aj{IjBb}}}Nn}{{{b{Of}}}{{Aj{IjBb}}}}{{{b{O`}}}{{Aj{IjBb}}}}{{{b{d{Ob{ce}}}}Lh}{{Aj{AdBb}}}N`Nb}{{{b{dOd}}Lh}{{Aj{AdBb}}}}{{{b{d{Nh{c}}}}Lh}{{Aj{AdBb}}}Nj}{{{b{d{Nl{c}}}}Lh}{{Aj{AdBb}}}Nn}{{{b{dOf}}Lh}{{Aj{AdBb}}}}{{{b{dO`}}Lh}{{Aj{AdBb}}}}{{{b{d{Ob{ce}}}}BdBdLl}{{Aj{AdBb}}}N`Nb}{{{b{dOd}}BdBdLl}{{Aj{AdBb}}}}{{{b{d{Nh{c}}}}BdBdLl}{{Aj{AdBb}}}Nj}{{{b{d{Nl{c}}}}BdBdLl}{{Aj{AdBb}}}Nn}{{{b{dOf}}BdBdLl}{{Aj{AdBb}}}}{{{b{dO`}}BdBdLl}{{Aj{AdBb}}}}{{{b{d{Nh{c}}}}{b{d{Db{Df}}}}Lh}{{Aj{CbBb}}}Nj}{{{b{d{Nl{c}}}}{b{d{Db{Df}}}}Lh}{{Aj{CbBb}}}Nn}{{{b{dO`}}{b{d{Db{Df}}}}Lh}{{Aj{CbBb}}}}{{{b{d{Nh{c}}}}{b{{Db{D`}}}}Lh}{{Aj{CbBb}}}Nj}{{{b{d{Nl{c}}}}{b{{Db{D`}}}}Lh}{{Aj{CbBb}}}Nn}{{{b{dO`}}{b{{Db{D`}}}}Lh}{{Aj{CbBb}}}}{{{b{d{Nh{c}}}}{b{d{Db{Df}}}}}{{Aj{CbBb}}}Nj}{{{b{d{Nl{c}}}}{b{d{Db{Df}}}}}{{Aj{CbBb}}}Nn}{{{b{dO`}}{b{d{Db{Df}}}}}{{Aj{CbBb}}}}{{{b{d{Nh{c}}}}M`Mb}{{Aj{LhBb}}}Nj}{{{b{d{Nl{c}}}}M`Mb}{{Aj{LhBb}}}Nn}{{{b{dO`}}M`Mb}{{Aj{LhBb}}}}{{{b{d{Nh{c}}}}}{{Aj{AdBb}}}Nj}{{{b{d{Nl{c}}}}}{{Aj{AdBb}}}Nn}{{{b{dO`}}}{{Aj{AdBb}}}}{{{b{d{Nh{c}}}}}{{Aj{LhBb}}}Nj}{{{b{d{Nl{c}}}}}{{Aj{LhBb}}}Nn}{{{b{dO`}}}{{Aj{LhBb}}}}{{{b{d{Nh{c}}}}{b{{Db{D`}}}}}{{Aj{CbBb}}}Nj}{{{b{d{Nl{c}}}}{b{{Db{D`}}}}}{{Aj{CbBb}}}Nn}{{{b{dO`}}{b{{Db{D`}}}}}{{Aj{CbBb}}}}`{{{b{N`}}{b{c}}}{{Fd{Cb}}}{{Ml{Mj}}}}{{{b{{Nd{ce}}}}Cb{b{g}}}{{Aj{CbBb}}}N`Nb{{Ml{Mj}}}}`{{{b{Of}}{b{dj}}}l}{{{b{O`}}{b{dj}}}l}{cc{}}000{c{{Nh{c}}}Nj}11{c{{Nl{c}}}Nn}222{{{b{Nf}}{b{c}}}{{Aj{OhBb}}}{{Ml{Mj}}}}{{{b{Of}}{b{c}}}{{Aj{OhBb}}}{{Ml{Mj}}}}{{{b{{Nd{ce}}}}Cb}{{Aj{{b{Ln}}Bb}}}N`Nb}{{{b{Nf}}Cb}{{Aj{{b{Ln}}Bb}}}}{{{b{{Oj{ceg}}}}Cb}{{Aj{{b{Ln}}Bb}}}NnNjNj}{{{b{{Nd{ce}}}}Cb}{{Aj{{b{Lf}}Bb}}}N`Nb}{{{b{Nf}}Cb}{{Aj{{b{Lf}}Bb}}}}{{{b{{Oj{ceg}}}}Cb}{{Aj{{b{Lf}}Bb}}}NnNjNj}{{{b{{Nd{ce}}}}Cb}{{Aj{{b{Lj}}Bb}}}N`Nb}{{{b{Nf}}Cb}{{Aj{{b{Lj}}Bb}}}}{{{b{{Oj{ceg}}}}Cb}{{Aj{{b{Lj}}Bb}}}NnNjNj}{{{b{d{Nd{ce}}}}Cb}{{Aj{{b{dLn}}Bb}}}N`Nb}{{{b{dNf}}Cb}{{Aj{{b{dLn}}Bb}}}}{{{b{d{Oj{ceg}}}}Cb}{{Aj{{b{dLn}}Bb}}}NnNjNj}{{{b{d{Nd{ce}}}}Cb}{{Aj{{b{dLf}}Bb}}}N`Nb}{{{b{dNf}}Cb}{{Aj{{b{dLf}}Bb}}}}{{{b{d{Oj{ceg}}}}Cb}{{Aj{{b{dLf}}Bb}}}NnNjNj}{{{b{d{Nd{ce}}}}Cb}{{Aj{{b{dLj}}Bb}}}N`Nb}{{{b{dNf}}Cb}{{Aj{{b{dLj}}Bb}}}}{{{b{d{Oj{ceg}}}}Cb}{{Aj{{b{dLj}}Bb}}}NnNjNj}{{{b{Of}}B`}{{Aj{{Ah{{Fn{AfB`Kl}}}}Bb}}}}{{{b{dNb}}}{{Aj{CbBb}}}}{{}c{}}00000000{{{b{N`}}}Bh}0{{{b{Nb}}}Bh}{{{b{dN`}}{b{c}}Cb}{{Aj{AdBb}}}{{Ml{Mj}}}}{{{b{dN`}}}Ad}{{}{{Nd{ce}}}N`Nb}{Oh{{F`{Nf}}}}{{ceg}{{Oj{ceg}}}NnNjNj}3{{{b{dNb}}}Ad}{{{b{d{Nd{ce}}}}g{b{n}}}{{Aj{AdBb}}}N`Nb{}}{{{b{dNf}}c{b{n}}}{{Aj{AdBb}}}{}}{{{b{d{Oj{ceg}}}}Cb{b{n}}}{{Aj{AdBb}}}NnNjNj}{{{b{{Nd{ce}}}}g{b{n}}Bh}{{Aj{IjBb}}}N`Nb{}}{{{b{Nf}}c{b{n}}Bh}{{Aj{IjBb}}}{}}{{{b{{Oj{ceg}}}}Cb{b{n}}Bh}{{Aj{IjBb}}}NnNjNj}{{{b{d{Nd{ce}}}}Cb{b{n}}Cb{b{n}}}{{Aj{AdBb}}}N`Nb}{{{b{dNf}}c{b{n}}c{b{n}}}{{Aj{AdBb}}}{}}{{{b{d{Oj{ceg}}}}i{b{n}}i{b{n}}}{{Aj{AdBb}}}NnNjNj{}}{{{b{d{Nd{ce}}}}g{b{n}}JfJhJhIl}{{Aj{CbBb}}}N`Nb{}}{{{b{dNf}}c{b{n}}JfJhJhIl}{{Aj{cBb}}}{}}{{{b{d{Oj{ceg}}}}Cb{b{n}}JfJhJhIl}{{Aj{iBb}}}NnNjNj{}};:95{{{b{dNf}}Cb{b{n}}Cb{b{n}}}{{Aj{AdBb}}}}{{{b{d{Oj{ceg}}}}Cb{b{n}}Cb{b{n}}}{{Aj{AdBb}}}NnNjNj}=<{{{b{d{Oj{ceg}}}}i{b{n}}}{{Aj{AdBb}}}NnNjNj{}}`{{{b{dN`}}{b{c}}}{{Aj{AdBb}}}{{Ml{Mj}}}}`{{{b{dNb}}Cb}Ad}{c{{Aj{e}}}{}{}}00000000{{}{{Aj{c}}}{}}00000000{bAl}000000004```````{b{{b{c}}}{}}0{{{b{d}}}{{b{dc}}}{}}0{{{b{df}}CbLhLhOl}{{Aj{AdBb}}}}{{{b{df}}Cb}{{Aj{AdBb}}}}{{{b{df}}Cb}{{Aj{AfBb}}}}{{{b{df}}CbCb}{{Aj{AdBb}}}}{{{b{f}}{b{dj}}}l}{{{b{On}}{b{dj}}}l}{cc{}}0{{{b{f}}Cb}{{Aj{{b{Ln}}Bb}}}}{{{b{f}}Cb}{{Aj{{b{Lf}}Bb}}}}{{{b{f}}Cb}{{Aj{{b{Lj}}Bb}}}}{{{b{df}}Cb}{{Aj{{b{dLn}}Bb}}}}{{{b{df}}Cb}{{Aj{{b{dLf}}Bb}}}}{{{b{df}}Cb}{{Aj{{b{dLj}}Bb}}}}{{{b{df}}Cb}{{Aj{{b{dEn}}Bb}}}}{{{b{f}}Cb}{{Aj{{b{En}}Bb}}}}{{{b{df}}En}{{Aj{CbBb}}}}{{}c{}}0{{{b{On}}}Bh}0{{{b{df}}{b{n}}{Ab{A`}}}Ad}{{}f}{{{Oj{ceg}}}f{NnA@`A@b}{NjA@`A@b}{NjA@`A@b}}{{{b{df}}Cb{b{n}}}{{Aj{AdBb}}}}{{{b{f}}Cb{b{n}}Bh}{{Aj{{Fn{B`Ij}}Bb}}}}{{{b{df}}Cb{b{n}}JfJhJhIl}{{Aj{CbBb}}}}2{{{b{df}}Cb{b{n}}Cb{b{n}}}{{Aj{AdBb}}}}3{c{{Aj{e}}}{}{}}0{{}{{Aj{c}}}{}}0{bAl}0``{{{b{dA@d}}}{{Aj{AdBb}}}}``{{{b{h}}{b{dc}}{C`{Cn}}{C`{Bf}}}{{Aj{AdBb}}}Cj}{{{b{h}}{b{dc}}{C`{Cn}}{C`{Cn}}}{{Aj{AdBb}}}Cj}``{{{b{dh}}{b{dc}}An{C`{Bd}}}{{Aj{AdBb}}}Cj}{{{b{h}}{b{dc}}AnBd{C`{Bd}}}{{Aj{AdBb}}}Cj}32{{{b{dh}}{b{dc}}A@fLhLhOl}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@fLhLh}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f}{{Aj{AdBb}}}Cj}0{{{b{dh}}{b{dc}}A@f{C`{Gh}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@fJl}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@fKhKh}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f{C`{Gj}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@fLh}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@fBdBdLl}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f{C`{Dd}}CnLh{C`{Cn}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f{C`{Bf}}Cn}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f{C`{Id}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f{C`{Cl}}CnLh{C`{Cn}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f{C`{Dd}}Cn{C`{Cn}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f{C`{Bf}}CnA@h{C`{Cn}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@fA@f}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@fM`Mb{C`{Lh}}}{{Aj{AdBb}}}Cj}>{{{b{dh}}{b{dc}}A@f{C`{Lh}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f{C`{Cl}}Cn{C`{Cn}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{c}}A@f{C`{Bf}}Cn}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@fKj{C`{Bf}}Cn{C`{Gj}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@fKj{C`{Bf}}CnBdBdLl}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@fKj{C`{Bf}}CnA@f{C`{Bf}}Cn}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@fKj{C`{Bf}}CnKfKhKhJl{C`{A@f}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f{C`{Bf}}Cn{C`{Bf}}Cn{C`{Cn}}}{{Aj{AdBb}}}Cj}5{{{b{dh}}{b{c}}A@f{C`{Bf}}CnA@f{C`{Bf}}Cn}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}{C`{Bf}}CnA@f{C`{Bf}}Cn}{{Aj{AdBb}}}Cj}7{{{b{dh}}{b{dc}}A@j}AdCj}{{{b{dh}}{b{dc}}A@l}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}{C`{Bf}}Cn}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}}{{Aj{AdBb}}}A@d}{{{b{dh}}{b{dc}}{C`{Ej}}{C`{Gn}}Cn{C`{Cn}}}{{Aj{AdBb}}}Cj}`{{{b{dh}}{b{dc}}A@f{C`{A@f}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{c}}A@f{C`{Hh}}G`}{{Aj{AdBb}}}Cj}0{{{b{dh}}{b{dc}}A@f{C`{Hh}}{C`{G`}}{C`{G`}}}{{Aj{AdBb}}}Cj}0{{{b{dh}}{b{dc}}A@fA@nAA`{C`{AAb}}{C`{Cn}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@fG`}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}{C`{Bf}}CnAAd{C`{Bf}}Cn{C`{Cn}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}AAdAAf{C`{A@f}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f{C`{Dd}}CnKb{C`{Cn}}{C`{Kd}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f{C`{Dd}}Cn{C`{Hh}}Kb{C`{G`}}{C`{Cn}}{C`{Kd}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f{C`{Cl}}CnK`{C`{Cn}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@f{C`{Cl}}Cn{C`{Hh}}G`K`{C`{Cn}}}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{c}}A@fA@nAA`{C`{AAb}}Cn}{{Aj{AdBb}}}Cj}{{{b{dh}}{b{dc}}A@fJn}{{Aj{AdBb}}}Cj}```````````````{b{{b{c}}}{}}00{{{b{d}}}{{b{dc}}}{}}00{{{b{AAh}}}AAh}{{{b{AAj}}}AAj}{{{b{AAl}}}AAl}{{b{b{dc}}}Ad{}}00{{bBf}Ad}00`{{{b{AAh}}{b{dj}}}l}{{{b{AAj}}{b{dj}}}l}{{{b{AAl}}{b{dj}}}l}{cc{}}00{{}c{}}00``{{{b{dh}}{b{dc}}{C`{Bf}}G`{C`{Bf}}G`{C`{Ad}}{C`{G`}}G`{C`{G`}}}{{Aj{AdBb}}}Cj}{bc{}}00{c{{Aj{e}}}{}{}}00{{}{{Aj{c}}}{}}00{bAl}00","D":"CA`","p":[[1,"reference",null,null,1],[0,"mut"],[5,"VFS",1871],[5,"WasiCtx",2],[5,"Formatter",2038],[8,"Result",2038],[1,"str"],[10,"WasiFileSys",998],[5,"Box",2039,null,1],[1,"unit"],[5,"String",2040],[5,"Vec",2041],[6,"Result",2042,null,1],[5,"TypeId",2043],[8,"Type",760],[1,"u64"],[5,"Errno",32],[8,"__wasi_timestamp_t",368],[1,"u8"],[1,"bool"],[8,"Type",765],[6,"ErrorKind",2044],[5,"Error",2044],[5,"WasmPtr",140],[1,"usize"],[10,"Sized",2045],[10,"Clone",2046],[10,"Debug",2038],[10,"Memory",140],[5,"__wasi_ciovec_t",368],[8,"__wasi_size_t",368],[5,"IoSlice",2047],[1,"slice"],[5,"__wasi_iovec_t",368],[5,"IoSliceMut",2047],[6,"AddressFamily",165],[6,"SocketType",165],[6,"ConnectState",165],[5,"WasiSocketState",165],[6,"SubscriptionFdType",165],[5,"SubscriptionFd",165],[5,"SubscriptionClock",165],[6,"Subscription",165],[6,"PrePoll",165],[5,"__wasi_subscription_t",368],[8,"__wasi_userdata_t",368],[5,"AsyncWasiSocket",325],[8,"Result",2044],[6,"SocketAddr",2048],[6,"Option",2049,null,1],[5,"FdStat",998],[5,"TcpListener",2050],[5,"UdpSocket",2051],[5,"Duration",2052],[1,"tuple",null,null,1],[1,"u32"],[8,"c_int",2053],[6,"Shutdown",2054],[5,"__wasi_dirent_t",368],[5,"__wasi_fdstat_t",368],[5,"__wasi_filestat_t",368],[5,"__wasi_event_fd_readwrite_t",368],[5,"__wasi_event_t",368],[5,"__wasi_subscription_clock_t",368],[5,"__wasi_subscription_fd_readwrite_t",368],[20,"__wasi_subscription_u_u_t",368],[5,"__wasi_subscription_u_t",368],[5,"__wasi_address_t",368],[5,"__wasi_sockaddr_in_t",368],[5,"__wasi_sockaddr_t",368],[5,"__wasi_addrinfo_t",368],[5,"__wasi_prestat_dir_t",368],[20,"__wasi_prestat_u_t",368],[5,"__wasi_prestat_t",368],[5,"__wasi_timeval",368],[5,"ReaddirEntity",998],[5,"Filestat",998],[5,"FdFlags",998],[5,"SdFlags",998],[5,"SiFlags",998],[5,"RiFlags",998],[5,"RoFlags",998],[5,"OFlags",998],[5,"WASIRights",998],[5,"Lookupflags",998],[8,"Type",860],[8,"Type",935],[8,"__wasi_siflags_t",368],[8,"Type",893],[8,"Type",933],[8,"Type",882],[8,"Type",896],[8,"Type",880],[5,"FileType",998],[6,"Advice",998],[17,"Item"],[10,"IntoIterator",2055],[17,"Index"],[10,"WasiFile",998],[8,"__wasi_filesize_t",368],[10,"WasiNode",998],[8,"Type",875],[10,"WasiDir",998],[8,"__wasi_filedelta_t",368],[8,"Type",994],[5,"Iter",2056],[5,"IterNames",2056],[5,"MemoryDir",1593],[5,"Path",2057],[10,"AsRef",2058],[5,"MemoryFile",1593],[10,"WasiVirtualDir",1647],[10,"WasiVirtualFile",1647],[5,"WasiVirtualSys",1647],[5,"DiskFileSys",1647],[5,"OutPipeline",1647],[10,"Write",2047],[5,"InPipline",1647],[10,"Read",2047],[5,"DiskFile",1647],[6,"Inode",1647],[6,"DiskInode",1647],[5,"DiskDir",1647],[5,"PathBuf",2057],[5,"StdioSys",1647],[8,"Type",745],[6,"VFD",1871],[10,"Send",2045],[10,"Sync",2045],[10,"AsyncVM",1871],[8,"__wasi_fd_t",368],[8,"__wasi_dircookie_t",368],[8,"__wasi_exitcode_t",368],[8,"Type",938],[8,"Type",970],[8,"Type",972],[1,"i32"],[8,"Type",741],[8,"Type",988],[6,"AddressFamily",1983],[5,"WasiSockaddr",1983],[5,"WasiAddrinfo",1983],[15,"Both",323],[6,"SystemTimeSpec",998],[15,"Inode",1921]],"r":[[0,2],[1873,325],[1874,32],[1918,24]],"b":[[130,"impl-From%3Cu16%3E-for-Errno"],[131,"impl-From%3CErrorKind%3E-for-Errno"],[132,"impl-From%3C%26Error%3E-for-Errno"],[133,"impl-From%3CError%3E-for-Errno"],[589,"impl-From%3C%26FdStat%3E-for-__wasi_fdstat_t"],[590,"impl-From%3CFdStat%3E-for-__wasi_fdstat_t"],[591,"impl-From%3C(u64,+Filestat)%3E-for-__wasi_filestat_t"],[593,"impl-From%3CFilestat%3E-for-__wasi_filestat_t"],[1125,"impl-Flags-for-FdFlags"],[1126,"impl-FdFlags"],[1127,"impl-SdFlags"],[1128,"impl-Flags-for-SdFlags"],[1129,"impl-SiFlags"],[1130,"impl-Flags-for-SiFlags"],[1131,"impl-Flags-for-RiFlags"],[1132,"impl-RiFlags"],[1133,"impl-Flags-for-RoFlags"],[1134,"impl-RoFlags"],[1135,"impl-OFlags"],[1136,"impl-Flags-for-OFlags"],[1137,"impl-WASIRights"],[1138,"impl-Flags-for-WASIRights"],[1139,"impl-Flags-for-Lookupflags"],[1140,"impl-Lookupflags"],[1279,"impl-UpperHex-for-FdFlags"],[1280,"impl-LowerHex-for-FdFlags"],[1281,"impl-Octal-for-FdFlags"],[1282,"impl-Binary-for-FdFlags"],[1283,"impl-Debug-for-FdFlags"],[1284,"impl-LowerHex-for-SdFlags"],[1285,"impl-Binary-for-SdFlags"],[1286,"impl-Octal-for-SdFlags"],[1287,"impl-UpperHex-for-SdFlags"],[1288,"impl-Binary-for-SiFlags"],[1289,"impl-Octal-for-SiFlags"],[1290,"impl-LowerHex-for-SiFlags"],[1291,"impl-UpperHex-for-SiFlags"],[1292,"impl-LowerHex-for-RiFlags"],[1293,"impl-Binary-for-RiFlags"],[1294,"impl-Octal-for-RiFlags"],[1295,"impl-UpperHex-for-RiFlags"],[1296,"impl-Binary-for-RoFlags"],[1297,"impl-UpperHex-for-RoFlags"],[1298,"impl-LowerHex-for-RoFlags"],[1299,"impl-Octal-for-RoFlags"],[1300,"impl-Octal-for-OFlags"],[1301,"impl-Binary-for-OFlags"],[1302,"impl-UpperHex-for-OFlags"],[1303,"impl-LowerHex-for-OFlags"],[1304,"impl-Debug-for-OFlags"],[1305,"impl-Octal-for-WASIRights"],[1306,"impl-Debug-for-WASIRights"],[1307,"impl-Binary-for-WASIRights"],[1308,"impl-UpperHex-for-WASIRights"],[1309,"impl-LowerHex-for-WASIRights"],[1310,"impl-Binary-for-Lookupflags"],[1311,"impl-Octal-for-Lookupflags"],[1312,"impl-LowerHex-for-Lookupflags"],[1313,"impl-UpperHex-for-Lookupflags"],[1337,"impl-Flags-for-FdFlags"],[1338,"impl-FdFlags"],[1339,"impl-Flags-for-SdFlags"],[1340,"impl-SdFlags"],[1341,"impl-SiFlags"],[1342,"impl-Flags-for-SiFlags"],[1343,"impl-Flags-for-RiFlags"],[1344,"impl-RiFlags"],[1345,"impl-Flags-for-RoFlags"],[1346,"impl-RoFlags"],[1347,"impl-OFlags"],[1348,"impl-Flags-for-OFlags"],[1349,"impl-Flags-for-WASIRights"],[1350,"impl-WASIRights"],[1351,"impl-Lookupflags"],[1352,"impl-Flags-for-Lookupflags"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAG4GNQABAAsADwAEABUAbACDAAMAiAAOAJgAAgCcAF8AAwEAAAYBAQARAT4AUQEMAF8B6QBMAgAATgICAFICAABiAgUAfALAAUUEAABmBAAAaQQAAGsEAQBuBAAAcQQAAHMEAQCGBDEAyAQBANIEAADbBAIA5gQ9ADoFAAA8BQAAPwUBAEIFAABFBQEASQUAAGIFCwCUBQcAvAUDAMgFBgDfBQAA+AUGAAcGKQA5Bh8AWgYAAFwGAQBgBoYA6wYAAO4GAADyBhUAEQdPAGMHCABuB3MA6AcOAA==","P":[[4,"T"],[7,""],[12,"T"],[13,"U"],[14,""],[21,"U,T"],[22,"U"],[23,""],[121,"T"],[123,""],[124,"T"],[125,""],[129,"T"],[130,""],[134,"U"],[135,"T"],[136,"U,T"],[137,"U"],[138,""],[142,"T,Add::Output"],[143,"T"],[147,""],[148,"T"],[152,""],[153,"T"],[154,"U"],[155,"T"],[157,""],[158,"T"],[159,"T,Sub::Output"],[160,"T"],[161,"U,T"],[162,"U"],[163,""],[164,"T"],[211,""],[219,"T"],[227,""],[251,"T"],[258,""],[259,"T"],[261,""],[263,"U"],[275,""],[286,"T"],[294,"U,T"],[303,"U"],[313,""],[329,"T"],[331,""],[335,"T"],[336,""],[349,"U"],[350,""],[365,"U,T"],[366,"U"],[367,""],[442,"T"],[489,""],[509,"T"],[529,""],[584,"T"],[587,""],[588,"T"],[589,""],[592,"T"],[593,""],[594,"T"],[615,"U"],[652,"T"],[672,"U,T"],[692,"U"],[715,""],[1157,"T"],[1185,""],[1193,"T"],[1200,""],[1245,"T"],[1253,"WasiFileSys::Index"],[1254,""],[1315,"T"],[1329,""],[1361,"T"],[1369,""],[1379,"WasiFileSys::Index"],[1385,""],[1413,"U"],[1427,"IntoIterator::IntoIter"],[1435,""],[1479,"WasiFileSys::Index"],[1486,""],[1527,"T"],[1534,""],[1542,"U,T"],[1556,"U"],[1570,""],[1595,"P"],[1596,"T"],[1600,""],[1621,"P"],[1622,""],[1624,"T"],[1625,""],[1626,"T"],[1627,""],[1629,"U"],[1631,""],[1634,"P"],[1635,""],[1638,"P"],[1639,""],[1640,"U,T"],[1642,"U"],[1644,""],[1646,"P"],[1663,"T"],[1681,""],[1685,"D,F,P"],[1688,""],[1689,"D,F"],[1691,"D,F,WasiFileSys::Index"],[1692,"WasiFileSys::Index"],[1694,"W"],[1695,"R"],[1696,""],[1697,"W"],[1698,"R"],[1699,""],[1700,"W"],[1701,"R"],[1702,""],[1703,"D,F"],[1704,""],[1705,"W"],[1706,"R"],[1707,""],[1709,"D,F"],[1710,""],[1711,"W"],[1712,"R"],[1713,""],[1715,"D,F"],[1716,""],[1717,"W"],[1718,"R"],[1719,""],[1721,"D,F"],[1722,""],[1723,"W"],[1724,"R"],[1725,""],[1727,"D,F"],[1728,""],[1729,"W"],[1730,"R"],[1731,""],[1733,"D,F"],[1734,""],[1735,"W"],[1736,"R"],[1737,""],[1739,"W"],[1740,"R"],[1741,""],[1742,"W"],[1743,"R"],[1744,""],[1745,"W"],[1746,"R"],[1747,""],[1748,"W"],[1749,"R"],[1750,""],[1751,"W"],[1752,"R"],[1753,""],[1754,"W"],[1755,"R"],[1756,""],[1757,"W"],[1758,"R"],[1759,""],[1761,"P"],[1762,"D,F,P"],[1764,""],[1766,"T"],[1770,"W"],[1771,"T"],[1773,"R"],[1774,"T"],[1777,"P"],[1779,"D,F"],[1780,""],[1781,"IN,OUT,ERR"],[1782,"D,F"],[1783,""],[1784,"IN,OUT,ERR"],[1785,"D,F"],[1786,""],[1787,"IN,OUT,ERR"],[1788,"D,F"],[1789,""],[1790,"IN,OUT,ERR"],[1791,"D,F"],[1792,""],[1793,"IN,OUT,ERR"],[1794,"D,F"],[1795,""],[1796,"IN,OUT,ERR"],[1797,""],[1799,"U"],[1808,""],[1811,"P"],[1812,""],[1813,"D,F"],[1814,""],[1815,"IN,OUT,ERR"],[1816,""],[1818,"D,F,WasiFileSys::Index"],[1819,"WasiFileSys::Index"],[1820,"IN,OUT,ERR"],[1821,"D,F,WasiFileSys::Index"],[1822,"WasiFileSys::Index"],[1823,"IN,OUT,ERR"],[1824,"D,F"],[1825,"WasiFileSys::Index"],[1826,"IN,OUT,ERR,WasiFileSys::Index"],[1827,"D,F,WasiFileSys::Index"],[1828,"WasiFileSys::Index"],[1829,"IN,OUT,ERR,WasiFileSys::Index"],[1830,"D,F,WasiFileSys::Index"],[1831,"WasiFileSys::Index"],[1832,"IN,OUT,ERR"],[1833,"D,F"],[1834,""],[1835,"IN,OUT,ERR"],[1836,"D,F,WasiFileSys::Index"],[1837,"WasiFileSys::Index"],[1838,"IN,OUT,ERR,WasiFileSys::Index"],[1840,"P"],[1842,""],[1843,"U,T"],[1852,"U"],[1861,""],[1870,"P"],[1878,"T"],[1882,""],[1888,"T"],[1890,""],[1899,"U"],[1901,""],[1905,"IN,OUT,ERR"],[1906,""],[1912,"U,T"],[1914,"U"],[1916,""],[1923,"M"],[1965,"VM"],[1966,"M"],[1998,"T"],[2004,""],[2007,"T"],[2010,""],[2017,"T"],[2020,"U"],[2025,"M"],[2026,"T"],[2029,"U,T"],[2032,"U"],[2035,""]]}],["wasmedge_macro",{"t":"XX","n":["async_host_function","host_function"],"q":[[0,"wasmedge_macro"]],"i":"``","f":"``","D":"f","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA=","P":[]}],["wasmedge_sdk",{"t":"RKFGGPPFPPGPPPPPFPFGPPIFFIFPFFGPIPPPPPPPGFFPFPPGPFTPPPPPPPPPIKKKINNNNMCXNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNXNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNQCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCCNCMHNNNNNFNNNNNNNCNNNNCCIFNNNNNNNNNNNNNNNKFNNNNNNNNNNNNNNNNNNNFNNENNNNNNNNNNNNFFFFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPPPPPPPPPPPPPPPGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPGPPPGPPPPPPGPPPGPPPPPPPPGPPPPPPGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGPPPPPPPPPPPGPGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGGPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOPPPGPPGFPPFIFPPPPNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFPPPPPPGNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFNNNNNNNNNNNNNNNNNNNNNNFNNNNNNNNNNNNNNNN","n":["Array","AsInstance","Compiler","CompilerOptimizationLevel","CompilerOutputFormat","Const","Err","ExportType","ExternRef","","ExternalInstanceType","F32","F64","Func","FuncRef","","FuncType","Global","GlobalType","HostRegistration","I32","I64","ImportObject","ImportObjectBuilder","ImportType","Instance","LogManager","Memory","MemoryType","Module","Mutability","Native","NeverType","O0","O1","O2","O3","Ok","Os","Oz","RefType","Statistics","Store","Table","TableType","UnsupportedRef","V128","ValType","Var","Vm","WASM_TYPE","Wasi","WasiCryptoAsymmetricCommon","WasiCryptoCommon","WasiCryptoKx","WasiCryptoSignatures","WasiCryptoSymmetric","WasiNn","Wasm","WasmEdgeProcess","WasmEdgeResult","WasmVal","WasmValType","WasmValTypeList","WasmValue","active_module","active_module_mut","args","args_len","as_ptr","async","async_host_function","borrow","","","","","","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","","","","","","build","clone","","","","","","","","","","","","","clone_into","","","","","","","","","","","","","clone_to_uninit","","","","","","","","","","","","","compile_from_bytes","compile_from_file","config","contains","contains_module","cost","count","count_of_exports","count_of_imports","count_per_second","default","","","","elem_ty","eq","","","","","","","","","","","error","executor","exports","fmt","","","","","","","","","","","","","","","","","","","","","from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","from_bytes","from_file","func_len","","func_names","","get_export","get_func","","get_func_mut","","get_global","","get_global_mut","","get_instance_and_executor","get_memory_mut","","get_memory_ref","","get_named_wasm_and_executor","get_table","","global_len","","global_names","","hash","host_function","imports","instance_names","","into","","","","","","","","","","","","","","","","","","","","log_debug_info","log_error_info","log_off","maximum","","mem_len","","mem_names","","minimum","","module_name","mutability","name","","","","named_instance_count","","new","","","","","","","","","params","plugin","register_active_module","register_module","register_named_module","returns","returns_len","run_func","run_func_with_timeout","set_cost_limit","set_cost_table","shared","store","store_mut","table_len","","table_names","","to_owned","","","","","","","","","","","","","to_string","to_wasm_value","try_from","","","","","","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","","","","","","ty","","type_id","","","","","","","","","","","","","","","","","","","","types","utils","value_ty","wasi","wasm_types","wat2wasm","with_func","with_func_by_type","with_global","with_memory","with_table","AsyncInstance","as_mut","as_ptr","as_ref","borrow","borrow_mut","fmt","from","import","into","try_from","try_into","type_id","vm","wasi","ImportObject","ImportObjectBuilder","borrow","borrow_mut","build","fmt","from","into","new","try_from","try_into","type_id","with_func","with_func_by_type","with_global","with_memory","with_table","AsyncInst","Vm","active_module","active_module_mut","borrow","borrow_mut","contains_module","fmt","from","instance_names","into","named_instance_count","new","register_module","run_func","run_func_with_timeout","store","store_mut","try_from","try_into","type_id","AsyncWasiModule","as_mut","as_ref","async_wasi","borrow","borrow_mut","create","create_from_wasi_context","exit_code","fmt","from","into","name","try_from","try_into","type_id","CommonConfigOptions","CompilerConfigOptions","Config","ConfigBuilder","RuntimeConfigOptions","StatisticsConfigOptions","borrow","","","","","","borrow_mut","","","","","","build","bulk_memory_operations","bulk_memory_operations_enabled","clone","","","","","clone_into","","","","","clone_to_uninit","","","","","cost_measuring_enabled","count_instructions","default","","","","","dump_ir","dump_ir_enabled","fmt","","","","","","from","","","","","","function_references","function_references_enabled","gc","generic_binary","generic_binary_enabled","instruction_counting_enabled","interpreter_mode","interpreter_mode_enabled","interruptible","interruptible_enabled","into","","","","","","max_memory_pages","","measure_cost","measure_time","multi_memories","multi_memories_enabled","multi_value","multi_value_enabled","mutable_globals","mutable_globals_enabled","new","","","","","non_trap_conversions","non_trap_conversions_enabled","optimization_level","","out_format","","reference_types","reference_types_enabled","sign_extension_operators","sign_extension_operators_enabled","simd","simd_enabled","tail_call","tail_call_enabled","threads","threads_enabled","time_measuring_enabled","to_owned","","","","","try_from","","","","","","try_into","","","","","","type_id","","","","","","with_compiler_config","with_runtime_config","with_statistics_config","AOTDisabled","AccessNullArray","AccessNullFunc","AccessNullI31","AccessNullStruct","ArrayOutOfBounds","ArrayTypesMismatch","ArrayTypesNumtypeRequired","CastFailed","CastNullToNonNull","Common","CompilerCreate","Component","ConfigCreate","ConstExprRequired","ConstPtr","Core","CoreCommonError","CoreComponentError","CoreError","CoreExecutionError","CoreInstantiationError","CoreLoadError","CoreValidationError","CostLimitExceeded","Create","","","","","","","","CreateBinding","CreateImportModule","CreateSharedType","CreateWasi","CreateWasmEdgeProcess","CreateWithWasiContext","DataCountRequired","DataSegDoesNotFit","DivideByZero","DupExportName","DuplicateImportModule","DuplicateModuleInstance","ElemSegDoesNotFit","ExecuteTimeout","Execution","ExecutorCreate","ExpectSharedMemory","ExpectedZeroByte","Export","ExportError","FoundNulByte","FromUtf8","Func","FuncError","FuncNotFound","FuncSigMismatch","FuncType","","FuncTypeCreate","Global","GlobalError","GlobalType","","GlobalTypeCreate","HostFuncError","HostFuncFailed","IllegalGrammar","IllegalOpCode","IllegalPath","ImmutableArray","ImmutableField","ImmutableGlobal","Import","ImportError","ImportObjCreate","IncompatibleDataCount","IncompatibleFuncCode","IncompatibleImportType","IndirectCallTypeMismatch","Instance","InstanceError","Instantiation","InstrTypeMismatch","IntegerOverflow","IntegerTooLarge","IntegerTooLong","Interrupted","IntrinsicsTableNotFound","InvalidAlignment","InvalidBrRefType","InvalidConvToInt","InvalidDataIdx","InvalidElemIdx","InvalidFieldIdx","InvalidFuncIdx","InvalidFuncTypeIdx","InvalidGlobalIdx","InvalidImportModule","InvalidLabelIdx","InvalidLaneIdx","InvalidLimit","InvalidLocalIdx","InvalidMemPages","InvalidMemoryIdx","InvalidMut","InvalidNotDefaultableArray","InvalidNotDefaultableField","InvalidPackedArray","InvalidPackedField","InvalidRefIdx","InvalidResultArity","InvalidStartFunc","InvalidSubType","InvalidTableIdx","InvalidUninitLocal","InvalidUnpackedArray","InvalidUnpackedField","JunkSection","LengthOutOfBounds","Load","LoaderCreate","MalformedAliasTarget","MalformedCanonical","MalformedCoreInstance","MalformedDefType","MalformedElemType","MalformedExportKind","MalformedFlagsType","MalformedImportKind","MalformedInstance","MalformedMagic","MalformedName","MalformedRecordType","MalformedRefType","MalformedSection","MalformedSort","MalformedTable","MalformedTupleType","MalformedUTF8","MalformedValType","MalformedVariantType","MalformedVersion","Mem","MemError","MemType","","MemTypeCreate","MemoryOutOfBounds","ModifyConst","ModuleCreate","ModuleNameConflict","MultiMemories","MultiTables","MutPtr","NonNullRequired","NotFound","NotFoundActiveModule","","NotFoundExecutor","NotFoundFunc","","NotFoundFuncRegistered","NotFoundFuncType","NotFoundGlobal","","NotFoundGlobalRegistered","NotFoundImportModule","NotFoundLoader","NotFoundMappedFdHandler","NotFoundMem","","NotFoundMemRegistered","NotFoundModule","","NotFoundNulByte","NotFoundStatistics","NotFoundStore","NotFoundTable","","NotFoundTableRegistered","NotFoundValidator","NotFoundWasiCryptoAsymmetricCommonModule","NotFoundWasiCryptoCommonModule","NotFoundWasiCryptoKxModule","NotFoundWasiCryptoSignaturesModule","NotFoundWasiCryptoSymmetricModule","NotFoundWasiModule","NotFoundWasiNnModule","NotFoundWasmEdgeProcessModule","NotValidated","Operation","Plugin","PluginError","Ptr2Ref","ReadError","RefTypeMismatch","Runtime","RuntimeError","SectionSizeMismatch","SetValueErrorType","SetValueToConst","SharedMemoryNoMax","StatisticsCreate","Store","StoreError","Table","TableError","TableOutOfBounds","TableType","","TableTypeCreate","Terminated","TooManyLocals","Type","","","","","","TypeCheckFailed","UnalignedAtomicAccess","UndefinedElement","UnexpectedEnd","UninitializedElement","UnknownCanonicalOption","UnknownError","UnknownImport","UnmatchedValType","Unreachable","User","","UserDefError","Utf8","Validation","ValidatorCreate","Vm","VmError","WasmEdgeError","WindowsPathConversion","WrongInstanceAddress","WrongInstanceIndex","WrongVMWorkflow","borrow","","","","","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","","","","","clone","","","","","","","","","","","","","","","","","","","clone_into","","","","","","","","","","","","","","","","","","","clone_to_uninit","","","","","","","","","","","","","","","","","","","eq","","","","","","","","","","","","","","","","","","","fmt","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","into","","","","","","","","","","","","","","","","","","","source","to_owned","","","","","","","","","","","","","","","","","","","to_string","","","","","","","","","","","","","","","","","","","try_from","","","","","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","","","","","type_id","","","","","","","","","","","","","","","","","","","actual","expected","actual","expected","func_name","global_name","mem_name","mod_name","","","","table_name","AUTO","Autodetect","CPU","ExecutionTarget","GGML","GPU","GraphEncoding","NNPreload","ONNX","OpenVINO","Plugin","PluginInstance","PluginManager","PyTorch","TPU","TensorFlow","TensorFlowLite","auto_detect_plugins","borrow","","","","","borrow_mut","","","","","clone","","clone_into","","clone_to_uninit","","cmp","","count","create_plugin_instance","eq","","ffi","find","fmt","","","","","","","","from","","","","","from_str","","","init_wasmedge_process","into","","","","","load","load_plugin_wasi_nn","load_wasi_crypto_asymmetric_common","load_wasi_crypto_common","load_wasi_crypto_kx","load_wasi_crypto_signatures","load_wasi_crypto_symmetric","mod_count","mod_instance","mod_names","name","names","new","nn_preload","partial_cmp","","to_owned","","to_string","","","try_from","","","","","try_into","","","","","type_id","","","","","APIVersion","Create","Description","","ModuleCount","ModuleDescriptions","Name","","ProgramOptionCount","ProgramOptions","Version","WasmEdge_ModuleDescriptor","WasmEdge_ModuleInstanceContext","WasmEdge_PluginDescriptor","borrow","","","borrow_mut","","","clone","","","clone_into","","","clone_to_uninit","","","fmt","","","from","","","into","","","to_owned","","","try_from","","","try_into","","","type_id","","","ExternRef","","F32","F64","I32","I64","V128","Val","borrow","","borrow_mut","","clone","","clone_into","","clone_to_uninit","","fmt","","from","","","into","","new","to_owned","","to_wasm_value","try_from","","try_into","","type_id","","wasm_types","CoreVersion","Driver","aot_compiler","borrow","","borrow_mut","","fmt","from","","into","","major","minor","patch","runtime_tool","try_from","","try_into","","type_id","","unified_tool","version_string","WasiModule","as_mut","as_ptr","as_ref","borrow","borrow_mut","create","exit_code","fmt","from","get_native_handler","init_wasi","into","name","try_from","try_into","type_id"],"q":[[0,"wasmedge_sdk"],[424,"wasmedge_sdk::async"],[439,"wasmedge_sdk::async::import"],[456,"wasmedge_sdk::async::vm"],[477,"wasmedge_sdk::async::wasi"],[493,"wasmedge_sdk::config"],[624,"wasmedge_sdk::error"],[1170,"wasmedge_sdk::error::ExportError"],[1172,"wasmedge_sdk::error::ImportError"],[1174,"wasmedge_sdk::error::StoreError"],[1182,"wasmedge_sdk::plugin"],[1282,"wasmedge_sdk::plugin::ffi"],[1332,"wasmedge_sdk::types"],[1368,"wasmedge_sdk::utils"],[1392,"wasmedge_sdk::wasi"],[1409,"wasmedge_sdk::vm"],[1410,"wasmedge_sdk::instance"],[1411,"core::option"],[1412,"core::marker"],[1413,"wasmedge_types"],[1414,"wasmedge_sys::instance::module"],[1415,"wasmedge_sys::ffi"],[1416,"wasmedge_sdk::import"],[1417,"wasmedge_sdk::module"],[1418,"wasmedge_sdk::statistics"],[1419,"wasmedge_sdk::compiler"],[1420,"std::path"],[1421,"core::convert"],[1422,"wasmedge_sdk::store"],[1423,"wasmedge_sys::executor"],[1424,"alloc::vec"],[1425,"core::fmt"],[1426,"core::result"],[1427,"wasmedge_sdk::log"],[1428,"wasmedge_sys::instance::function"],[1429,"wasmedge_sys::instance::table"],[1430,"wasmedge_sys::instance::memory"],[1431,"wasmedge_sys::instance::global"],[1432,"alloc::string"],[1433,"wasmedge_sys::instance"],[1434,"wasmedge_types::error"],[1435,"alloc::boxed"],[1436,"core::hash"],[1437,"alloc::borrow"],[1438,"std::collections::hash::map"],[1439,"core::iter::traits::collect"],[1440,"core::time"],[1441,"wasmedge_sdk::io"],[1442,"core::any"],[1443,"wat"],[1444,"wasmedge_sys::async::module"],[1445,"wasmedge_sys::async::function"],[1446,"async_wasi::snapshots"],[1447,"alloc::ffi::c_str"],[1448,"core::str::error"],[1449,"core::ffi::c_str"],[1450,"core::error"],[1451,"core::cmp"],[1452,"wasmedge_sys::types"],[1453,"wasmedge_macro"]],"i":"A@d````B`Cl`AnA``00Bh21`0``11`````0```Bd`Bb000500```2`33`6`A@fBf00000030`````b0n0Af``DdChAj<;>896:4BjBlBnEnC`F`E`Cb=:98AnA`B`BbBdBfBhn?>=<;:98bAj98765432BjBlBnC`>=<;:98763210>=<;:98763210>Ch0`Dd7Cb033096546AnA`B`BbBdBfBhn>=<`9;9:?765432110>=Aj<<;;;:::9998887766655Bj0Bl0Bn07C`76Cb611Af000200000000Dd11110111111>`3080Ch8AnA`B`BbBdBfBhn?>=En=F`E`>b333BjBlAf000215Bn1165Dd50ChAj;653Cb8``383<<88006885555AnA`B`BbBdBfBhn?>=L`Lb<<`10<`?333>>><`<332?<`=??33Ln4??MfMb000007000000600000000000066LlGhMh000990909009909099091`7614?1833Kj6=<;;><<;><<;;>><<<;2;;><<;;;;;;;;;622`0:5Mj7;77;33`3`69837;Kh2KlKn<;899>957=1963:6766``699:62410<;LdLfLhLj;>M`=Md?;9<8:76L`Lb7654?Ln4Mb4MfMh?Gh?Kj?>76=<;:Ll6:5943Mj3Kh3KlKn<;LdLfLhLj8>M`>Md>=9<8;76L`Lb765476=<;:Ll6:5943Mj33Kh033Kl0Kn0<<;;Ld0Lf0Lh0Lj088>>M`0>>Md0>>==99<<<<<<<<<<<<<<<<8;76L`Lb765476=<;:Ll6:5943Mj33Kh3KlKn<;LdLfLhLj8>M`>Md>=9<8;76L`Lb765476=<;:Ll6:5943Mj3Kh3KlKn<;LdLfLhLj8>M`>Md>=9<8;76L`Lb7654{{{d{Fj}}}Bl}?{{{d{Fl}}}Bn}{cc{}}00000{{{h{{d{Fn}}}}c}{{Cl{C`}}}{{Cn{{Ab{Cf}}}}}}{{{h{{d{Fn}}}}c}{{Cl{C`}}}{{Cn{Db}}}}{{{d{Af}}}Dj}0{{{d{Af}}}{{h{{Eb{G`}}}}}}0{{{d{C`}}c}{{h{Bh}}}{{Cn{D`}}}}{{{d{Af}}{d{D`}}}{{El{{Gf{Gb{d{Gd}}}}{Gj{Gh}}}}}}0{{{d{lAf}}{d{D`}}}{{El{{Gf{Gb{d{lGd}}}}{Gj{Gh}}}}}}0{{{d{Af}}c}{{El{{Gf{Gl{d{Af}}}}{Gj{Gh}}}}}{{Cn{D`}}}}0{{{d{lAf}}c}{{El{{Gf{Gl{d{lAf}}}}{Gj{Gh}}}}}{{Cn{D`}}}}0{{{d{l{Dd{c}}}}e}{{h{{Gn{{d{lc}}{d{lDn}}}}}}}{Afj}{{Cn{D`}}}}{{{d{lAf}}c}{{El{{Gf{H`{d{lAf}}}}{Gj{Gh}}}}}{{Cn{D`}}}}0{{{d{Af}}c}{{El{{Gf{H`{d{Af}}}}{Gj{Gh}}}}}{{Cn{D`}}}}0{{{d{l{Dd{c}}}}e}{{h{{Gn{{d{lGd}}{d{lDn}}}}}}}{Afj}{{Cn{D`}}}}{{{d{Af}}c}{{El{{Gf{Hb{d{Af}}}}{Gj{Gh}}}}}{{Cn{D`}}}}0;;::{{{d{Bf}}{d{lc}}}CdHd}`{{{d{C`}}}{{Eb{F`}}}}{{{d{{Dd{c}}}}}{{Eb{G`}}}{Afj}}{{{d{{b{c}}}}}{{Eb{G`}}}{j`}}{{}c{}}0000000000000000000{{}Cd}00{{{d{Bj}}}{{h{Dj}}}}{{{d{Bl}}}{{h{Dj}}}}{{{d{Af}}}Dj}0{{{d{Af}}}{{h{{Eb{G`}}}}}}0{{{d{Bj}}}Dj}{{{d{Bl}}}Dj}{{{d{F`}}}{{Hf{D`}}}}{{{d{Bn}}}B`}{{{d{Af}}}{{h{G`}}}}02{{{d{E`}}}{{Hf{D`}}}}{{{d{{Dd{c}}}}}Ad{Afj}}{{{d{{b{c}}}}}Ad{j`}}{{{h{{d{Fn}}}}{Hh{G`{d{lc}}}}}{{Cl{{Dd{c}}}}}{Afj}}{{{h{{d{Fn}}}}}{{Cl{Ch}}}}{{{d{D`}}c}{{Cl{{Aj{c}}}}}{}}{{{Eb{A`}}{Eb{A`}}}n}{{AnDj{h{Dj}}}Bj}{{Dj{h{Dj}}Df}{{El{Bl{Gj{Gh}}}}}}{{A`B`}Bn}{{}{{Cl{Cb}}}}{{{Dd{c}}}{{b{c}}}{j`}}``{{{d{l{Dd{c}}}}{d{C`}}}{{Cl{Gd}}}{Afj}}{{{d{l{b{c}}}}{h{{d{D`}}}}C`}{{Cl{{d{l{b{c}}}}}}}{j`}}{{{d{l{Dd{c}}}}e{d{C`}}}{{Cl{Cd}}}{Afj}{{Cn{D`}}}}{{{d{n}}}{{d{{Ab{A`}}}}}}{{{d{n}}}Ad}{{{d{l{b{c}}}}{h{{d{D`}}}}eg}{{Cl{{Eb{Hj}}}}}{j`}{{Cn{D`}}}{{Hn{}{{Hl{Hj}}}}}}{{{d{l{b{c}}}}{h{{d{D`}}}}egI`}{{Cl{{Eb{Hj}}}}}{j`}{{Cn{D`}}}{{Hn{}{{Hl{Hj}}}}}}{{{d{lCb}}Dh}Cd}{{{d{lCb}}c}Cd{{Cn{{Ab{Dh}}}}}}{{{d{Bl}}}Df}{{{d{{b{c}}}}}{{d{{Dd{c}}}}}{j`}}{{{d{l{b{c}}}}}{{d{l{Dd{c}}}}}{j`}}{{{d{Af}}}Dj}0{{{d{Af}}}{{h{{Eb{G`}}}}}}0{dc{}}000000000000{dG`}{IbHj}{c{{El{e}}}{}{}}0000000000000000000{{}{{El{c}}}{}}0000000000000000000{{{d{F`}}}{{Cl{Bh}}}}{{{d{E`}}}{{Cl{Bh}}}}{dId}0000000000000000000``{{{d{Bn}}}A`}`{{}{{d{{Ab{A`}}}}}}{{{d{{Ab{Cf}}}}}{{El{{Hf{{Ab{Cf}}}}If}}}}{{{d{l{Aj{c}}}}e{Ih{c}}}{{Cl{{d{l{Aj{c}}}}}}}{}{{Cn{D`}}}}{{{d{l{Aj{c}}}}en{Ih{c}}}{{Cl{{d{l{Aj{c}}}}}}}{}{{Cn{D`}}}}{{{Aj{c}}eGl}{{Aj{c}}}{}{{Cn{D`}}}}{{{Aj{c}}eH`}{{Aj{c}}}{}{{Cn{D`}}}}{{{Aj{c}}eHb}{{Aj{c}}}{}{{Cn{D`}}}}`{{{d{lIj}}}{{d{lGd}}}}{dAh}{{{d{Ij}}}{{d{Gd}}}}{d{{d{c}}}{}}{{{d{l}}}{{d{lc}}}{}}{{{d{Ij}}{d{lEd}}}{{El{CdEj}}}}{cc{}}`{{}c{}}{c{{El{e}}}{}{}}{{}{{El{c}}}{}}{dId}````76{{{Il{c}}}{{In{c}}}J`}{{{d{{Il{c}}}}{d{lEd}}}Ef{EhJ`}}65{{ce}{{Cl{{Il{e}}}}}{{Cn{D`}}}J`}543{{{d{l{Il{c}}}}e{Jb{c}}}{{Cl{{d{l{Il{c}}}}}}}J`{{Cn{D`}}}}{{{d{l{Il{c}}}}en{Jb{c}}}{{Cl{{d{l{Il{c}}}}}}}J`{{Cn{D`}}}}{{{Il{c}}eGl}{{Il{c}}}J`{{Cn{D`}}}}{{{Il{c}}eH`}{{Il{c}}}J`{{Cn{D`}}}}{{{Il{c}}eHb}{{Il{c}}}J`{{Cn{D`}}}}``{{{d{{Jd{c}}}}}{{h{{d{f}}}}}{jJ`Jf}}{{{d{l{Jd{c}}}}}{{h{{d{lf}}}}}{jJ`Jf}}{d{{d{c}}}{}}{{{d{l}}}{{d{lc}}}{}}{{{d{{Jd{c}}}}e}Df{jJ`Jf}{{Cn{D`}}}}{{{d{{Jd{c}}}}{d{lEd}}}Ef{EhjJ`Jf}}{cc{}}{{{d{{Jd{c}}}}}{{Eb{G`}}}{jJ`Jf}}{{}c{}}{{{d{{Jd{c}}}}}Ad{jJ`Jf}}{{{Dd{c}}}{{Jd{c}}}{jJ`Jf}}{{{d{l{Jd{c}}}}{h{{d{D`}}}}C`}{{Cl{{d{l{Jd{c}}}}}}}{jJ`Jf}}{{{d{l{Jd{c}}}}{h{{d{D`}}}}eg}{{Cl{{Eb{Hj}}}}}{jJ`Jf}{{Cn{D`}}}{{Hn{}{{Hl{Hj}}}}J`}}{{{d{l{Jd{c}}}}{h{{d{D`}}}}egI`}{{Cl{{Eb{Hj}}}}}{jJ`Jf}{{Cn{D`}}}{{Hn{}{{Hl{Hj}}}}J`}}{{{d{{Jd{c}}}}}{{d{{Dd{c}}}}}{jJ`Jf}}{{{d{l{Jd{c}}}}}{{d{l{Dd{c}}}}}{jJ`Jf}}{c{{El{e}}}{}{}}{{}{{El{c}}}{}}{dId}`{{{d{lJh}}}{{d{l{Jl{Jj}}}}}}{{{d{Jh}}}{{d{{Jl{Jj}}}}}}`{d{{d{c}}}{}}{{{d{l}}}{{d{lc}}}{}}{{{h{{Eb{c}}}}{h{{Eb{{Gn{eg}}}}}}}{{El{Jh{Gj{Gh}}}}}{{Cn{D`}}}{{Cn{D`}}}{{Cn{D`}}}}{Jj{{El{Jh{Gj{Gh}}}}}}{{{d{Jh}}}Dj}{{{d{Jh}}{d{lEd}}}{{El{CdEj}}}}{cc{}}{{}c{}}{{{d{Jh}}}{{d{D`}}}}=<;``````888888777777{Jn{{Cl{Fn}}}}{{K`Df}K`}{{{d{Fn}}}Df}{{{d{Fn}}}Fn}{{{d{K`}}}K`}{{{d{Kb}}}Kb}{{{d{Kd}}}Kd}{{{d{Kf}}}Kf}{{d{d{lc}}}Cd{}}0000{{dCf}Cd}00007{{KfDf}Kf}{{}Jn}{{}K`}{{}Kb}{{}Kd}{{}Kf}{{KbDf}Kb}>{{{d{Jn}}{d{lEd}}}Ef}{{{d{Fn}}{d{lEd}}}Ef}{{{d{K`}}{d{lEd}}}Ef}{{{d{Kb}}{d{lEd}}}Ef}{{{d{Kd}}{d{lEd}}}Ef}{{{d{Kf}}{d{lEd}}}Ef}{cc{}}00000{{K`Df}K`}{{{d{Fn}}}Df}19001090{{}c{}}00000{{{d{Fn}}}Dj}{{KdDj}Kd}{{KfDf}Kf}0545454{K`Jn}{{}K`}{{}Kb}{{}Kd}{{}Kf}:9{{{d{Fn}}}Bb}{{KbBb}Kb}{{{d{Fn}}}Bd}{{KbBd}Kb}>=>=>=>=>=={dc{}}0000{c{{El{e}}}{}{}}00000{{}{{El{c}}}{}}00000{dId}00000{{JnKb}Jn}{{JnKd}Jn}{{JnKf}Jn}`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````{d{{d{c}}}{}}000000000000000000{{{d{l}}}{{d{lc}}}{}}000000000000000000{{{d{Gh}}}Gh}{{{d{Kh}}}Kh}{{{d{Kj}}}Kj}{{{d{Kl}}}Kl}{{{d{Kn}}}Kn}{{{d{L`}}}L`}{{{d{Lb}}}Lb}{{{d{Ld}}}Ld}{{{d{Lf}}}Lf}{{{d{Lh}}}Lh}{{{d{Lj}}}Lj}{{{d{Ll}}}Ll}{{{d{Ln}}}Ln}{{{d{M`}}}M`}{{{d{Mb}}}Mb}{{{d{Md}}}Md}{{{d{Mf}}}Mf}{{{d{Mh}}}Mh}{{{d{Mj}}}Mj}{{d{d{lc}}}Cd{}}000000000000000000{{dCf}Cd}000000000000000000{{{d{Gh}}{d{Gh}}}Df}{{{d{Kh}}{d{Kh}}}Df}{{{d{Kj}}{d{Kj}}}Df}{{{d{Kl}}{d{Kl}}}Df}{{{d{Kn}}{d{Kn}}}Df}{{{d{L`}}{d{L`}}}Df}{{{d{Lb}}{d{Lb}}}Df}{{{d{Ld}}{d{Ld}}}Df}{{{d{Lf}}{d{Lf}}}Df}{{{d{Lh}}{d{Lh}}}Df}{{{d{Lj}}{d{Lj}}}Df}{{{d{Ll}}{d{Ll}}}Df}{{{d{Ln}}{d{Ln}}}Df}{{{d{M`}}{d{M`}}}Df}{{{d{Mb}}{d{Mb}}}Df}{{{d{Md}}{d{Md}}}Df}{{{d{Mf}}{d{Mf}}}Df}{{{d{Mh}}{d{Mh}}}Df}{{{d{Mj}}{d{Mj}}}Df}{{{d{Gh}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Kh}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Kj}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Kl}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Kn}}{d{lEd}}}{{El{CdEj}}}}0{{{d{L`}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Lb}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Ld}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Lf}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Lh}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Lj}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Ll}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Ln}}{d{lEd}}}{{El{CdEj}}}}0{{{d{M`}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Mb}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Md}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Mf}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Mh}}{d{lEd}}}{{El{CdEj}}}}0{{{d{Mj}}{d{lEd}}}{{El{CdEj}}}}0{LjGh}{LhGh}{KlGh}{KjGh}{MlGh}{cc{}}{LfGh}{LdGh}{MnGh}{LbGh}{KhGh}{L`Gh}{N`Gh}{NbGh}{LlGh}{KnGh}::::::::::::::::::{{}c{}}000000000000000000{{{d{Gh}}}{{h{{d{Nd}}}}}}{dc{}}000000000000000000{dG`}000000000000000000{c{{El{e}}}{}{}}000000000000000000{{}{{El{c}}}{}}000000000000000000{dId}000000000000000000`````````````````````````````{{}{{Cl{{Eb{f}}}}}}{d{{d{c}}}{}}0000{{{d{l}}}{{d{lc}}}{}}0000{{{d{Nf}}}Nf}{{{d{Nh}}}Nh}{{d{d{lc}}}Cd{}}0{{dCf}Cd}0{{{d{Nf}}{d{Nf}}}Nj}{{{d{Nh}}{d{Nh}}}Nj}{{}Dj}{{ce}{{Cl{Nl}}}{{Cn{D`}}}{{Cn{D`}}}}{{{d{Nf}}{d{Nf}}}Df}{{{d{Nh}}{d{Nh}}}Df}`{c{{Cl{Nn}}}{{Cn{D`}}}}{{{d{O`}}{d{lEd}}}Ef}0{{{d{Nf}}{d{lEd}}}Ef}0{{{d{Nh}}{d{lEd}}}Ef}0{{{d{Ob}}{d{lEd}}}Ef}{{{d{Nn}}{d{lEd}}}Ef}{cc{}}0000{{{d{D`}}}{{El{O`c}}}{}}{{{d{D`}}}{{El{Nfc}}}{}}{{{d{D`}}}{{El{Nhc}}}{}}{{{h{{Eb{{d{D`}}}}}}Df}Cd}{{}c{}}0000{{{h{{d{Db}}}}}{{Cl{Cd}}}}{{}{{Cl{f}}}}00000{{{d{Nn}}}Dj}{{{d{Nn}}c}{{Cl{Nl}}}{{Cn{D`}}}}{{{d{Nn}}}{{Eb{G`}}}}{{{d{Nn}}}G`}{{}{{Eb{G`}}}}{{cNfNhe}O`{{Cn{D`}}}{{Cn{Db}}}}{{{Eb{O`}}}Cd}{{{d{Nf}}{d{Nf}}}{{h{Nj}}}}{{{d{Nh}}{d{Nh}}}{{h{Nj}}}}{dc{}}0{dG`}00{c{{El{e}}}{}{}}0000{{}{{El{c}}}{}}0000{dId}0000``````````````{d{{d{c}}}{}}00{{{d{l}}}{{d{lc}}}{}}00{{{d{Ah}}}Ah}{{{d{Od}}}Od}{{{d{Of}}}Of}{{d{d{lc}}}Cd{}}00{{dCf}Cd}00{{{d{Ah}}{d{lEd}}}{{El{CdEj}}}}{{{d{Od}}{d{lEd}}}{{El{CdEj}}}}{{{d{Of}}{d{lEd}}}{{El{CdEj}}}}{cc{}}00{{}c{}}00{dc{}}00???>>>===````````<<;;{{{d{Oh}}}Oh}{{{d{Oj}}}Oj}9988{{{d{Oh}}{d{lEd}}}Ef}{{{d{Oj}}{d{lEd}}}Ef}{OlOh}7766{{{d{lc}}}Oj{J`On}}66{OjHj}{c{{El{e}}}{}{}}0{{}{{El{c}}}{}}0{dId}0{{}{{d{{Ab{A`}}}}}}``{eFd{{Cn{D`}}}{{Hn{}{{Hl{c}}}}}}{d{{d{c}}}{}}0{{{d{l}}}{{d{lc}}}{}}0{{{d{A@`}}{d{lEd}}}Ef}{cc{}}0{{}c{}}0{{}Dj}006::99886{{}G`}`{{{d{lA@b}}}{{d{lGd}}}}{dAh}{{{d{A@b}}}{{d{Gd}}}}98{{{h{{Eb{{d{D`}}}}}}{h{{Eb{{d{D`}}}}}}{h{{Eb{{d{D`}}}}}}}{{El{A@b{Gj{Gh}}}}}}{{{d{A@b}}}Dj}{{{d{A@b}}{d{lEd}}}{{El{CdEj}}}}9{{{d{A@b}}Fd}{{El{Dh{Gj{Gh}}}}}}{{{d{lA@b}}{h{{Eb{{d{D`}}}}}}{h{{Eb{{d{D`}}}}}}{h{{Eb{{d{D`}}}}}}}Cd}:{{{d{A@b}}}{{d{D`}}}}{c{{El{e}}}{}{}}{{}{{El{c}}}{}}{dId}","D":"CEn","p":[[5,"Vm",0,1409],[1,"reference",null,null,1],[8,"Instance",0,1410],[6,"Option",1411,null,1],[10,"Sized",1412],[0,"mut"],[5,"FuncType",0,1413],[6,"ValType",0,1413],[1,"slice"],[1,"usize"],[10,"AsInstance",0,1414],[5,"WasmEdge_ModuleInstanceContext",1282,1415],[5,"ImportObjectBuilder",0,1416],[8,"ImportObject",0,1416],[6,"RefType",0,1413],[6,"Mutability",0,1413],[6,"CompilerOptimizationLevel",0,1413],[6,"CompilerOutputFormat",0,1413],[6,"HostRegistration",0,1413],[6,"ExternalInstanceType",0,1413],[5,"TableType",0,1413],[5,"MemoryType",0,1413],[5,"GlobalType",0,1413],[5,"Module",0,1417],[5,"Statistics",0,1418],[1,"unit"],[1,"u8"],[5,"Compiler",0,1419],[5,"PathBuf",1420],[8,"WasmEdgeResult",0,1413],[10,"AsRef",1421],[1,"str"],[5,"Path",1420],[5,"Store",0,1422],[1,"bool"],[1,"u64"],[1,"u32"],[1,"f64"],[5,"Executor",1423],[5,"ExportType",0,1417],[5,"Vec",1424],[5,"Formatter",1425],[8,"Result",1425],[10,"Debug",1425],[5,"Error",1425],[6,"Result",1426,null,1],[5,"LogManager",0,1427],[5,"ImportType",0,1417],[5,"WasmEdge_ValType",1415],[1,"i32"],[5,"FuncTypeOwn",1428],[5,"TableType",1429],[5,"MemType",1430],[5,"GlobalType",1431],[5,"Config",493],[5,"String",1432],[5,"Function",1428],[5,"Instance",1414],[5,"InnerRef",1433],[6,"WasmEdgeError",624,1434],[5,"Box",1435,null,1],[5,"Global",1431],[1,"tuple",null,null,1],[5,"Memory",1430],[5,"Table",1429],[10,"Hasher",1436],[6,"Cow",1437],[5,"HashMap",1438],[8,"WasmValue",0],[17,"Item"],[10,"IntoIterator",1439],[5,"Duration",1440],[10,"WasmVal",0,1441],[5,"TypeId",1442],[5,"Error",1443],[8,"SyncFn",1428],[5,"AsyncInstance",424,1444],[5,"ImportObjectBuilder",439],[8,"ImportObject",439],[10,"Send",1412],[8,"AsyncFn",1445],[5,"Vm",456],[10,"AsyncInst",456],[5,"AsyncWasiModule",477,1444],[5,"WasiCtx",1446],[5,"AsyncImportObject",1444],[5,"ConfigBuilder",493],[5,"CommonConfigOptions",493],[5,"CompilerConfigOptions",493],[5,"RuntimeConfigOptions",493],[5,"StatisticsConfigOptions",493],[6,"FuncError",624,1434],[6,"MemError",624,1434],[6,"GlobalError",624,1434],[6,"TableError",624,1434],[6,"ImportError",624,1434],[6,"ExportError",624,1434],[6,"InstanceError",624,1434],[6,"PluginError",624,1434],[6,"StoreError",624,1434],[6,"VmError",624,1434],[6,"CoreError",624,1434],[6,"CoreCommonError",624,1434],[6,"CoreLoadError",624,1434],[6,"CoreValidationError",624,1434],[6,"CoreInstantiationError",624,1434],[6,"CoreExecutionError",624,1434],[6,"CoreComponentError",624,1434],[6,"HostFuncError",624,1434],[5,"NulError",1447],[5,"FromUtf8Error",1432],[5,"Utf8Error",1448],[5,"FromBytesWithNulError",1449],[10,"Error",1450],[6,"GraphEncoding",1182],[6,"ExecutionTarget",1182],[6,"Ordering",1451],[8,"PluginInstance",1182],[5,"Plugin",1182],[5,"NNPreload",1182],[5,"PluginManager",1182],[5,"WasmEdge_ModuleDescriptor",1282,1415],[5,"WasmEdge_PluginDescriptor",1282,1415],[6,"Val",1332],[5,"ExternRef",1332],[5,"WasmValue",1452],[10,"Sync",1412],[5,"Driver",1368],[5,"WasiModule",1392,1414],[10,"WasmValTypeList",0],[10,"WasmValType",0],[15,"Type",1170],[15,"Type",1172],[15,"NotFoundFuncRegistered",1174],[15,"NotFoundGlobalRegistered",1174],[15,"NotFoundMemRegistered",1174],[15,"NotFoundTableRegistered",1174],[5,"CoreVersion",1368]],"r":[[1,1414],[2,1419],[3,1413],[4,1413],[5,1413],[6,1413],[7,1417],[8,1413],[9,1413],[10,1413],[11,1413],[12,1413],[13,1413],[14,1413],[15,1413],[16,1413],[17,1413],[18,1413],[19,1413],[20,1413],[21,1413],[22,1416],[23,1416],[24,1417],[25,1410],[26,1427],[27,1413],[28,1413],[29,1417],[30,1413],[31,1413],[33,1413],[34,1413],[35,1413],[36,1413],[37,1413],[38,1413],[39,1413],[40,1413],[41,1418],[42,1422],[43,1413],[44,1413],[45,1413],[46,1413],[47,1413],[48,1413],[49,1409],[51,1413],[52,1413],[53,1413],[54,1413],[55,1413],[56,1413],[57,1413],[58,1413],[59,1413],[60,1413],[61,1441],[62,1441],[63,1441],[65,1409],[66,1409],[67,1413],[68,1413],[69,1414],[71,1453],[72,1422],[73,1419],[74,1416],[75,1413],[76,1413],[77,1413],[78,1413],[79,1413],[80,1413],[81,1413],[82,1413],[83,1413],[84,1413],[85,1413],[86,1427],[87,1417],[88,1417],[89,1417],[90,1418],[91,1409],[92,1422],[93,1419],[94,1416],[95,1413],[96,1413],[97,1413],[98,1413],[99,1413],[100,1413],[101,1413],[102,1413],[103,1413],[104,1413],[105,1413],[106,1427],[107,1417],[108,1417],[109,1417],[110,1418],[111,1409],[112,1416],[113,1413],[114,1413],[115,1413],[116,1413],[117,1413],[118,1413],[119,1413],[120,1413],[121,1413],[122,1413],[123,1413],[124,1417],[125,1418],[126,1413],[127,1413],[128,1413],[129,1413],[130,1413],[131,1413],[132,1413],[133,1413],[134,1413],[135,1413],[136,1413],[137,1417],[138,1418],[139,1413],[140,1413],[141,1413],[142,1413],[143,1413],[144,1413],[145,1413],[146,1413],[147,1413],[148,1413],[149,1413],[150,1417],[151,1418],[152,1419],[153,1419],[155,1422],[156,1409],[157,1418],[158,1418],[159,1417],[160,1417],[161,1418],[162,1413],[163,1413],[164,1413],[165,1413],[166,1413],[167,1413],[168,1413],[169,1413],[170,1413],[171,1413],[172,1413],[173,1413],[174,1413],[175,1413],[176,1413],[177,1413],[178,1413],[179,1422],[180,1417],[181,1422],[182,1419],[183,1416],[184,1413],[185,1413],[186,1413],[187,1413],[188,1413],[189,1413],[190,1413],[191,1413],[192,1413],[193,1413],[194,1413],[195,1413],[196,1427],[197,1417],[198,1417],[199,1417],[200,1418],[201,1409],[202,1422],[203,1419],[204,1416],[205,1413],[206,1413],[207,1413],[208,1413],[209,1413],[210,1413],[211,1413],[212,1413],[213,1413],[214,1413],[215,1413],[216,1413],[217,1413],[218,1413],[219,1413],[220,1413],[221,1413],[222,1413],[223,1413],[224,1413],[225,1413],[226,1413],[227,1413],[228,1413],[229,1413],[230,1413],[231,1413],[232,1427],[233,1417],[234,1417],[235,1417],[236,1418],[237,1409],[238,1417],[239,1417],[240,1414],[241,1414],[242,1414],[243,1414],[244,1417],[245,1414],[246,1414],[247,1414],[248,1414],[249,1414],[250,1414],[251,1414],[252,1414],[253,1422],[254,1414],[255,1414],[256,1414],[257,1414],[258,1422],[259,1414],[260,1414],[261,1414],[262,1414],[263,1414],[264,1414],[265,1413],[266,1453],[267,1417],[268,1422],[269,1409],[270,1422],[271,1419],[272,1416],[273,1413],[274,1413],[275,1413],[276,1413],[277,1413],[278,1413],[279,1413],[280,1413],[281,1413],[282,1413],[283,1413],[284,1427],[285,1417],[286,1417],[287,1417],[288,1418],[289,1409],[290,1427],[291,1427],[292,1427],[293,1413],[294,1413],[295,1414],[296,1414],[297,1414],[298,1414],[299,1413],[300,1413],[301,1417],[302,1413],[303,1414],[304,1414],[305,1417],[306,1417],[307,1422],[308,1409],[309,1422],[310,1419],[311,1416],[312,1413],[313,1413],[314,1413],[315,1413],[316,1418],[317,1409],[320,1422],[321,1409],[322,1422],[323,1413],[324,1413],[325,1409],[326,1409],[327,1418],[328,1418],[329,1413],[330,1409],[331,1409],[332,1414],[333,1414],[334,1414],[335,1414],[336,1413],[337,1413],[338,1413],[339,1413],[340,1413],[341,1413],[342,1413],[343,1413],[344,1413],[345,1413],[346,1413],[347,1417],[348,1418],[349,1413],[350,1441],[351,1422],[352,1419],[353,1416],[354,1413],[355,1413],[356,1413],[357,1413],[358,1413],[359,1413],[360,1413],[361,1413],[362,1413],[363,1413],[364,1413],[365,1427],[366,1417],[367,1417],[368,1417],[369,1418],[370,1409],[371,1422],[372,1419],[373,1416],[374,1413],[375,1413],[376,1413],[377,1413],[378,1413],[379,1413],[380,1413],[381,1413],[382,1413],[383,1413],[384,1413],[385,1427],[386,1417],[387,1417],[388,1417],[389,1418],[390,1409],[391,1417],[392,1417],[393,1422],[394,1419],[395,1416],[396,1413],[397,1413],[398,1413],[399,1413],[400,1413],[401,1413],[402,1413],[403,1413],[404,1413],[405,1413],[406,1413],[407,1427],[408,1417],[409,1417],[410,1417],[411,1418],[412,1409],[415,1413],[419,1416],[420,1416],[421,1416],[422,1416],[423,1416],[424,1444],[425,1444],[426,1444],[427,1444],[428,1444],[429,1444],[430,1444],[431,1444],[433,1444],[434,1444],[435,1444],[436,1444],[477,1444],[478,1444],[479,1444],[481,1444],[482,1444],[483,1444],[484,1444],[485,1444],[486,1444],[487,1444],[488,1444],[489,1444],[490,1444],[491,1444],[492,1444],[624,1434],[625,1434],[626,1434],[627,1434],[628,1434],[629,1434],[630,1434],[631,1434],[632,1434],[633,1434],[634,1434],[635,1434],[636,1434],[637,1434],[638,1434],[639,1434],[640,1434],[641,1434],[642,1434],[643,1434],[644,1434],[645,1434],[646,1434],[647,1434],[648,1434],[649,1434],[650,1434],[651,1434],[652,1434],[653,1434],[654,1434],[655,1434],[656,1434],[657,1434],[658,1434],[659,1434],[660,1434],[661,1434],[662,1434],[663,1434],[664,1434],[665,1434],[666,1434],[667,1434],[668,1434],[669,1434],[670,1434],[671,1434],[672,1434],[673,1434],[674,1434],[675,1434],[676,1434],[677,1434],[678,1434],[679,1434],[680,1434],[681,1434],[682,1434],[683,1434],[684,1434],[685,1434],[686,1434],[687,1434],[688,1434],[689,1434],[690,1434],[691,1434],[692,1434],[693,1434],[694,1434],[695,1434],[696,1434],[697,1434],[698,1434],[699,1434],[700,1434],[701,1434],[702,1434],[703,1434],[704,1434],[705,1434],[706,1434],[707,1434],[708,1434],[709,1434],[710,1434],[711,1434],[712,1434],[713,1434],[714,1434],[715,1434],[716,1434],[717,1434],[718,1434],[719,1434],[720,1434],[721,1434],[722,1434],[723,1434],[724,1434],[725,1434],[726,1434],[727,1434],[728,1434],[729,1434],[730,1434],[731,1434],[732,1434],[733,1434],[734,1434],[735,1434],[736,1434],[737,1434],[738,1434],[739,1434],[740,1434],[741,1434],[742,1434],[743,1434],[744,1434],[745,1434],[746,1434],[747,1434],[748,1434],[749,1434],[750,1434],[751,1434],[752,1434],[753,1434],[754,1434],[755,1434],[756,1434],[757,1434],[758,1434],[759,1434],[760,1434],[761,1434],[762,1434],[763,1434],[764,1434],[765,1434],[766,1434],[767,1434],[768,1434],[769,1434],[770,1434],[771,1434],[772,1434],[773,1434],[774,1434],[775,1434],[776,1434],[777,1434],[778,1434],[779,1434],[780,1434],[781,1434],[782,1434],[783,1434],[784,1434],[785,1434],[786,1434],[787,1434],[788,1434],[789,1434],[790,1434],[791,1434],[792,1434],[793,1434],[794,1434],[795,1434],[796,1434],[797,1434],[798,1434],[799,1434],[800,1434],[801,1434],[802,1434],[803,1434],[804,1434],[805,1434],[806,1434],[807,1434],[808,1434],[809,1434],[810,1434],[811,1434],[812,1434],[813,1434],[814,1434],[815,1434],[816,1434],[817,1434],[818,1434],[819,1434],[820,1434],[821,1434],[822,1434],[823,1434],[824,1434],[825,1434],[826,1434],[827,1434],[828,1434],[829,1434],[830,1434],[831,1434],[832,1434],[833,1434],[834,1434],[835,1434],[836,1434],[837,1434],[838,1434],[839,1434],[840,1434],[841,1434],[842,1434],[843,1434],[844,1434],[845,1434],[846,1434],[847,1434],[848,1434],[849,1434],[850,1434],[851,1434],[852,1434],[853,1434],[854,1434],[855,1434],[856,1434],[857,1434],[858,1434],[859,1434],[860,1434],[861,1434],[862,1434],[863,1434],[864,1434],[865,1434],[866,1434],[867,1434],[868,1434],[869,1434],[870,1434],[871,1434],[872,1434],[873,1434],[874,1434],[875,1434],[876,1434],[877,1434],[878,1434],[879,1434],[880,1434],[881,1434],[882,1434],[883,1434],[884,1434],[885,1434],[886,1434],[887,1434],[888,1434],[889,1434],[890,1434],[891,1434],[892,1434],[893,1434],[894,1434],[895,1434],[896,1434],[897,1434],[898,1434],[899,1434],[900,1434],[901,1434],[902,1434],[903,1434],[904,1434],[905,1434],[906,1434],[907,1434],[908,1434],[909,1434],[910,1434],[911,1434],[912,1434],[913,1434],[914,1434],[915,1434],[916,1434],[917,1434],[918,1434],[919,1434],[920,1434],[921,1434],[922,1434],[923,1434],[924,1434],[925,1434],[926,1434],[927,1434],[928,1434],[929,1434],[930,1434],[931,1434],[932,1434],[933,1434],[934,1434],[935,1434],[936,1434],[937,1434],[938,1434],[939,1434],[940,1434],[941,1434],[942,1434],[943,1434],[944,1434],[945,1434],[946,1434],[947,1434],[948,1434],[949,1434],[950,1434],[951,1434],[952,1434],[953,1434],[954,1434],[955,1434],[956,1434],[957,1434],[958,1434],[959,1434],[960,1434],[961,1434],[962,1434],[963,1434],[964,1434],[965,1434],[966,1434],[967,1434],[968,1434],[969,1434],[970,1434],[971,1434],[972,1434],[973,1434],[974,1434],[975,1434],[976,1434],[977,1434],[978,1434],[979,1434],[980,1434],[981,1434],[982,1434],[983,1434],[984,1434],[985,1434],[986,1434],[987,1434],[988,1434],[989,1434],[990,1434],[991,1434],[992,1434],[993,1434],[994,1434],[995,1434],[996,1434],[997,1434],[998,1434],[999,1434],[1000,1434],[1001,1434],[1002,1434],[1003,1434],[1004,1434],[1005,1434],[1006,1434],[1007,1434],[1008,1434],[1009,1434],[1010,1434],[1011,1434],[1012,1434],[1013,1434],[1014,1434],[1015,1434],[1016,1434],[1017,1434],[1018,1434],[1019,1434],[1020,1434],[1021,1434],[1022,1434],[1023,1434],[1024,1434],[1025,1434],[1026,1434],[1027,1434],[1028,1434],[1029,1434],[1030,1434],[1031,1434],[1032,1434],[1033,1434],[1034,1434],[1035,1434],[1036,1434],[1037,1434],[1038,1434],[1039,1434],[1040,1434],[1041,1434],[1042,1434],[1043,1434],[1044,1434],[1045,1434],[1046,1434],[1047,1434],[1048,1434],[1049,1434],[1050,1434],[1051,1434],[1052,1434],[1053,1434],[1054,1434],[1055,1434],[1056,1434],[1057,1434],[1058,1434],[1059,1434],[1060,1434],[1061,1434],[1062,1434],[1063,1434],[1064,1434],[1065,1434],[1066,1434],[1067,1434],[1068,1434],[1069,1434],[1070,1434],[1071,1434],[1072,1434],[1073,1434],[1074,1434],[1075,1434],[1076,1434],[1077,1434],[1078,1434],[1079,1434],[1080,1434],[1081,1434],[1082,1434],[1083,1434],[1084,1434],[1085,1434],[1086,1434],[1087,1434],[1088,1434],[1089,1434],[1090,1434],[1091,1434],[1092,1434],[1093,1434],[1094,1434],[1095,1434],[1096,1434],[1097,1434],[1098,1434],[1099,1434],[1100,1434],[1101,1434],[1102,1434],[1103,1434],[1104,1434],[1105,1434],[1106,1434],[1107,1434],[1108,1434],[1109,1434],[1110,1434],[1111,1434],[1112,1434],[1113,1434],[1114,1434],[1115,1434],[1116,1434],[1117,1434],[1118,1434],[1119,1434],[1120,1434],[1121,1434],[1122,1434],[1123,1434],[1124,1434],[1125,1434],[1126,1434],[1127,1434],[1128,1434],[1129,1434],[1130,1434],[1131,1434],[1132,1434],[1133,1434],[1134,1434],[1135,1434],[1136,1434],[1137,1434],[1138,1434],[1139,1434],[1140,1434],[1141,1434],[1142,1434],[1143,1434],[1144,1434],[1145,1434],[1146,1434],[1147,1434],[1148,1434],[1149,1434],[1150,1434],[1151,1434],[1152,1434],[1153,1434],[1154,1434],[1155,1434],[1156,1434],[1157,1434],[1158,1434],[1159,1434],[1160,1434],[1161,1434],[1162,1434],[1163,1434],[1164,1434],[1165,1434],[1166,1434],[1167,1434],[1168,1434],[1169,1434],[1282,1415],[1283,1415],[1284,1415],[1285,1415],[1286,1415],[1287,1415],[1288,1415],[1289,1415],[1290,1415],[1291,1415],[1292,1415],[1293,1415],[1294,1415],[1295,1415],[1296,1415],[1297,1415],[1298,1415],[1299,1415],[1300,1415],[1301,1415],[1302,1415],[1303,1415],[1304,1415],[1305,1415],[1306,1415],[1307,1415],[1308,1415],[1309,1415],[1310,1415],[1311,1415],[1312,1415],[1313,1415],[1314,1415],[1315,1415],[1316,1415],[1317,1415],[1318,1415],[1319,1415],[1320,1415],[1321,1415],[1322,1415],[1323,1415],[1324,1415],[1325,1415],[1326,1415],[1327,1415],[1328,1415],[1329,1415],[1330,1415],[1331,1415],[1392,1414],[1393,1414],[1394,1414],[1395,1414],[1396,1414],[1397,1414],[1398,1414],[1399,1414],[1400,1414],[1401,1414],[1402,1414],[1403,1414],[1404,1414],[1405,1414],[1406,1414],[1407,1414],[1408,1414]],"b":[[190,"impl-Display-for-ExternalInstanceType"],[191,"impl-Debug-for-ExternalInstanceType"],[208,"impl-From%3CWasmEdge_ValType%3E-for-ValType"],[209,"impl-From%3CRefType%3E-for-ValType"],[211,"impl-From%3Ci32%3E-for-Mutability"],[212,"impl-From%3Cu32%3E-for-Mutability"],[214,"impl-From%3Cu32%3E-for-CompilerOptimizationLevel"],[215,"impl-From%3Ci32%3E-for-CompilerOptimizationLevel"],[216,"impl-From%3Ci32%3E-for-CompilerOutputFormat"],[218,"impl-From%3Cu32%3E-for-CompilerOutputFormat"],[221,"impl-From%3Ci32%3E-for-ExternalInstanceType"],[222,"impl-From%3Cu32%3E-for-ExternalInstanceType"],[983,"impl-Display-for-WasmEdgeError"],[984,"impl-Debug-for-WasmEdgeError"],[985,"impl-Display-for-FuncError"],[986,"impl-Debug-for-FuncError"],[987,"impl-Display-for-MemError"],[988,"impl-Debug-for-MemError"],[989,"impl-Debug-for-GlobalError"],[990,"impl-Display-for-GlobalError"],[991,"impl-Display-for-TableError"],[992,"impl-Debug-for-TableError"],[993,"impl-Display-for-ImportError"],[994,"impl-Debug-for-ImportError"],[995,"impl-Debug-for-ExportError"],[996,"impl-Display-for-ExportError"],[997,"impl-Debug-for-InstanceError"],[998,"impl-Display-for-InstanceError"],[999,"impl-Debug-for-PluginError"],[1000,"impl-Display-for-PluginError"],[1001,"impl-Debug-for-StoreError"],[1002,"impl-Display-for-StoreError"],[1003,"impl-Display-for-VmError"],[1004,"impl-Debug-for-VmError"],[1005,"impl-Display-for-CoreError"],[1006,"impl-Debug-for-CoreError"],[1007,"impl-Debug-for-CoreCommonError"],[1008,"impl-Display-for-CoreCommonError"],[1009,"impl-Debug-for-CoreLoadError"],[1010,"impl-Display-for-CoreLoadError"],[1011,"impl-Debug-for-CoreValidationError"],[1012,"impl-Display-for-CoreValidationError"],[1013,"impl-Debug-for-CoreInstantiationError"],[1014,"impl-Display-for-CoreInstantiationError"],[1015,"impl-Display-for-CoreExecutionError"],[1016,"impl-Debug-for-CoreExecutionError"],[1017,"impl-Display-for-CoreComponentError"],[1018,"impl-Debug-for-CoreComponentError"],[1019,"impl-Display-for-HostFuncError"],[1020,"impl-Debug-for-HostFuncError"],[1021,"impl-From%3CVmError%3E-for-WasmEdgeError"],[1022,"impl-From%3CStoreError%3E-for-WasmEdgeError"],[1023,"impl-From%3CGlobalError%3E-for-WasmEdgeError"],[1024,"impl-From%3CMemError%3E-for-WasmEdgeError"],[1025,"impl-From%3CNulError%3E-for-WasmEdgeError"],[1027,"impl-From%3CPluginError%3E-for-WasmEdgeError"],[1028,"impl-From%3CInstanceError%3E-for-WasmEdgeError"],[1029,"impl-From%3CFromUtf8Error%3E-for-WasmEdgeError"],[1030,"impl-From%3CExportError%3E-for-WasmEdgeError"],[1031,"impl-From%3CFuncError%3E-for-WasmEdgeError"],[1032,"impl-From%3CImportError%3E-for-WasmEdgeError"],[1033,"impl-From%3CUtf8Error%3E-for-WasmEdgeError"],[1034,"impl-From%3CFromBytesWithNulError%3E-for-WasmEdgeError"],[1035,"impl-From%3CCoreError%3E-for-WasmEdgeError"],[1036,"impl-From%3CTableError%3E-for-WasmEdgeError"],[1224,"impl-Debug-for-NNPreload"],[1225,"impl-Display-for-NNPreload"],[1226,"impl-Display-for-GraphEncoding"],[1227,"impl-Debug-for-GraphEncoding"],[1228,"impl-Debug-for-ExecutionTarget"],[1229,"impl-Display-for-ExecutionTarget"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAANIDUgA0AAYAPAAAAEcAAABJACcAcgAmAKMAAwCoAAoAtAAAALYAFADOAAAA0QABANQAAQDXAAIA2wAAAN0AAgDhAAAA5AAAAOYAAADoAAAA/AAEAAMBAAAKAQAAPgEAAEMBAABRATYAigETAKEBAACpAQYAsQEAALMBAgC3AQAAugEBAL0BAADBAQIAyQEAAM0BAQDQAQAA1QEAANsBAgDfAQQA5wEAAOsBAgD0AQsAAwIOABQCAAAWAgIAGwIFAFcCFgBxAg8AiQIbAKYCAgCqAgUAsQICALUCBwC+AgUAxQI9AAQDLwA1AwoAQQMAAEMDHABiA6AABAQJADMEbgCjBAEApwQBAKoEAACsBBYAxAQCAMkEBwDWBAIA4AQFAO0EIAAPBQAAEQURACkFCwA9BQwATwUJAFwFBABpBQUAcgUEAHkFAAB/BQIA","P":[[65,"T"],[67,""],[72,"T"],[112,"Data"],[113,""],[126,"T"],[139,""],[152,",,"],[155,"T,"],[157,""],[179,"T"],[180,""],[181,"T"],[182,""],[183,"Data"],[184,""],[201,"T"],[205,""],[206,"T"],[208,""],[210,"T"],[211,""],[213,"T"],[214,""],[217,"T"],[218,""],[219,"T"],[220,""],[223,"T"],[224,""],[225,"T"],[227,""],[228,"T"],[229,""],[230,"T"],[231,""],[232,"T"],[238,""],[240,""],[244,""],[245,""],[249,""],[253,"T,"],[254,""],[258,"T,"],[259,""],[261,""],[265,"__H"],[267,""],[268,"T"],[270,"U"],[290,""],[307,"T"],[310,""],[311,"Data"],[312,""],[317,"T"],[322,"T,"],[323,""],[325,"T,,"],[327,""],[328,""],[329,""],[330,"T"],[332,""],[336,"T"],[349,""],[351,"U,T"],[371,"U"],[391,""],[419,"Data,"],[425,""],[428,"T"],[430,""],[431,"T"],[433,"U"],[434,"U,T"],[435,"U"],[436,""],[441,"T"],[443,"Data"],[445,"T"],[446,"U"],[447,",Data"],[448,"U,T"],[449,"U"],[450,""],[451,"Data,"],[458,"T"],[462,"T,"],[463,"T"],[466,"U"],[467,"T"],[470,"T,,"],[472,"T"],[474,"U,T"],[475,"U"],[476,""],[481,"T"],[483,",,"],[484,""],[487,"T"],[488,"U"],[489,""],[490,"U,T"],[491,"U"],[492,""],[499,"T"],[511,""],[519,"T"],[524,""],[544,"T"],[550,""],[560,"U"],[566,""],[598,"T"],[603,"U,T"],[609,"U"],[615,""],[869,"T"],[907,""],[926,"T"],[945,""],[1026,"T"],[1027,""],[1037,"T"],[1055,"U"],[1074,""],[1075,"T"],[1094,""],[1113,"U,T"],[1132,"U"],[1151,""],[1200,"T"],[1210,""],[1212,"T"],[1214,""],[1219,","],[1220,""],[1223,""],[1224,""],[1232,"T"],[1237,"FromStr::Err"],[1240,""],[1241,"U"],[1246,""],[1254,""],[1255,""],[1258,","],[1259,""],[1262,"T"],[1264,""],[1267,"U,T"],[1272,"U"],[1277,""],[1296,"T"],[1302,""],[1305,"T"],[1308,""],[1314,"T"],[1317,"U"],[1320,"T"],[1323,"U,T"],[1326,"U"],[1329,""],[1340,"T"],[1344,""],[1346,"T"],[1348,""],[1353,"T"],[1355,"U"],[1357,"T"],[1360,""],[1361,"U,T"],[1363,"U"],[1365,""],[1370,"V,I"],[1371,"T"],[1375,""],[1376,"T"],[1378,"U"],[1380,""],[1383,"V,I"],[1384,"U,T"],[1386,"U"],[1388,""],[1390,"V,I"],[1391,""],[1396,"T"],[1398,""],[1401,"T"],[1402,""],[1404,"U"],[1405,""],[1406,"U,T"],[1407,"U"],[1408,""]]}],["wasmedge_sys",{"t":"KFFFFFIFFFFFFFFFFFFFIFFFIFFNNNONNMNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONCNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCCNNNEECCCFFNNNNNNNNNNNNNNNNNNNNNNNNNIFNNNNNNNNNNNFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOPPOOOOPPOOOOOFHHHHHFHHHHHHFHHHFHHHHHHFHHISSSSSSISSHHHHHHHHHHHHFHHHHHHHHHHHHHHHHHHHHHISSISSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSHFHHHHHHHHFHHHHHHHISSSSSFHHHHHFHHHHHHFHHHHHFHHHHIISFHHHHHHHHFHFHHHHHHHHHFHHHHHHHHHFHHHFHHHHFHHHHHHHHHHHHHHHHHHHHHHHHHISSFHFHHHHHHHHHFSHFISSSSSSSSSSSSSISSSSSSSSSSSSSSSSSSFHHHHHHFHHHHHHHFHHHHHFHHHHHHFHHHHHHHHFHHHHFHFHISSSSSSSSSSSSSSSSSSSSSSSSSSSSSHHHHHHHFHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHHHHHHHHHHHHFHHHFHHHHHHHHHHHHHHHHHHHINNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNINNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNIFNNFFFFFNNNNNNNNNNNNNNCCNCCCNNNNKIIFINNNNMNFNNNNNNFNNNNNNNNNNNNNNKFFFNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNFNNNNNNNNPPPPPPFIPFFFIFFGPPPPPPNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNOONNNNNNONNNNNNNNNNNNNNNNNNNNNNNFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHHHHHHHHHH","n":["AsInstance","CallingFrame","Compiler","Config","Executor","ExportType","FuncRef","FuncType","Function","Global","GlobalType","ImportModule","ImportType","Instance","Loader","Memory","MemoryType","Module","Statistics","Store","SyncFn","Table","TableType","Validator","WasiCtx","WasiModule","WasmValue","annotations","annotations_enabled","args","","args_len","as_mut","as_ptr","","","","","","","","","as_ref","async","borrow","","","","","","","","","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","","","","","","","","","bulk_memory_operations","bulk_memory_operations_enabled","call_func","call_func_async","call_func_async_with_timeout","call_func_ref","call_func_ref_async","call_func_with_timeout","clear","clone","","","","","","clone_into","","","","","","clone_to_uninit","","","","","","compile_from_bytes","compile_from_file","contains","cost_in_total","count_instructions","count_of_exports","count_of_imports","create","","","","","","","default","","","","drop","","","","","","","","","","","","","","","dump_ir","dump_ir_enabled","elem_ty","eq","","","","exception_handling","exception_handling_enabled","exit_code","export","ffi","fmt","","","","","","","","","","","","","","","","","","","","","","","frame","from","","","","","","","","","","","","","","","","","","","","","","","","from_bytes","from_file","from_raw","func_len","func_names","function_references","function_references_enabled","gc","gc_enabled","generic_binary","generic_binary_enabled","get_aot_compiler_output_format","get_aot_optimization_level","get_data","get_func","get_func_mut","get_func_raw","get_global","get_global_mut","get_iovec","get_max_memory_pages","get_memory_mut","get_memory_ref","get_slice","get_table","global_len","global_names","imports","instance","instr_count","instr_per_sec","interpreter_mode","interpreter_mode_enabled","interruptible","interruptible_enabled","into","","","","","","","","","","","","","","","","","","","","","","","is_cost_measuring","is_instruction_counting","is_time_measuring","maximum","","measure_cost","measure_time","mem_len","mem_names","memory64","memory64_enabled","minimum","","module","module_len","module_name","module_names","multi_memories","multi_memories_enabled","multi_value","multi_value_enabled","mut_data","mut_iovec","mut_slice","mutability","mutable_globals","mutable_globals_enabled","name","","","","new","","","","non_trap_conversions","non_trap_conversions_enabled","plugin","reference_types","reference_types_enabled","register_active_module","register_import_module","register_named_module","returns","returns_len","set_aot_compiler_output_format","set_aot_optimization_level","set_cost_limit","set_cost_table","set_max_memory_pages","shared","sign_extension_operators","sign_extension_operators_enabled","simd","simd_enabled","table_len","table_names","tail_call","tail_call_enabled","threads","threads_enabled","to_owned","","","","","","try_from","","","","","","","","","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","","","","","","","","","ty","","type_id","","","","","","","","","","","","","","","","","","","","","","","types","utils","validate","value_ty","write_data","AsyncWasiModule","async_wasi","fiber","function","module","AsyncCx","AsyncState","async_cx","borrow","","borrow_mut","","clone","clone_into","clone_to_uninit","default","","fmt","","from","","into","","new","","to_owned","try_from","","try_into","","type_id","","AsyncFn","AsyncFunction","as_mut","as_ref","borrow","borrow_mut","create_async_func","from","get_func_raw","into","try_from","try_into","type_id","AsyncImportObject","AsyncInstance","AsyncWasiModule","add_async_func","as_mut","","","as_ptr","","as_ref","","","borrow","","","borrow_mut","","","create","","create_from_wasi_context","deref","deref_mut","exit_code","fmt","","","from","","","into","","","name","try_from","","","try_into","","","type_id","","","APIVersion","Buf","","Build","Code","Create","Data","DefaultValue","Description","","","HasMax","Length","","Major","Max","Min","Minor","ModuleCount","ModuleDescriptions","Name","","","None","","Patch","ProgramOptionCount","ProgramOptions","Shared","Some","","Storage","Type","","Value","Version","WasmEdge_ASTModuleContext","WasmEdge_ASTModuleDelete","WasmEdge_ASTModuleListExports","WasmEdge_ASTModuleListExportsLength","WasmEdge_ASTModuleListImports","WasmEdge_ASTModuleListImportsLength","WasmEdge_Async","WasmEdge_AsyncCancel","WasmEdge_AsyncDelete","WasmEdge_AsyncGet","WasmEdge_AsyncGetReturnsLength","WasmEdge_AsyncWait","WasmEdge_AsyncWaitFor","WasmEdge_Bytes","WasmEdge_BytesCreate","WasmEdge_BytesDelete","WasmEdge_BytesWrap","WasmEdge_CallingFrameContext","WasmEdge_CallingFrameGetExecutor","WasmEdge_CallingFrameGetMemoryInstance","WasmEdge_CallingFrameGetModuleInstance","WasmEdge_CompilerCompile","WasmEdge_CompilerCompileFromBuffer","WasmEdge_CompilerCompileFromBytes","WasmEdge_CompilerContext","WasmEdge_CompilerCreate","WasmEdge_CompilerDelete","WasmEdge_CompilerOptimizationLevel","WasmEdge_CompilerOptimizationLevel_O0","WasmEdge_CompilerOptimizationLevel_O1","WasmEdge_CompilerOptimizationLevel_O2","WasmEdge_CompilerOptimizationLevel_O3","WasmEdge_CompilerOptimizationLevel_Os","WasmEdge_CompilerOptimizationLevel_Oz","WasmEdge_CompilerOutputFormat","WasmEdge_CompilerOutputFormat_Native","WasmEdge_CompilerOutputFormat_Wasm","WasmEdge_ConfigureAddHostRegistration","WasmEdge_ConfigureAddProposal","WasmEdge_ConfigureCompilerGetOptimizationLevel","WasmEdge_ConfigureCompilerGetOutputFormat","WasmEdge_ConfigureCompilerIsDumpIR","WasmEdge_ConfigureCompilerIsGenericBinary","WasmEdge_ConfigureCompilerIsInterruptible","WasmEdge_ConfigureCompilerSetDumpIR","WasmEdge_ConfigureCompilerSetGenericBinary","WasmEdge_ConfigureCompilerSetInterruptible","WasmEdge_ConfigureCompilerSetOptimizationLevel","WasmEdge_ConfigureCompilerSetOutputFormat","WasmEdge_ConfigureContext","WasmEdge_ConfigureCreate","WasmEdge_ConfigureDelete","WasmEdge_ConfigureGetMaxMemoryPage","WasmEdge_ConfigureHasHostRegistration","WasmEdge_ConfigureHasProposal","WasmEdge_ConfigureIsAllowAFUNIX","WasmEdge_ConfigureIsForceInterpreter","WasmEdge_ConfigureRemoveHostRegistration","WasmEdge_ConfigureRemoveProposal","WasmEdge_ConfigureSetAllowAFUNIX","WasmEdge_ConfigureSetForceInterpreter","WasmEdge_ConfigureSetMaxMemoryPage","WasmEdge_ConfigureStatisticsIsCostMeasuring","WasmEdge_ConfigureStatisticsIsInstructionCounting","WasmEdge_ConfigureStatisticsIsTimeMeasuring","WasmEdge_ConfigureStatisticsSetCostMeasuring","WasmEdge_ConfigureStatisticsSetInstructionCounting","WasmEdge_ConfigureStatisticsSetTimeMeasuring","WasmEdge_Driver_Compiler","WasmEdge_Driver_Tool","WasmEdge_Driver_UniTool","WasmEdge_ErrCategory","WasmEdge_ErrCategory_UserLevelError","WasmEdge_ErrCategory_WASM","WasmEdge_ErrCode","WasmEdge_ErrCode_AOTDisabled","WasmEdge_ErrCode_AccessNullArray","WasmEdge_ErrCode_AccessNullException","WasmEdge_ErrCode_AccessNullFunc","WasmEdge_ErrCode_AccessNullI31","WasmEdge_ErrCode_AccessNullStruct","WasmEdge_ErrCode_ArrayOutOfBounds","WasmEdge_ErrCode_ArrayTypesMismatch","WasmEdge_ErrCode_ArrayTypesNumtypeRequired","WasmEdge_ErrCode_CastFailed","WasmEdge_ErrCode_CastNullToNonNull","WasmEdge_ErrCode_ConstExprRequired","WasmEdge_ErrCode_CoreInvalidExport","WasmEdge_ErrCode_CostLimitExceeded","WasmEdge_ErrCode_DataCountRequired","WasmEdge_ErrCode_DataSegDoesNotFit","WasmEdge_ErrCode_DivideByZero","WasmEdge_ErrCode_DupExportName","WasmEdge_ErrCode_ENDCodeExpected","WasmEdge_ErrCode_ElemSegDoesNotFit","WasmEdge_ErrCode_ExpectSharedMemory","WasmEdge_ErrCode_ExpectedZeroByte","WasmEdge_ErrCode_FuncNotFound","WasmEdge_ErrCode_FuncSigMismatch","WasmEdge_ErrCode_HostFuncError","WasmEdge_ErrCode_IllegalGrammar","WasmEdge_ErrCode_IllegalOpCode","WasmEdge_ErrCode_IllegalPath","WasmEdge_ErrCode_ImmutableArray","WasmEdge_ErrCode_ImmutableField","WasmEdge_ErrCode_ImmutableGlobal","WasmEdge_ErrCode_IncompatibleDataCount","WasmEdge_ErrCode_IncompatibleFuncCode","WasmEdge_ErrCode_IncompatibleImportType","WasmEdge_ErrCode_IndirectCallTypeMismatch","WasmEdge_ErrCode_InstrTypeMismatch","WasmEdge_ErrCode_IntegerOverflow","WasmEdge_ErrCode_IntegerTooLarge","WasmEdge_ErrCode_IntegerTooLong","WasmEdge_ErrCode_Interrupted","WasmEdge_ErrCode_IntrinsicsTableNotFound","WasmEdge_ErrCode_InvalidAlignment","WasmEdge_ErrCode_InvalidBrRefType","WasmEdge_ErrCode_InvalidCanonOption","WasmEdge_ErrCode_InvalidConvToInt","WasmEdge_ErrCode_InvalidCoreSort","WasmEdge_ErrCode_InvalidDataIdx","WasmEdge_ErrCode_InvalidElemIdx","WasmEdge_ErrCode_InvalidFieldIdx","WasmEdge_ErrCode_InvalidFuncIdx","WasmEdge_ErrCode_InvalidFuncTypeIdx","WasmEdge_ErrCode_InvalidGlobalIdx","WasmEdge_ErrCode_InvalidLabelIdx","WasmEdge_ErrCode_InvalidLaneIdx","WasmEdge_ErrCode_InvalidLimit","WasmEdge_ErrCode_InvalidLocalIdx","WasmEdge_ErrCode_InvalidMemPages","WasmEdge_ErrCode_InvalidMemoryIdx","WasmEdge_ErrCode_InvalidMut","WasmEdge_ErrCode_InvalidNotDefaultableArray","WasmEdge_ErrCode_InvalidNotDefaultableField","WasmEdge_ErrCode_InvalidPackedArray","WasmEdge_ErrCode_InvalidPackedField","WasmEdge_ErrCode_InvalidRefIdx","WasmEdge_ErrCode_InvalidResultArity","WasmEdge_ErrCode_InvalidStartFunc","WasmEdge_ErrCode_InvalidStoreAlignment","WasmEdge_ErrCode_InvalidSubType","WasmEdge_ErrCode_InvalidTableIdx","WasmEdge_ErrCode_InvalidTagIdx","WasmEdge_ErrCode_InvalidTagResultType","WasmEdge_ErrCode_InvalidUninitLocal","WasmEdge_ErrCode_InvalidUnpackedArray","WasmEdge_ErrCode_InvalidUnpackedField","WasmEdge_ErrCode_JunkSection","WasmEdge_ErrCode_LengthOutOfBounds","WasmEdge_ErrCode_MalformedAliasTarget","WasmEdge_ErrCode_MalformedCanonical","WasmEdge_ErrCode_MalformedCoreInstance","WasmEdge_ErrCode_MalformedDefType","WasmEdge_ErrCode_MalformedElemType","WasmEdge_ErrCode_MalformedExportKind","WasmEdge_ErrCode_MalformedFlagsType","WasmEdge_ErrCode_MalformedImportKind","WasmEdge_ErrCode_MalformedInstance","WasmEdge_ErrCode_MalformedMagic","WasmEdge_ErrCode_MalformedName","WasmEdge_ErrCode_MalformedRecordType","WasmEdge_ErrCode_MalformedRefType","WasmEdge_ErrCode_MalformedSection","WasmEdge_ErrCode_MalformedSort","WasmEdge_ErrCode_MalformedTable","WasmEdge_ErrCode_MalformedTupleType","WasmEdge_ErrCode_MalformedUTF8","WasmEdge_ErrCode_MalformedValType","WasmEdge_ErrCode_MalformedVariantType","WasmEdge_ErrCode_MalformedVersion","WasmEdge_ErrCode_MemoryOutOfBounds","WasmEdge_ErrCode_ModuleNameConflict","WasmEdge_ErrCode_MultiMemories","WasmEdge_ErrCode_MultiTables","WasmEdge_ErrCode_NonNullRequired","WasmEdge_ErrCode_NotValidated","WasmEdge_ErrCode_ReadError","WasmEdge_ErrCode_RefTypeMismatch","WasmEdge_ErrCode_RuntimeError","WasmEdge_ErrCode_SectionSizeMismatch","WasmEdge_ErrCode_SetValueErrorType","WasmEdge_ErrCode_SetValueToConst","WasmEdge_ErrCode_SharedMemoryNoMax","WasmEdge_ErrCode_Success","WasmEdge_ErrCode_TableOutOfBounds","WasmEdge_ErrCode_Terminated","WasmEdge_ErrCode_TooManyLocals","WasmEdge_ErrCode_TypeCheckFailed","WasmEdge_ErrCode_UnalignedAtomicAccess","WasmEdge_ErrCode_UncaughtException","WasmEdge_ErrCode_UndefinedElement","WasmEdge_ErrCode_UnexpectedEnd","WasmEdge_ErrCode_UninitializedElement","WasmEdge_ErrCode_UnknownCanonicalOption","WasmEdge_ErrCode_UnknownImport","WasmEdge_ErrCode_Unreachable","WasmEdge_ErrCode_UserDefError","WasmEdge_ErrCode_WrongInstanceAddress","WasmEdge_ErrCode_WrongInstanceIndex","WasmEdge_ErrCode_WrongVMWorkflow","WasmEdge_ExecutorAsyncInvoke","WasmEdge_ExecutorContext","WasmEdge_ExecutorCreate","WasmEdge_ExecutorDelete","WasmEdge_ExecutorExperimentalRegisterPostHostFunction","WasmEdge_ExecutorExperimentalRegisterPreHostFunction","WasmEdge_ExecutorInstantiate","WasmEdge_ExecutorInvoke","WasmEdge_ExecutorRegister","WasmEdge_ExecutorRegisterImport","WasmEdge_ExportTypeContext","WasmEdge_ExportTypeGetExternalName","WasmEdge_ExportTypeGetExternalType","WasmEdge_ExportTypeGetFunctionType","WasmEdge_ExportTypeGetGlobalType","WasmEdge_ExportTypeGetMemoryType","WasmEdge_ExportTypeGetTableType","WasmEdge_ExportTypeGetTagType","WasmEdge_ExternalType","WasmEdge_ExternalType_Function","WasmEdge_ExternalType_Global","WasmEdge_ExternalType_Memory","WasmEdge_ExternalType_Table","WasmEdge_ExternalType_Tag","WasmEdge_FunctionInstanceContext","WasmEdge_FunctionInstanceCreate","WasmEdge_FunctionInstanceCreateBinding","WasmEdge_FunctionInstanceDelete","WasmEdge_FunctionInstanceGetData","WasmEdge_FunctionInstanceGetFunctionType","WasmEdge_FunctionTypeContext","WasmEdge_FunctionTypeCreate","WasmEdge_FunctionTypeDelete","WasmEdge_FunctionTypeGetParameters","WasmEdge_FunctionTypeGetParametersLength","WasmEdge_FunctionTypeGetReturns","WasmEdge_FunctionTypeGetReturnsLength","WasmEdge_GlobalInstanceContext","WasmEdge_GlobalInstanceCreate","WasmEdge_GlobalInstanceDelete","WasmEdge_GlobalInstanceGetGlobalType","WasmEdge_GlobalInstanceGetValue","WasmEdge_GlobalInstanceSetValue","WasmEdge_GlobalTypeContext","WasmEdge_GlobalTypeCreate","WasmEdge_GlobalTypeDelete","WasmEdge_GlobalTypeGetMutability","WasmEdge_GlobalTypeGetValType","WasmEdge_HostFunc_t","WasmEdge_HostRegistration","WasmEdge_HostRegistration_Wasi","WasmEdge_ImportTypeContext","WasmEdge_ImportTypeGetExternalName","WasmEdge_ImportTypeGetExternalType","WasmEdge_ImportTypeGetFunctionType","WasmEdge_ImportTypeGetGlobalType","WasmEdge_ImportTypeGetMemoryType","WasmEdge_ImportTypeGetModuleName","WasmEdge_ImportTypeGetTableType","WasmEdge_ImportTypeGetTagType","WasmEdge_Limit","WasmEdge_LimitIsEqual","WasmEdge_LoaderContext","WasmEdge_LoaderCreate","WasmEdge_LoaderDelete","WasmEdge_LoaderParseFromBuffer","WasmEdge_LoaderParseFromBytes","WasmEdge_LoaderParseFromFile","WasmEdge_LoaderSerializeASTModule","WasmEdge_LogOff","WasmEdge_LogSetDebugLevel","WasmEdge_LogSetErrorLevel","WasmEdge_MemoryInstanceContext","WasmEdge_MemoryInstanceCreate","WasmEdge_MemoryInstanceDelete","WasmEdge_MemoryInstanceGetData","WasmEdge_MemoryInstanceGetMemoryType","WasmEdge_MemoryInstanceGetPageSize","WasmEdge_MemoryInstanceGetPointer","WasmEdge_MemoryInstanceGetPointerConst","WasmEdge_MemoryInstanceGrowPage","WasmEdge_MemoryInstanceSetData","WasmEdge_MemoryTypeContext","WasmEdge_MemoryTypeCreate","WasmEdge_MemoryTypeDelete","WasmEdge_MemoryTypeGetLimit","WasmEdge_ModuleDescriptor","WasmEdge_ModuleInstanceAddFunction","WasmEdge_ModuleInstanceAddGlobal","WasmEdge_ModuleInstanceAddMemory","WasmEdge_ModuleInstanceAddTable","WasmEdge_ModuleInstanceContext","WasmEdge_ModuleInstanceCreate","WasmEdge_ModuleInstanceCreateWASI","WasmEdge_ModuleInstanceCreateWithData","WasmEdge_ModuleInstanceDelete","WasmEdge_ModuleInstanceFindFunction","WasmEdge_ModuleInstanceFindGlobal","WasmEdge_ModuleInstanceFindMemory","WasmEdge_ModuleInstanceFindTable","WasmEdge_ModuleInstanceFindTag","WasmEdge_ModuleInstanceGetHostData","WasmEdge_ModuleInstanceGetModuleName","WasmEdge_ModuleInstanceInitWASI","WasmEdge_ModuleInstanceInitWasmEdgeProcess","WasmEdge_ModuleInstanceListFunction","WasmEdge_ModuleInstanceListFunctionLength","WasmEdge_ModuleInstanceListGlobal","WasmEdge_ModuleInstanceListGlobalLength","WasmEdge_ModuleInstanceListMemory","WasmEdge_ModuleInstanceListMemoryLength","WasmEdge_ModuleInstanceListTable","WasmEdge_ModuleInstanceListTableLength","WasmEdge_ModuleInstanceListTag","WasmEdge_ModuleInstanceListTagLength","WasmEdge_ModuleInstanceWASIGetExitCode","WasmEdge_ModuleInstanceWASIGetNativeHandler","WasmEdge_Mutability","WasmEdge_Mutability_Const","WasmEdge_Mutability_Var","WasmEdge_PluginContext","WasmEdge_PluginCreateModule","WasmEdge_PluginDescriptor","WasmEdge_PluginFind","WasmEdge_PluginGetPluginName","WasmEdge_PluginInitWASINN","WasmEdge_PluginListModule","WasmEdge_PluginListModuleLength","WasmEdge_PluginListPlugins","WasmEdge_PluginListPluginsLength","WasmEdge_PluginLoadFromPath","WasmEdge_PluginLoadWithDefaultPaths","WasmEdge_PluginVersionData","WasmEdge_Plugin_CurrentAPIVersion","WasmEdge_Plugin_GetDescriptor","WasmEdge_ProgramOption","WasmEdge_ProgramOptionType","WasmEdge_ProgramOptionType_Double","WasmEdge_ProgramOptionType_Float","WasmEdge_ProgramOptionType_Int16","WasmEdge_ProgramOptionType_Int32","WasmEdge_ProgramOptionType_Int64","WasmEdge_ProgramOptionType_Int8","WasmEdge_ProgramOptionType_None","WasmEdge_ProgramOptionType_String","WasmEdge_ProgramOptionType_Toggle","WasmEdge_ProgramOptionType_UInt16","WasmEdge_ProgramOptionType_UInt32","WasmEdge_ProgramOptionType_UInt64","WasmEdge_ProgramOptionType_UInt8","WasmEdge_Proposal","WasmEdge_Proposal_Annotations","WasmEdge_Proposal_BulkMemoryOperations","WasmEdge_Proposal_Component","WasmEdge_Proposal_ExceptionHandling","WasmEdge_Proposal_ExtendedConst","WasmEdge_Proposal_FunctionReferences","WasmEdge_Proposal_GC","WasmEdge_Proposal_ImportExportMutGlobals","WasmEdge_Proposal_Memory64","WasmEdge_Proposal_MultiMemories","WasmEdge_Proposal_MultiValue","WasmEdge_Proposal_NonTrapFloatToIntConversions","WasmEdge_Proposal_ReferenceTypes","WasmEdge_Proposal_RelaxSIMD","WasmEdge_Proposal_SIMD","WasmEdge_Proposal_SignExtensionOperators","WasmEdge_Proposal_TailCall","WasmEdge_Proposal_Threads","WasmEdge_Result","WasmEdge_ResultGen","WasmEdge_ResultGetCategory","WasmEdge_ResultGetCode","WasmEdge_ResultGetMessage","WasmEdge_ResultOK","WasmEdge_StatisticsClear","WasmEdge_StatisticsContext","WasmEdge_StatisticsCreate","WasmEdge_StatisticsDelete","WasmEdge_StatisticsGetInstrCount","WasmEdge_StatisticsGetInstrPerSecond","WasmEdge_StatisticsGetTotalCost","WasmEdge_StatisticsSetCostLimit","WasmEdge_StatisticsSetCostTable","WasmEdge_StoreContext","WasmEdge_StoreCreate","WasmEdge_StoreDelete","WasmEdge_StoreFindModule","WasmEdge_StoreListModule","WasmEdge_StoreListModuleLength","WasmEdge_String","WasmEdge_StringCopy","WasmEdge_StringCreateByBuffer","WasmEdge_StringCreateByCString","WasmEdge_StringDelete","WasmEdge_StringIsEqual","WasmEdge_StringWrap","WasmEdge_TableInstanceContext","WasmEdge_TableInstanceCreate","WasmEdge_TableInstanceCreateWithInit","WasmEdge_TableInstanceDelete","WasmEdge_TableInstanceGetData","WasmEdge_TableInstanceGetSize","WasmEdge_TableInstanceGetTableType","WasmEdge_TableInstanceGrow","WasmEdge_TableInstanceSetData","WasmEdge_TableTypeContext","WasmEdge_TableTypeCreate","WasmEdge_TableTypeDelete","WasmEdge_TableTypeGetLimit","WasmEdge_TableTypeGetRefType","WasmEdge_TagInstanceContext","WasmEdge_TagInstanceGetTagType","WasmEdge_TagTypeContext","WasmEdge_TagTypeGetFunctionType","WasmEdge_TypeCode","WasmEdge_TypeCode_AnyRef","WasmEdge_TypeCode_Array","WasmEdge_TypeCode_ArrayRef","WasmEdge_TypeCode_Epsilon","WasmEdge_TypeCode_EqRef","WasmEdge_TypeCode_ExnRef","WasmEdge_TypeCode_ExternRef","WasmEdge_TypeCode_F32","WasmEdge_TypeCode_F64","WasmEdge_TypeCode_Func","WasmEdge_TypeCode_FuncRef","WasmEdge_TypeCode_I16","WasmEdge_TypeCode_I31Ref","WasmEdge_TypeCode_I32","WasmEdge_TypeCode_I64","WasmEdge_TypeCode_I8","WasmEdge_TypeCode_NullExternRef","WasmEdge_TypeCode_NullFuncRef","WasmEdge_TypeCode_NullRef","WasmEdge_TypeCode_Rec","WasmEdge_TypeCode_Ref","WasmEdge_TypeCode_RefNull","WasmEdge_TypeCode_String","WasmEdge_TypeCode_Struct","WasmEdge_TypeCode_StructRef","WasmEdge_TypeCode_Sub","WasmEdge_TypeCode_SubFinal","WasmEdge_TypeCode_TypeIndex","WasmEdge_TypeCode_V128","WasmEdge_VMAsyncExecute","WasmEdge_VMAsyncExecuteRegistered","WasmEdge_VMAsyncRunWasmFromASTModule","WasmEdge_VMAsyncRunWasmFromBuffer","WasmEdge_VMAsyncRunWasmFromBytes","WasmEdge_VMAsyncRunWasmFromFile","WasmEdge_VMCleanup","WasmEdge_VMContext","WasmEdge_VMCreate","WasmEdge_VMDelete","WasmEdge_VMExecute","WasmEdge_VMExecuteRegistered","WasmEdge_VMGetActiveModule","WasmEdge_VMGetExecutorContext","WasmEdge_VMGetFunctionList","WasmEdge_VMGetFunctionListLength","WasmEdge_VMGetFunctionType","WasmEdge_VMGetFunctionTypeRegistered","WasmEdge_VMGetImportModuleContext","WasmEdge_VMGetLoaderContext","WasmEdge_VMGetRegisteredModule","WasmEdge_VMGetStatisticsContext","WasmEdge_VMGetStoreContext","WasmEdge_VMGetValidatorContext","WasmEdge_VMInstantiate","WasmEdge_VMListRegisteredModule","WasmEdge_VMListRegisteredModuleLength","WasmEdge_VMLoadWasmFromASTModule","WasmEdge_VMLoadWasmFromBuffer","WasmEdge_VMLoadWasmFromBytes","WasmEdge_VMLoadWasmFromFile","WasmEdge_VMRegisterModuleFromASTModule","WasmEdge_VMRegisterModuleFromBuffer","WasmEdge_VMRegisterModuleFromBytes","WasmEdge_VMRegisterModuleFromFile","WasmEdge_VMRegisterModuleFromImport","WasmEdge_VMRunWasmFromASTModule","WasmEdge_VMRunWasmFromBuffer","WasmEdge_VMRunWasmFromBytes","WasmEdge_VMRunWasmFromFile","WasmEdge_VMValidate","WasmEdge_ValType","WasmEdge_ValTypeGenExternRef","WasmEdge_ValTypeGenF32","WasmEdge_ValTypeGenF64","WasmEdge_ValTypeGenFuncRef","WasmEdge_ValTypeGenI32","WasmEdge_ValTypeGenI64","WasmEdge_ValTypeGenV128","WasmEdge_ValTypeIsEqual","WasmEdge_ValTypeIsExternRef","WasmEdge_ValTypeIsF32","WasmEdge_ValTypeIsF64","WasmEdge_ValTypeIsFuncRef","WasmEdge_ValTypeIsI32","WasmEdge_ValTypeIsI64","WasmEdge_ValTypeIsRef","WasmEdge_ValTypeIsRefNull","WasmEdge_ValTypeIsV128","WasmEdge_ValidatorContext","WasmEdge_ValidatorCreate","WasmEdge_ValidatorDelete","WasmEdge_ValidatorValidate","WasmEdge_Value","WasmEdge_ValueGenExternRef","WasmEdge_ValueGenF32","WasmEdge_ValueGenF64","WasmEdge_ValueGenFuncRef","WasmEdge_ValueGenI32","WasmEdge_ValueGenI64","WasmEdge_ValueGenV128","WasmEdge_ValueGetExternRef","WasmEdge_ValueGetF32","WasmEdge_ValueGetF64","WasmEdge_ValueGetFuncRef","WasmEdge_ValueGetI32","WasmEdge_ValueGetI64","WasmEdge_ValueGetV128","WasmEdge_ValueIsNullRef","WasmEdge_VersionGet","WasmEdge_VersionGetMajor","WasmEdge_VersionGetMinor","WasmEdge_VersionGetPatch","WasmEdge_WrapFunc_t","borrow","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","clone","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","clone_into","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","clone_to_uninit","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","fmt","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","int128_t","into","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","to_owned","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","try_from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","type_id","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","uint128_t","CallingFrame","memory_mut","memory_ref","FuncType","GlobalType","InnerRef","MemoryType","TableType","borrow","borrow_mut","clone","clone_into","clone_to_uninit","create_from_mut","create_from_ref","create_mut","create_ref","deref","","deref_mut","fmt","from","function","global","into","memory","module","table","to_owned","try_from","try_into","type_id","AsFunc","CustomFnWrapper","FuncRef","Function","SyncFn","as_ptr","create_sync_func","create_with_custom_wrapper","from_raw","get_func_raw","ty","Global","as_ptr","create","from_raw","get_value","set_value","ty","Memory","as_ptr","create","data_pointer","data_pointer_mut","get_data","get_ref","get_ref_mut","grow","mut_slice","set_data","size","slice","ty","write","AsInstance","ImportModule","Instance","WasiModule","add_func","add_global","add_memory","add_table","as_ptr","as_raw","create","","exit_code","from_raw","func_len","func_names","get_func","get_func_mut","get_global","get_global_mut","get_host_data","get_host_data_mut","get_memory_mut","get_memory_ref","get_native_handler","get_table","global_len","global_names","init_wasi","mem_len","mem_names","name","","table_len","table_names","Table","as_ptr","capacity","create","from_raw","get_data","grow","set_data","ty","F32","F64","I16","I32","I64","I8","ModuleDescriptor","ModuleInstanceCreateFn","None","Plugin","PluginDescriptor","PluginManager","PluginModule","PluginVersion","ProgramOption","ProgramOptionType","String","Toggle","U16","U32","U64","U8","add_module_descriptor","add_program_option","as_ptr","as_raw_ptr","","borrow","","","","","","","borrow_mut","","","","","","","build","clone","","clone_into","","clone_to_uninit","","count","create","","","","create_plugin_instance","eq","find","fmt","","","","","","","from","","","","","","","","init_wasmedge_process","inner","into","","","","","","","load_plugins","load_plugins_from_default_paths","major","minor","mod_count","mod_instance","mod_names","name","names","nn_preload","patch","to_owned","","try_from","","","","","","","try_into","","","","","","","type_id","","","","","","","WasmEdgeString","WasmValue","as_mut","as_raw","as_ref","borrow","borrow_mut","drop","eq","extern_ref","fmt","from","","from_extern_ref","from_f32","from_f64","from_func_ref","from_i32","from_i64","from_raw","from_v128","func_ref","into","into_raw","is_null_ref","null_extern_ref","to_f32","to_f64","to_i32","to_i64","to_v128","try_from","try_into","ty","type_id","driver_aot_compiler","driver_runtime_tool","driver_unified_tool","log_debug_info","log_error_info","log_off","version_major_value","version_minor_value","version_patch_value","version_string"],"q":[[0,"wasmedge_sys"],[411,"wasmedge_sys::async"],[416,"wasmedge_sys::async::fiber"],[443,"wasmedge_sys::async::function"],[456,"wasmedge_sys::async::module"],[499,"wasmedge_sys::ffi"],[1492,"wasmedge_sys::frame"],[1493,"wasmedge_sys"],[1495,"wasmedge_sys::instance"],[1524,"wasmedge_sys::instance::function"],[1529,"wasmedge_sys"],[1533,"wasmedge_sys::instance::function"],[1535,"wasmedge_sys::instance::global"],[1536,"wasmedge_sys"],[1542,"wasmedge_sys::instance::memory"],[1543,"wasmedge_sys"],[1557,"wasmedge_sys::instance::module"],[1561,"wasmedge_sys"],[1592,"wasmedge_sys::instance::table"],[1593,"wasmedge_sys"],[1601,"wasmedge_sys::plugin"],[1715,"wasmedge_sys::types"],[1718,"wasmedge_sys"],[1719,"wasmedge_sys::types"],[1724,"wasmedge_sys"],[1725,"wasmedge_sys::types"],[1728,"wasmedge_sys"],[1734,"wasmedge_sys::types"],[1735,"wasmedge_sys"],[1737,"wasmedge_sys::types"],[1739,"wasmedge_sys"],[1746,"wasmedge_sys::types"],[1748,"wasmedge_sys"],[1749,"wasmedge_sys::types"],[1750,"wasmedge_sys::utils"],[1760,"wasmedge_sys::config"],[1761,"wasmedge_types"],[1762,"wasmedge_sys::ast_module"],[1763,"wasmedge_sys::compiler"],[1764,"core::marker"],[1765,"wasmedge_sys::statistics"],[1766,"wasmedge_sys::validator"],[1767,"wasmedge_sys::executor"],[1768,"alloc::vec"],[1769,"core::iter::traits::collect"],[1770,"core::time"],[1771,"core::convert"],[1772,"std::path"],[1773,"wasmedge_sys::store"],[1774,"core::option"],[1775,"wasmedge_sys::loader"],[1776,"core::fmt"],[1777,"core::result"],[1778,"alloc::sync"],[1779,"alloc::string"],[1780,"async_wasi::snapshots::common::memory"],[1781,"async_wasi::snapshots::common::error"],[1782,"async_wasi::snapshots::common::types"],[1783,"std::io"],[1784,"alloc::borrow"],[1785,"wasmedge_types::error"],[1786,"alloc::boxed"],[1787,"core::any"],[1788,"async_wasi::snapshots"],[1789,"std::os::raw"],[1790,"core::clone"],[1791,"core::mem::manually_drop"],[1792,"core::ffi"]],"i":"```````````````````````````d0lAC`1AdAhAlB`6AfBf5BjBn7`9DhDjDlEj9Fj9?CbGdCdFbFd=EdCf?l?>=5<3210;:94CdFbFd;:FfF`;Ed;??9l:98d0AC`9`2<;:9AlFjB`4CbGd=<;AfBfAd==>7777l<;:9AlFjB`;CbGd<;:AfBfAd<;Bj;CfBnd00DhDj22??2210Ed0>03333Fd00Dl55AhAlFj=l87499`99Cb0011::==:8::::44::::1985=<1985Ej43B`<2GdCdFb;AfBfAdFfF`BjEdCfBn?DhDjDlEjAlFjB`dCbGdCdFbFdAfBfAdFfF`BjEdCfBnAlFjlDhDjDlEj65B`dCbGdCdFbFdAfBfAdFfF`BjEdCfBn``0Dl:```````D`0Jf1000010101010100101010``Jh0000000000```JlJn1K`121201201202002201201201200120120120OlMhKlA@lKjA@jNjA@h027O`76500588138NfNh7::2103Gh40;```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````50:973BdBlGlMlN`NbNdMnAnKfBbObC`L`MfAjHjOdLbOfNlKnKhA@`OjA@hA@jA@lOlNjGhMhKlKjO`BdBlGlMlN`NbNdMnAnKfBbObC`L`MfAjHjOdLbOfNlKnKhA@`OjA@hA@jA@lOlNjGhMhKlKjO`BdBlGlMlN`NbNdMnAnKfBbObC`L`MfAjHjOdLbOfNlKnKhA@`OjA@hA@jA@lOlNjGhMhKlKjO`BdBlGlMlN`NbNdMnAnKfBbObC`L`MfAjHjOdLbOfNlKnKhA@`OjA@hA@jA@lOlNjGhMhKlKjO`BdBlGlMlN`NbNdMnAnKfBbObC`L`MfAjHjOdLbOfNlKnKhA@`OjA@hA@jA@lOlNjGhMhKlKjO`BdBlGlMlN`NbNdMnAnKfBbObC`L`MfAjHjOdLbOfNlKnKhA@`OjA@hA@jA@lOlAA`Nj0GhMhKlKj0O`BdBlGlMlN`NbNdMnAnKfBbObC`L`MfAjHjOdLbOfNlKnKhA@`OjA@hA@jA@l0Ol`NjGhMhKlKjO`BdBlGlMlN`NbNdMnAnKfBbObC`L`MfAjHjOdLbOfNlKnKhA@`OjA@hA@jA@lOlNjGhMhKlKjO`BdBlGlMlN`NbNdMnAnKfBbObC`L`MfAjHjOdLbOfNlKnKhA@`OjA@hA@jA@lOlNjGhMhKlKjO`BdBlGlMlN`NbNdMnAnKfBbObC`L`MfAjHjOdLbOfNlKnKhA@`OjA@hA@jA@lOlNjGhMhKlKjO`BdBlGlMlN`NbNdMnAnKfBbObC`L`MfAjHjOdLbOfNlKnKhA@`OjA@hA@jA@lOlNjGhMhKlKjO`BdBlGlMlN`NbNdMnAnKfBbObC`L`MfAjHjOdLbOfNlKnKhA@`OjA@hA@jA@lOl``Gd0`````Hl0000000000000``0```0000`````Cd000Df0`Fb00000`Fd0000000000000````Bf000Ah11Ad02111111221101110111011`Ff0000000A@n00000``0```````000000AB`0ABdABf2ABj24ABh2AAd524613050464646213052622461305246613052124613052200444422046246130524613052461305``ABlCf1111101110000001001100000001101``````````","f":"```````````````````````````{{{f{bd}}h}j}{{{f{d}}}h}{{{f{l}}}{{f{{A`{n}}}}}}`{{{f{l}}}Ab}{{{f{bAd}}}{{f{bAf}}}}{{{f{Ah}}}Aj}{{{f{Al}}}An}{{{f{B`}}}Bb}{{{f{d}}}Bd}{{{f{Af}}}Aj}{{{f{{Bf{c}}}}}AjBh}{fAj}{{{f{Bj}}}Bl}{{{f{Bn}}}C`}{{{f{Ad}}}{{f{Af}}}}`{f{{f{c}}}{}}0000000000000000000000{{{f{b}}}{{f{bc}}}{}}0000000000000000000000{{{f{bd}}h}j}{{{f{d}}}h}{{{f{bCb}}{f{bCd}}c}{{Cj{{Ch{Cf}}}}}{{Cn{}{{Cl{Cf}}}}}}{{{f{bCb}}{f{D`}}{f{bCd}}c}{{Cj{{Ch{Cf}}}}}{{Cn{}{{Cl{Cf}}}}Db}}{{{f{bCb}}{f{D`}}{f{bCd}}cDd}{{Cj{{Ch{Cf}}}}}{{Cn{}{{Cl{Cf}}}}Db}}{{{f{bCb}}{f{bc}}e}{{Cj{{Ch{Cf}}}}}Df{{Cn{}{{Cl{Cf}}}}}}{{{f{bCb}}{f{D`}}{f{bc}}e}{{Cj{{Ch{Cf}}}}}{DfDb}{{Cn{}{{Cl{Cf}}}}Db}}{{{f{Cb}}{f{bCd}}cDd}{{Cj{{Ch{Cf}}}}}{{Cn{}{{Cl{Cf}}}}}}{{{f{bBj}}}j}{{{f{l}}}l}{{{f{Dh}}}Dh}{{{f{Dj}}}Dj}{{{f{Dl}}}Dl}{{{f{Bj}}}Bj}{{{f{Cf}}}Cf}{{f{f{bc}}}j{}}00000{{fDn}j}00000{{{f{B`}}ce}{{Cj{j}}}{{E`{{A`{Dn}}}}}{{E`{Eb}}}}{{{f{B`}}ce}{{Cj{j}}}{{E`{Eb}}}{{E`{Eb}}}}{{{f{Ed}}c}h{{E`{Ef}}}}{{{f{Bj}}}Eh}{{{f{bd}}h}j}{{{f{Ej}}}El}0{{{En{{f{d}}}}}{{Cj{B`}}}}{{}{{Cj{d}}}}{{{En{{f{d}}}}{En{Bj}}}{{Cj{Cb}}}}{{{En{{f{d}}}}}{{Cj{F`}}}}{{}{{Cj{Bj}}}}{{}{{Cj{Ed}}}}{{{En{{f{d}}}}}{{Cj{Bn}}}}{{}l}{{}Dh}{{}Dj}{{}Dl}{{{f{bEj}}}j}{{{f{bAl}}}j}{{{f{bB`}}}j}{{{f{bd}}}j}{{{f{bCb}}}j}{{{f{bCd}}}j}{{{f{bFb}}}j}{{{f{bFd}}}j}{{{f{bAf}}}j}{{{f{b{Bf{c}}}}}jBh}{{{f{bFf}}}j}{{{f{bF`}}}j}{{{f{bBj}}}j}{{{f{bEd}}}j}{{{f{bBn}}}j}{{{f{bd}}h}j}{{{f{d}}}h}{{{f{Dh}}}Fh}{{{f{l}}{f{l}}}h}{{{f{Dh}}{f{Dh}}}h}{{{f{Dj}}{f{Dj}}}h}{{{f{Dl}}{f{Dl}}}h}65`{{{f{Ej}}}{{Ch{Fj}}}}`{{{f{l}}{f{bFl}}}{{G`{jFn}}}}{{{f{Dh}}{f{bFl}}}{{G`{jFn}}}}{{{f{Dj}}{f{bFl}}}{{G`{jFn}}}}{{{f{Dl}}{f{bFl}}}{{G`{jFn}}}}{{{f{Ej}}{f{bFl}}}Gb}{{{f{Al}}{f{bFl}}}Gb}{{{f{Fj}}{f{bFl}}}Gb}{{{f{B`}}{f{bFl}}}Gb}{{{f{d}}{f{bFl}}}Gb}{{{f{Cb}}{f{bFl}}}Gb}{{{f{Gd}}{f{bFl}}}Gb}{{{f{Cd}}{f{bFl}}}Gb}{{{f{Fb}}{f{bFl}}}Gb}{{{f{Fd}}{f{bFl}}}Gb}{{{f{Af}}{f{bFl}}}Gb}{{{f{{Bf{c}}}}{f{bFl}}}Gb{GfBh}}{{{f{Ad}}{f{bFl}}}Gb}{{{f{Ff}}{f{bFl}}}Gb}{{{f{F`}}{f{bFl}}}Gb}{{{f{Bj}}{f{bFl}}}Gb}{{{f{Ed}}{f{bFl}}}Gb}{{{f{Cf}}{f{bFl}}}Gb}{{{f{Bn}}{f{bFl}}}Gb}`{cc{}}000000000000000000000{GhCf}1{{{f{F`}}c}{{Cj{{Gj{Ej}}}}}{{E`{{A`{Dn}}}}}}{{{f{F`}}c}{{Cj{{Gj{Ej}}}}}{{E`{Eb}}}}{GlEj}{{{f{Ah}}}El}{{{f{Ah}}}{{En{{Ch{Gn}}}}}}{{{f{bd}}h}j}{{{f{d}}}h}1010{{{f{d}}}H`}{{{f{d}}}Hb}{{{f{Fd}}{Hd{c}}}{{G`{{f{c}}Hf}}}Bh}{{{f{Ah}}{f{Ef}}}{{Cj{{Hh{{f{Af}}}}}}}}{{{f{bAh}}{f{Ef}}}{{Cj{{Hh{{f{bAf}}}}}}}}{{{f{Cd}}}Hj}{{{f{Ah}}c}{{Cj{{Hl{Fb{f{Ah}}}}}}}{{E`{Ef}}}}{{{f{bAh}}c}{{Cj{{Hl{Fb{f{bAh}}}}}}}{{E`{Ef}}}}{{{f{Fd}}{Hd{Hn}}I`}{{G`{{Ch{Ib}}Hf}}}}{{{f{d}}}El}{{{f{bAh}}c}{{Cj{{Hl{Fd{f{bAh}}}}}}}{{E`{Ef}}}}{{{f{Ah}}c}{{Cj{{Hl{Fd{f{Ah}}}}}}}{{E`{Ef}}}}{{{f{Fd}}{Hd{c}}Ab}{{G`{{f{{A`{c}}}}Hf}}}Bh}{{{f{Ah}}c}{{Cj{{Hl{Ff{f{Ah}}}}}}}{{E`{Ef}}}}{{{f{Ah}}}El}{{{f{Ah}}}{{En{{Ch{Gn}}}}}}{{{f{Ej}}}{{Ch{Al}}}}`{{{f{Bj}}}Eh}{{{f{Bj}}}Id}{{{f{bd}}h}j}{{{f{d}}}h}10{{}c{}}0000000000000000000000111{{{f{Dh}}}{{En{El}}}}{{{f{Dj}}}{{En{El}}}}449843{{{f{Dh}}}El}{{{f{Dj}}}El}{{{f{Ed}}c}{{Cj{{Hl{Af{f{Ed}}}}}}}{{E`{Ef}}}}{{{f{Ed}}}El}{{{f{Al}}}{{If{Ef}}}}{{{f{Ed}}}{{En{{Ch{Gn}}}}}}:9:9{{{f{bFd}}{Hd{c}}}{{G`{{f{bc}}Hf}}}Bh}{{{f{bFd}}{Hd{Ih}}I`}{{G`{{Ch{Ij}}Hf}}}}{{{f{bFd}}{Hd{c}}Ab}{{G`{{f{b{A`{c}}}}Hf}}}Bh}{{{f{Dl}}}Il}>={{{f{Ah}}}{{En{Gn}}}}6{{{f{Fj}}}{{If{Ef}}}}{{{f{{Bf{c}}}}}{{En{Gn}}}Bh}{{{Ch{n}}{Ch{n}}}l}{{FhEl{En{El}}}Dh}{{El{En{El}}h}{{G`{Dj{J`{In}}}}}}{{nIl}Dl}{{{f{bd}}h}j}{{{f{d}}}h}`10{{{f{bCb}}{f{bEd}}{f{Ej}}}{{Cj{Af}}}}{{{f{bCb}}{f{bEd}}{f{c}}}{{Cj{j}}}{AhBh}}{{{f{bCb}}{f{bEd}}{f{Ej}}c}{{Cj{Af}}}{{E`{Ef}}}}{{{f{l}}}{{f{{A`{n}}}}}}{{{f{l}}}Ab}{{{f{bd}}H`}j}{{{f{bd}}Hb}j}{{{f{bBj}}Eh}j}{{{f{bBj}}c}j{{E`{{A`{Eh}}}}}}{{{f{bd}}El}j}{{{f{Dj}}}h}<;<;{{{f{Ah}}}El}{{{f{Ah}}}{{En{{Ch{Gn}}}}}}>=>={fc{}}00000{c{{G`{e}}}{}{}}0000000000000000000000{{}{{G`{c}}}{}}0000000000000000000000{{{f{Al}}}{{Cj{Jb}}}}{{{f{Fj}}}{{Cj{Jb}}}}{fJd}0000000000000000000000``{{{f{Bn}}{f{Ej}}}{{Cj{j}}}}{{{f{Dl}}}n}{{{f{bFd}}{Hd{c}}c}{{G`{jHf}}}Bh}```````{{{f{D`}}}{{En{Jf}}}}{f{{f{c}}}{}}0{{{f{b}}}{{f{bc}}}{}}0{{{f{Jf}}}Jf}{{f{f{bc}}}j{}}{{fDn}j}{{}D`}{{}Jf}{{{f{D`}}{f{bFl}}}Gb}{{{f{Jf}}{f{bFl}}}Gb}{cc{}}0{{}c{}}054{fc{}}{c{{G`{e}}}{}{}}0{{}{{G`{c}}}{}}0{fJd}0``{{{f{bJh}}}{{f{bCd}}}}{{{f{Jh}}}{{f{Cd}}}}{f{{f{c}}}{}}{{{f{b}}}{{f{bc}}}{}}{{{f{l}}{Jj{c}}Eh}{{Cj{Jh}}}Db}:{fHj}:876```{{{f{b{Jl{c}}}}eJh}jDb{{E`{Ef}}}}{{{f{bJn}}}{{f{bAf}}}}{{{f{b{Jl{c}}}}}{{f{b{Bf{c}}}}}Db}{{{f{bK`}}}{{f{b{Jl{Kb}}}}}}{fAj}{{{f{{Jl{c}}}}}AjDb}{{{f{Jn}}}{{f{Af}}}}{{{f{{Jl{c}}}}}{{f{{Bf{c}}}}}Db}{{{f{K`}}}{{f{{Jl{Kb}}}}}}<<<;;;{{c{J`{e}}}{{Cj{{Jl{e}}}}}{{E`{Ef}}}Db}{{{En{{Ch{c}}}}{En{{Ch{{Kd{eg}}}}}}}{{Cj{K`}}}{{E`{Ef}}}{{E`{Ef}}}{{E`{Ef}}}}{Kb{{Cj{K`}}}}{{{f{{Jl{c}}}}}{{f{e}}}Db{}}{{{f{b{Jl{c}}}}}{{f{be}}}Db{}}{{{f{K`}}}El}{{{f{Jn}}{f{bFl}}}Gb}{{{f{{Jl{c}}}}{f{bFl}}}Gb{GfDb}}{{{f{K`}}{f{bFl}}}Gb}{cc{}}00{{}c{}}00{{{f{K`}}}{{f{Ef}}}}{c{{G`{e}}}{}{}}00{{}{{G`{c}}}{}}00{fJd}00`````````````````````````````````````{Glj}{{GlKfEl}El}{GlEl}{{GlAnEl}El}1`{Khj}0{{KhGhEl}Kj}{KhEl}2{{KhEh}h}`{{DnEl}Kl}{Klj}1`{KnL`}{{KnEl}Lb}{KnAj}{{BbLdLd}Kj}{{BbDnEhLd}Kj}{{BbKlLd}Kj}`{BdBb}{Bbj}``````````{{BdLf}j}{{BdLh}j}{BdLj}{BdLl}{Bdh}00{{Bdh}j}00{{BdLj}j}{{BdLl}j}`{{}Bd}{Bdj}{BdEl}{{BdLf}h}{{BdLh}h}88<;77{{BdEl}j}999888{{LnLd}Ln}00```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````{{L`HjGhEl}Kh}`{{BdBl}L`}{L`j}{{L`M`{En{{Md{M`}{{Mb{j}}}}}}}j}0{{L`AjMfGl}Kj}{{L`HjGhElGhEl}Kj}{{L`AjMfGlMh}Kj}{{L`MfAj}Kj}`{KfMh}{KfMj}{{GlKf}Ml}{{GlKf}Mn}{{GlKf}N`}{{GlKf}Nb}{{GlKf}Nd}```````{{MlNfM`Eh}Hj}{{MlNhM`M`Eh}Hj}{Hjj}{HjM`}{HjMl}`{{NjElNjEl}Ml}{Mlj}{{MlNjEl}El}{MlEl}10`{{MnGh}Nl}{Nlj}{NlMn}{NlGh}{{NlGh}Kj}`{{NjNn}Mn}{Mnj}{MnNn}{MnNj}````{AnMh}{AnMj}{{GlAn}Ml}{{GlAn}Mn}{{GlAn}N`}4{{GlAn}Nb}{{GlAn}Nd}`{{O`O`}h}`{BdOb}{Obj}{{ObGlDnEl}Kj}{{ObGlKl}Kj}{{ObGlLd}Kj}1{{}j}00`{N`Lb}{Lbj}{{LbDnElEl}Kj}{LbN`}{LbEl}{{LbElEl}Dn}0{{LbEl}Kj}4`{O`N`}{N`j}{N`O`}`{{AjMhHj}j}{{AjMhNl}j}{{AjMhLb}j}{{AjMhOd}j}`{MhAj}{{LdElLdElLdEl}Aj}{{MhM`{En{{Md{M`}{{Mb{j}}}}}}}Aj}{Ajj}{{AjMh}Hj}{{AjMh}Nl}{{AjMh}Lb}{{AjMh}Od}{{AjMh}Of}{AjM`}{AjMh}{{AjLdElLdElLdEl}j}{{LdElh}j}{{AjMhEl}El}{AjEl}101010100{{AjOhEh}El}````{{OjMh}Aj}`{MhOj}{OjMh}{{LdEl}j}{{OjMhEl}El}{OjEl}{{MhEl}El}{{}El}{Ldj}{{}j}``{{}Ol}```````````````````````````````````{{OnEl}Kj}{KjOn}{KjEl}{KjLd}{Kjh}{Blj}`{{}Bl}1{BlEh}{BlId}1{{BlEh}j}{{BlEhEl}j}`{{}Mf}{Mfj}{{MfMh}Aj}{{MfMhEl}El}{MfEl}`{{MhLdEl}El}{{LdEl}Mh}{LdMh}{Mhj}{{MhMh}h}3`{NbOd}{{NbGh}Od}{Odj}{{OdGhEl}Kj}{OdEl}{OdNb}{{OdEl}Kj}3`{{NjO`}Nb}{Nbj}{NbO`}{NbNj}`{OfNd}`{NdMl}``````````````````````````````{{A@`MhGhEl}Kh}{{A@`MhMhGhEl}Kh}{{A@`GlMhGhEl}Kh}{{A@`DnElMhGhEl}Kh}{{A@`KlMhGhEl}Kh}{{A@`LdMhGhEl}Kh}{A@`j}`{{BdMf}A@`}1{{A@`MhGhElGhEl}Kj}{{A@`MhMhGhElGhEl}Kj}{A@`Aj}{A@`L`}{{A@`MhMlEl}El}{A@`El}{{A@`Mh}Ml}{{A@`MhMh}Ml}{{A@`Lf}Aj}{A@`Ob}{{A@`Mh}Aj}{A@`Bl}{A@`Mf}{A@`C`}{A@`Kj}{{A@`MhEl}El}:{{A@`Gl}Kj}{{A@`DnEl}Kj}{{A@`Kl}Kj}{{A@`Ld}Kj}{{A@`MhGl}Kj}{{A@`MhDnEl}Kj}{{A@`MhKl}Kj}{{A@`MhLd}Kj}{{A@`Aj}Kj}{{A@`GlMhGhElGhEl}Kj}{{A@`DnElMhGhElGhEl}Kj}{{A@`KlMhGhElGhEl}Kj}{{A@`LdMhGhElGhEl}Kj}>`{{}Nj}000000{{NjNj}h}{Njh}00000000`{BdC`}{C`j}{{C`Gl}Kj}`{M`Gh}{A@bGh}{IdGh}{HjGh}{OhGh}{A@dGh}{A@fGh}{GhM`}{GhA@b}{GhId}{GhHj}{GhOh}{GhA@d}{GhA@f}{Ghh}{{}Ld}{{}El}00`{f{{f{c}}}{}}0000000000000000000000000000000000{{{f{b}}}{{f{bc}}}{}}0000000000000000000000000000000000{{{f{Nj}}}Nj}{{{f{Gh}}}Gh}{{{f{Mh}}}Mh}{{{f{Kl}}}Kl}{{{f{Kj}}}Kj}{{{f{O`}}}O`}{{{f{Bd}}}Bd}{{{f{Bl}}}Bl}{{{f{Gl}}}Gl}{{{f{Ml}}}Ml}{{{f{N`}}}N`}{{{f{Nb}}}Nb}{{{f{Nd}}}Nd}{{{f{Mn}}}Mn}{{{f{An}}}An}{{{f{Kf}}}Kf}{{{f{Bb}}}Bb}{{{f{Ob}}}Ob}{{{f{C`}}}C`}{{{f{L`}}}L`}{{{f{Mf}}}Mf}{{{f{Aj}}}Aj}{{{f{Hj}}}Hj}{{{f{Od}}}Od}{{{f{Lb}}}Lb}{{{f{Of}}}Of}{{{f{Nl}}}Nl}{{{f{Kn}}}Kn}{{{f{Kh}}}Kh}{{{f{A@`}}}A@`}{{{f{Oj}}}Oj}{{{f{A@h}}}A@h}{{{f{A@j}}}A@j}{{{f{A@l}}}A@l}{{{f{Ol}}}Ol}{{f{f{bc}}}j{}}0000000000000000000000000000000000{{fDn}j}0000000000000000000000000000000000{{{f{Nj}}{f{bFl}}}Gb}{{{f{Gh}}{f{bFl}}}Gb}{{{f{Mh}}{f{bFl}}}Gb}{{{f{Kl}}{f{bFl}}}Gb}{{{f{Kj}}{f{bFl}}}Gb}{{{f{O`}}{f{bFl}}}Gb}{{{f{Bd}}{f{bFl}}}Gb}{{{f{Bl}}{f{bFl}}}Gb}{{{f{Gl}}{f{bFl}}}Gb}{{{f{Ml}}{f{bFl}}}Gb}{{{f{N`}}{f{bFl}}}Gb}{{{f{Nb}}{f{bFl}}}Gb}{{{f{Nd}}{f{bFl}}}Gb}{{{f{Mn}}{f{bFl}}}Gb}{{{f{An}}{f{bFl}}}Gb}{{{f{Kf}}{f{bFl}}}Gb}{{{f{Bb}}{f{bFl}}}Gb}{{{f{Ob}}{f{bFl}}}Gb}{{{f{C`}}{f{bFl}}}Gb}{{{f{L`}}{f{bFl}}}Gb}{{{f{Mf}}{f{bFl}}}Gb}{{{f{Aj}}{f{bFl}}}Gb}{{{f{Hj}}{f{bFl}}}Gb}{{{f{Od}}{f{bFl}}}Gb}{{{f{Lb}}{f{bFl}}}Gb}{{{f{Of}}{f{bFl}}}Gb}{{{f{Nl}}{f{bFl}}}Gb}{{{f{Kn}}{f{bFl}}}Gb}{{{f{Kh}}{f{bFl}}}Gb}{{{f{A@`}}{f{bFl}}}Gb}{{{f{Oj}}{f{bFl}}}Gb}{{{f{A@h}}{f{bFl}}}Gb}{{{f{A@j}}{f{bFl}}}Gb}{{{f{A@l}}{f{bFl}}}Gb}{{{f{Ol}}{f{bFl}}}Gb}{A@nAA`}{cc{}}{nNj}1111{AAbKj}22222222222222222222222222222{AAdA@l}3`{{}c{}}0000000000000000000000000000000000{fc{}}0000000000000000000000000000000000{c{{G`{e}}}{}{}}0000000000000000000000000000000000{{}{{G`{c}}}{}}0000000000000000000000000000000000{fJd}0000000000000000000000000000000000``{{{f{bGd}}El}{{En{{Hl{Fd{f{bGd}}}}}}}}{{{f{Gd}}El}{{En{{Hl{Fd{f{Gd}}}}}}}}`````{f{{f{c}}}{}}{{{f{b}}}{{f{bc}}}{}}{{{f{{Hl{c{f{be}}}}}}}{{Hl{c{f{be}}}}}AAf{}}{{f{f{bc}}}j{}}{{fDn}j}{{{AAh{c}}{f{be}}}{{Hl{c{f{be}}}}}{}Bh}{{{AAh{c}}{f{e}}}{{Hl{c{f{e}}}}}{}Bh}{{{AAh{c}}}{{Hl{c{f{be}}}}}{}Bh}{{{AAh{c}}}{{Hl{c{f{e}}}}}{}Bh}{{{f{{Hl{c{f{be}}}}}}}{{f{g}}}{}{}{}}{{{f{{Hl{c{f{e}}}}}}}{{f{g}}}{}{}{}}{{{f{b{Hl{c{f{be}}}}}}}{{f{bg}}}{}{}{}}{{{f{{Hl{ce}}}}{f{bFl}}}GbGf{}}{cc{}}``{{}c{}}```{fc{}}{c{{G`{e}}}{}{}}{{}{{G`{c}}}{}}{fJd}`````{{{f{Cd}}}Hj}{{{f{l}}{AAj{c}}Eh}{{Cj{Cd}}}{}}{{{f{l}}AAlAAnAAnEh}{{Cj{Cd}}}}{HjCd}{{{f{Df}}}Hj}{{{f{Df}}}{{En{l}}}}`{{{f{Fb}}}Nl}{{{f{Dl}}Cf}{{Cj{Fb}}}}{NlFb}{{{f{Fb}}}Cf}{{{f{bFb}}Cf}{{Cj{j}}}}{{{f{Fb}}}{{Cj{Dl}}}}`{{{f{Fd}}}Lb}{{{f{Dj}}}{{Cj{Fd}}}}{{{f{Fd}}ElEl}{{Cj{Dn}}}}{{{f{bFd}}ElEl}{{Cj{Dn}}}}{{{f{Fd}}ElEl}{{Cj{{Ch{Dn}}}}}}{{{f{Fd}}Ab}{{En{{f{c}}}}}Bh}{{{f{bFd}}Ab}{{En{{f{bc}}}}}Bh}{{{f{bFd}}El}{{Cj{j}}}}{{{f{Fd}}AbAb}{{En{{f{b{A`{c}}}}}}}Bh}{{{f{bFd}}cEl}{{Cj{j}}}{{E`{{A`{Dn}}}}}}{{{f{Fd}}}El}{{{f{Fd}}AbAb}{{En{{f{{A`{c}}}}}}}Bh}{{{f{Fd}}}{{Cj{Dj}}}}{{{f{bFd}}Abc}{{En{j}}}Bh}````{{{f{b{Bf{c}}}}eCd}jBh{{E`{Ef}}}}{{{f{b{Bf{c}}}}eFb}jBh{{E`{Ef}}}}{{{f{b{Bf{c}}}}eFd}jBh{{E`{Ef}}}}{{{f{b{Bf{c}}}}eFf}jBh{{E`{Ef}}}}{{{f{Ah}}}Aj}{{{f{{Bf{c}}}}}AjBh}{{c{J`{e}}}{{Cj{{Bf{e}}}}}{{E`{Ef}}}Bh}{{{En{{Ch{{f{Ef}}}}}}{En{{Ch{{f{Ef}}}}}}{En{{Ch{{f{Ef}}}}}}}{{Cj{Ad}}}}{{{f{Ad}}}El}{Aj{{Bf{c}}}Bh}{{{f{Ah}}}El}{{{f{Ah}}}{{En{{Ch{Gn}}}}}}{{{f{Ah}}{f{Ef}}}{{Cj{{Hh{{f{Af}}}}}}}}{{{f{bAh}}{f{Ef}}}{{Cj{{Hh{{f{bAf}}}}}}}}{{{f{Ah}}c}{{Cj{{Hl{Fb{f{Ah}}}}}}}{{E`{Ef}}}}{{{f{bAh}}c}{{Cj{{Hl{Fb{f{bAh}}}}}}}{{E`{Ef}}}}{{{f{{Bf{c}}}}}{{f{c}}}Bh}{{{f{b{Bf{c}}}}}{{f{bc}}}Bh}{{{f{bAh}}c}{{Cj{{Hl{Fd{f{bAh}}}}}}}{{E`{Ef}}}}{{{f{Ah}}c}{{Cj{{Hl{Fd{f{Ah}}}}}}}{{E`{Ef}}}}{{{f{Ad}}Oh}{{Cj{Eh}}}}{{{f{Ah}}c}{{Cj{{Hl{Ff{f{Ah}}}}}}}{{E`{Ef}}}};:{{{f{bAd}}{En{{Ch{{f{Ef}}}}}}{En{{Ch{{f{Ef}}}}}}{En{{Ch{{f{Ef}}}}}}}j}<;{{{f{Ah}}}{{En{Gn}}}}{{{f{Ad}}}{{f{Ef}}}}>=`{{{f{Ff}}}Od}{{{f{Ff}}}Ab}{Dh{{Cj{Ff}}}}{OdFf}{{{f{Ff}}El}{{Cj{Cf}}}}{{{f{bFf}}El}{{Cj{j}}}}{{{f{bFf}}CfEl}{{Cj{j}}}}{{{f{Ff}}}{{Cj{Dh}}}}``````````````````````{{AB`ce{En{ABb}}}{{Cj{AB`}}}{{E`{Ef}}}{{E`{Ef}}}}{{AB`ceA@n}{{Cj{AB`}}}{{E`{Ef}}}{{E`{Ef}}}}{{{f{ABd}}}Oj}{{{f{ABf}}}A@j}{{{f{AB`}}}Ol}{f{{f{c}}}{}}000000{{{f{b}}}{{f{bc}}}{}}000000`{{{f{ABd}}}ABd}{{{f{A@n}}}A@n}{{f{f{bc}}}j{}}0{{fDn}j}0{{}El}{{ceA@n}{{Cj{ABh}}}{{E`{Ef}}}{{E`{Ef}}}}{{ce{En{ABb}}}{{Cj{ABf}}}{{E`{Ef}}}{{E`{Ef}}}}{{ElElElEl}AAd}{{ceAAd}{{Cj{AB`}}}{{E`{Ef}}}{{E`{Ef}}}}{{ce}{{Cj{Af}}}{{E`{Ef}}}{{E`{Ef}}}}{{{f{A@n}}{f{A@n}}}h}{c{{Cj{ABd}}}{{E`{Ef}}}}{{{f{ABj}}{f{bFl}}}Gb}{{{f{ABd}}{f{bFl}}}Gb}{{{f{A@n}}{f{bFl}}}Gb}{{{f{ABh}}{f{bFl}}}Gb}{{{f{ABf}}{f{bFl}}}Gb}{{{f{AAd}}{f{bFl}}}Gb}{{{f{AB`}}{f{bFl}}}Gb}{cc{}}00{AA`A@n}1111{{{En{{Ch{{f{Ef}}}}}}h}j}`{{}c{}}000000{c{{Cj{j}}}{{E`{Eb}}}}{{}j}``{{{f{ABd}}}El}{{{f{ABd}}c}{{Cj{Af}}}{{E`{Ef}}}}{{{f{ABd}}}{{Ch{Gn}}}}{{{f{ABd}}}Gn}{{}{{Ch{Gn}}}}{{{Ch{{f{Ef}}}}}j}`{fc{}}0{c{{G`{e}}}{}{}}000000{{}{{G`{c}}}{}}000000{fJd}000000``{{{f{bABl}}}{{f{bMh}}}}{{{f{Cf}}}Gh}{{{f{ABl}}}{{f{Mh}}}}{f{{f{c}}}{}}{{{f{b}}}{{f{bc}}}{}}{{{f{bABl}}}j}{{{f{ABl}}{f{ABl}}}h}{{{f{Cf}}}{{En{{f{c}}}}}{}}{{{f{ABl}}{f{bFl}}}Gb}{cABl{{E`{Ef}}}}{cc{}}{{{f{bc}}}Cf{}}{A@bCf}{IdCf}{{{f{c}}}CfDf}{OhCf}{A@dCf}{MhABl}{ABnCf}{{{f{Cf}}}{{En{{Hh{{f{Cf}}}}}}}}{{}c{}}{ABlMh}{{{f{Cf}}}h}{{}Cf}{{{f{Cf}}}A@b}{{{f{Cf}}}Id}{{{f{Cf}}}Oh}{{{f{Cf}}}A@d}{{{f{Cf}}}ABn}{c{{G`{e}}}{}{}}{{}{{G`{c}}}{}}{{{f{Cf}}}n}{fJd}{eOh{{E`{Ef}}}{{Cn{}{{Cl{c}}}}}}00{{}j}00{{}El}00{{}Gn}","D":"EOb","p":[[0,"mut"],[5,"Config",1748,1760],[1,"reference",null,null,1],[1,"bool"],[1,"unit"],[5,"FuncType",1748,1761],[6,"ValType",1761],[1,"slice"],[1,"usize"],[5,"WasiModule",1748,1557],[5,"Instance",1748,1557],[10,"AsInstance",1748,1557],[5,"WasmEdge_ModuleInstanceContext",499],[5,"ImportType",1748,1762],[5,"WasmEdge_ImportTypeContext",499],[5,"Compiler",1748,1763],[5,"WasmEdge_CompilerContext",499],[5,"WasmEdge_ConfigureContext",499],[5,"ImportModule",1748,1557],[10,"Sized",1764],[5,"Statistics",1748,1765],[5,"WasmEdge_StatisticsContext",499],[5,"Validator",1748,1766],[5,"WasmEdge_ValidatorContext",499],[5,"Executor",1748,1767],[5,"Function",1748,1533],[5,"WasmValue",1748,1749],[5,"Vec",1768],[8,"WasmEdgeResult",1761],[17,"Item"],[10,"IntoIterator",1769],[5,"AsyncState",416],[10,"Send",1764],[5,"Duration",1770],[10,"AsFunc",1533],[5,"TableType",1748,1761],[5,"MemoryType",1748,1761],[5,"GlobalType",1748,1761],[1,"u8"],[10,"AsRef",1771],[5,"Path",1772],[5,"Store",1748,1773],[1,"str"],[1,"u64"],[5,"Module",1748,1762],[1,"u32"],[6,"Option",1774,null,1],[5,"Loader",1748,1775],[5,"Global",1748,1535],[5,"Memory",1748,1542],[5,"Table",1748,1592],[6,"RefType",1761],[5,"ExportType",1748,1762],[5,"Formatter",1776],[5,"Error",1776],[6,"Result",1777,null,1],[8,"Result",1776],[5,"CallingFrame",1748,1492],[10,"Debug",1776],[5,"WasmEdge_Value",499],[5,"Arc",1778,null,1],[5,"WasmEdge_ASTModuleContext",499],[5,"String",1779],[6,"CompilerOutputFormat",1761],[6,"CompilerOptimizationLevel",1761],[5,"WasmPtr",1780],[5,"Errno",1781],[8,"FuncRef",1748,1533],[5,"WasmEdge_FunctionInstanceContext",499],[5,"InnerRef",1495],[5,"__wasi_ciovec_t",1782],[8,"__wasi_size_t",1782],[5,"IoSlice",1783],[1,"f64"],[6,"Cow",1784],[5,"__wasi_iovec_t",1782],[5,"IoSliceMut",1783],[6,"Mutability",1761],[6,"WasmEdgeError",1785],[5,"Box",1786,null,1],[6,"ExternalInstanceType",1761],[5,"TypeId",1787],[5,"AsyncCx",416],[5,"AsyncFunction",443],[8,"AsyncFn",443],[5,"AsyncImportObject",456],[5,"AsyncInstance",456],[5,"AsyncWasiModule",456],[5,"WasiCtx",1788],[1,"tuple",null,null,1],[5,"WasmEdge_ExportTypeContext",499],[5,"WasmEdge_Async",499],[5,"WasmEdge_Result",499],[5,"WasmEdge_Bytes",499],[5,"WasmEdge_CallingFrameContext",499],[5,"WasmEdge_ExecutorContext",499],[5,"WasmEdge_MemoryInstanceContext",499],[8,"c_char",1789],[8,"WasmEdge_HostRegistration",499],[8,"WasmEdge_Proposal",499],[8,"WasmEdge_CompilerOptimizationLevel",499],[8,"WasmEdge_CompilerOutputFormat",499],[8,"c_int",1789],[8,"c_void",1789],[17,"Output"],[1,"fn"],[5,"WasmEdge_StoreContext",499],[5,"WasmEdge_String",499],[8,"WasmEdge_ExternalType",499],[5,"WasmEdge_FunctionTypeContext",499],[5,"WasmEdge_GlobalTypeContext",499],[5,"WasmEdge_MemoryTypeContext",499],[5,"WasmEdge_TableTypeContext",499],[5,"WasmEdge_TagTypeContext",499],[8,"WasmEdge_HostFunc_t",499],[8,"WasmEdge_WrapFunc_t",499],[5,"WasmEdge_ValType",499],[5,"WasmEdge_GlobalInstanceContext",499],[8,"WasmEdge_Mutability",499],[5,"WasmEdge_Limit",499],[5,"WasmEdge_LoaderContext",499],[5,"WasmEdge_TableInstanceContext",499],[5,"WasmEdge_TagInstanceContext",499],[1,"i32"],[5,"WasmEdge_PluginContext",499],[5,"WasmEdge_PluginDescriptor",499],[8,"WasmEdge_ErrCategory",499],[5,"WasmEdge_VMContext",499],[1,"f32"],[1,"i64"],[8,"int128_t",499],[5,"WasmEdge_ProgramOption",499],[5,"WasmEdge_ModuleDescriptor",499],[5,"WasmEdge_PluginVersionData",499],[6,"ProgramOptionType",1601],[8,"WasmEdge_ProgramOptionType",499],[6,"CoreError",1785],[5,"PluginVersion",1601],[10,"Clone",1790],[5,"ManuallyDrop",1791],[8,"SyncFn",1748,1533],[8,"CustomFnWrapper",1533],[6,"c_void",1792],[5,"PluginDescriptor",1601],[8,"ModuleInstanceCreateFn",1601],[5,"Plugin",1601],[5,"ModuleDescriptor",1601],[5,"ProgramOption",1601],[5,"PluginManager",1601],[5,"WasmEdgeString",1749],[1,"i128"],[8,"WasiCtx",1748]],"r":[[0,1557],[1,1492],[2,1763],[3,1760],[4,1767],[5,1762],[6,1533],[7,1761],[8,1533],[9,1535],[10,1761],[11,1557],[12,1762],[13,1557],[14,1775],[15,1542],[16,1761],[17,1762],[18,1765],[19,1773],[20,1533],[21,1592],[22,1761],[23,1766],[25,1557],[26,1749],[27,1760],[28,1760],[29,1761],[31,1761],[32,1557],[33,1557],[34,1762],[35,1763],[36,1760],[37,1557],[38,1557],[39,1557],[40,1765],[41,1766],[42,1557],[44,1761],[45,1761],[46,1761],[47,1761],[48,1762],[49,1762],[50,1762],[51,1763],[52,1760],[53,1767],[54,1492],[55,1533],[56,1535],[57,1542],[58,1557],[59,1557],[60,1557],[61,1592],[62,1775],[63,1765],[64,1773],[65,1749],[66,1766],[67,1761],[68,1761],[69,1761],[70,1761],[71,1762],[72,1762],[73,1762],[74,1763],[75,1760],[76,1767],[77,1492],[78,1533],[79,1535],[80,1542],[81,1557],[82,1557],[83,1557],[84,1592],[85,1775],[86,1765],[87,1773],[88,1749],[89,1766],[90,1760],[91,1760],[92,1767],[93,1767],[94,1767],[95,1767],[96,1767],[97,1767],[98,1765],[99,1761],[100,1761],[101,1761],[102,1761],[103,1765],[104,1749],[105,1761],[106,1761],[107,1761],[108,1761],[109,1765],[110,1749],[111,1761],[112,1761],[113,1761],[114,1761],[115,1765],[116,1749],[117,1763],[118,1763],[119,1773],[120,1765],[121,1760],[122,1762],[123,1762],[124,1763],[125,1760],[126,1767],[127,1775],[128,1765],[129,1773],[130,1766],[131,1761],[132,1761],[133,1761],[134,1761],[135,1762],[136,1762],[137,1763],[138,1760],[139,1767],[140,1533],[141,1535],[142,1542],[143,1557],[144,1557],[145,1592],[146,1775],[147,1765],[148,1773],[149,1766],[150,1760],[151,1760],[152,1761],[153,1761],[154,1761],[155,1761],[156,1761],[157,1760],[158,1760],[160,1762],[162,1761],[163,1761],[164,1761],[165,1761],[166,1762],[167,1762],[168,1762],[169,1763],[170,1760],[171,1767],[172,1492],[173,1533],[174,1535],[175,1542],[176,1557],[177,1557],[178,1557],[179,1592],[180,1775],[181,1765],[182,1773],[183,1749],[184,1766],[186,1761],[187,1761],[188,1761],[189,1761],[190,1762],[191,1762],[192,1762],[193,1763],[194,1760],[195,1767],[196,1492],[197,1533],[198,1535],[199,1542],[200,1557],[201,1557],[202,1557],[203,1592],[204,1775],[205,1765],[206,1773],[207,1749],[208,1749],[209,1766],[210,1775],[211,1775],[212,1762],[213,1557],[214,1557],[215,1760],[216,1760],[217,1760],[218,1760],[219,1760],[220,1760],[221,1760],[222,1760],[223,1542],[224,1557],[225,1557],[226,1533],[227,1557],[228,1557],[229,1542],[230,1760],[231,1557],[232,1557],[233,1542],[234,1557],[235,1557],[236,1557],[237,1762],[239,1765],[240,1765],[241,1760],[242,1760],[243,1760],[244,1760],[245,1761],[246,1761],[247,1761],[248,1761],[249,1762],[250,1762],[251,1762],[252,1763],[253,1760],[254,1767],[255,1492],[256,1533],[257,1535],[258,1542],[259,1557],[260,1557],[261,1557],[262,1592],[263,1775],[264,1765],[265,1773],[266,1749],[267,1766],[268,1760],[269,1760],[270,1760],[271,1761],[272,1761],[273,1760],[274,1760],[275,1557],[276,1557],[277,1760],[278,1760],[279,1761],[280,1761],[281,1773],[282,1773],[283,1762],[284,1773],[285,1760],[286,1760],[287,1760],[288,1760],[289,1542],[290,1542],[291,1542],[292,1761],[293,1760],[294,1760],[295,1557],[296,1762],[297,1762],[298,1557],[299,1761],[300,1761],[301,1761],[302,1761],[303,1760],[304,1760],[306,1760],[307,1760],[308,1767],[309,1767],[310,1767],[311,1761],[312,1761],[313,1760],[314,1760],[315,1765],[316,1765],[317,1760],[318,1761],[319,1760],[320,1760],[321,1760],[322,1760],[323,1557],[324,1557],[325,1760],[326,1760],[327,1760],[328,1760],[329,1761],[330,1761],[331,1761],[332,1761],[333,1765],[334,1749],[335,1761],[336,1761],[337,1761],[338,1761],[339,1762],[340,1762],[341,1762],[342,1763],[343,1760],[344,1767],[345,1492],[346,1533],[347,1535],[348,1542],[349,1557],[350,1557],[351,1557],[352,1592],[353,1775],[354,1765],[355,1773],[356,1749],[357,1766],[358,1761],[359,1761],[360,1761],[361,1761],[362,1762],[363,1762],[364,1762],[365,1763],[366,1760],[367,1767],[368,1492],[369,1533],[370,1535],[371,1542],[372,1557],[373,1557],[374,1557],[375,1592],[376,1775],[377,1765],[378,1773],[379,1749],[380,1766],[381,1762],[382,1762],[383,1761],[384,1761],[385,1761],[386,1761],[387,1762],[388,1762],[389,1762],[390,1763],[391,1760],[392,1767],[393,1492],[394,1533],[395,1535],[396,1542],[397,1557],[398,1557],[399,1557],[400,1592],[401,1775],[402,1765],[403,1773],[404,1749],[405,1766],[408,1766],[409,1761],[410,1542],[411,456],[1493,1492],[1494,1492],[1495,1761],[1496,1761],[1498,1761],[1499,1761],[1529,1533],[1530,1533],[1531,1533],[1532,1533],[1536,1535],[1537,1535],[1538,1535],[1539,1535],[1540,1535],[1541,1535],[1543,1542],[1544,1542],[1545,1542],[1546,1542],[1547,1542],[1548,1542],[1549,1542],[1550,1542],[1551,1542],[1552,1542],[1553,1542],[1554,1542],[1555,1542],[1556,1542],[1561,1557],[1562,1557],[1563,1557],[1564,1557],[1565,1557],[1566,1557],[1567,1557],[1568,1557],[1569,1557],[1570,1557],[1571,1557],[1572,1557],[1573,1557],[1574,1557],[1575,1557],[1576,1557],[1577,1557],[1578,1557],[1579,1557],[1580,1557],[1581,1557],[1582,1557],[1583,1557],[1584,1557],[1585,1557],[1586,1557],[1587,1557],[1588,1557],[1589,1557],[1590,1557],[1591,1557],[1593,1592],[1594,1592],[1595,1592],[1596,1592],[1597,1592],[1598,1592],[1599,1592],[1600,1592],[1718,1749],[1724,1749],[1728,1749],[1729,1749],[1730,1749],[1731,1749],[1732,1749],[1733,1749],[1735,1749],[1736,1749],[1739,1749],[1740,1749],[1741,1749],[1742,1749],[1743,1749],[1744,1749],[1745,1749],[1748,1749]],"b":[[223,"impl-Memory-for-Memory"],[291,"impl-Memory-for-Memory"],[1509,"impl-Deref-for-InnerRef%3CD,+%26mut+Ref%3E"],[1510,"impl-Deref-for-InnerRef%3CD,+%26Ref%3E"],[1547,"impl-Memory"],[1551,"impl-Memory"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAOcDYgAVAAAAHwAAACEAAAAmAAIAKwAAAC0ALQBkABEAhAASAJoAAwCgAAAAowAWANEAAADVAAAA4AAAAOMAAADlAAEA6AAAAOoAAAAiAQIAKwEAAEoBMwCAARYAmwECAJ8BAQCkAQoAtQEMAMQBAADGAQQAzAEPAN4BAQDhAQIA6wETAAACAgAFAgUADQICABMCBQAeAgAAKQIAADACAAAzAgkASQIAAF8CggDjAgAA7AIAAPQCBgAAAwAABwMAAA0DAAASAwMAIAMAACoDAAA0AwAAPQMAAFcDAwBnAwAAeAMSAJIDAACaAwAApwMAALADAAC1AwAAtwMAALkDHQDeAwAAEgQAACoE0wD/BAAABAUAACIFAAAkBQAASAWMANoFAADdBQQA5gUDAPEFBQD5BQAA/wUAAA0GAQAQBgAAEwYAABUGAAAaBgMAKQYDAEIGBQBKBgAAUgYHAF0GFAB2BgIAegYGAIQGAACKBgAAlAYBAJsGGAC2BgAAuAYEAL4GAQDTBgEA1gYAAA==","P":[[38,"T"],[39,""],[44,"T"],[90,""],[92,""],[95,"FuncRef,"],[97,""],[98,""],[105,"T"],[111,""],[117,","],[119,""],[120,""],[144,"T"],[145,""],[177,"T"],[178,""],[186,"T"],[208,""],[209,"T"],[210,""],[212,""],[223,"T"],[224,""],[227,""],[229,""],[231,""],[233,"T"],[234,""],[235,""],[245,"U"],[268,""],[281,""],[282,""],[289,"T"],[290,""],[291,"T"],[292,""],[298,"T"],[299,""],[309,"T"],[310,""],[311,""],[316,""],[317,""],[329,"T"],[335,"U,T"],[358,"U"],[381,""],[410,"T"],[418,""],[419,"T"],[423,""],[424,"T"],[425,""],[430,"T"],[432,"U"],[434,""],[436,"T"],[437,"U,T"],[439,"U"],[441,""],[447,"T"],[451,""],[452,"U"],[453,"U,T"],[454,"U"],[455,""],[459,"T,"],[460,""],[461,"T"],[462,""],[464,"T"],[465,""],[466,"T"],[467,""],[468,"T"],[474,",T"],[475,",,"],[476,""],[477,"T,Deref::Target"],[479,""],[481,"T"],[482,""],[483,"T"],[486,"U"],[489,""],[490,"U,T"],[493,"U"],[496,""],[1066,"T"],[1136,""],[1171,"T"],[1206,""],[1277,"T"],[1278,""],[1279,"T"],[1283,""],[1284,"T"],[1313,""],[1314,"T"],[1316,"U"],[1351,"T"],[1386,"U,T"],[1421,"U"],[1456,""],[1500,"T"],[1502,"D,Ref"],[1503,"T"],[1504,""],[1505,"D,Ref"],[1509,"D,Ref,Deref::Target"],[1512,"D,Ref"],[1513,"T"],[1516,"U"],[1520,"T"],[1521,"U,T"],[1522,"U"],[1523,""],[1530,"T"],[1531,""],[1548,"T"],[1550,""],[1551,"T"],[1552,""],[1553,""],[1554,"T"],[1555,""],[1556,"T"],[1561,"T,"],[1565,""],[1566,"T"],[1567,",T"],[1568,""],[1570,"T"],[1571,""],[1575,""],[1577,"T"],[1579,""],[1581,""],[1582,""],[1583,""],[1623,","],[1625,""],[1628,"T"],[1643,""],[1645,"T"],[1647,""],[1650,","],[1652,""],[1653,","],[1655,""],[1656,""],[1657,""],[1664,"T"],[1667,""],[1668,"T"],[1672,""],[1674,"U"],[1681,""],[1682,""],[1686,""],[1687,""],[1692,"T"],[1694,"U,T"],[1701,"U"],[1708,""],[1720,"T"],[1722,""],[1724,"T"],[1725,""],[1726,"T"],[1729,""],[1731,"Func"],[1732,""],[1737,"U"],[1738,""],[1746,"U,T"],[1747,"U"],[1748,""],[1750,"V,I"],[1753,""]]}],["wasmedge_types",{"t":"GGPPPPGPPPPPFPFGPPPFGPGPPPPPPPGPFPPGPPPPPPPPPPINNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHPPPPPPPPPPPPPPPPPGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPGPPPGPPPPPPGPPPGPPPPPPPPGPPPPPPGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGPPPPPPPPPPPGPGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGGPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOO","n":["CompilerOptimizationLevel","CompilerOutputFormat","Const","Err","ExternRef","","ExternalInstanceType","F32","F64","Func","FuncRef","","FuncType","Global","GlobalType","HostRegistration","I32","I64","Memory","MemoryType","Mutability","Native","NeverType","O0","O1","O2","O3","Ok","Os","Oz","RefType","Table","TableType","UnsupportedRef","V128","ValType","Var","Wasi","WasiCryptoAsymmetricCommon","WasiCryptoCommon","WasiCryptoKx","WasiCryptoSignatures","WasiCryptoSymmetric","WasiNn","Wasm","WasmEdgeProcess","WasmEdgeResult","args","args_len","borrow","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","clone","","","","","","","","","","","","clone_into","","","","","","","","","","","","clone_to_uninit","","","","","","","","","","","","default","","","","elem_ty","eq","","","","","","","","","","","error","fmt","","","","","","","","","","","","","from","","","","","","","","","","","","","","","","","","","","","","","hash","into","","","","","","","","","","","","maximum","","minimum","","mutability","new","","","","returns","returns_len","shared","to_owned","","","","","","","","","","","","to_string","try_from","","","","","","","","","","","","try_into","","","","","","","","","","","","type_id","","","","","","","","","","","","value_ty","wat2wasm","AOTDisabled","AccessNullArray","AccessNullFunc","AccessNullI31","AccessNullStruct","ArrayOutOfBounds","ArrayTypesMismatch","ArrayTypesNumtypeRequired","CastFailed","CastNullToNonNull","Common","CompilerCreate","Component","ConfigCreate","ConstExprRequired","ConstPtr","Core","CoreCommonError","CoreComponentError","CoreError","CoreExecutionError","CoreInstantiationError","CoreLoadError","CoreValidationError","CostLimitExceeded","Create","","","","","","","","CreateBinding","CreateImportModule","CreateSharedType","CreateWasi","CreateWasmEdgeProcess","CreateWithWasiContext","DataCountRequired","DataSegDoesNotFit","DivideByZero","DupExportName","DuplicateImportModule","DuplicateModuleInstance","ElemSegDoesNotFit","ExecuteTimeout","Execution","ExecutorCreate","ExpectSharedMemory","ExpectedZeroByte","Export","ExportError","FoundNulByte","FromUtf8","Func","FuncError","FuncNotFound","FuncSigMismatch","FuncType","","FuncTypeCreate","Global","GlobalError","GlobalType","","GlobalTypeCreate","HostFuncError","HostFuncFailed","IllegalGrammar","IllegalOpCode","IllegalPath","ImmutableArray","ImmutableField","ImmutableGlobal","Import","ImportError","ImportObjCreate","IncompatibleDataCount","IncompatibleFuncCode","IncompatibleImportType","IndirectCallTypeMismatch","Instance","InstanceError","Instantiation","InstrTypeMismatch","IntegerOverflow","IntegerTooLarge","IntegerTooLong","Interrupted","IntrinsicsTableNotFound","InvalidAlignment","InvalidBrRefType","InvalidConvToInt","InvalidDataIdx","InvalidElemIdx","InvalidFieldIdx","InvalidFuncIdx","InvalidFuncTypeIdx","InvalidGlobalIdx","InvalidImportModule","InvalidLabelIdx","InvalidLaneIdx","InvalidLimit","InvalidLocalIdx","InvalidMemPages","InvalidMemoryIdx","InvalidMut","InvalidNotDefaultableArray","InvalidNotDefaultableField","InvalidPackedArray","InvalidPackedField","InvalidRefIdx","InvalidResultArity","InvalidStartFunc","InvalidSubType","InvalidTableIdx","InvalidUninitLocal","InvalidUnpackedArray","InvalidUnpackedField","JunkSection","LengthOutOfBounds","Load","LoaderCreate","MalformedAliasTarget","MalformedCanonical","MalformedCoreInstance","MalformedDefType","MalformedElemType","MalformedExportKind","MalformedFlagsType","MalformedImportKind","MalformedInstance","MalformedMagic","MalformedName","MalformedRecordType","MalformedRefType","MalformedSection","MalformedSort","MalformedTable","MalformedTupleType","MalformedUTF8","MalformedValType","MalformedVariantType","MalformedVersion","Mem","MemError","MemType","","MemTypeCreate","MemoryOutOfBounds","ModifyConst","ModuleCreate","ModuleNameConflict","MultiMemories","MultiTables","MutPtr","NonNullRequired","NotFound","NotFoundActiveModule","","NotFoundExecutor","NotFoundFunc","","NotFoundFuncRegistered","NotFoundFuncType","NotFoundGlobal","","NotFoundGlobalRegistered","NotFoundImportModule","NotFoundLoader","NotFoundMappedFdHandler","NotFoundMem","","NotFoundMemRegistered","NotFoundModule","","NotFoundNulByte","NotFoundStatistics","NotFoundStore","NotFoundTable","","NotFoundTableRegistered","NotFoundValidator","NotFoundWasiCryptoAsymmetricCommonModule","NotFoundWasiCryptoCommonModule","NotFoundWasiCryptoKxModule","NotFoundWasiCryptoSignaturesModule","NotFoundWasiCryptoSymmetricModule","NotFoundWasiModule","NotFoundWasiNnModule","NotFoundWasmEdgeProcessModule","NotValidated","Operation","Plugin","PluginError","Ptr2Ref","ReadError","RefTypeMismatch","Runtime","RuntimeError","SectionSizeMismatch","SetValueErrorType","SetValueToConst","SharedMemoryNoMax","StatisticsCreate","Store","StoreError","Table","TableError","TableOutOfBounds","TableType","","TableTypeCreate","Terminated","TooManyLocals","Type","","","","","","TypeCheckFailed","UnalignedAtomicAccess","UndefinedElement","UnexpectedEnd","UninitializedElement","UnknownCanonicalOption","UnknownError","UnknownImport","UnmatchedValType","Unreachable","User","","UserDefError","Utf8","Validation","ValidatorCreate","Vm","VmError","WasmEdgeError","WindowsPathConversion","WrongInstanceAddress","WrongInstanceIndex","WrongVMWorkflow","borrow","","","","","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","","","","","clone","","","","","","","","","","","","","","","","","","","clone_into","","","","","","","","","","","","","","","","","","","clone_to_uninit","","","","","","","","","","","","","","","","","","","eq","","","","","","","","","","","","","","","","","","","fmt","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","into","","","","","","","","","","","","","","","","","","","source","to_owned","","","","","","","","","","","","","","","","","","","to_string","","","","","","","","","","","","","","","","","","","try_from","","","","","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","","","","","type_id","","","","","","","","","","","","","","","","","","","actual","expected","actual","expected","func_name","global_name","mem_name","mod_name","","","","table_name"],"q":[[0,"wasmedge_types"],[238,"wasmedge_types::error"],[784,"wasmedge_types::error::ExportError"],[786,"wasmedge_types::error::ImportError"],[788,"wasmedge_types::error::StoreError"],[796,"core::fmt"],[797,"core::hash"],[798,"core::option"],[799,"alloc::vec"],[800,"alloc::string"],[801,"core::result"],[802,"core::any"],[803,"alloc::borrow"],[804,"wat"],[805,"alloc::ffi::c_str"],[806,"core::str::error"],[807,"core::ffi::c_str"],[808,"core::error"]],"i":"``A`Cfnf`00Ah21`0``110``Ad`Ab000500`2`33`6Af00000020`b065823140AjAlAnB`:9<675843210:9<675843210:9<675843210:9<67584321043213:9<67584321`:9<6758843210::99<<<66677755888432105:9<675843210323214321442:9<6758432108:9<675843210:9<675843210:9<6758432101`EjFb0000En011EhDb102Df1```````5Dd1DhDjE`EbEdEf637330ElF`=<220:;:=1:`:::`>=DlDn<<`10<`?333>>><`<332?<`=??33Ej4??FbEn000007000000600000000000066EhDbFd000990909009909099091`7614?1833Df6=<;;><<;><<;;>><<<;2;;><<;;;;;;;;;622`0:5Ff7;77;33`3`69837;Dd2DhDj<;899>957=1963:6766``699:62410<;E`EbEdEf;>El=F`?;9<8:76DlDn7654?Ej4En4FbFd?Db?Df?>76=<;:Eh6:5943Ff3Dd3DhDj<;E`EbEdEf8>El>F`>=9<8;76DlDn765476=<;:Eh6:5943Ff33Dd033Dh0Dj0<<;;E`0Eb0Ed0Ef088>>El0>>F`0>>==99<<<<<<<<<<<<<<<<8;76DlDn765476=<;:Eh6:5943Ff33Dd3DhDj<;E`EbEdEf8>El>F`>=9<8;76DlDn765476=<;:Eh6:5943Ff3Dd3DhDj<;E`EbEdEf8>El>F`>=9<8;76DlDn7654U::from(self).\nThe format of the env argument should be “KEY=VALUE”\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nGet a flags value with all known bits set.\nGet a flags value with all known bits set.\nGet a flags value with all known bits set.\nGet a flags value with all known bits set.\nGet a flags value with all known bits set.\nGet a flags value with all known bits set.\nGet a flags value with all known bits set.\nGet a flags value with all known bits set.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nGet the underlying bits value.\nGet the underlying bits value.\nGet the underlying bits value.\nGet the underlying bits value.\nGet the underlying bits value.\nGet the underlying bits value.\nGet the underlying bits value.\nGet the underlying bits value.\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nWhether all set bits in a source flags value are also set …\nWhether all set bits in a source flags value are also set …\nWhether all set bits in a source flags value are also set …\nWhether all set bits in a source flags value are also set …\nWhether all set bits in a source flags value are also set …\nWhether all set bits in a source flags value are also set …\nWhether all set bits in a source flags value are also set …\nWhether all set bits in a source flags value are also set …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nGet a flags value with all bits unset.\nGet a flags value with all bits unset.\nGet a flags value with all bits unset.\nGet a flags value with all bits unset.\nGet a flags value with all bits unset.\nGet a flags value with all bits unset.\nGet a flags value with all bits unset.\nGet a flags value with all bits unset.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nConvert from a bits value.\nConvert from a bits value.\nConvert from a bits value.\nConvert from a bits value.\nConvert from a bits value.\nConvert from a bits value.\nConvert from a bits value.\nConvert from a bits value.\nConvert from a bits value exactly.\nConvert from a bits value exactly.\nConvert from a bits value exactly.\nConvert from a bits value exactly.\nConvert from a bits value exactly.\nConvert from a bits value exactly.\nConvert from a bits value exactly.\nConvert from a bits value exactly.\nConvert from a bits value, unsetting any unknown bits.\nConvert from a bits value, unsetting any unknown bits.\nConvert from a bits value, unsetting any unknown bits.\nConvert from a bits value, unsetting any unknown bits.\nConvert from a bits value, unsetting any unknown bits.\nConvert from a bits value, unsetting any unknown bits.\nConvert from a bits value, unsetting any unknown bits.\nConvert from a bits value, unsetting any unknown bits.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nThe bitwise or (|) of the bits in each flags value.\nGet a flags value with the bits of a flag with the given …\nGet a flags value with the bits of a flag with the given …\nGet a flags value with the bits of a flag with the given …\nGet a flags value with the bits of a flag with the given …\nGet a flags value with the bits of a flag with the given …\nGet a flags value with the bits of a flag with the given …\nGet a flags value with the bits of a flag with the given …\nGet a flags value with the bits of a flag with the given …\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nThe bitwise and (&) of the bits in two flags values.\nWhether any set bits in a source flags value are also set …\nWhether any set bits in a source flags value are also set …\nWhether any set bits in a source flags value are also set …\nWhether any set bits in a source flags value are also set …\nWhether any set bits in a source flags value are also set …\nWhether any set bits in a source flags value are also set …\nWhether any set bits in a source flags value are also set …\nWhether any set bits in a source flags value are also set …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nWhether all known bits in this flags value are set.\nWhether all known bits in this flags value are set.\nWhether all known bits in this flags value are set.\nWhether all known bits in this flags value are set.\nWhether all known bits in this flags value are set.\nWhether all known bits in this flags value are set.\nWhether all known bits in this flags value are set.\nWhether all known bits in this flags value are set.\nWhether all bits in this flags value are unset.\nWhether all bits in this flags value are unset.\nWhether all bits in this flags value are unset.\nWhether all bits in this flags value are unset.\nWhether all bits in this flags value are unset.\nWhether all bits in this flags value are unset.\nWhether all bits in this flags value are unset.\nWhether all bits in this flags value are unset.\nYield a set of contained flags values.\nYield a set of contained flags values.\nYield a set of contained flags values.\nYield a set of contained flags values.\nYield a set of contained flags values.\nYield a set of contained flags values.\nYield a set of contained flags values.\nYield a set of contained flags values.\nYield a set of contained named flags values.\nYield a set of contained named flags values.\nYield a set of contained named flags values.\nYield a set of contained named flags values.\nYield a set of contained named flags values.\nYield a set of contained named flags values.\nYield a set of contained named flags values.\nYield a set of contained named flags values.\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nThe bitwise negation (!) of the bits in a flags value, …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nCall insert when value is true or remove when value is …\nCall insert when value is true or remove when value is …\nCall insert when value is true or remove when value is …\nCall insert when value is true or remove when value is …\nCall insert when value is true or remove when value is …\nCall insert when value is true or remove when value is …\nCall insert when value is true or remove when value is …\nCall insert when value is true or remove when value is …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe intersection of a source flags value with the …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise exclusive-or (^) of the bits in two flags …\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nThe bitwise or (|) of the bits in two flags values.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).") \ No newline at end of file diff --git a/search.desc/wasmedge_macro/wasmedge_macro-desc-0-.js b/search.desc/wasmedge_macro/wasmedge_macro-desc-0-.js new file mode 100644 index 000000000..61927aba4 --- /dev/null +++ b/search.desc/wasmedge_macro/wasmedge_macro-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("wasmedge_macro", 0, "Overview\nDeclare a native async function that will be used to …\nDeclare a native function that will be used to create a …") \ No newline at end of file diff --git a/search.desc/wasmedge_sdk/wasmedge_sdk-desc-0-.js b/search.desc/wasmedge_sdk/wasmedge_sdk-desc-0-.js new file mode 100644 index 000000000..04865bac4 --- /dev/null +++ b/search.desc/wasmedge_sdk/wasmedge_sdk-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("wasmedge_sdk", 0, "Overview\nThe array type that can hold all the represented values.\nThe object as an module instance is required to implement …\nDefines WasmEdge ahead-of-time(AOT) compiler and the …\nDefines WasmEdge AOT compiler optimization level.\nDefines WasmEdge AOT compiler output binary format.\nIdentifies an immutable global variable.\nContains the error value\nDefines the types of the exported instances.\nRefers to the infinite union of all references to objects …\nA reference to object.\nDefines the type of external WasmEdge instances.\n32-bit floating-point data as defined by the IEEE 754-2019.\n64-bit floating-point data as defined by the IEEE 754-2019.\nA WasmEdge instance that is a WasmEdge Func.\nRefers to the infinite union of all references to host …\nA reference to a host function.\nStruct of WasmEdge FuncType.\nA WasmEdge instance that is a WasmEdge Global.\nStruct of WasmEdge GlobalType.\nDefines WasmEdge host module registration enum.\n32-bit integer.\n64-bit integer.\nDefines an import object that contains the required import …\nCreates a import object.\nDefines the types of the imported instances.\nRepresents an instantiated module.\nManipulates the runtime logger.\nA WasmEdge instance that is a WasmEdge Memory.\nStruct of WasmEdge MemoryType.\nDefines compiled in-memory representation of an input WASM …\nDefines the mutability property of WasmEdge Global …\nNative dynamic library format.\nThis is a workaround solution to the never type in Rust. …\nDisable as many optimizations as possible.\nOptimize quickly without destroying debuggability.\nOptimize for fast execution as much as possible without …\nOptimize for fast execution as much as possible.\nContains the success value\nOptimize for small code size as much as possible without …\nOptimize for small code size as much as possible.\nDefines WasmEdge reference types.\nUsed to collect statistics of the WasmEdge runtime, such …\nThe Store is a collection of registered modules and …\nA WasmEdge instance that is a WasmEdge Table.\nStruct of WasmEdge TableType.\nA reference that unsupported by c-api.\n128-bit vector of packed integer or floating-point data.\nDefines WasmEdge value types.\nIdentifies a mutable global variable.\nA Vm defines a virtual environment for managing …\nThe Wasm type.\nWebAssembly with AOT compiled codes in custom sections.\nThe WasmEdge result type.\nDefines the function converting a value of Rust type to …\nDescribes the mapping of Rust type to Wasm type.\nDescribes the mapping of a tuple of Rust types to Wasm …\nWebAssembly value type.\nReturns a reference to the active module instance from …\nReturns a mutable reference to the active module instance …\nReturns the types of the arguments of a host function.\nReturns the number of the arguments of a host function.\nSafety\nDeclare a native async function that will be used to …\nCreates a new ImportObject.\nCompiles the given wasm bytes into a shared library file (*…\nCompiles the given wasm file into a shared library file (*…\nDefines the structs used to construct configurations.\nChecks if the store contains a named module instance.\nChecks if the vm contains a named module instance.\nReturns the total cost in execution.\nReturns the instruction count in execution.\nReturns the count of the exported WasmEdge instances from …\nReturns the count of the imported WasmEdge instances in …\nReturns the instruction count per second in execution.\nReturns the element type defined in the TableType.\nDefines WasmEdge error types.\nReturns the export types of all exported WasmEdge …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nLoads a WebAssembly binary module from in-memory bytes.\nReturns a validated module from a file.\nReturns the length of the exported function instances in …\nReturns the length of the exported function instances in …\nReturns the names of the exported function instances in …\nReturns the names of the exported function instances in …\nGets the export type by the name of a specific exported …\nReturns the exported function instance by name.\nReturns the exported function instance by name.\nReturns the exported function instance by name.\nReturns the exported function instance by name.\nReturns the exported global instance by name.\nReturns the exported global instance by name.\nReturns the exported memory instance by name.\nReturns the exported memory instance by name.\nReturns the exported table instance by name.\nReturns the exported table instance by name.\nReturns the length of the exported global instances in …\nReturns the length of the exported global instances in …\nReturns the names of the exported global instances in this …\nReturns the names of the exported global instances in this …\nDeclare a native function that will be used to create a …\nReturns the import types of all imported WasmEdge …\nReturns the names of all registered named module instances.\nReturns the names of all named module instances this vm …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nLogs the debug information.\nLogs the error information.\nSets the logging system off.\nReturns the maximum size defined in the TableType.\nReturns the maximum size defined in the MemoryType.\nReturns the length of the exported memory instances in …\nReturns the length of the exported memory instances in …\nReturns the names of all exported memory instances in this …\nReturns the names of all exported memory instances in this …\nReturns the minimum size defined in the TableType.\nReturns the minimum size defined in the MemoryType.\nReturns the name of the module hosting the imported …\nReturns the value mutability property defined in the …\nReturns the name of this exported module instance.\nReturns the name of this exported module instance.\nReturns the imported name of the WasmEdge instance.\nReturns the exported name of the WasmEdge instance.\nReturns the number of the named module instances in this …\nReturns the count of the named module instances this vm …\nCreates a new Store.\nCreates a new AOT compiler.\nCreates a new ImportObjectBuilder.\nCreates a new FuncType with the given types of arguments …\nCreates a new TableType with the given element type and …\nCreates a new MemoryType with the given size range.\nCreates a new GlobalType with the given value type and …\nCreates a new Statistics.\nGenerates arguments of WasmValue types.\nDefines plugin related structs.\nRegisters and instantiates a WasmEdge compiled module into …\nRegisters a wasm module into this vm as a named or active …\nReturns the types of the returns of a host function.\nReturns the number of the returns of a host function.\nRuns an exported wasm function in a (named or active) …\nRuns an exported wasm function in a (named or active) …\nSets the cost limit in execution.\nSets the cost of instructions.\nReturns whether the memory is shared.\nReturns a reference to the internal store from this vm.\nReturns a mutable reference to the internal store from …\nReturns the length of the exported table instances in this …\nReturns the length of the exported table instances in this …\nReturns the names of the exported table instances in this …\nReturns the names of the exported table instances in this …\nReturns the type of the imported WasmEdge instance, which …\nReturns the type of the exported WasmEdge instance, which …\nDefines the general types.\nDefines WasmEdge Driver and CoreVersion types\nReturns the value type defined in the GlobalType.\nGet the Wasm types for the tuple (list) of currently …\nParses in-memory bytes as either the WebAssembly Text …\nAdds a host function to the ImportObject to create.\nAdds a host function to the ImportObject to create.\nAdds a global to the ImportObject to create.\nAdds a memory to the ImportObject to create.\nAdds a table to the ImportObject to create.\nReturns the argument unchanged.\nCalls U::from(self).\nDefines WasmEdge Vm struct.\nDefines an import object that contains the required import …\nCreates a async import object.\nCreates a new ImportObject.\nReturns the argument unchanged.\nCalls U::from(self).\nCreates a new ImportObjectBuilder.\nAdds a host function to the ImportObject to create.\nAdds a host function to the ImportObject to create.\nAdds a global to the ImportObject to create.\nAdds a memory to the ImportObject to create.\nAdds a table to the ImportObject to create.\nA Vm defines a virtual environment for managing …\nReturns a reference to the active module instance from …\nReturns a mutable reference to the active module instance …\nChecks if the vm contains a named module instance.\nReturns the argument unchanged.\nReturns the names of all named module instances this vm …\nCalls U::from(self).\nReturns the count of the named module instances this vm …\nRegisters a wasm module into this vm as a named or active …\nRuns an exported wasm function in a (named or active) …\nRuns an exported wasm function in a (named or active) …\nReturns a reference to the internal store from this vm.\nReturns a mutable reference to the internal store from …\nA AsyncWasiModule is a module instance for the WASI …\nCreates a AsyncWasiModule instance.\nCreates a AsyncWasiModule instance with the given wasi …\nReturns the WASI exit code.\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the name of the module instance.\nDefines the common configuration options.\nDefines a group of configuration options for AOT compiler.\nDefines Config struct used to check/set the configuration …\nDefines a builder for creating a Config.\nDefines a group of runtime configuration options.\nDefines a group of the statistics configuration options.\nCreates a new Config from the ConfigBuilder.\nEnables or disables the BulkMemoryOperations option.\nChecks if the BulkMemoryOperations option turns on or not.\nChecks if the cost measuring option turns on or not.\nSets the instruction counting option.\nCreates a new default instance of CommonConfigOptions.\nSets the dump IR option of AOT compiler.\nChecks if the dump IR option turns on or not.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nEnables or disables the FunctionReferences option.\nChecks if the FunctionReferences option turns on or not.\nEnables or disables the GC option.\nSets the generic binary option of AOT compiler.\nChecks if the generic binary option of AOT compiler turns …\nChecks if the instruction counting option turns on or not.\nEnables or disables the ForceInterpreter option.\nChecks if the ForceInterpreter option turns on or not.\nEnables or Disables the Interruptible option of AOT …\nChecks if the Interruptible option of AOT Compiler turns …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns the number of the memory pages available.\nSets the maximum number of the memory pages available.\nSets the cost measuring option.\nSets the time measuring option.\nEnables or disables the MultiMemories option.\nChecks if the MultiMemories option turns on or not.\nEnables or disables the MultiValue option.\nChecks if the MultiValue option turns on or not.\nEnables or disables the ImportExportMutGlobals option.\nChecks if the ImportExportMutGlobals option turns on or …\nCreates a new ConfigBuilder with the given …\nCreates a new instance of CommonConfigOptions.\nCreates a new instance of CompilerConfigOptions.\nCreates a new instance of RuntimeConfigOptions.\nCreates a new instance of StatisticsConfigOptions.\nEnables or disables the NonTrapFloatToIntConversions …\nChecks if the NonTrapFloatToIntConversions option turns on …\nReturns the optimization level of AOT compiler.\nSets the optimization level of AOT compiler.\nReturns the output binary format of AOT compiler.\nSets the output binary format of AOT compiler.\nEnables or disables the ReferenceTypes option.\nChecks if the ReferenceTypes option turns on or not.\nEnables or disables the SignExtensionOperators option.\nChecks if the SignExtensionOperators option turns on or …\nEnables or disables the SIMD option.\nChecks if the SIMD option turns on or not.\nEnables or disables the TailCall option.\nChecks if the TailCall option turns on or not.\nEnables or disables the Threads option.\nChecks if the Threads option turns on or not.\nChecks if the cost measuring option turns on or not.\nSets the CompilerConfigOptions for the ConfigBuilder.\nSets the RuntimeConfigOptions for the ConfigBuilder.\nSets the StatisticsConfigOptions for the ConfigBuilder.\nErrors raised by WasmEdge Core.\nThe error type for the common errors from WasmEdge Core.\nThe error type for the component model phase from WasmEdge …\nThe error types raised by WasmEdge Core.\nThe error type for the execution phase from WasmEdge Core.\nThe error type for the instantiation phase from WasmEdge …\nThe error type for the load phase from WasmEdge Core.\nThe error type for the validation phase from WasmEdge Core.\nThe error types for WasmEdge ExportType.\nThe error types for WasmEdge Function.\nThe error types for WasmEdge Global.\nThe error type for the host function definition.\nThe error types for WasmEdge ImportType.\nThe error types for WasmEdge Instance.\nThe error types for WasmEdge Memory.\nThe error types for WasmEdge plugin.\nThe error types for WasmEdge Store.\nThe error types for WasmEdge Table.\nThe error types for WasmEdge Vm.\nThe error types used by both wasmedge-sys and wasmedge …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nDefine where the graph should be executed.\nDescribes the encoding of the graph.\nPreload config for initializing the wasi_nn plug-in.\nRepresents a loaded plugin. It provides the APIs for …\nDefines the API to manage plugins.\nReturns the count of loaded plugins.\nDefines low-level types used in Plugin development.\nReturns the target plugin by its name.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nInitializes the wasmedge_process plugin module instance …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nLoad plugins from the given path.\nReturns the count of the module instances in this plugin.\nReturns a module instance that is generated from the …\nReturns the names of all module instances in this plugin.\nReturns the name of this plugin.\nReturns the names of all loaded plugins.\nCreates a new preload config.\nInitialize the wasi_nn plug-in with the preloads.\nModule descriptor for plugins.\nPlugin descriptor for plugins.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nA reference to opaque data in the wasm instance.\nA reference to a host function.\n32-bit floating-point data as defined by the IEEE 754-2019.\n64-bit floating-point data as defined by the IEEE 754-2019.\n32-bit integer.\n64-bit integer.\n128-bit vector of packed integer or floating-point data.\nDefines runtime values that a WebAssembly module can …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCreates a new instance of ExternRef wrapping the given …\nThe version info of WasmEdge core\nDefines WasmEdge Driver functions\nTriggers the WasmEdge AOT compiler tool\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nReturns the major version value of WasmEdge core.\nReturns the minor version value of WasmEdge core.\nReturns the patch version value of WasmEdge core.\nTriggers the WasmEdge runtime tool\nTriggers the WasmEdge unified tool\nReturns the version string of WasmEdge core.\nA WasiModule is a module instance for the WASI …\nCreates a WASI host module which contains the WASI host …\nReturns the WASI exit code.\nReturns the argument unchanged.\nReturns the native handler from the mapped FD/Handler.\nInitializes the WASI host module with the given parameters.\nCalls U::from(self).\nReturns the name of the module instance.") \ No newline at end of file diff --git a/search.desc/wasmedge_sys/wasmedge_sys-desc-0-.js b/search.desc/wasmedge_sys/wasmedge_sys-desc-0-.js new file mode 100644 index 000000000..162588f68 --- /dev/null +++ b/search.desc/wasmedge_sys/wasmedge_sys-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("wasmedge_sys", 0, "Overview\nThe object as an module instance is required to implement …\nRepresents a calling frame on top of stack.\nDefines WasmEdge ahead-of-time(AOT) compiler and the …\nDefines Config struct used to check/set the configuration …\nDefines an execution environment for both pure WASM and …\nDefines the types of the exported wasm values.\nDefines a reference to a host function.\nStruct of WasmEdge FuncType.\nDefines a host function.\nDefines a WebAssembly global variable, which stores a …\nStruct of WasmEdge GlobalType.\nAn ImportModule represents a host module with a name. A …\nDefines the types of the imported wasm value.\nAn Instance represents an instantiated module. In the …\nLoader is used to load WASM modules from the given WASM …\nDefines a WebAssembly memory instance, which is a linear …\nStruct of WasmEdge MemoryType.\nDefines compiled in-memory representation of an input WASM …\nStruct of WasmEdge Statistics.\nThe Store is a collection of registered modules and …\nA WasmEdge Table defines a WebAssembly table instance …\nStruct of WasmEdge TableType.\nStruct of WasmEdge Validator.\nType of wasi context that is used to configure the wasi …\nA WasiModule is a module instance for the WASI …\nDefines a WebAssembly value.\nEnables or disables the Annotations option. By default, …\nChecks if the Annotations option turns on or not.\nReturns the types of the arguments of a host function.\nReturns the number of the arguments of a host function.\nSafety\nProvides a raw pointer to the inner ImportType context.\nProvides a raw pointer to the inner Compiler context.\nProvides a raw pointer to the inner Configure context.\nProvides a raw pointer to the inner Statistics context.\nProvides a raw pointer to the inner Validator context.\nDefines async related types.\nEnables or disables the BulkMemoryOperations option. By …\nChecks if the BulkMemoryOperations option turns on or not.\nRuns a host function instance and returns the results.\nAsynchronously runs a host function instance and returns …\nAsynchronously runs a host function instance with a …\nRuns a host function reference instance and returns the …\nAsynchronously runs a host function reference instance and …\nRun a host function instance and return the results or …\nClears the data in this statistics.\nCompiles the input WASM from the given bytes for the AOT …\nCompiles the input WASM from the given file path for the …\nChecks if the Store contains a module of which the name …\nReturns the total cost in execution.\nSets the instruction counting option. By default, the …\nReturns the count of wasm exports in the Module.\nReturns the number of wasm imports in the Module.\nCreates a new AOT compiler.\nCreates a new Config.\nCreates a new executor to be associated with the given …\nCreate a new Loader to be associated with the given global …\nCreates a new Statistics.\nCreates a new Store.\nCreates a new Validator to be associated with the given …\nSets the dump IR option of AOT compiler. By default, the …\nChecks if the dump IR option turns on or not.\nReturns the element type defined in the TableType.\nEnables or disables the ExceptionHandling option. By …\nChecks if the ExceptionHandling option turns on or not.\nReturns the types of wasm exports in the Module.\nForeign function interfaces generated from WasmEdge C-API.\nDefines WasmEdge CallingFrame.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nLoads a WASM module from a in-memory bytes.\nLoads a WASM module from a WASM file.\nReturns the length of the exported function instances in …\nReturns the names of the exported function instances in …\nEnables or disables the FunctionReferences option. By …\nChecks if the FunctionReferences option turns on or not.\nEnables or disables the GC option. By default, the option …\nChecks if the GC option turns on or not.\nSets the generic binary option of AOT compiler. By …\nChecks if the generic binary option of AOT compiler turns …\nReturns the output binary format of AOT compiler.\nReturns the optimization level of AOT compiler.\nReturns the exported function instance by name.\nReturns the exported function instance by name.\nReturns the exported global instance by name.\nReturns the number of the memory pages available.\nReturns the exported memory instance by name.\nReturns the exported table instance by name.\nReturns the length of the exported global instances in …\nReturns the names of the exported global instances in this …\nReturns the types of wasm imports in the Module.\nDefines WasmEdge instance structs, including Function, …\nReturns the instruction count in execution.\nReturns the instruction count per second in execution.\nEnables or disables the ForceInterpreter option. By …\nChecks if the ForceInterpreter option turns on or not.\nEnables or Disables the Interruptible option of AOT …\nChecks if the Interruptible option of AOT Compiler turns …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nChecks if the cost measuring option turns on or not.\nChecks if the instruction counting option turns on or not.\nChecks if the time measuring option turns on or not.\nReturns the maximum size defined in the TableType.\nReturns the maximum size defined in the MemoryType.\nSets the cost measuring option. By default, the option is …\nSets the time measuring option. By default, the option is …\nReturns the length of the exported memory instances in …\nReturns the names of all exported memory instances in this …\nEnables or disables the Memory64 option. By default, the …\nChecks if the Memory64 option turns on or not.\nReturns the minimum size defined in the TableType.\nReturns the minimum size defined in the MemoryType.\nReturns the module instance by the module name.\nReturns the length of the registered modules.\nReturns the module name that this import is expected to …\nReturns the names of all registered modules.\nEnables or disables the MultiMemories option. By default, …\nChecks if the MultiMemories option turns on or not.\nEnables or disables the MultiValue option. By default, the …\nChecks if the MultiValue option turns on or not.\nReturns the value mutability property defined in the …\nEnables or disables the ImportExportMutGlobals option. By …\nChecks if the ImportExportMutGlobals option turns on or …\nReturns the name of this exported module instance.\nReturns the field name of the module that this import is …\nReturns the name by which this export is known by.\nCreates a new FuncType with the given types of arguments …\nCreates a new TableType with the given element type and …\nCreates a new MemoryType with the given size range.\nCreates a new GlobalType with the given value type and …\nEnables or disables the NonTrapFloatToIntConversions …\nChecks if the NonTrapFloatToIntConversions option turns on …\nDefines PluginManager and Plugin structs.\nEnables or disables the ReferenceTypes option. By default, …\nChecks if the ReferenceTypes option turns on or not.\nRegisters and instantiates a WasmEdge module into a store …\nRegisters and instantiates a import module into a store.\nRegisters and instantiates a WasmEdge module into a store.\nReturns the types of the returns of a host function.\nReturns the number of the returns of a host function.\nSets the output binary format of AOT compiler. By default, …\nSets the optimization level of AOT compiler. By default, …\nSets the cost limit in execution.\nSets the cost of instructions.\nSets the maximum number of the memory pages available.\nReturns whether the memory is shared.\nEnables or disables the SignExtensionOperators option. By …\nChecks if the SignExtensionOperators option turns on or …\nEnables or disables the SIMD option. By default, the …\nChecks if the SIMD option turns on or not.\nReturns the length of the exported table instances in this …\nReturns the names of the exported table instances in this …\nEnables or disables the TailCall option. By default, the …\nChecks if the TailCall option turns on or not.\nEnables or disables the Threads option. By default, the …\nChecks if the Threads option turns on or not.\nReturns the type of this import.\nReturns the type of this export.\nDefines the WebAssembly primitive types.\nDefines the versioning and logging functions.\nValidates a given WasmEdge Module.\nReturns the value type defined in the GlobalType.\nDefines data structure for WasmEdge async mechanism.\nDefines an async execution context.\nDefines a async state that contains the pointer to current …\nReturns an async execution context.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCreates a new async state.\nCreates a new async execution context.\nCreates an async host function with the given function …\nReturns the argument unchanged.\nCalls U::from(self).\nA AsyncWasiModule is a module instance for the WASI …\nCreates a AsyncWasiModule instance.\nCreates a AsyncWasiModule instance with the given wasi …\nReturns the WASI exit code.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns the name of the module instance.\nBoolean to describe has max value or not.\nMaximum value. Will be ignored if the HasMax is false.\nMinimum value.\nNo value.\nNo value.\nBoolean to describe is shared memory or not.\nSome value of type T.\nSome value of type T.\nDeletion of the WasmEdge_ASTModuleContext.\nList the exports of the AST module.\nGet the length of exports list of the AST module.\nList the imports of the AST module.\nGet the length of imports list of the AST module.\nCancel a WasmEdge_Async execution.\nDeletion of the WasmEdge_Async.\nWait and get the result of WasmEdge_Async execution.\nWait and get the return list length of the WasmEdge_Async …\nWait a WasmEdge_Async execution.\nWait a WasmEdge_Async execution with timeout.\nWasmEdge bytes struct.\nCreation of the WasmEdge_Bytes with the buffer and its …\nDeletion of the WasmEdge_Bytes.\nCreate the WasmEdge_Bytes wraps to the buffer.\nGet the executor context from the current calling frame.\nGet the memory instance by index from the module instance …\nGet the module instance of the current calling frame.\nCompile the input WASM from the file path.\nCompile the input WASM from the given buffer.\nCompile the input WASM from a WasmEdge_Bytes.\nCreation of the WasmEdge_CompilerContext.\nDeletion of the WasmEdge_CompilerContext.\nAdd a built-in host registration setting into …\nAdd a proposal setting into the WasmEdge_ConfigureContext.\nGet the optimization level of the AOT compiler.\nGet the output binary format of the AOT compiler.\nGet the dump IR option of the AOT compiler.\nGet the generic binary option of the AOT compiler.\nGet the interruptible option of the AOT compiler.\nSet the dump IR option of the AOT compiler.\nSet the generic binary option of the AOT compiler.\nSet the interruptible option of the AOT compiler.\nSet the optimization level of the AOT compiler.\nSet the output binary format of the AOT compiler.\nCreation of the WasmEdge_ConfigureContext.\nDeletion of the WasmEdge_ConfigureContext.\nGet the setting of the page limit of memory instances.\nCheck if a built-in host registration setting exists in the\nCheck if a proposal setting exists in the …\nGet the AllowAFUNIX option.\nGet the force interpreter mode execution option.\nRemove a built-in host registration setting in the …\nRemove a proposal setting in the WasmEdge_ConfigureContext.\nSet the option of enabling/disabling AF_UNIX support in …\nSet the force interpreter mode execution option.\nSet the page limit of memory instances.\nGet the cost measuring option for the statistics.\nGet the instruction counting option for the statistics.\nGet the time measuring option for the statistics.\nSet the cost measuring option for the statistics.\nSet the instruction counting option for the statistics.\nSet the time measuring option for the statistics.\nEntrypoint for the compiler tool.\nEntrypoint for the runtime tool.\nEntrypoint for the unified tool.\nAsynchronous invoke a WASM function by the function …\nCreation of the WasmEdge_ExecutorContext.\nDeletion of the WasmEdge_ExecutorContext.\nRegister a host function that will be invoked after …\nRegister a host function that will be invoked before …\nInstantiate an AST Module into a module instance.\nInvoke a WASM function by the function instance.\nInstantiate an AST Module into a named module instance and …\nRegister a module instance into a store with exporting its …\nGet the external name from an export type.\nGet the external type from an export type.\nGet the external value (which is function type) from an …\nGet the external value (which is global type) from an …\nGet the external value (which is memory type) from an …\nGet the external value (which is table type) from an …\nGet the external value (which is tag type) from an export …\nCreation of the WasmEdge_FunctionInstanceContext for host …\nCreation of the WasmEdge_FunctionInstanceContext for host …\nDeletion of the WasmEdge_FunctionInstanceContext.\nGet the function data field of the function instance.\nGet the function type context of the function instance.\nCreation of the WasmEdge_FunctionTypeContext.\nDeletion of the WasmEdge_FunctionTypeContext.\nGet the parameter types list from the …\nGet the parameter types list length from the …\nGet the return types list from the …\nGet the return types list length from the …\nCreation of the WasmEdge_GlobalInstanceContext.\nDeletion of the WasmEdge_GlobalInstanceContext.\nGet the global type context from a global instance.\nGet the value from a global instance.\nSet the value into a global instance.\nCreation of the WasmEdge_GlobalTypeContext.\nDeletion of the WasmEdge_GlobalTypeContext.\nGet the mutability from a global type.\nGet the value type from a global type.\nGet the external name from an import type.\nGet the external type from an import type.\nGet the external value (which is function type) from an …\nGet the external value (which is global type) from an …\nGet the external value (which is memory type) from an …\nGet the module name from an import type.\nGet the external value (which is table type) from an …\nGet the external value (which is tag type) from an import …\nStruct of WASM limit.\nCompare the two WasmEdge_Limit objects.\nCreation of the WasmEdge_LoaderContext.\nDeletion of the WasmEdge_LoaderContext.\nLoad and parse the WASM module from a buffer into …\nLoad and parse the WASM module from a WasmEdge_Bytes into …\nLoad and parse the WASM module from a WASM file into a …\nSerialize the WasmEdge_ASTModuleContext into WASM binary.\nSet the logging system off.\nSet the logging system to filter to debug level.\nSet the logging system to filter to error level.\nCreation of the WasmEdge_MemoryInstanceContext.\nDeletion of the WasmEdge_MemoryInstanceContext.\nCopy the data to the output buffer from a memory instance.\nGet the memory type context from a memory instance.\nGet the current page size (64 KiB of each page) of a …\nGet the data pointer in a memory instance.\nGet the const data pointer in a const memory instance.\nGrow a memory instance with a page size.\nCopy the data into a memory instance from the input buffer.\nCreation of the WasmEdge_MemoryTypeContext.\nDeletion of the WasmEdge_MemoryTypeContext.\nGet the limit from a memory type.\nModule descriptor for plugins.\nAdd a function instance context into a …\nAdd a global instance context into a …\nAdd a memory instance context into a …\nAdd a table instance context into a …\nCreation of the WasmEdge_ModuleInstanceContext.\nCreation of the WasmEdge_ModuleInstanceContext for the …\nCreation of the WasmEdge_ModuleInstanceContext with host …\nDeletion of the WasmEdge_ModuleInstanceContext.\nGet the exported function instance context of a module …\nGet the exported global instance context of a module …\nGet the exported memory instance context of a module …\nGet the exported table instance context of a module …\nGet the exported tag instance context of a module instance.\nGet the host data set into the module instance when …\nGet the export module name of a module instance.\nInitialize the WasmEdge_ModuleInstanceContext for the WASI …\nInitialize the WasmEdge_ModuleInstanceContext for the …\nList the exported function names of a module instance.\nGet the length of exported function list of a module …\nList the exported global names of a module instance.\nGet the length of exported global list of a module …\nList the exported memory names of a module instance.\nGet the length of exported memory list of a module …\nList the exported table names of a module instance.\nGet the length of exported table list of a module instance.\nList the exported tag names of a module instance.\nGet the length of exported tag list of a module instance.\nGet the WASI exit code.\nGet the native handler from the WASI mapped FD/Handler.\nCreate the module instance in the plug-in by the module …\nPlugin descriptor for plugins.\nFind the loaded plug-in context by name.\nGet the plug-in name of the plug-in context.\nInitialize the wasi_nn plug-in.\nList the modules in the plug-in context with their names.\nGet the length of module list in the plug-in context.\nList the loaded plug-ins with their names.\nGet the length of loaded plug-in list.\nLoad the plugin with the given file or directory.\nLoad plugins with the default search paths.\nVersion data for plugins.\nImplement by plugins for returning the plugin descriptor.\nProgram option for plugins.\nType of option value.\nBoolean value.\nBoolean value.\nBoolean value.\nBoolean value.\nBoolean value.\nBoolean value.\nNo option value.\nWasmEdge_String.\nBoolean value.\nBoolean value.\nBoolean value.\nBoolean value.\nBoolean value.\nWasmEdge result struct.\nGenerate the result with code.\nGet the error category.\nGet the result code.\nGet the result message.\nCheck the result is a success or not.\nClear all data in the WasmEdge_StatisticsContext.\nCreation of the WasmEdge_StatisticsContext.\nDeletion of the WasmEdge_StatisticsContext.\nGet the instruction count in execution.\nGet the instruction count per second in execution.\nGet the total cost in execution.\nSet the cost limit in execution.\nSet the costs of instructions.\nCreation of the WasmEdge_StoreContext.\nDeletion of the WasmEdge_StoreContext.\nGet the module instance context by the module name.\nList the registered module names.\nGet the length of registered module list in store.\nWasmEdge string struct.\nCopy the content of WasmEdge_String object to the buffer.\nCreation of the WasmEdge_String with the buffer and its …\nCreation of the WasmEdge_String with the C string.\nDeletion of the WasmEdge_String.\nCompare the two WasmEdge_String objects.\nCreate the WasmEdge_String wraps to the buffer.\nCreation of the WasmEdge_TableInstanceContext.\nCreation of the WasmEdge_TableInstanceContext with the …\nDeletion of the WasmEdge_TableInstanceContext.\nGet the reference value in a table instance.\nGet the size of a table instance.\nGet the table type context from a table instance.\nGrow a table instance with a size.\nSet the reference value into a table instance.\nCreation of the WasmEdge_TableTypeContext.\nDeletion of the WasmEdge_TableTypeContext.\nGet the limit from a table type.\nGet the reference type from a table type.\nGet the tag type context from a tag instance.\nGet the function type from a tag type.\nAsynchronous invoke a WASM function by name.\nAsynchronous invoke a WASM function by its module name and …\nInstantiate the WASM module from a WasmEdge AST Module and …\nInstantiate the WASM module from a buffer and asynchronous …\nInstantiate the WASM module from a WasmEdge_Bytes and …\nInstantiate the WASM module from a WASM file and …\nReset of WasmEdge_VMContext.\nCreation of the WasmEdge_VMContext.\nDeletion of the WasmEdge_VMContext.\nInvoke a WASM function by name.\nInvoke a WASM function by its module name and function …\nGet the current instantiated module in VM.\nGet the executor context used in the WasmEdge_VMContext.\nGet the exported function list.\nGet the length of exported function list.\nGet the function type by function name.\nGet the function type by function name.\nGet the module instance corresponding to the …\nGet the loader context used in the WasmEdge_VMContext.\nGet the registered module in VM by the module name.\nGet the statistics context used in the WasmEdge_VMContext.\nGet the store context used in the WasmEdge_VMContext.\nGet the validator context used in the WasmEdge_VMContext.\nInstantiate the validated WASM module in the VM context.\nList the registered module names in the WasmEdge_VMContext.\nGet the length of registered module list in the …\nLoad the WASM module from loaded WasmEdge AST Module.\nLoad the WASM module from a buffer.\nLoad the WASM module from a WasmEdge_Bytes.\nLoad the WASM module from a WASM file.\nInstantiate and register an AST Module into a named module …\nRegister and instantiate WASM into the store in VM from a …\nRegister and instantiate WASM into the store in VM from a …\nRegister and instantiate WASM into the store in VM from a …\nRegister a module instance into the store in VM with …\nInstantiate the WASM module from a WasmEdge AST Module and …\nInstantiate the WASM module from a buffer and invoke a …\nInstantiate the WASM module from a WasmEdge_Bytes and …\nInstantiate the WASM module from a WASM file and invoke a …\nValidate the WASM module loaded into the VM context.\nWasmEdge WASM value type struct.\nGenerate the ExternRef WASM value type.\nGenerate the F32 WASM value type.\nGenerate the F64 WASM value type.\nGenerate the FuncRef WASM value type.\nGenerate the I32 WASM value type.\nGenerate the I64 WASM value type.\nGenerate the V128 WASM value type.\nCompare the two WasmEdge_ValType objects.\nSpecify the WASM value type is an ExternRef or not.\nSpecify the WASM value type is a F32 or not.\nSpecify the WASM value type is a F64 or not.\nSpecify the WASM value type is a FuncRef or not.\nSpecify the WASM value type is an I32 or not.\nSpecify the WASM value type is an I64 or not.\nSpecify the WASM value type is a Ref (includes nullable …\nSpecify the WASM value type is a nullable Ref or not.\nSpecify the WASM value type is a V128 or not.\nCreation of the WasmEdge_ValidatorContext.\nDeletion of the WasmEdge_ValidatorContext.\nValidate the WasmEdge AST Module.\nWasmEdge WASM value struct.\nGenerate the function reference WASM value.\nGenerate the F32 WASM value.\nGenerate the F64 WASM value.\nGenerate the function reference WASM value.\nGenerate the I32 WASM value.\nGenerate the I64 WASM value.\nGenerate the V128 WASM value.\nRetrieve the external reference from the WASM value.\nRetrieve the F32 value from the WASM value.\nRetrieve the F64 value from the WASM value.\nRetrieve the function instance context from the WASM value.\nRetrieve the I32 value from the WASM value.\nRetrieve the I64 value from the WASM value.\nRetrieve the V128 value from the WASM value.\nSpecify the WASM value is a null reference or not.\nGet the version string of the WasmEdge C API.\nGet the major version value of the WasmEdge C API.\nGet the minor version value of the WasmEdge C API.\nGet the patch version value of the WasmEdge C API.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nRepresents a calling frame on top of stack.\nReturns an mutable smart pointer borrowing the memory …\nReturns an immutable smart pointer borrowing the memory …\nStruct of WasmEdge FuncType.\nStruct of WasmEdge GlobalType.\nStruct of WasmEdge MemoryType.\nStruct of WasmEdge TableType.\nSafety\nSafety\nSafety\nSafety\nReturns the argument unchanged.\nDefines WasmEdge Function and FuncType structs.\nDefines WasmEdge Global and GlobalType structs.\nCalls U::from(self).\nDefines WasmEdge Memory and MemType structs.\nDefines WasmEdge Instance and other relevant types.\nDefines WasmEdge Table and TableType structs.\nDefines a reference to a host function.\nDefines a host function.\nSafety\nCreates a host function with the given function type.\nCreates a host function with the given function type and …\nSafety\nSafety\nDefines a WebAssembly global variable, which stores a …\nSafety\nCreates a new Global instance to be associated with the …\nSafety\nReturns the value of the Global instance.\nSets the value of the Global instance.\nReturns the underlying wasm type of a Global instance.\nDefines a WebAssembly memory instance, which is a linear …\nSafety\nCreate a new Memory to be associated with the given …\nReturns the const data pointer to the Memory.\nReturns the data pointer to the Memory.\nCopies the data from the Memory to the output buffer.\nGrows this WebAssembly memory by count pages.\nCopies the data from the given input buffer into the Memory…\nReturns the size, in WebAssembly pages (64 KiB of each …\nReturns the type of the Memory.\nThe object as an module instance is required to implement …\nAn ImportModule represents a host module with a name. A …\nAn Instance represents an instantiated module. In the …\nA WasiModule is a module instance for the WASI …\nSafety\nSafety\nCreates a module instance which is used to import host …\nCreates a WASI host module which contains the WASI host …\nReturns the WASI exit code.\nSafety\nReturns the length of the exported function instances in …\nReturns the names of the exported function instances in …\nReturns the exported function instance by name.\nReturns the exported function instance by name.\nReturns the exported global instance by name.\nReturns the exported memory instance by name.\nReturns the native handler from the mapped FD/Handler.\nReturns the exported table instance by name.\nReturns the length of the exported global instances in …\nReturns the names of the exported global instances in this …\nInitializes the WASI host module with the given parameters.\nReturns the length of the exported memory instances in …\nReturns the names of all exported memory instances in this …\nReturns the name of this exported module instance.\nReturns the name of the module instance.\nReturns the length of the exported table instances in this …\nReturns the names of the exported table instances in this …\nA WasmEdge Table defines a WebAssembly table instance …\nSafety\nReturns the capacity of the Table.\nCreates a new Table to be associated with the given …\nSafety\nReturns the element value at a specific position in the …\nIncreases the capacity of the Table.\nSets a new element value at a specific position in the …\nReturns the TableType of the Table.\nDefines the module descriptor for plugins.\nDefines the type of the function that creates a module …\nRepresents a loaded plugin. It provides the APIs for …\nRepresents Plugin descriptor for plugins.\nDefines the APIs for loading plugins and check the basic …\nRepresents a Plugin module instance.\nDefines the version of a plugin.\nDefines the program option for plugins.\nDefines the type of the program options.\nSafety\nReturns the raw pointer to the inner …\nReturns the raw pointer to the inner …\nReturns the count of loaded plugins.\nCreates a new program option.\nCreates a new module descriptor.\nCreates a new plugin version.\nReturns the target plugin by its name.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nInitializes the wasmedge_process plugin module instance …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nLoad a single or multiple plugins from a given path.\nLoad plugins from the default path. The default plugin …\nReturns the count of the module instances in this plugin.\nReturns a plugin module instance that is generated from …\nReturns the names of all module instances in this plugin.\nReturns the name of this plugin.\nReturns the names of all loaded plugins.\nStruct of WasmEdge String.\nDefines a WebAssembly value.\nReturns the raw WasmEdge_Value.\nReturns the reference to an external object.\nReturns the argument unchanged.\nCreates a WasmValue from a reference to an external object.\nCreates a WasmValue from a f32 value.\nCreates a WasmValue from a f64 value.\nCreates a WasmValue from a FuncRef.\nCreates a WasmValue from a i32 value.\nCreates a WasmValue from a i64 value.\nSafety\nCreates a WasmValue from a i128 value.\nReturns the FuncRef(crate::FuncRef).\nCalls U::from(self).\nSafety\nChecks if a WasmValue is NullRef or not.\nCreates a null WasmValue with a ExternRef.\nGenerates a f32 value from a WasmValue.\nGenerates a f64 value from a WasmValue.\nGenerates a i32 value from a WasmValue.\nGenerates a i64 value from a WasmValue.\nGenerates a v128 value from a WasmValue.\nReturns the type of a WasmValue.\nTriggers the WasmEdge AOT compiler tool\nTriggers the WasmEdge runtime tool\nTriggers the WasmEdge unified tool\nLogs the debug information.\nLogs the error information.\nSets the logging system off.\nReturns the major version value.\nReturns the minor version value.\nReturns the patch version value.\nReturns the version string.") \ No newline at end of file diff --git a/search.desc/wasmedge_types/wasmedge_types-desc-0-.js b/search.desc/wasmedge_types/wasmedge_types-desc-0-.js new file mode 100644 index 000000000..c09d3d3ca --- /dev/null +++ b/search.desc/wasmedge_types/wasmedge_types-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("wasmedge_types", 0, "The wasmedge-types crate defines a group of common data …\nDefines WasmEdge AOT compiler optimization level.\nDefines WasmEdge AOT compiler output binary format.\nIdentifies an immutable global variable.\nContains the error value\nRefers to the infinite union of all references to objects …\nA reference to object.\nDefines the type of external WasmEdge instances.\n32-bit floating-point data as defined by the IEEE 754-2019.\n64-bit floating-point data as defined by the IEEE 754-2019.\nA WasmEdge instance that is a WasmEdge Func.\nRefers to the infinite union of all references to host …\nA reference to a host function.\nStruct of WasmEdge FuncType.\nA WasmEdge instance that is a WasmEdge Global.\nStruct of WasmEdge GlobalType.\nDefines WasmEdge host module registration enum.\n32-bit integer.\n64-bit integer.\nA WasmEdge instance that is a WasmEdge Memory.\nStruct of WasmEdge MemoryType.\nDefines the mutability property of WasmEdge Global …\nNative dynamic library format.\nThis is a workaround solution to the never type in Rust. …\nDisable as many optimizations as possible.\nOptimize quickly without destroying debuggability.\nOptimize for fast execution as much as possible without …\nOptimize for fast execution as much as possible.\nContains the success value\nOptimize for small code size as much as possible without …\nOptimize for small code size as much as possible.\nDefines WasmEdge reference types.\nA WasmEdge instance that is a WasmEdge Table.\nStruct of WasmEdge TableType.\nA reference that unsupported by c-api.\n128-bit vector of packed integer or floating-point data.\nDefines WasmEdge value types.\nIdentifies a mutable global variable.\nWebAssembly with AOT compiled codes in custom sections.\nThe WasmEdge result type.\nReturns the types of the arguments of a host function.\nReturns the number of the arguments of a host function.\nReturns the element type defined in the TableType.\nDefines WasmEdge error types.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns the maximum size defined in the TableType.\nReturns the maximum size defined in the MemoryType.\nReturns the minimum size defined in the TableType.\nReturns the minimum size defined in the MemoryType.\nReturns the value mutability property defined in the …\nCreates a new FuncType with the given types of arguments …\nCreates a new TableType with the given element type and …\nCreates a new MemoryType with the given size range.\nCreates a new GlobalType with the given value type and …\nReturns the types of the returns of a host function.\nReturns the number of the returns of a host function.\nReturns whether the memory is shared.\nReturns the value type defined in the GlobalType.\nParses in-memory bytes as either the WebAssembly Text …\nErrors raised by WasmEdge Core.\nThe error type for the common errors from WasmEdge Core.\nThe error type for the component model phase from WasmEdge …\nThe error types raised by WasmEdge Core.\nThe error type for the execution phase from WasmEdge Core.\nThe error type for the instantiation phase from WasmEdge …\nThe error type for the load phase from WasmEdge Core.\nThe error type for the validation phase from WasmEdge Core.\nThe error types for WasmEdge ExportType.\nThe error types for WasmEdge Function.\nThe error types for WasmEdge Global.\nThe error type for the host function definition.\nThe error types for WasmEdge ImportType.\nThe error types for WasmEdge Instance.\nThe error types for WasmEdge Memory.\nThe error types for WasmEdge plugin.\nThe error types for WasmEdge Store.\nThe error types for WasmEdge Table.\nThe error types for WasmEdge Vm.\nThe error types used by both wasmedge-sys and wasmedge …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).") \ No newline at end of file diff --git a/settings.html b/settings.html new file mode 100644 index 000000000..5a0fcda2a --- /dev/null +++ b/settings.html @@ -0,0 +1 @@ +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/src-files.js b/src-files.js new file mode 100644 index 000000000..da9faa1d9 --- /dev/null +++ b/src-files.js @@ -0,0 +1,3 @@ +var srcIndex = new Map(JSON.parse('[["async_wasi",["",[["snapshots",[["common",[["net",[],["async_tokio.rs","mod.rs"]],["vfs",[],["impls.rs","mod.rs","virtual_sys.rs"]]],["clock.rs","error.rs","memory.rs","mod.rs","types.rs"]],["preview_1",[],["async_poll.rs","async_socket.rs","mod.rs"]]],["env.rs","mod.rs"]]],["lib.rs"]]],["wasmedge_macro",["",[],["lib.rs"]]],["wasmedge_sdk",["",[["async",[],["import.rs","mod.rs","vm.rs"]]],["compiler.rs","config.rs","import.rs","instance.rs","io.rs","lib.rs","log.rs","module.rs","plugin.rs","statistics.rs","store.rs","types.rs","utils.rs","vm.rs"]]],["wasmedge_sys",["",[["async",[],["fiber.rs","function.rs","mod.rs","module.rs"]],["instance",[],["function.rs","global.rs","memory.rs","mod.rs","module.rs","table.rs"]]],["ast_module.rs","compiler.rs","config.rs","executor.rs","frame.rs","io.rs","lib.rs","loader.rs","plugin.rs","statistics.rs","store.rs","types.rs","utils.rs","validator.rs"]]],["wasmedge_types",["",[],["error.rs","lib.rs"]]]]')); +createSrcSidebar(); +//{"start":36,"fragment_lengths":[288,38,229,347,49]} \ No newline at end of file diff --git a/src/async_wasi/lib.rs.html b/src/async_wasi/lib.rs.html new file mode 100644 index 000000000..59d9fe968 --- /dev/null +++ b/src/async_wasi/lib.rs.html @@ -0,0 +1,33 @@ +lib.rs - source

async_wasi/
lib.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
#![doc(
+    html_logo_url = "https://github.com/cncf/artwork/blob/master/projects/wasm-edge-runtime/icon/color/wasm-edge-runtime-icon-color.png?raw=true",
+    html_favicon_url = "https://raw.githubusercontent.com/cncf/artwork/49169bdbc88a7ce3c4a722c641cc2d548bd5c340/projects/wasm-edge-runtime/icon/color/wasm-edge-runtime-icon-color.svg"
+)]
+
+//! The [async-wasi](https://crates.io/crates/async-wasi) crate implements WASI spec for the asynchronous scenarios.
+//!
+//! See also
+//!
+//! * [WasmEdge Runtime](https://wasmedge.org/)
+//!
+
+#[allow(clippy::too_many_arguments)]
+pub mod snapshots;
+
+pub use snapshots::WasiCtx;
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/common/clock.rs.html b/src/async_wasi/snapshots/common/clock.rs.html new file mode 100644 index 000000000..badd2a583 --- /dev/null +++ b/src/async_wasi/snapshots/common/clock.rs.html @@ -0,0 +1,65 @@ +clock.rs - source

async_wasi/snapshots/common/
clock.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
use crate::snapshots::{
+    common::{
+        error::Errno,
+        types::{__wasi_clockid_t, __wasi_errno_t, __wasi_timestamp_t},
+    },
+    WasiCtx,
+};
+
+pub fn wasi_clock_res_get(clock_id: __wasi_clockid_t::Type) -> Result<u64, Errno> {
+    match clock_id {
+        __wasi_clockid_t::__WASI_CLOCKID_MONOTONIC => Ok(1),
+        __wasi_clockid_t::__WASI_CLOCKID_REALTIME => Ok(1),
+        _ => Err(Errno(__wasi_errno_t::__WASI_ERRNO_BADF)),
+    }
+}
+
+pub fn wasi_clock_time_get(
+    ctx: &WasiCtx,
+    clock_id: __wasi_clockid_t::Type,
+    _precision: __wasi_timestamp_t,
+) -> Result<u64, Errno> {
+    use std::time::SystemTime;
+    match clock_id {
+        __wasi_clockid_t::__WASI_CLOCKID_REALTIME | __wasi_clockid_t::__WASI_CLOCKID_MONOTONIC => {
+            let d = SystemTime::now()
+                .duration_since(SystemTime::UNIX_EPOCH)
+                .unwrap();
+            Ok(d.as_nanos() as u64)
+        }
+        _ => Err(Errno(__wasi_errno_t::__WASI_ERRNO_NODEV)),
+    }
+}
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/common/error.rs.html b/src/async_wasi/snapshots/common/error.rs.html new file mode 100644 index 000000000..e4f634e39 --- /dev/null +++ b/src/async_wasi/snapshots/common/error.rs.html @@ -0,0 +1,469 @@ +error.rs - source

async_wasi/snapshots/common/
error.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
use std::{fmt::Debug, io::ErrorKind};
+
+pub use super::types::__wasi_errno_t as wasi_errno;
+
+#[derive(Debug, Eq, PartialEq, Clone, Copy)]
+pub struct Errno(pub wasi_errno::Type);
+
+impl Default for Errno {
+    fn default() -> Self {
+        Errno::__WASI_ERRNO_SUCCESS
+    }
+}
+
+impl Errno {
+    pub const __WASI_ERRNO_SUCCESS: Errno = Errno(0);
+    pub const __WASI_ERRNO_2BIG: Errno = Errno(1);
+    pub const __WASI_ERRNO_ACCES: Errno = Errno(2);
+    pub const __WASI_ERRNO_ADDRINUSE: Errno = Errno(3);
+    pub const __WASI_ERRNO_ADDRNOTAVAIL: Errno = Errno(4);
+    pub const __WASI_ERRNO_AFNOSUPPORT: Errno = Errno(5);
+    pub const __WASI_ERRNO_AGAIN: Errno = Errno(6);
+    pub const __WASI_ERRNO_ALREADY: Errno = Errno(7);
+    pub const __WASI_ERRNO_BADF: Errno = Errno(8);
+    pub const __WASI_ERRNO_BADMSG: Errno = Errno(9);
+    pub const __WASI_ERRNO_BUSY: Errno = Errno(10);
+    pub const __WASI_ERRNO_CANCELED: Errno = Errno(11);
+    pub const __WASI_ERRNO_CHILD: Errno = Errno(12);
+    pub const __WASI_ERRNO_CONNABORTED: Errno = Errno(13);
+    pub const __WASI_ERRNO_CONNREFUSED: Errno = Errno(14);
+    pub const __WASI_ERRNO_CONNRESET: Errno = Errno(15);
+    pub const __WASI_ERRNO_DEADLK: Errno = Errno(16);
+    pub const __WASI_ERRNO_DESTADDRREQ: Errno = Errno(17);
+    pub const __WASI_ERRNO_DOM: Errno = Errno(18);
+    pub const __WASI_ERRNO_DQUOT: Errno = Errno(19);
+    pub const __WASI_ERRNO_EXIST: Errno = Errno(20);
+    pub const __WASI_ERRNO_FAULT: Errno = Errno(21);
+    pub const __WASI_ERRNO_FBIG: Errno = Errno(22);
+    pub const __WASI_ERRNO_HOSTUNREACH: Errno = Errno(23);
+    pub const __WASI_ERRNO_IDRM: Errno = Errno(24);
+    pub const __WASI_ERRNO_ILSEQ: Errno = Errno(25);
+    pub const __WASI_ERRNO_INPROGRESS: Errno = Errno(26);
+    pub const __WASI_ERRNO_INTR: Errno = Errno(27);
+    pub const __WASI_ERRNO_INVAL: Errno = Errno(28);
+    pub const __WASI_ERRNO_IO: Errno = Errno(29);
+    pub const __WASI_ERRNO_ISCONN: Errno = Errno(30);
+    pub const __WASI_ERRNO_ISDIR: Errno = Errno(31);
+    pub const __WASI_ERRNO_LOOP: Errno = Errno(32);
+    pub const __WASI_ERRNO_MFILE: Errno = Errno(33);
+    pub const __WASI_ERRNO_MLINK: Errno = Errno(34);
+    pub const __WASI_ERRNO_MSGSIZE: Errno = Errno(35);
+    pub const __WASI_ERRNO_MULTIHOP: Errno = Errno(36);
+    pub const __WASI_ERRNO_NAMETOOLONG: Errno = Errno(37);
+    pub const __WASI_ERRNO_NETDOWN: Errno = Errno(38);
+    pub const __WASI_ERRNO_NETRESET: Errno = Errno(39);
+    pub const __WASI_ERRNO_NETUNREACH: Errno = Errno(40);
+    pub const __WASI_ERRNO_NFILE: Errno = Errno(41);
+    pub const __WASI_ERRNO_NOBUFS: Errno = Errno(42);
+    pub const __WASI_ERRNO_NODEV: Errno = Errno(43);
+    pub const __WASI_ERRNO_NOENT: Errno = Errno(44);
+    pub const __WASI_ERRNO_NOEXEC: Errno = Errno(45);
+    pub const __WASI_ERRNO_NOLCK: Errno = Errno(46);
+    pub const __WASI_ERRNO_NOLINK: Errno = Errno(47);
+    pub const __WASI_ERRNO_NOMEM: Errno = Errno(48);
+    pub const __WASI_ERRNO_NOMSG: Errno = Errno(49);
+    pub const __WASI_ERRNO_NOPROTOOPT: Errno = Errno(50);
+    pub const __WASI_ERRNO_NOSPC: Errno = Errno(51);
+    pub const __WASI_ERRNO_NOSYS: Errno = Errno(52);
+    pub const __WASI_ERRNO_NOTCONN: Errno = Errno(53);
+    pub const __WASI_ERRNO_NOTDIR: Errno = Errno(54);
+    pub const __WASI_ERRNO_NOTEMPTY: Errno = Errno(55);
+    pub const __WASI_ERRNO_NOTRECOVERABLE: Errno = Errno(56);
+    pub const __WASI_ERRNO_NOTSOCK: Errno = Errno(57);
+    pub const __WASI_ERRNO_NOTSUP: Errno = Errno(58);
+    pub const __WASI_ERRNO_NOTTY: Errno = Errno(59);
+    pub const __WASI_ERRNO_NXIO: Errno = Errno(60);
+    pub const __WASI_ERRNO_OVERFLOW: Errno = Errno(61);
+    pub const __WASI_ERRNO_OWNERDEAD: Errno = Errno(62);
+    pub const __WASI_ERRNO_PERM: Errno = Errno(63);
+    pub const __WASI_ERRNO_PIPE: Errno = Errno(64);
+    pub const __WASI_ERRNO_PROTO: Errno = Errno(65);
+    pub const __WASI_ERRNO_PROTONOSUPPORT: Errno = Errno(66);
+    pub const __WASI_ERRNO_PROTOTYPE: Errno = Errno(67);
+    pub const __WASI_ERRNO_RANGE: Errno = Errno(68);
+    pub const __WASI_ERRNO_ROFS: Errno = Errno(69);
+    pub const __WASI_ERRNO_SPIPE: Errno = Errno(70);
+    pub const __WASI_ERRNO_SRCH: Errno = Errno(71);
+    pub const __WASI_ERRNO_STALE: Errno = Errno(72);
+    pub const __WASI_ERRNO_TIMEDOUT: Errno = Errno(73);
+    pub const __WASI_ERRNO_TXTBSY: Errno = Errno(74);
+    pub const __WASI_ERRNO_XDEV: Errno = Errno(75);
+    pub const __WASI_ERRNO_NOTCAPABLE: Errno = Errno(76);
+    pub const __WASI_ERRNO_AIADDRFAMILY: Errno = Errno(77);
+    pub const __WASI_ERRNO_AIAGAIN: Errno = Errno(78);
+    pub const __WASI_ERRNO_AIBADFLAG: Errno = Errno(79);
+    pub const __WASI_ERRNO_AIFAIL: Errno = Errno(80);
+    pub const __WASI_ERRNO_AIFAMILY: Errno = Errno(81);
+    pub const __WASI_ERRNO_AIMEMORY: Errno = Errno(82);
+    pub const __WASI_ERRNO_AINODATA: Errno = Errno(83);
+    pub const __WASI_ERRNO_AINONAME: Errno = Errno(84);
+    pub const __WASI_ERRNO_AISERVICE: Errno = Errno(85);
+    pub const __WASI_ERRNO_AISOCKTYPE: Errno = Errno(86);
+    pub const __WASI_ERRNO_AISYSTEM: Errno = Errno(87);
+}
+
+impl From<wasi_errno::Type> for Errno {
+    fn from(e: wasi_errno::Type) -> Self {
+        Errno(e)
+    }
+}
+
+impl From<ErrorKind> for Errno {
+    fn from(e: ErrorKind) -> Self {
+        match e {
+            ErrorKind::NotFound => Errno::__WASI_ERRNO_NOENT,
+            ErrorKind::PermissionDenied => Errno::__WASI_ERRNO_PERM,
+            ErrorKind::ConnectionRefused => Errno::__WASI_ERRNO_CONNREFUSED,
+            ErrorKind::ConnectionReset => Errno::__WASI_ERRNO_CONNRESET,
+            ErrorKind::ConnectionAborted => Errno::__WASI_ERRNO_CONNABORTED,
+            ErrorKind::NotConnected => Errno::__WASI_ERRNO_NOTCONN,
+            ErrorKind::AddrInUse => Errno::__WASI_ERRNO_ADDRINUSE,
+            ErrorKind::AddrNotAvailable => Errno::__WASI_ERRNO_ADDRNOTAVAIL,
+            ErrorKind::BrokenPipe => Errno::__WASI_ERRNO_PIPE,
+            ErrorKind::AlreadyExists => Errno::__WASI_ERRNO_EXIST,
+            ErrorKind::WouldBlock => Errno::__WASI_ERRNO_AGAIN,
+            ErrorKind::InvalidInput => Errno::__WASI_ERRNO_INVAL,
+            ErrorKind::InvalidData => Errno::__WASI_ERRNO_IO,
+            ErrorKind::TimedOut => Errno::__WASI_ERRNO_TIMEDOUT,
+            ErrorKind::WriteZero => Errno::__WASI_ERRNO_IO,
+            ErrorKind::Interrupted => Errno::__WASI_ERRNO_INTR,
+            ErrorKind::UnexpectedEof => Errno::__WASI_ERRNO_IO,
+            ErrorKind::Unsupported => Errno::__WASI_ERRNO_NOTSUP,
+            ErrorKind::OutOfMemory => Errno::__WASI_ERRNO_NOMEM,
+            _ => Errno::__WASI_ERRNO_IO,
+        }
+    }
+}
+
+impl From<&std::io::Error> for Errno {
+    fn from(e: &std::io::Error) -> Self {
+        if let Some(error_code) = e.raw_os_error() {
+            match error_code {
+                0 => Errno::__WASI_ERRNO_SUCCESS,
+                libc::E2BIG => Errno::__WASI_ERRNO_2BIG,
+                libc::EACCES => Errno::__WASI_ERRNO_ACCES,
+                libc::EADDRINUSE => Errno::__WASI_ERRNO_ADDRINUSE,
+                libc::EADDRNOTAVAIL => Errno::__WASI_ERRNO_ADDRNOTAVAIL,
+                libc::EAFNOSUPPORT => Errno::__WASI_ERRNO_AFNOSUPPORT,
+                libc::EAGAIN => Errno::__WASI_ERRNO_AGAIN,
+                libc::EALREADY => Errno::__WASI_ERRNO_ALREADY,
+                libc::EBADF => Errno::__WASI_ERRNO_BADF,
+                libc::EBADMSG => Errno::__WASI_ERRNO_BADMSG,
+                libc::EBUSY => Errno::__WASI_ERRNO_BUSY,
+                libc::ECANCELED => Errno::__WASI_ERRNO_CANCELED,
+                libc::ECHILD => Errno::__WASI_ERRNO_CHILD,
+                libc::ECONNABORTED => Errno::__WASI_ERRNO_CONNABORTED,
+                libc::ECONNREFUSED => Errno::__WASI_ERRNO_CONNREFUSED,
+                libc::ECONNRESET => Errno::__WASI_ERRNO_CONNRESET,
+                libc::EDEADLK => Errno::__WASI_ERRNO_DEADLK,
+                libc::EDESTADDRREQ => Errno::__WASI_ERRNO_DESTADDRREQ,
+                libc::EDOM => Errno::__WASI_ERRNO_DOM,
+                #[cfg(unix)]
+                libc::EDQUOT => Errno::__WASI_ERRNO_DQUOT,
+                libc::EEXIST => Errno::__WASI_ERRNO_EXIST,
+                libc::EFAULT => Errno::__WASI_ERRNO_FAULT,
+                libc::EFBIG => Errno::__WASI_ERRNO_FBIG,
+                libc::EHOSTUNREACH => Errno::__WASI_ERRNO_HOSTUNREACH,
+                libc::EIDRM => Errno::__WASI_ERRNO_IDRM,
+                libc::EILSEQ => Errno::__WASI_ERRNO_ILSEQ,
+                libc::EINPROGRESS => Errno::__WASI_ERRNO_INPROGRESS,
+                libc::EINTR => Errno::__WASI_ERRNO_INTR,
+                libc::EINVAL => Errno::__WASI_ERRNO_INVAL,
+                libc::EIO => Errno::__WASI_ERRNO_IO,
+                libc::EISCONN => Errno::__WASI_ERRNO_ISCONN,
+                libc::EISDIR => Errno::__WASI_ERRNO_ISDIR,
+                libc::ELOOP => Errno::__WASI_ERRNO_LOOP,
+                libc::EMFILE => Errno::__WASI_ERRNO_MFILE,
+                libc::EMLINK => Errno::__WASI_ERRNO_MLINK,
+                libc::EMSGSIZE => Errno::__WASI_ERRNO_MSGSIZE,
+                #[cfg(unix)]
+                libc::EMULTIHOP => Errno::__WASI_ERRNO_MULTIHOP,
+                libc::ENAMETOOLONG => Errno::__WASI_ERRNO_NAMETOOLONG,
+                libc::ENETDOWN => Errno::__WASI_ERRNO_NETDOWN,
+                libc::ENETRESET => Errno::__WASI_ERRNO_NETRESET,
+                libc::ENETUNREACH => Errno::__WASI_ERRNO_NETUNREACH,
+                libc::ENFILE => Errno::__WASI_ERRNO_NFILE,
+                libc::ENOBUFS => Errno::__WASI_ERRNO_NOBUFS,
+                libc::ENODEV => Errno::__WASI_ERRNO_NODEV,
+                libc::ENOENT => Errno::__WASI_ERRNO_NOENT,
+                libc::ENOEXEC => Errno::__WASI_ERRNO_NOEXEC,
+                libc::ENOLCK => Errno::__WASI_ERRNO_NOLCK,
+                libc::ENOLINK => Errno::__WASI_ERRNO_NOLINK,
+                libc::ENOMEM => Errno::__WASI_ERRNO_NOMEM,
+                libc::ENOMSG => Errno::__WASI_ERRNO_NOMSG,
+                libc::ENOPROTOOPT => Errno::__WASI_ERRNO_NOPROTOOPT,
+                libc::ENOSPC => Errno::__WASI_ERRNO_NOSPC,
+                libc::ENOSYS => Errno::__WASI_ERRNO_NOSYS,
+                libc::ENOTCONN => Errno::__WASI_ERRNO_NOTCONN,
+                libc::ENOTDIR => Errno::__WASI_ERRNO_NOTDIR,
+                libc::ENOTEMPTY => Errno::__WASI_ERRNO_NOTEMPTY,
+                libc::ENOTRECOVERABLE => Errno::__WASI_ERRNO_NOTRECOVERABLE,
+                libc::ENOTSOCK => Errno::__WASI_ERRNO_NOTSOCK,
+                libc::ENOTSUP => Errno::__WASI_ERRNO_NOTSUP,
+                libc::ENOTTY => Errno::__WASI_ERRNO_NOTTY,
+                libc::ENXIO => Errno::__WASI_ERRNO_NXIO,
+                libc::EOVERFLOW => Errno::__WASI_ERRNO_OVERFLOW,
+                libc::EOWNERDEAD => Errno::__WASI_ERRNO_OWNERDEAD,
+                libc::EPERM => Errno::__WASI_ERRNO_PERM,
+                libc::EPIPE => Errno::__WASI_ERRNO_PIPE,
+                libc::EPROTO => Errno::__WASI_ERRNO_PROTO,
+                libc::EPROTONOSUPPORT => Errno::__WASI_ERRNO_PROTONOSUPPORT,
+                libc::EPROTOTYPE => Errno::__WASI_ERRNO_PROTOTYPE,
+                libc::ERANGE => Errno::__WASI_ERRNO_RANGE,
+                libc::EROFS => Errno::__WASI_ERRNO_ROFS,
+                libc::ESPIPE => Errno::__WASI_ERRNO_SPIPE,
+                libc::ESRCH => Errno::__WASI_ERRNO_SRCH,
+                #[cfg(unix)]
+                libc::ESTALE => Errno::__WASI_ERRNO_STALE,
+                libc::ETIMEDOUT => Errno::__WASI_ERRNO_TIMEDOUT,
+                libc::ETXTBSY => Errno::__WASI_ERRNO_TXTBSY,
+                libc::EXDEV => Errno::__WASI_ERRNO_XDEV,
+                _ => Errno::__WASI_ERRNO_IO,
+            }
+        } else {
+            let kind = e.kind();
+            Errno::from(kind)
+        }
+    }
+}
+
+impl From<std::io::Error> for Errno {
+    fn from(e: std::io::Error) -> Self {
+        Errno::from(&e)
+    }
+}
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/common/memory.rs.html b/src/async_wasi/snapshots/common/memory.rs.html new file mode 100644 index 000000000..00ae2d224 --- /dev/null +++ b/src/async_wasi/snapshots/common/memory.rs.html @@ -0,0 +1,129 @@ +memory.rs - source

async_wasi/snapshots/common/
memory.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
use super::{
+    error::Errno,
+    types::{__wasi_ciovec_t, __wasi_iovec_t, __wasi_size_t},
+};
+use std::{
+    io::{IoSlice, IoSliceMut},
+    ops::{Add, Deref, DerefMut, Sub},
+};
+
+pub trait Memory {
+    fn get_data<T: Sized>(&self, offset: WasmPtr<T>) -> Result<&T, Errno>;
+
+    fn get_slice<T: Sized>(&self, offset: WasmPtr<T>, len: usize) -> Result<&[T], Errno>;
+
+    fn get_iovec<'a>(
+        &self,
+        iovec_ptr: WasmPtr<__wasi_ciovec_t>,
+        iovec_len: __wasi_size_t,
+    ) -> Result<Vec<IoSlice<'a>>, Errno>;
+
+    fn mut_data<T: Sized>(&mut self, offset: WasmPtr<T>) -> Result<&mut T, Errno>;
+
+    fn mut_slice<T: Sized>(&mut self, offset: WasmPtr<T>, len: usize) -> Result<&mut [T], Errno>;
+
+    fn mut_iovec(
+        &mut self,
+        iovec_ptr: WasmPtr<__wasi_iovec_t>,
+        iovec_len: __wasi_size_t,
+    ) -> Result<Vec<IoSliceMut<'_>>, Errno>;
+
+    fn write_data<T: Sized>(&mut self, offset: WasmPtr<T>, data: T) -> Result<(), Errno>;
+}
+
+#[derive(Debug, Clone, Copy)]
+pub struct WasmPtr<T: Sized>(pub usize, std::marker::PhantomData<T>);
+impl<T: Sized> WasmPtr<T> {
+    pub fn is_null(&self) -> bool {
+        self.0 == 0
+    }
+}
+impl<T: Sized> From<usize> for WasmPtr<T> {
+    fn from(i: usize) -> Self {
+        WasmPtr(i, Default::default())
+    }
+}
+impl<T: Sized> From<WasmPtr<T>> for usize {
+    fn from(val: WasmPtr<T>) -> Self {
+        val.0
+    }
+}
+impl<T: Sized> Add<usize> for WasmPtr<T> {
+    type Output = Self;
+    fn add(mut self, rhs: usize) -> Self::Output {
+        self.0 += rhs * std::mem::size_of::<T>();
+        self
+    }
+}
+impl<T: Sized> Sub<usize> for WasmPtr<T> {
+    type Output = Self;
+    fn sub(mut self, rhs: usize) -> Self::Output {
+        self.0 -= rhs * std::mem::size_of::<T>();
+        self
+    }
+}
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/common/mod.rs.html b/src/async_wasi/snapshots/common/mod.rs.html new file mode 100644 index 000000000..7219e2d6c --- /dev/null +++ b/src/async_wasi/snapshots/common/mod.rs.html @@ -0,0 +1,17 @@ +mod.rs - source

async_wasi/snapshots/common/
mod.rs

+1
+2
+3
+4
+5
+6
+7
+8
#![allow(non_camel_case_types, non_upper_case_globals, unused)]
+pub mod types;
+
+pub mod clock;
+pub mod error;
+pub mod memory;
+pub mod net;
+pub mod vfs;
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/common/net/async_tokio.rs.html b/src/async_wasi/snapshots/common/net/async_tokio.rs.html new file mode 100644 index 000000000..4628f7aa0 --- /dev/null +++ b/src/async_wasi/snapshots/common/net/async_tokio.rs.html @@ -0,0 +1,1483 @@ +async_tokio.rs - source

async_wasi/snapshots/common/net/
async_tokio.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
use super::*;
+use crate::snapshots::{
+    common::{types as wasi_types, vfs},
+    env::Errno,
+};
+use socket2::{SockAddr, Socket};
+use std::{
+    ops::DerefMut,
+    os::unix::prelude::{AsRawFd, FromRawFd, RawFd},
+    sync::atomic::{AtomicBool, AtomicI8, AtomicU8},
+};
+use tokio::io::{
+    unix::{AsyncFd, AsyncFdReadyGuard, TryIoError},
+    AsyncReadExt, AsyncWriteExt, Interest,
+};
+
+#[derive(Debug)]
+pub(crate) enum AsyncWasiSocketInner {
+    PreOpen(Socket),
+    AsyncFd(AsyncFd<Socket>),
+}
+
+impl AsyncWasiSocketInner {
+    fn register(&mut self) -> io::Result<()> {
+        unsafe {
+            let inner = match self {
+                AsyncWasiSocketInner::PreOpen(s) => {
+                    let mut inner_socket = std::mem::zeroed();
+                    std::mem::swap(s, &mut inner_socket);
+                    inner_socket
+                }
+                AsyncWasiSocketInner::AsyncFd(_) => return Ok(()),
+            };
+            let mut new_self = Self::AsyncFd(AsyncFd::new(inner)?);
+            std::mem::swap(self, &mut new_self);
+            std::mem::forget(new_self);
+            Ok(())
+        }
+    }
+
+    fn bind(&mut self, addr: &SockAddr) -> io::Result<()> {
+        match self {
+            AsyncWasiSocketInner::PreOpen(s) => {
+                s.set_reuse_address(true)?;
+                s.bind(addr)
+            }
+            AsyncWasiSocketInner::AsyncFd(_) => Err(io::Error::from_raw_os_error(libc::EINVAL)),
+        }
+    }
+
+    fn bind_device(&mut self, interface: Option<&[u8]>) -> io::Result<()> {
+        match self {
+            AsyncWasiSocketInner::PreOpen(s) => s.bind_device(interface),
+            AsyncWasiSocketInner::AsyncFd(s) => s.get_ref().bind_device(interface),
+        }
+    }
+
+    fn device(&self) -> io::Result<Option<Vec<u8>>> {
+        match self {
+            AsyncWasiSocketInner::PreOpen(s) => s.device(),
+            AsyncWasiSocketInner::AsyncFd(s) => s.get_ref().device(),
+        }
+    }
+
+    fn listen(&mut self, backlog: i32) -> io::Result<()> {
+        match self {
+            AsyncWasiSocketInner::PreOpen(s) => {
+                s.listen(backlog)?;
+            }
+            AsyncWasiSocketInner::AsyncFd(_) => {
+                return Err(io::Error::from_raw_os_error(libc::EINVAL))
+            }
+        }
+        self.register()
+    }
+
+    async fn accept(&mut self) -> io::Result<(Socket, SockAddr)> {
+        match self {
+            AsyncWasiSocketInner::PreOpen(s) => Err(io::Error::from_raw_os_error(libc::EINVAL)),
+            AsyncWasiSocketInner::AsyncFd(s) => {
+                match tokio::time::timeout(
+                    std::time::Duration::from_millis(100),
+                    s.async_io(Interest::READABLE, |s| s.accept()),
+                )
+                .await
+                {
+                    Ok(r) => r,
+                    Err(_) => Err(io::Error::from(io::ErrorKind::WouldBlock)),
+                }
+            }
+        }
+    }
+
+    fn connect(&mut self, addr: &SockAddr) -> io::Result<()> {
+        let r = match self {
+            AsyncWasiSocketInner::PreOpen(s) => s.connect(addr),
+            AsyncWasiSocketInner::AsyncFd(_) => {
+                return Err(io::Error::from_raw_os_error(libc::EINVAL))
+            }
+        };
+
+        if let Err(e) = r {
+            let errno = Errno::from(&e);
+            if errno != Errno::__WASI_ERRNO_INPROGRESS {
+                Err(e)
+            } else {
+                self.register()?;
+                Err(io::Error::from_raw_os_error(libc::EINPROGRESS))
+            }
+        } else {
+            self.register()?;
+            Ok(())
+        }
+    }
+
+    fn get_ref(&self) -> io::Result<&Socket> {
+        match self {
+            AsyncWasiSocketInner::PreOpen(_) => Err(io::Error::from_raw_os_error(libc::ENOTCONN)),
+            AsyncWasiSocketInner::AsyncFd(s) => Ok(s.get_ref()),
+        }
+    }
+
+    fn get_async_socket(&self) -> io::Result<&AsyncFd<Socket>> {
+        match self {
+            AsyncWasiSocketInner::PreOpen(_) => Err(io::Error::from_raw_os_error(libc::ENOTCONN)),
+            AsyncWasiSocketInner::AsyncFd(s) => Ok(s),
+        }
+    }
+
+    fn mut_async_socket(&mut self) -> io::Result<&mut AsyncFd<Socket>> {
+        match self {
+            AsyncWasiSocketInner::PreOpen(_) => Err(io::Error::from_raw_os_error(libc::ENOTCONN)),
+            AsyncWasiSocketInner::AsyncFd(s) => Ok(s),
+        }
+    }
+
+    pub(crate) async fn readable(&self) -> io::Result<AsyncFdReadyGuard<Socket>> {
+        match self {
+            AsyncWasiSocketInner::PreOpen(_) => Err(io::Error::from_raw_os_error(libc::ENOTCONN)),
+            AsyncWasiSocketInner::AsyncFd(s) => Ok(s.readable().await?),
+        }
+    }
+
+    pub(crate) async fn writable(&self) -> io::Result<AsyncFdReadyGuard<Socket>> {
+        match self {
+            AsyncWasiSocketInner::PreOpen(_) => Err(io::Error::from_raw_os_error(libc::ENOTCONN)),
+            AsyncWasiSocketInner::AsyncFd(s) => Ok(s.writable().await?),
+        }
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct SocketWritable(pub(crate) AtomicI8);
+impl SocketWritable {
+    pub(crate) async fn writable(&self) {
+        let b = self.0.fetch_sub(1, std::sync::atomic::Ordering::Acquire);
+        tokio::time::timeout(Duration::from_secs(10), SocketWritableFuture(b)).await;
+    }
+
+    pub(crate) fn set_writable(&self) {
+        self.0.store(5, std::sync::atomic::Ordering::Release)
+    }
+}
+impl Default for SocketWritable {
+    fn default() -> Self {
+        Self(AtomicI8::new(5))
+    }
+}
+
+#[derive(Debug, Clone, Copy)]
+pub(crate) struct SocketWritableFuture(i8);
+
+impl Future for SocketWritableFuture {
+    type Output = ();
+
+    fn poll(
+        self: std::pin::Pin<&mut Self>,
+        cx: &mut std::task::Context<'_>,
+    ) -> std::task::Poll<Self::Output> {
+        log::trace!("SocketWritableFuture self.0={}", self.0);
+        if self.0 >= 0 {
+            std::task::Poll::Ready(())
+        } else {
+            std::task::Poll::Pending
+        }
+    }
+}
+
+#[derive(Debug)]
+pub struct AsyncWasiSocket {
+    pub(crate) inner: AsyncWasiSocketInner,
+    pub state: Box<WasiSocketState>,
+    pub(crate) writable: SocketWritable,
+}
+
+impl AsyncWasiSocket {
+    pub(crate) async fn readable(&self) -> std::io::Result<()> {
+        self.inner.readable().await.map(|x| ())
+    }
+
+    pub(crate) async fn writable(&self) -> std::io::Result<()> {
+        self.writable.writable().await;
+        self.inner.writable().await?;
+        Ok(())
+    }
+}
+
+#[inline]
+fn handle_timeout_result<T>(
+    result: Result<io::Result<T>, tokio::time::error::Elapsed>,
+) -> io::Result<T> {
+    if let Ok(r) = result {
+        r
+    } else {
+        Err(io::Error::from_raw_os_error(libc::EWOULDBLOCK))
+    }
+}
+
+impl AsyncWasiSocket {
+    pub fn fd_fdstat_get(&self) -> Result<FdStat, Errno> {
+        let mut filetype = match self.state.sock_type.1 {
+            SocketType::Datagram => FileType::SOCKET_DGRAM,
+            SocketType::Stream => FileType::SOCKET_STREAM,
+        };
+        let flags = if self.state.nonblocking {
+            FdFlags::NONBLOCK
+        } else {
+            FdFlags::empty()
+        };
+
+        Ok(FdStat {
+            filetype,
+            fs_rights_base: self.state.fs_rights.clone(),
+            fs_rights_inheriting: WASIRights::empty(),
+            flags,
+        })
+    }
+}
+
+impl AsyncWasiSocket {
+    pub fn from_tcplistener(
+        listener: std::net::TcpListener,
+        state: WasiSocketState,
+    ) -> io::Result<Self> {
+        let socket = Socket::from(listener);
+        socket.set_nonblocking(true)?;
+        Ok(Self {
+            inner: AsyncWasiSocketInner::AsyncFd(AsyncFd::new(socket)?),
+            state: Box::new(state),
+            writable: Default::default(),
+        })
+    }
+
+    pub fn from_udpsocket(socket: std::net::UdpSocket, state: WasiSocketState) -> io::Result<Self> {
+        let socket = Socket::from(socket);
+        socket.set_nonblocking(true)?;
+        Ok(Self {
+            inner: AsyncWasiSocketInner::AsyncFd(AsyncFd::new(socket)?),
+            state: Box::new(state),
+            writable: Default::default(),
+        })
+    }
+}
+
+impl AsyncWasiSocket {
+    pub fn open(mut state: WasiSocketState) -> io::Result<Self> {
+        use socket2::{Domain, Protocol, Type};
+        match state.sock_type.1 {
+            SocketType::Stream => {
+                state.fs_rights = WASIRights::SOCK_BIND
+                    | WASIRights::SOCK_CLOSE
+                    | WASIRights::SOCK_RECV
+                    | WASIRights::SOCK_SEND
+                    | WASIRights::SOCK_SHUTDOWN
+                    | WASIRights::POLL_FD_READWRITE;
+            }
+            SocketType::Datagram => {
+                state.fs_rights = WASIRights::SOCK_BIND
+                    | WASIRights::SOCK_CLOSE
+                    | WASIRights::SOCK_RECV_FROM
+                    | WASIRights::SOCK_SEND_TO
+                    | WASIRights::SOCK_SHUTDOWN
+                    | WASIRights::POLL_FD_READWRITE;
+            }
+        }
+        let inner = match state.sock_type {
+            (AddressFamily::Inet4, SocketType::Datagram) => {
+                Socket::new(Domain::IPV4, Type::DGRAM, Some(Protocol::UDP))?
+            }
+            (AddressFamily::Inet4, SocketType::Stream) => {
+                Socket::new(Domain::IPV4, Type::STREAM, Some(Protocol::TCP))?
+            }
+            (AddressFamily::Inet6, SocketType::Datagram) => {
+                Socket::new(Domain::IPV6, Type::DGRAM, Some(Protocol::UDP))?
+            }
+            (AddressFamily::Inet6, SocketType::Stream) => {
+                Socket::new(Domain::IPV6, Type::STREAM, Some(Protocol::TCP))?
+            }
+        };
+        inner.set_nonblocking(true)?;
+        if !state.bind_device.is_empty() {
+            inner.bind_device(Some(&state.bind_device))?;
+        }
+        Ok(AsyncWasiSocket {
+            inner: AsyncWasiSocketInner::PreOpen(inner),
+            state: Box::new(state),
+            writable: Default::default(),
+        })
+    }
+
+    pub fn bind(&mut self, addr: net::SocketAddr) -> io::Result<()> {
+        use socket2::SockAddr;
+        let sock_addr = SockAddr::from(addr);
+        self.inner.bind(&sock_addr)?;
+        if let SocketType::Datagram = self.state.sock_type.1 {
+            self.inner.register()?;
+        }
+        self.state.local_addr = Some(addr);
+        Ok(())
+    }
+
+    pub fn device(&self) -> io::Result<Option<Vec<u8>>> {
+        if self.state.bind_device.is_empty() {
+            self.inner.device()
+        } else {
+            Ok(Some(self.state.bind_device.clone()))
+        }
+    }
+
+    pub fn bind_device(&mut self, interface: Option<&[u8]>) -> io::Result<()> {
+        self.inner.bind_device(interface)?;
+        self.state.bind_device = match interface {
+            Some(interface) => interface.to_vec(),
+            None => vec![],
+        };
+        Ok(())
+    }
+
+    pub fn listen(&mut self, backlog: u32) -> io::Result<()> {
+        self.inner.listen(backlog as i32)?;
+        self.state.backlog = backlog;
+        self.state.so_conn_state = ConnectState::Listening;
+        Ok(())
+    }
+
+    pub async fn accept(&mut self) -> io::Result<Self> {
+        let mut new_state = WasiSocketState {
+            nonblocking: self.state.nonblocking,
+            so_conn_state: ConnectState::Connected,
+            ..Default::default()
+        };
+
+        log::trace!("accept nonblocking={}", self.state.nonblocking);
+
+        let (cs, _) = if self.state.nonblocking {
+            let s = self
+                .inner
+                .get_async_socket()?
+                .async_io(Interest::READABLE, |s| s.accept());
+            tokio::time::timeout(std::time::Duration::from_millis(50), s)
+                .await
+                .map_err(|_| io::Error::from(io::ErrorKind::WouldBlock))?
+        } else {
+            self.inner
+                .get_async_socket()?
+                .async_io(Interest::READABLE, |s| s.accept())
+                .await
+        }?;
+
+        cs.set_nonblocking(true)?;
+        new_state.peer_addr = cs.peer_addr().ok().and_then(|addr| addr.as_socket());
+        new_state.local_addr = cs.local_addr().ok().and_then(|addr| addr.as_socket());
+
+        Ok(AsyncWasiSocket {
+            inner: AsyncWasiSocketInner::AsyncFd(AsyncFd::new(cs)?),
+            state: Box::new(new_state),
+            writable: Default::default(),
+        })
+    }
+
+    pub async fn connect(&mut self, addr: net::SocketAddr) -> io::Result<()> {
+        let address = SockAddr::from(addr);
+        self.state.so_conn_state = ConnectState::Connected;
+        self.state.peer_addr = Some(addr);
+
+        match (self.state.nonblocking, self.state.so_send_timeout) {
+            (true, None) => {
+                let r = self.inner.connect(&address);
+                if r.is_err() {
+                    self.state.so_conn_state = ConnectState::Connecting;
+                }
+                r?;
+                Ok(())
+            }
+            (false, None) => {
+                if let Err(e) = self.inner.connect(&address) {
+                    match e.raw_os_error() {
+                        Some(libc::EINPROGRESS) => {}
+                        _ => return Err(e),
+                    }
+                    let s = self.inner.writable().await?;
+                    let e = s.get_inner().take_error()?;
+                    if let Some(e) = e {
+                        return Err(e);
+                    }
+                }
+                Ok(())
+            }
+            (_, Some(timeout)) => {
+                if let Err(e) = self.inner.connect(&address) {
+                    match e.raw_os_error() {
+                        Some(libc::EINPROGRESS) => {}
+                        _ => return Err(e),
+                    }
+                    match tokio::time::timeout(timeout, self.inner.writable()).await {
+                        Ok(r) => {
+                            let s = r?;
+                            let e = s.get_inner().take_error()?;
+                            if let Some(e) = e {
+                                return Err(e);
+                            }
+                            Ok(())
+                        }
+                        Err(e) => Err(io::Error::from_raw_os_error(libc::EWOULDBLOCK)),
+                    }
+                } else {
+                    Ok(())
+                }
+            }
+        }
+    }
+
+    pub async fn recv<'a>(
+        &self,
+        bufs: &mut [io::IoSliceMut<'a>],
+        flags: libc::c_int,
+    ) -> io::Result<(usize, bool)> {
+        use socket2::MaybeUninitSlice;
+
+        let (n, f) = match (self.state.nonblocking, self.state.so_recv_timeout) {
+            (true, None) => {
+                let f = self
+                    .inner
+                    .get_async_socket()?
+                    .async_io(Interest::READABLE, |s| {
+                        let bufs = unsafe {
+                            &mut *(bufs as *mut [io::IoSliceMut<'_>]
+                                as *mut [MaybeUninitSlice<'_>])
+                        };
+                        s.recv_vectored_with_flags(bufs, flags)
+                    });
+
+                tokio::time::timeout(std::time::Duration::from_millis(50), f)
+                    .await
+                    .map_err(|_| io::Error::from(io::ErrorKind::WouldBlock))??
+            }
+            (false, None) => {
+                self.inner
+                    .get_async_socket()?
+                    .async_io(Interest::READABLE, |s| {
+                        let bufs = unsafe {
+                            &mut *(bufs as *mut [io::IoSliceMut<'_>]
+                                as *mut [MaybeUninitSlice<'_>])
+                        };
+                        s.recv_vectored_with_flags(bufs, flags)
+                    })
+                    .await?
+            }
+            (_, Some(timeout)) => {
+                let f = self
+                    .inner
+                    .get_async_socket()?
+                    .async_io(Interest::READABLE, |s| {
+                        let bufs = unsafe {
+                            &mut *(bufs as *mut [io::IoSliceMut<'_>]
+                                as *mut [MaybeUninitSlice<'_>])
+                        };
+                        s.recv_vectored_with_flags(bufs, flags)
+                    });
+
+                tokio::time::timeout(timeout, f)
+                    .await
+                    .map_err(|_| io::Error::from(io::ErrorKind::WouldBlock))??
+            }
+        };
+
+        Ok((n, f.is_truncated()))
+    }
+
+    pub async fn recv_from<'a>(
+        &self,
+        bufs: &mut [io::IoSliceMut<'a>],
+        flags: libc::c_int,
+    ) -> io::Result<(usize, bool, Option<net::SocketAddr>)> {
+        use socket2::MaybeUninitSlice;
+
+        let (n, f, addr) = match (self.state.nonblocking, self.state.so_recv_timeout) {
+            (true, None) => {
+                let f = self
+                    .inner
+                    .get_async_socket()?
+                    .async_io(Interest::READABLE, |s| {
+                        let bufs = unsafe {
+                            &mut *(bufs as *mut [io::IoSliceMut<'_>]
+                                as *mut [MaybeUninitSlice<'_>])
+                        };
+                        s.recv_from_vectored_with_flags(bufs, flags)
+                    });
+
+                tokio::time::timeout(std::time::Duration::from_millis(50), f)
+                    .await
+                    .map_err(|_| io::Error::from(io::ErrorKind::WouldBlock))??
+            }
+            (false, None) => {
+                let f = self
+                    .inner
+                    .get_async_socket()?
+                    .async_io(Interest::READABLE, |s| {
+                        let bufs = unsafe {
+                            &mut *(bufs as *mut [io::IoSliceMut<'_>]
+                                as *mut [MaybeUninitSlice<'_>])
+                        };
+                        s.recv_from_vectored_with_flags(bufs, flags)
+                    });
+
+                f.await?
+            }
+            (_, Some(timeout)) => {
+                let f = self
+                    .inner
+                    .get_async_socket()?
+                    .async_io(Interest::READABLE, |s| {
+                        let bufs = unsafe {
+                            &mut *(bufs as *mut [io::IoSliceMut<'_>]
+                                as *mut [MaybeUninitSlice<'_>])
+                        };
+                        s.recv_from_vectored_with_flags(bufs, flags)
+                    });
+
+                tokio::time::timeout(timeout, f)
+                    .await
+                    .map_err(|_| io::Error::from(io::ErrorKind::WouldBlock))??
+            }
+        };
+        Ok((n, f.is_truncated(), addr.as_socket()))
+    }
+
+    pub async fn send<'a>(
+        &self,
+        bufs: &[io::IoSlice<'a>],
+        flags: libc::c_int,
+    ) -> io::Result<usize> {
+        let n = match (self.state.nonblocking, self.state.so_send_timeout) {
+            (true, None) => {
+                let f = self
+                    .inner
+                    .get_async_socket()?
+                    .async_io(Interest::WRITABLE, |s| {
+                        s.send_vectored_with_flags(bufs, flags)
+                    });
+
+                tokio::time::timeout(std::time::Duration::from_millis(50), f)
+                    .await
+                    .map_err(|_| io::Error::from(io::ErrorKind::WouldBlock))??
+            }
+            (false, None) => {
+                let f = self
+                    .inner
+                    .get_async_socket()?
+                    .async_io(Interest::WRITABLE, |s| {
+                        s.send_vectored_with_flags(bufs, flags)
+                    });
+
+                f.await?
+            }
+            (_, Some(timeout)) => {
+                let f = self
+                    .inner
+                    .get_async_socket()?
+                    .async_io(Interest::WRITABLE, |s| {
+                        s.send_vectored_with_flags(bufs, flags)
+                    });
+
+                tokio::time::timeout(timeout, f)
+                    .await
+                    .map_err(|_| io::Error::from(io::ErrorKind::WouldBlock))??
+            }
+        };
+
+        Ok(n)
+    }
+
+    pub async fn send_to<'a>(
+        &self,
+        bufs: &[io::IoSlice<'a>],
+        addr: net::SocketAddr,
+        flags: libc::c_int,
+    ) -> io::Result<usize> {
+        use socket2::{MaybeUninitSlice, SockAddr};
+        let address = SockAddr::from(addr);
+
+        let n = match (self.state.nonblocking, self.state.so_send_timeout) {
+            (true, None) => {
+                let f = self
+                    .inner
+                    .get_async_socket()?
+                    .async_io(Interest::WRITABLE, |s| {
+                        s.send_to_vectored_with_flags(bufs, &address, flags)
+                    });
+
+                tokio::time::timeout(std::time::Duration::from_millis(50), f)
+                    .await
+                    .map_err(|_| io::Error::from(io::ErrorKind::WouldBlock))??
+            }
+            (false, None) => {
+                let f = self
+                    .inner
+                    .get_async_socket()?
+                    .async_io(Interest::WRITABLE, |s| {
+                        s.send_to_vectored_with_flags(bufs, &address, flags)
+                    });
+
+                f.await?
+            }
+            (_, Some(timeout)) => {
+                let f = self
+                    .inner
+                    .get_async_socket()?
+                    .async_io(Interest::WRITABLE, |s| {
+                        s.send_to_vectored_with_flags(bufs, &address, flags)
+                    });
+
+                tokio::time::timeout(timeout, f)
+                    .await
+                    .map_err(|_| io::Error::from(io::ErrorKind::WouldBlock))??
+            }
+        };
+
+        Ok(n)
+    }
+
+    pub fn shutdown(&mut self, how: net::Shutdown) -> io::Result<()> {
+        self.inner.get_ref()?.shutdown(how)?;
+        self.state.shutdown.insert(how);
+        Ok(())
+    }
+
+    pub fn get_peer(&mut self) -> io::Result<net::SocketAddr> {
+        if let Some(addr) = self.state.peer_addr {
+            Ok(addr)
+        } else {
+            let addr = self.inner.get_ref()?.peer_addr()?.as_socket().unwrap();
+            self.state.peer_addr = Some(addr);
+            Ok(addr)
+        }
+    }
+
+    pub fn get_local(&mut self) -> io::Result<net::SocketAddr> {
+        if let Some(addr) = self.state.local_addr {
+            Ok(addr)
+        } else {
+            let addr = self.inner.get_ref()?.local_addr()?.as_socket().unwrap();
+            self.state.local_addr = Some(addr);
+            Ok(addr)
+        }
+    }
+
+    pub fn set_nonblocking(&mut self, nonblocking: bool) -> io::Result<()> {
+        self.state.nonblocking = nonblocking;
+        Ok(())
+    }
+
+    pub fn get_nonblocking(&self) -> bool {
+        self.state.nonblocking
+    }
+
+    pub fn get_so_type(&self) -> (AddressFamily, SocketType) {
+        self.state.sock_type
+    }
+
+    pub fn get_so_accept_conn(&self) -> io::Result<bool> {
+        self.inner.get_ref()?.is_listener()
+    }
+
+    pub fn sync_conn_state(&mut self) {
+        if self.state.so_conn_state == ConnectState::Connecting {
+            self.state.so_conn_state = ConnectState::Connected;
+        }
+    }
+
+    pub fn set_so_reuseaddr(&mut self, reuseaddr: bool) -> io::Result<()> {
+        self.state.so_reuseaddr = reuseaddr;
+        Ok(())
+    }
+
+    pub fn get_so_reuseaddr(&self) -> bool {
+        self.state.so_reuseaddr
+    }
+
+    pub fn set_so_recv_buf_size(&mut self, buf_size: usize) -> io::Result<()> {
+        self.state.so_recv_buf_size = buf_size;
+        Ok(())
+    }
+
+    pub fn get_so_recv_buf_size(&self) -> usize {
+        self.state.so_recv_buf_size
+    }
+
+    pub fn set_so_send_buf_size(&mut self, buf_size: usize) -> io::Result<()> {
+        self.state.so_send_buf_size = buf_size;
+        Ok(())
+    }
+
+    pub fn get_so_send_buf_size(&mut self) -> usize {
+        self.state.so_send_buf_size
+    }
+
+    pub fn set_so_recv_timeout(&mut self, timeout: Option<Duration>) -> io::Result<()> {
+        self.state.so_recv_timeout = timeout;
+        self.state.nonblocking = true;
+        Ok(())
+    }
+
+    pub fn get_so_recv_timeout(&mut self) -> Option<Duration> {
+        self.state.so_recv_timeout
+    }
+
+    pub fn set_so_send_timeout(&mut self, timeout: Option<Duration>) -> io::Result<()> {
+        self.state.so_send_timeout = timeout;
+        self.state.nonblocking = true;
+        Ok(())
+    }
+
+    pub fn get_so_send_timeout(&mut self) -> Option<Duration> {
+        self.state.so_send_timeout
+    }
+
+    pub fn get_so_error(&mut self) -> io::Result<Option<io::Error>> {
+        self.inner.get_ref()?.take_error()
+    }
+}
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/common/net/mod.rs.html b/src/async_wasi/snapshots/common/net/mod.rs.html new file mode 100644 index 000000000..ea1c4e260 --- /dev/null +++ b/src/async_wasi/snapshots/common/net/mod.rs.html @@ -0,0 +1,547 @@ +mod.rs - source

async_wasi/snapshots/common/net/
mod.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
#[cfg(all(unix, feature = "async_tokio"))]
+pub mod async_tokio;
+
+pub use super::vfs::*;
+
+use super::{
+    error::Errno,
+    types::{self as wasi_types, __wasi_subscription_t},
+};
+use std::{
+    future::Future,
+    io::{self, Read, Write},
+    net,
+    time::{Duration, SystemTime},
+};
+use wasi_types::{
+    __wasi_clockid_t::{
+        __WASI_CLOCKID_MONOTONIC as CLOCKID_MONOTONIC, __WASI_CLOCKID_REALTIME as CLOCKID_REALTIME,
+    },
+    __wasi_eventtype_t::{
+        __WASI_EVENTTYPE_CLOCK as CLOCK, __WASI_EVENTTYPE_FD_READ as RD,
+        __WASI_EVENTTYPE_FD_WRITE as WR,
+    },
+};
+
+#[derive(Debug, Clone, Copy, Default)]
+pub enum AddressFamily {
+    #[default]
+    Inet4,
+    Inet6,
+}
+
+#[derive(Debug, Clone, Copy, Default)]
+pub enum SocketType {
+    Datagram,
+    #[default]
+    Stream,
+}
+
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum ConnectState {
+    Empty,
+    Listening,
+    Connected,
+    Connecting,
+}
+
+impl Default for ConnectState {
+    fn default() -> Self {
+        Self::Empty
+    }
+}
+
+#[derive(Debug, Clone, Default)]
+pub struct WasiSocketState {
+    pub sock_type: (AddressFamily, SocketType),
+    pub local_addr: Option<net::SocketAddr>,
+    pub peer_addr: Option<net::SocketAddr>,
+    pub bind_device: Vec<u8>,
+    pub backlog: u32,
+    pub shutdown: Option<net::Shutdown>,
+    pub nonblocking: bool,
+    pub so_reuseaddr: bool,
+    pub so_conn_state: ConnectState,
+    pub so_recv_buf_size: usize,
+    pub so_send_buf_size: usize,
+    pub so_recv_timeout: Option<Duration>,
+    pub so_send_timeout: Option<Duration>,
+    pub fs_rights: WASIRights,
+}
+
+#[derive(Debug, Clone, Copy)]
+pub enum SubscriptionFdType {
+    Read(wasi_types::__wasi_userdata_t),
+    Write(wasi_types::__wasi_userdata_t),
+    Both {
+        read: wasi_types::__wasi_userdata_t,
+        write: wasi_types::__wasi_userdata_t,
+    },
+}
+
+#[derive(Debug, Clone, Copy)]
+pub struct SubscriptionFd {
+    pub fd: wasi_types::__wasi_fd_t,
+    pub type_: SubscriptionFdType,
+}
+
+impl SubscriptionFd {
+    pub fn set_write(&mut self, userdata: wasi_types::__wasi_userdata_t) {
+        let read_userdata = match &mut self.type_ {
+            SubscriptionFdType::Read(v) => *v,
+            SubscriptionFdType::Write(v) => {
+                *v = userdata;
+                return;
+            }
+            SubscriptionFdType::Both { read, write } => {
+                *write = userdata;
+                return;
+            }
+        };
+        self.type_ = SubscriptionFdType::Both {
+            read: read_userdata,
+            write: userdata,
+        };
+    }
+
+    pub fn set_read(&mut self, userdata: wasi_types::__wasi_userdata_t) {
+        let write_userdata = match &mut self.type_ {
+            SubscriptionFdType::Write(v) => *v,
+            SubscriptionFdType::Read(v) => {
+                *v = userdata;
+                return;
+            }
+            SubscriptionFdType::Both { read, write } => {
+                *read = userdata;
+                return;
+            }
+        };
+        self.type_ = SubscriptionFdType::Both {
+            read: userdata,
+            write: write_userdata,
+        };
+    }
+}
+
+#[derive(Debug, Clone, Copy)]
+pub struct SubscriptionClock {
+    pub timeout: Option<SystemTime>,
+    pub userdata: wasi_types::__wasi_userdata_t,
+    pub err: Option<Errno>,
+}
+
+#[derive(Debug, Clone, Copy)]
+pub enum Subscription {
+    FD(SubscriptionFd),
+    RealClock(SubscriptionClock),
+}
+
+impl Subscription {
+    pub fn from(s: &__wasi_subscription_t) -> Result<Subscription, Errno> {
+        let userdata = s.userdata;
+        match s.u.tag {
+            CLOCK => {
+                let clock = unsafe { s.u.u.clock };
+                match clock.id {
+                    CLOCKID_REALTIME | CLOCKID_MONOTONIC => {
+                        if clock.flags == 1 {
+                            if let Some(ddl) = std::time::UNIX_EPOCH
+                                .checked_add(Duration::from_nanos(clock.timeout + clock.precision))
+                            {
+                                Ok(Subscription::RealClock(SubscriptionClock {
+                                    timeout: Some(ddl),
+                                    userdata,
+                                    err: None,
+                                }))
+                            } else {
+                                Ok(Subscription::RealClock(SubscriptionClock {
+                                    timeout: None,
+                                    userdata,
+                                    err: Some(Errno::__WASI_ERRNO_INVAL),
+                                }))
+                            }
+                        } else if clock.timeout == 0 {
+                            Ok(Subscription::RealClock(SubscriptionClock {
+                                timeout: None,
+                                userdata,
+                                err: None,
+                            }))
+                        } else {
+                            let duration = Duration::from_nanos(clock.timeout + clock.precision);
+
+                            let timeout = std::time::SystemTime::now().checked_add(duration);
+
+                            Ok(Subscription::RealClock(SubscriptionClock {
+                                timeout,
+                                userdata,
+                                err: None,
+                            }))
+                        }
+                    }
+
+                    _ => Ok(Subscription::RealClock(SubscriptionClock {
+                        timeout: None,
+                        userdata,
+                        err: Some(Errno::__WASI_ERRNO_NODEV),
+                    })),
+                }
+            }
+            RD => {
+                let fd_read = unsafe { s.u.u.fd_read };
+                Ok(Subscription::FD(SubscriptionFd {
+                    fd: fd_read.file_descriptor,
+                    type_: SubscriptionFdType::Read(userdata),
+                }))
+            }
+            WR => {
+                let fd_read = unsafe { s.u.u.fd_read };
+                Ok(Subscription::FD(SubscriptionFd {
+                    fd: fd_read.file_descriptor,
+                    type_: SubscriptionFdType::Write(userdata),
+                }))
+            }
+            _ => Err(Errno::__WASI_ERRNO_INVAL),
+        }
+    }
+}
+
+#[derive(Debug)]
+pub enum PrePoll {
+    OnlyFd(Vec<SubscriptionFd>),
+    OnlyClock(SubscriptionClock),
+    ClockAndFd(SubscriptionClock, Vec<SubscriptionFd>),
+}
+
+impl PrePoll {
+    pub fn from_wasi_subscription(
+        subs: &[wasi_types::__wasi_subscription_t],
+    ) -> Result<Self, Errno> {
+        use std::collections::HashMap;
+        let mut fds = HashMap::with_capacity(subs.len());
+
+        let mut timeout: Option<SubscriptionClock> = None;
+        for s in subs {
+            let s = Subscription::from(s)?;
+            match s {
+                Subscription::FD(fd) => {
+                    let type_ = fd.type_;
+
+                    fds.entry(fd.fd)
+                        .and_modify(|e: &mut SubscriptionFd| match type_ {
+                            SubscriptionFdType::Read(data) => e.set_read(data),
+                            SubscriptionFdType::Write(data) => e.set_write(data),
+                            SubscriptionFdType::Both { read, write } => {
+                                e.type_ = SubscriptionFdType::Both { read, write };
+                            }
+                        })
+                        .or_insert(fd);
+                }
+                Subscription::RealClock(clock) => {
+                    if clock.err.is_some() {
+                        return Ok(PrePoll::OnlyClock(clock));
+                    }
+                    if clock.timeout.is_none() {
+                        return Ok(PrePoll::OnlyClock(clock));
+                    }
+
+                    if let Some(old_clock) = &mut timeout {
+                        let new_timeout = clock.timeout.unwrap();
+                        let old_timeout = old_clock.timeout.unwrap();
+
+                        if new_timeout < old_timeout {
+                            *old_clock = clock
+                        }
+                    } else {
+                        timeout = Some(clock)
+                    }
+                }
+            }
+        }
+
+        let fd_vec: Vec<SubscriptionFd> = fds.into_values().collect();
+
+        if let Some(clock) = timeout {
+            if fd_vec.is_empty() {
+                Ok(PrePoll::OnlyClock(clock))
+            } else {
+                Ok(PrePoll::ClockAndFd(clock, fd_vec))
+            }
+        } else {
+            Ok(PrePoll::OnlyFd(fd_vec))
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/common/types.rs.html b/src/async_wasi/snapshots/common/types.rs.html new file mode 100644 index 000000000..7c32bcb8b --- /dev/null +++ b/src/async_wasi/snapshots/common/types.rs.html @@ -0,0 +1,1025 @@ +types.rs - source

async_wasi/snapshots/common/
types.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
// bindgen --impl-debug --size_t-is-usize --no-layout-tests --no-doc-comments  --allowlist-type="__wasi.*" --default-enum-style moduleconsts WasmEdge/thirdparty/wasi/api.hpp -o wasi_types.rs
+
+/* automatically generated by rust-bindgen 0.60.1 */
+
+pub type __uint8_t = ::std::os::raw::c_uchar;
+pub type __uint16_t = ::std::os::raw::c_ushort;
+pub type __int32_t = ::std::os::raw::c_int;
+pub type __uint32_t = ::std::os::raw::c_uint;
+pub type __int64_t = ::std::os::raw::c_long;
+pub type __uint64_t = ::std::os::raw::c_ulong;
+pub type const_uint8_t_ptr = u32;
+pub type uint8_t_ptr = u32;
+pub type __wasi_size_t = u32;
+pub type __wasi_filesize_t = u64;
+pub type __wasi_timestamp_t = u64;
+pub mod __wasi_clockid_t {
+    pub type Type = u32;
+    pub const __WASI_CLOCKID_REALTIME: Type = 0;
+    pub const __WASI_CLOCKID_MONOTONIC: Type = 1;
+    pub const __WASI_CLOCKID_PROCESS_CPUTIME_ID: Type = 2;
+    pub const __WASI_CLOCKID_THREAD_CPUTIME_ID: Type = 3;
+}
+pub mod __wasi_errno_t {
+    pub type Type = u16;
+    pub const __WASI_ERRNO_SUCCESS: Type = 0;
+    pub const __WASI_ERRNO_2BIG: Type = 1;
+    pub const __WASI_ERRNO_ACCES: Type = 2;
+    pub const __WASI_ERRNO_ADDRINUSE: Type = 3;
+    pub const __WASI_ERRNO_ADDRNOTAVAIL: Type = 4;
+    pub const __WASI_ERRNO_AFNOSUPPORT: Type = 5;
+    pub const __WASI_ERRNO_AGAIN: Type = 6;
+    pub const __WASI_ERRNO_ALREADY: Type = 7;
+    pub const __WASI_ERRNO_BADF: Type = 8;
+    pub const __WASI_ERRNO_BADMSG: Type = 9;
+    pub const __WASI_ERRNO_BUSY: Type = 10;
+    pub const __WASI_ERRNO_CANCELED: Type = 11;
+    pub const __WASI_ERRNO_CHILD: Type = 12;
+    pub const __WASI_ERRNO_CONNABORTED: Type = 13;
+    pub const __WASI_ERRNO_CONNREFUSED: Type = 14;
+    pub const __WASI_ERRNO_CONNRESET: Type = 15;
+    pub const __WASI_ERRNO_DEADLK: Type = 16;
+    pub const __WASI_ERRNO_DESTADDRREQ: Type = 17;
+    pub const __WASI_ERRNO_DOM: Type = 18;
+    pub const __WASI_ERRNO_DQUOT: Type = 19;
+    pub const __WASI_ERRNO_EXIST: Type = 20;
+    pub const __WASI_ERRNO_FAULT: Type = 21;
+    pub const __WASI_ERRNO_FBIG: Type = 22;
+    pub const __WASI_ERRNO_HOSTUNREACH: Type = 23;
+    pub const __WASI_ERRNO_IDRM: Type = 24;
+    pub const __WASI_ERRNO_ILSEQ: Type = 25;
+    pub const __WASI_ERRNO_INPROGRESS: Type = 26;
+    pub const __WASI_ERRNO_INTR: Type = 27;
+    pub const __WASI_ERRNO_INVAL: Type = 28;
+    pub const __WASI_ERRNO_IO: Type = 29;
+    pub const __WASI_ERRNO_ISCONN: Type = 30;
+    pub const __WASI_ERRNO_ISDIR: Type = 31;
+    pub const __WASI_ERRNO_LOOP: Type = 32;
+    pub const __WASI_ERRNO_MFILE: Type = 33;
+    pub const __WASI_ERRNO_MLINK: Type = 34;
+    pub const __WASI_ERRNO_MSGSIZE: Type = 35;
+    pub const __WASI_ERRNO_MULTIHOP: Type = 36;
+    pub const __WASI_ERRNO_NAMETOOLONG: Type = 37;
+    pub const __WASI_ERRNO_NETDOWN: Type = 38;
+    pub const __WASI_ERRNO_NETRESET: Type = 39;
+    pub const __WASI_ERRNO_NETUNREACH: Type = 40;
+    pub const __WASI_ERRNO_NFILE: Type = 41;
+    pub const __WASI_ERRNO_NOBUFS: Type = 42;
+    pub const __WASI_ERRNO_NODEV: Type = 43;
+    pub const __WASI_ERRNO_NOENT: Type = 44;
+    pub const __WASI_ERRNO_NOEXEC: Type = 45;
+    pub const __WASI_ERRNO_NOLCK: Type = 46;
+    pub const __WASI_ERRNO_NOLINK: Type = 47;
+    pub const __WASI_ERRNO_NOMEM: Type = 48;
+    pub const __WASI_ERRNO_NOMSG: Type = 49;
+    pub const __WASI_ERRNO_NOPROTOOPT: Type = 50;
+    pub const __WASI_ERRNO_NOSPC: Type = 51;
+    pub const __WASI_ERRNO_NOSYS: Type = 52;
+    pub const __WASI_ERRNO_NOTCONN: Type = 53;
+    pub const __WASI_ERRNO_NOTDIR: Type = 54;
+    pub const __WASI_ERRNO_NOTEMPTY: Type = 55;
+    pub const __WASI_ERRNO_NOTRECOVERABLE: Type = 56;
+    pub const __WASI_ERRNO_NOTSOCK: Type = 57;
+    pub const __WASI_ERRNO_NOTSUP: Type = 58;
+    pub const __WASI_ERRNO_NOTTY: Type = 59;
+    pub const __WASI_ERRNO_NXIO: Type = 60;
+    pub const __WASI_ERRNO_OVERFLOW: Type = 61;
+    pub const __WASI_ERRNO_OWNERDEAD: Type = 62;
+    pub const __WASI_ERRNO_PERM: Type = 63;
+    pub const __WASI_ERRNO_PIPE: Type = 64;
+    pub const __WASI_ERRNO_PROTO: Type = 65;
+    pub const __WASI_ERRNO_PROTONOSUPPORT: Type = 66;
+    pub const __WASI_ERRNO_PROTOTYPE: Type = 67;
+    pub const __WASI_ERRNO_RANGE: Type = 68;
+    pub const __WASI_ERRNO_ROFS: Type = 69;
+    pub const __WASI_ERRNO_SPIPE: Type = 70;
+    pub const __WASI_ERRNO_SRCH: Type = 71;
+    pub const __WASI_ERRNO_STALE: Type = 72;
+    pub const __WASI_ERRNO_TIMEDOUT: Type = 73;
+    pub const __WASI_ERRNO_TXTBSY: Type = 74;
+    pub const __WASI_ERRNO_XDEV: Type = 75;
+    pub const __WASI_ERRNO_NOTCAPABLE: Type = 76;
+    pub const __WASI_ERRNO_AIADDRFAMILY: Type = 77;
+    pub const __WASI_ERRNO_AIAGAIN: Type = 78;
+    pub const __WASI_ERRNO_AIBADFLAG: Type = 79;
+    pub const __WASI_ERRNO_AIFAIL: Type = 80;
+    pub const __WASI_ERRNO_AIFAMILY: Type = 81;
+    pub const __WASI_ERRNO_AIMEMORY: Type = 82;
+    pub const __WASI_ERRNO_AINODATA: Type = 83;
+    pub const __WASI_ERRNO_AINONAME: Type = 84;
+    pub const __WASI_ERRNO_AISERVICE: Type = 85;
+    pub const __WASI_ERRNO_AISOCKTYPE: Type = 86;
+    pub const __WASI_ERRNO_AISYSTEM: Type = 87;
+}
+pub mod __wasi_rights_t {
+    pub type Type = u64;
+    pub const __WASI_RIGHTS_FD_DATASYNC: Type = 1;
+    pub const __WASI_RIGHTS_FD_READ: Type = 2;
+    pub const __WASI_RIGHTS_FD_SEEK: Type = 4;
+    pub const __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS: Type = 8;
+    pub const __WASI_RIGHTS_FD_SYNC: Type = 16;
+    pub const __WASI_RIGHTS_FD_TELL: Type = 32;
+    pub const __WASI_RIGHTS_FD_WRITE: Type = 64;
+    pub const __WASI_RIGHTS_FD_ADVISE: Type = 128;
+    pub const __WASI_RIGHTS_FD_ALLOCATE: Type = 256;
+    pub const __WASI_RIGHTS_PATH_CREATE_DIRECTORY: Type = 512;
+    pub const __WASI_RIGHTS_PATH_CREATE_FILE: Type = 1024;
+    pub const __WASI_RIGHTS_PATH_LINK_SOURCE: Type = 2048;
+    pub const __WASI_RIGHTS_PATH_LINK_TARGET: Type = 4096;
+    pub const __WASI_RIGHTS_PATH_OPEN: Type = 8192;
+    pub const __WASI_RIGHTS_FD_READDIR: Type = 16384;
+    pub const __WASI_RIGHTS_PATH_READLINK: Type = 32768;
+    pub const __WASI_RIGHTS_PATH_RENAME_SOURCE: Type = 65536;
+    pub const __WASI_RIGHTS_PATH_RENAME_TARGET: Type = 131072;
+    pub const __WASI_RIGHTS_PATH_FILESTAT_GET: Type = 262144;
+    pub const __WASI_RIGHTS_PATH_FILESTAT_SET_SIZE: Type = 524288;
+    pub const __WASI_RIGHTS_PATH_FILESTAT_SET_TIMES: Type = 1048576;
+    pub const __WASI_RIGHTS_FD_FILESTAT_GET: Type = 2097152;
+    pub const __WASI_RIGHTS_FD_FILESTAT_SET_SIZE: Type = 4194304;
+    pub const __WASI_RIGHTS_FD_FILESTAT_SET_TIMES: Type = 8388608;
+    pub const __WASI_RIGHTS_PATH_SYMLINK: Type = 16777216;
+    pub const __WASI_RIGHTS_PATH_REMOVE_DIRECTORY: Type = 33554432;
+    pub const __WASI_RIGHTS_PATH_UNLINK_FILE: Type = 67108864;
+    pub const __WASI_RIGHTS_POLL_FD_READWRITE: Type = 134217728;
+    pub const __WASI_RIGHTS_SOCK_SHUTDOWN: Type = 268435456;
+    pub const __WASI_RIGHTS_SOCK_OPEN: Type = 536870912;
+    pub const __WASI_RIGHTS_SOCK_CLOSE: Type = 1073741824;
+    pub const __WASI_RIGHTS_SOCK_BIND: Type = 2147483648;
+    pub const __WASI_RIGHTS_SOCK_RECV: Type = 4294967296;
+    pub const __WASI_RIGHTS_SOCK_RECV_FROM: Type = 8589934592;
+    pub const __WASI_RIGHTS_SOCK_SEND: Type = 17179869184;
+    pub const __WASI_RIGHTS_SOCK_SEND_TO: Type = 34359738368;
+}
+pub type __wasi_fd_t = i32;
+pub type __wasi_sock_d_t = __wasi_fd_t;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_iovec_t {
+    pub buf: uint8_t_ptr,
+    pub buf_len: __wasi_size_t,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_ciovec_t {
+    pub buf: const_uint8_t_ptr,
+    pub buf_len: __wasi_size_t,
+}
+pub type __wasi_filedelta_t = i64;
+pub mod __wasi_whence_t {
+    pub type Type = u8;
+    pub const __WASI_WHENCE_SET: Type = 0;
+    pub const __WASI_WHENCE_CUR: Type = 1;
+    pub const __WASI_WHENCE_END: Type = 2;
+}
+pub type __wasi_dircookie_t = u64;
+pub type __wasi_dirnamlen_t = u32;
+pub type __wasi_inode_t = u64;
+pub mod __wasi_filetype_t {
+    pub type Type = u8;
+    pub const __WASI_FILETYPE_UNKNOWN: Type = 0;
+    pub const __WASI_FILETYPE_BLOCK_DEVICE: Type = 1;
+    pub const __WASI_FILETYPE_CHARACTER_DEVICE: Type = 2;
+    pub const __WASI_FILETYPE_DIRECTORY: Type = 3;
+    pub const __WASI_FILETYPE_REGULAR_FILE: Type = 4;
+    pub const __WASI_FILETYPE_SOCKET_DGRAM: Type = 5;
+    pub const __WASI_FILETYPE_SOCKET_STREAM: Type = 6;
+    pub const __WASI_FILETYPE_SYMBOLIC_LINK: Type = 7;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_dirent_t {
+    pub d_next: __wasi_dircookie_t,
+    pub d_ino: __wasi_inode_t,
+    pub d_namlen: __wasi_dirnamlen_t,
+    pub d_type: __wasi_filetype_t::Type,
+}
+pub mod __wasi_advice_t {
+    pub type Type = u8;
+    pub const __WASI_ADVICE_NORMAL: Type = 0;
+    pub const __WASI_ADVICE_SEQUENTIAL: Type = 1;
+    pub const __WASI_ADVICE_RANDOM: Type = 2;
+    pub const __WASI_ADVICE_WILLNEED: Type = 3;
+    pub const __WASI_ADVICE_DONTNEED: Type = 4;
+    pub const __WASI_ADVICE_NOREUSE: Type = 5;
+}
+pub mod __wasi_fdflags_t {
+    pub type Type = u16;
+    pub const __WASI_FDFLAGS_APPEND: Type = 1;
+    pub const __WASI_FDFLAGS_DSYNC: Type = 2;
+    pub const __WASI_FDFLAGS_NONBLOCK: Type = 4;
+    pub const __WASI_FDFLAGS_RSYNC: Type = 8;
+    pub const __WASI_FDFLAGS_SYNC: Type = 16;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_fdstat_t {
+    pub fs_filetype: __wasi_filetype_t::Type,
+    pub fs_flags: __wasi_fdflags_t::Type,
+    pub fs_rights_base: __wasi_rights_t::Type,
+    pub fs_rights_inheriting: __wasi_rights_t::Type,
+}
+pub type __wasi_device_t = u64;
+pub mod __wasi_fstflags_t {
+    pub type Type = u16;
+    pub const __WASI_FSTFLAGS_ATIM: Type = 1;
+    pub const __WASI_FSTFLAGS_ATIM_NOW: Type = 2;
+    pub const __WASI_FSTFLAGS_MTIM: Type = 4;
+    pub const __WASI_FSTFLAGS_MTIM_NOW: Type = 8;
+}
+pub mod __wasi_lookupflags_t {
+    pub type Type = u32;
+    pub const __WASI_LOOKUPFLAGS_SYMLINK_FOLLOW: Type = 1;
+}
+pub mod __wasi_oflags_t {
+    pub type Type = u16;
+    pub const __WASI_OFLAGS_CREAT: Type = 1;
+    pub const __WASI_OFLAGS_DIRECTORY: Type = 2;
+    pub const __WASI_OFLAGS_EXCL: Type = 4;
+    pub const __WASI_OFLAGS_TRUNC: Type = 8;
+}
+pub type __wasi_linkcount_t = u64;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_filestat_t {
+    pub dev: __wasi_device_t,
+    pub ino: __wasi_inode_t,
+    pub filetype: __wasi_filetype_t::Type,
+    pub nlink: __wasi_linkcount_t,
+    pub size: __wasi_filesize_t,
+    pub atim: __wasi_timestamp_t,
+    pub mtim: __wasi_timestamp_t,
+    pub ctim: __wasi_timestamp_t,
+}
+pub type __wasi_userdata_t = u64;
+pub mod __wasi_eventtype_t {
+    pub type Type = u8;
+    pub const __WASI_EVENTTYPE_CLOCK: Type = 0;
+    pub const __WASI_EVENTTYPE_FD_READ: Type = 1;
+    pub const __WASI_EVENTTYPE_FD_WRITE: Type = 2;
+}
+pub mod __wasi_eventrwflags_t {
+    pub type Type = u16;
+    pub const __WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP: Type = 1;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_event_fd_readwrite_t {
+    pub nbytes: __wasi_filesize_t,
+    pub flags: __wasi_eventrwflags_t::Type,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_event_t {
+    pub userdata: __wasi_userdata_t,
+    pub error: __wasi_errno_t::Type,
+    pub type_: __wasi_eventtype_t::Type,
+    pub fd_readwrite: __wasi_event_fd_readwrite_t,
+}
+pub mod __wasi_subclockflags_t {
+    pub type Type = u16;
+    pub const __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME: Type = 1;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_subscription_clock_t {
+    pub id: __wasi_clockid_t::Type,
+    pub timeout: __wasi_timestamp_t,
+    pub precision: __wasi_timestamp_t,
+    pub flags: __wasi_subclockflags_t::Type,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_subscription_fd_readwrite_t {
+    pub file_descriptor: __wasi_fd_t,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union __wasi_subscription_u_u_t {
+    pub clock: __wasi_subscription_clock_t,
+    pub fd_read: __wasi_subscription_fd_readwrite_t,
+    pub fd_write: __wasi_subscription_fd_readwrite_t,
+}
+impl ::std::fmt::Debug for __wasi_subscription_u_u_t {
+    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+        write!(f, "__wasi_subscription_u_u_t {{ union }}")
+    }
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct __wasi_subscription_u_t {
+    pub tag: __wasi_eventtype_t::Type,
+    pub u: __wasi_subscription_u_u_t,
+}
+impl ::std::fmt::Debug for __wasi_subscription_u_t {
+    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+        write!(
+            f,
+            "__wasi_subscription_u_t {{ tag: {:?}, u: {:?} }}",
+            self.tag, self.u
+        )
+    }
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct __wasi_subscription_t {
+    pub userdata: __wasi_userdata_t,
+    pub u: __wasi_subscription_u_t,
+}
+impl ::std::fmt::Debug for __wasi_subscription_t {
+    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+        write!(
+            f,
+            "__wasi_subscription_t {{ userdata: {:?}, u: {:?} }}",
+            self.userdata, self.u
+        )
+    }
+}
+pub type __wasi_exitcode_t = u32;
+pub mod __wasi_signal_t {
+    pub type Type = u8;
+    pub const __WASI_SIGNAL_NONE: Type = 0;
+    pub const __WASI_SIGNAL_HUP: Type = 1;
+    pub const __WASI_SIGNAL_INT: Type = 2;
+    pub const __WASI_SIGNAL_QUIT: Type = 3;
+    pub const __WASI_SIGNAL_ILL: Type = 4;
+    pub const __WASI_SIGNAL_TRAP: Type = 5;
+    pub const __WASI_SIGNAL_ABRT: Type = 6;
+    pub const __WASI_SIGNAL_BUS: Type = 7;
+    pub const __WASI_SIGNAL_FPE: Type = 8;
+    pub const __WASI_SIGNAL_KILL: Type = 9;
+    pub const __WASI_SIGNAL_USR1: Type = 10;
+    pub const __WASI_SIGNAL_SEGV: Type = 11;
+    pub const __WASI_SIGNAL_USR2: Type = 12;
+    pub const __WASI_SIGNAL_PIPE: Type = 13;
+    pub const __WASI_SIGNAL_ALRM: Type = 14;
+    pub const __WASI_SIGNAL_TERM: Type = 15;
+    pub const __WASI_SIGNAL_CHLD: Type = 16;
+    pub const __WASI_SIGNAL_CONT: Type = 17;
+    pub const __WASI_SIGNAL_STOP: Type = 18;
+    pub const __WASI_SIGNAL_TSTP: Type = 19;
+    pub const __WASI_SIGNAL_TTIN: Type = 20;
+    pub const __WASI_SIGNAL_TTOU: Type = 21;
+    pub const __WASI_SIGNAL_URG: Type = 22;
+    pub const __WASI_SIGNAL_XCPU: Type = 23;
+    pub const __WASI_SIGNAL_XFSZ: Type = 24;
+    pub const __WASI_SIGNAL_VTALRM: Type = 25;
+    pub const __WASI_SIGNAL_PROF: Type = 26;
+    pub const __WASI_SIGNAL_WINCH: Type = 27;
+    pub const __WASI_SIGNAL_POLL: Type = 28;
+    pub const __WASI_SIGNAL_PWR: Type = 29;
+    pub const __WASI_SIGNAL_SYS: Type = 30;
+}
+pub mod __wasi_address_family_t {
+    pub type Type = u8;
+    pub const __WASI_ADDRESS_FAMILY_UNSPEC: Type = 0;
+    pub const __WASI_ADDRESS_FAMILY_INET4: Type = 1;
+    pub const __WASI_ADDRESS_FAMILY_INET6: Type = 2;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_address_t {
+    pub buf: uint8_t_ptr,
+    pub buf_len: __wasi_size_t,
+}
+pub mod __wasi_sock_opt_level_t {
+    pub type Type = u32;
+    pub const __WASI_SOCK_OPT_LEVEL_SOL_SOCKET: Type = 0;
+}
+pub mod __wasi_sock_opt_so_t {
+    pub type Type = u32;
+    pub const __WASI_SOCK_OPT_SO_REUSEADDR: Type = 0;
+    pub const __WASI_SOCK_OPT_SO_TYPE: Type = 1;
+    pub const __WASI_SOCK_OPT_SO_ERROR: Type = 2;
+    pub const __WASI_SOCK_OPT_SO_DONTROUTE: Type = 3;
+    pub const __WASI_SOCK_OPT_SO_BROADCAST: Type = 4;
+    pub const __WASI_SOCK_OPT_SO_SNDBUF: Type = 5;
+    pub const __WASI_SOCK_OPT_SO_RCVBUF: Type = 6;
+    pub const __WASI_SOCK_OPT_SO_KEEPALIVE: Type = 7;
+    pub const __WASI_SOCK_OPT_SO_OOBINLINE: Type = 8;
+    pub const __WASI_SOCK_OPT_SO_LINGER: Type = 9;
+    pub const __WASI_SOCK_OPT_SO_RCVLOWAT: Type = 10;
+    pub const __WASI_SOCK_OPT_SO_RCVTIMEO: Type = 11;
+    pub const __WASI_SOCK_OPT_SO_SNDTIMEO: Type = 12;
+    pub const __WASI_SOCK_OPT_SO_ACCEPTCONN: Type = 13;
+    pub const __WASI_SOCK_OPT_SO_BINDTODEVICE: Type = 14;
+}
+pub mod __wasi_aiflags_t {
+    pub type Type = u16;
+    pub const __WASI_AIFLAGS_AI_PASSIVE: Type = 1;
+    pub const __WASI_AIFLAGS_AI_CANONNAME: Type = 2;
+    pub const __WASI_AIFLAGS_AI_NUMERICHOST: Type = 4;
+    pub const __WASI_AIFLAGS_AI_NUMERICSERV: Type = 8;
+    pub const __WASI_AIFLAGS_AI_V4MAPPED: Type = 16;
+    pub const __WASI_AIFLAGS_AI_ALL: Type = 32;
+    pub const __WASI_AIFLAGS_AI_ADDRCONFIG: Type = 64;
+}
+pub mod __wasi_sock_type_t {
+    pub type Type = u8;
+    pub const __WASI_SOCK_TYPE_SOCK_ANY: Type = 0;
+    pub const __WASI_SOCK_TYPE_SOCK_DGRAM: Type = 1;
+    pub const __WASI_SOCK_TYPE_SOCK_STREAM: Type = 2;
+}
+pub mod __wasi_protocol_t {
+    pub type Type = u8;
+    pub const __WASI_PROTOCOL_IPPROTO_IP: Type = 0;
+    pub const __WASI_PROTOCOL_IPPROTO_TCP: Type = 1;
+    pub const __WASI_PROTOCOL_IPPROTO_UDP: Type = 2;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_sockaddr_in_t {
+    pub sin_family: __wasi_address_family_t::Type,
+    pub sin_port: u16,
+    pub sin_addr: __wasi_address_t,
+    pub sin_zero_len: __wasi_size_t,
+    pub sin_zero: uint8_t_ptr,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_sockaddr_t {
+    pub sa_family: __wasi_address_family_t::Type,
+    pub sa_data_len: __wasi_size_t,
+    pub sa_data: uint8_t_ptr,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_addrinfo_t {
+    pub ai_flags: __wasi_aiflags_t::Type,
+    pub ai_family: __wasi_address_family_t::Type,
+    pub ai_socktype: __wasi_sock_type_t::Type,
+    pub ai_protocol: __wasi_protocol_t::Type,
+    pub ai_addrlen: __wasi_size_t,
+    pub ai_addr: uint8_t_ptr,
+    pub ai_canonname: uint8_t_ptr,
+    pub ai_canonname_len: __wasi_size_t,
+    pub ai_next: uint8_t_ptr,
+}
+pub mod __wasi_riflags_t {
+    pub type Type = u16;
+    pub const __WASI_RIFLAGS_RECV_PEEK: Type = 1;
+    pub const __WASI_RIFLAGS_RECV_WAITALL: Type = 2;
+}
+pub mod __wasi_roflags_t {
+    pub type Type = u16;
+    pub const __WASI_ROFLAGS_RECV_DATA_TRUNCATED: Type = 1;
+}
+pub type __wasi_siflags_t = u16;
+pub mod __wasi_sdflags_t {
+    pub type Type = u8;
+    pub const __WASI_SDFLAGS_RD: Type = 1;
+    pub const __WASI_SDFLAGS_WR: Type = 2;
+}
+pub mod __wasi_preopentype_t {
+    pub type Type = u8;
+    pub const __WASI_PREOPENTYPE_DIR: Type = 0;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_prestat_dir_t {
+    pub pr_name_len: __wasi_size_t,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union __wasi_prestat_u_t {
+    pub dir: __wasi_prestat_dir_t,
+}
+impl ::std::fmt::Debug for __wasi_prestat_u_t {
+    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+        write!(f, "__wasi_prestat_u_t {{ union }}")
+    }
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct __wasi_prestat_t {
+    pub tag: __wasi_preopentype_t::Type,
+    pub u: __wasi_prestat_u_t,
+}
+impl ::std::fmt::Debug for __wasi_prestat_t {
+    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+        write!(
+            f,
+            "__wasi_prestat_t {{ tag: {:?}, u: {:?} }}",
+            self.tag, self.u
+        )
+    }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct __wasi_timeval {
+    pub tv_sec: i64,
+    pub tv_usec: i64,
+}
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/common/vfs/impls.rs.html b/src/async_wasi/snapshots/common/vfs/impls.rs.html new file mode 100644 index 000000000..7ae4677c2 --- /dev/null +++ b/src/async_wasi/snapshots/common/vfs/impls.rs.html @@ -0,0 +1,731 @@ +impls.rs - source

async_wasi/snapshots/common/vfs/
impls.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
use std::{
+    collections::HashMap,
+    fmt::Debug,
+    io::{Read, Seek, Write},
+};
+
+use crate::snapshots::env::Errno;
+
+use super::{
+    virtual_sys::{WasiVirtualDir, WasiVirtualFile},
+    WasiDir, WasiFile, WasiNode,
+};
+
+#[derive(Debug)]
+struct DirEntry {
+    ino: usize,
+    is_dir: bool,
+}
+
+#[derive(Debug)]
+pub struct MemoryDir {
+    ino: usize,
+    nlink: usize,
+    paths: HashMap<String, DirEntry>,
+    is_open: usize,
+}
+
+impl Drop for MemoryDir {
+    fn drop(&mut self) {
+        log::trace!("\r\n{self:#?}")
+    }
+}
+
+impl Drop for MemoryFile {
+    fn drop(&mut self) {
+        log::trace!("\r\n{self:#?} \r\n {:#?}", self.context.get_ref());
+    }
+}
+
+impl WasiNode for MemoryDir {
+    fn fd_fdstat_get(&self) -> Result<super::FdStat, Errno> {
+        Ok(super::FdStat {
+            filetype: super::FileType::DIRECTORY,
+            fs_rights_base: super::WASIRights::dir_all(),
+            fs_rights_inheriting: super::WASIRights::fd_all(),
+            flags: super::FdFlags::empty(),
+        })
+    }
+
+    fn fd_filestat_get(&self) -> Result<super::Filestat, Errno> {
+        Ok(super::Filestat {
+            filetype: super::FileType::DIRECTORY,
+            inode: self.ino as _,
+            nlink: self.nlink as _,
+            size: self.paths.len() as _,
+            atim: None,
+            mtim: None,
+            ctim: None,
+        })
+    }
+
+    fn fd_filestat_set_size(
+        &mut self,
+        size: crate::snapshots::env::wasi_types::__wasi_filesize_t,
+    ) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_filestat_set_times(
+        &mut self,
+        atim: crate::snapshots::env::wasi_types::__wasi_timestamp_t,
+        mtim: crate::snapshots::env::wasi_types::__wasi_timestamp_t,
+        fst_flags: crate::snapshots::env::wasi_types::__wasi_fstflags_t::Type,
+    ) -> Result<(), Errno> {
+        Ok(())
+    }
+}
+
+impl WasiDir for MemoryDir {
+    fn get_readdir(&self, start: u64) -> Result<Vec<(String, u64, super::FileType)>, Errno> {
+        let mut r = vec![];
+        for (path, DirEntry { ino, is_dir }) in self.paths.iter().skip(start as usize) {
+            r.push((
+                path.clone(),
+                *ino as _,
+                if *is_dir {
+                    super::FileType::DIRECTORY
+                } else {
+                    super::FileType::REGULAR_FILE
+                },
+            ));
+        }
+        Ok(r)
+    }
+}
+
+impl WasiVirtualDir for MemoryDir {
+    fn create(ino: usize) -> Self {
+        let mut paths = HashMap::default();
+        paths.insert(".".to_string(), DirEntry { ino, is_dir: true });
+        if ino == 0 {
+            paths.insert("..".to_string(), DirEntry { ino, is_dir: true });
+        }
+
+        Self {
+            ino,
+            paths,
+            is_open: 0,
+            nlink: 1,
+        }
+    }
+
+    fn add_sub_dir<P: AsRef<std::path::Path>>(
+        &mut self,
+        path: &P,
+        ino: usize,
+    ) -> Result<(), Errno> {
+        self.paths.insert(
+            path.as_ref()
+                .to_str()
+                .ok_or(Errno::__WASI_ERRNO_ILSEQ)?
+                .to_string(),
+            DirEntry { ino, is_dir: true },
+        );
+        self.nlink += 1;
+        Ok(())
+    }
+
+    fn remove_sub_dir<P: AsRef<std::path::Path>>(&mut self, path: &P) -> Result<(), Errno> {
+        let path = path.as_ref().to_str().ok_or(Errno::__WASI_ERRNO_ILSEQ)?;
+        if let Some(DirEntry { ino, is_dir }) = self.paths.remove(path) {
+            if is_dir && self.nlink > 1 {
+                self.nlink -= 1;
+            }
+            Ok(())
+        } else {
+            Err(Errno::__WASI_ERRNO_NOENT)
+        }
+    }
+
+    fn link_inode<P: AsRef<std::path::Path>>(
+        &mut self,
+        path: &P,
+        ino: usize,
+    ) -> Result<(), crate::snapshots::env::Errno> {
+        self.paths.insert(
+            path.as_ref()
+                .to_str()
+                .ok_or(Errno::__WASI_ERRNO_ILSEQ)?
+                .to_string(),
+            DirEntry { ino, is_dir: false },
+        );
+        Ok(())
+    }
+
+    fn unlink_inode<P: AsRef<std::path::Path>>(
+        &mut self,
+        path: &P,
+    ) -> Result<(), crate::snapshots::env::Errno> {
+        let path = path.as_ref().to_str().ok_or(Errno::__WASI_ERRNO_ILSEQ)?;
+        if self.paths.remove(path).is_some() {
+            Ok(())
+        } else {
+            Err(Errno::__WASI_ERRNO_NOENT)
+        }
+    }
+
+    fn find_inode<P: AsRef<std::path::Path>>(&self, path: &P) -> Option<usize> {
+        let path = path.as_ref().to_str()?;
+        if path.is_empty() {
+            return Some(self.ino);
+        }
+        let entry = self.paths.get(path)?;
+        Some(entry.ino)
+    }
+
+    fn is_empty(&self) -> bool {
+        self.paths.len() <= 2
+    }
+
+    fn is_open(&self) -> bool {
+        self.is_open > 0
+    }
+
+    fn open(&mut self) {
+        self.is_open += 1;
+    }
+
+    fn close(&mut self) -> usize {
+        if self.is_open > 0 {
+            self.is_open -= 1;
+        }
+        self.nlink
+    }
+
+    fn mark_remove(&mut self) {
+        self.nlink = 0
+    }
+}
+
+pub struct MemoryFile {
+    context: std::io::Cursor<Vec<u8>>,
+    nlink: usize,
+    ino: usize,
+    is_open: bool,
+}
+
+impl WasiNode for MemoryFile {
+    fn fd_fdstat_get(&self) -> Result<super::FdStat, Errno> {
+        Ok(super::FdStat {
+            filetype: super::FileType::REGULAR_FILE,
+            fs_rights_base: super::WASIRights::dir_all(),
+            fs_rights_inheriting: super::WASIRights::fd_all(),
+            flags: super::FdFlags::empty(),
+        })
+    }
+
+    fn fd_filestat_get(&self) -> Result<super::Filestat, Errno> {
+        Ok(super::Filestat {
+            filetype: super::FileType::REGULAR_FILE,
+            inode: self.ino as _,
+            nlink: self.nlink as _,
+            size: self.context.get_ref().len() as _,
+            atim: None,
+            mtim: None,
+            ctim: None,
+        })
+    }
+
+    fn fd_filestat_set_size(
+        &mut self,
+        size: crate::snapshots::env::wasi_types::__wasi_filesize_t,
+    ) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_NOTSUP)
+    }
+
+    fn fd_filestat_set_times(
+        &mut self,
+        atim: crate::snapshots::env::wasi_types::__wasi_timestamp_t,
+        mtim: crate::snapshots::env::wasi_types::__wasi_timestamp_t,
+        fst_flags: crate::snapshots::env::wasi_types::__wasi_fstflags_t::Type,
+    ) -> Result<(), Errno> {
+        Ok(())
+    }
+}
+
+impl WasiFile for MemoryFile {
+    fn fd_read(&mut self, bufs: &mut [std::io::IoSliceMut<'_>]) -> Result<usize, Errno> {
+        Ok(self.context.read_vectored(bufs)?)
+    }
+
+    fn fd_pread(
+        &mut self,
+        bufs: &mut [std::io::IoSliceMut<'_>],
+        offset: crate::snapshots::env::wasi_types::__wasi_filesize_t,
+    ) -> Result<usize, Errno> {
+        let old_pos = self.context.position();
+        self.context.set_position(offset);
+        let n = self.context.read_vectored(bufs);
+        self.context.set_position(old_pos);
+        Ok(n?)
+    }
+
+    fn fd_write(&mut self, bufs: &[std::io::IoSlice<'_>]) -> Result<usize, Errno> {
+        Ok(self.context.write_vectored(bufs)?)
+    }
+
+    fn fd_pwrite(
+        &mut self,
+        bufs: &[std::io::IoSlice<'_>],
+        offset: crate::snapshots::env::wasi_types::__wasi_filesize_t,
+    ) -> Result<usize, Errno> {
+        let old_pos = self.context.position();
+        self.context.set_position(offset);
+        let n = self.context.write_vectored(bufs);
+        self.context.set_position(old_pos);
+        Ok(n?)
+    }
+
+    fn fd_seek(
+        &mut self,
+        offset: crate::snapshots::env::wasi_types::__wasi_filedelta_t,
+        whence: crate::snapshots::env::wasi_types::__wasi_whence_t::Type,
+    ) -> Result<crate::snapshots::env::wasi_types::__wasi_filesize_t, Errno> {
+        let pos = match whence {
+            crate::snapshots::env::wasi_types::__wasi_whence_t::__WASI_WHENCE_CUR => {
+                std::io::SeekFrom::Current(offset)
+            }
+            crate::snapshots::env::wasi_types::__wasi_whence_t::__WASI_WHENCE_END => {
+                std::io::SeekFrom::End(offset)
+            }
+            crate::snapshots::env::wasi_types::__wasi_whence_t::__WASI_WHENCE_SET => {
+                std::io::SeekFrom::Start(offset as u64)
+            }
+            _ => return Err(Errno::__WASI_ERRNO_INVAL),
+        };
+        Ok(self.context.seek(pos)?)
+    }
+
+    fn fd_tell(&mut self) -> Result<crate::snapshots::env::wasi_types::__wasi_filesize_t, Errno> {
+        Ok(self.context.position() as _)
+    }
+}
+
+impl From<Vec<u8>> for MemoryFile {
+    fn from(value: Vec<u8>) -> Self {
+        Self {
+            context: std::io::Cursor::new(value),
+            nlink: 0,
+            ino: 0,
+            is_open: false,
+        }
+    }
+}
+
+impl WasiVirtualFile for MemoryFile {
+    fn create(ino: usize) -> Self {
+        Self {
+            context: std::io::Cursor::new(Vec::new()),
+            nlink: 0,
+            ino,
+            is_open: false,
+        }
+    }
+
+    fn set_ino(&mut self, ino: usize) {
+        self.ino = ino;
+    }
+
+    fn inc_link(&mut self) -> Result<usize, Errno> {
+        self.nlink += 1;
+        Ok(self.nlink)
+    }
+
+    fn dec_link(&mut self) -> Result<usize, Errno> {
+        if self.nlink > 0 {
+            self.nlink -= 1;
+        }
+        Ok(self.nlink)
+    }
+
+    fn is_open(&self) -> bool {
+        self.is_open
+    }
+
+    fn open(&mut self) {
+        self.is_open = true;
+    }
+
+    fn close(&mut self) -> usize {
+        self.is_open = false;
+        self.nlink
+    }
+}
+
+impl Debug for MemoryFile {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        f.debug_struct("MemoryFile")
+            .field("context_len", &self.context.get_ref().len())
+            .field("nlink", &self.nlink)
+            .field("ino", &self.ino)
+            .field("is_open", &self.is_open)
+            .finish()
+    }
+}
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/common/vfs/mod.rs.html b/src/async_wasi/snapshots/common/vfs/mod.rs.html new file mode 100644 index 000000000..fa432131f --- /dev/null +++ b/src/async_wasi/snapshots/common/vfs/mod.rs.html @@ -0,0 +1,933 @@ +mod.rs - source

async_wasi/snapshots/common/vfs/
mod.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
use super::{
+    error::Errno,
+    types::{self as wasi_types},
+};
+use bitflags::bitflags;
+use std::{fmt::Debug, future::Future, io, path::Path, time::Duration};
+
+pub mod impls;
+pub mod virtual_sys;
+
+pub enum SystemTimeSpec {
+    SymbolicNow,
+    Absolute(Duration),
+}
+
+pub struct ReaddirEntity {
+    pub next: u64,
+    pub inode: u64,
+    pub name: String,
+    pub filetype: FileType,
+}
+
+impl From<&ReaddirEntity> for wasi_types::__wasi_dirent_t {
+    fn from(ent: &ReaddirEntity) -> Self {
+        wasi_types::__wasi_dirent_t {
+            d_next: ent.next.to_le(),
+            d_ino: ent.inode.to_le(),
+            d_namlen: (ent.name.len() as u32).to_le(),
+            d_type: ent.filetype.0,
+        }
+    }
+}
+
+#[derive(Debug, Clone)]
+pub struct FdStat {
+    pub filetype: FileType,
+    pub fs_rights_base: WASIRights,
+    pub fs_rights_inheriting: WASIRights,
+    pub flags: FdFlags,
+}
+
+impl From<&FdStat> for wasi_types::__wasi_fdstat_t {
+    fn from(fdstat: &FdStat) -> wasi_types::__wasi_fdstat_t {
+        use wasi_types::__wasi_fdstat_t;
+        __wasi_fdstat_t {
+            fs_filetype: fdstat.filetype.0,
+            fs_rights_base: fdstat.fs_rights_base.bits(),
+            fs_rights_inheriting: fdstat.fs_rights_inheriting.bits(),
+            fs_flags: fdstat.flags.bits(),
+        }
+    }
+}
+
+impl From<FdStat> for wasi_types::__wasi_fdstat_t {
+    fn from(fdstat: FdStat) -> wasi_types::__wasi_fdstat_t {
+        use wasi_types::__wasi_fdstat_t;
+        __wasi_fdstat_t::from(&fdstat)
+    }
+}
+
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct Filestat {
+    pub filetype: FileType,
+    pub inode: u64,
+    pub nlink: u64,
+    pub size: u64, // this is a read field, the rest are file fields
+    pub atim: Option<std::time::SystemTime>,
+    pub mtim: Option<std::time::SystemTime>,
+    pub ctim: Option<std::time::SystemTime>,
+}
+
+impl From<Filestat> for wasi_types::__wasi_filestat_t {
+    fn from(stat: Filestat) -> wasi_types::__wasi_filestat_t {
+        wasi_types::__wasi_filestat_t {
+            dev: 3,
+            ino: stat.inode,
+            filetype: stat.filetype.0,
+            nlink: stat.nlink,
+            size: stat.size,
+            atim: stat
+                .atim
+                .map(|t| t.duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos() as u64)
+                .unwrap_or(0),
+            mtim: stat
+                .mtim
+                .map(|t| t.duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos() as u64)
+                .unwrap_or(0),
+            ctim: stat
+                .ctim
+                .map(|t| t.duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos() as u64)
+                .unwrap_or(0),
+        }
+    }
+}
+
+impl From<(u64, Filestat)> for wasi_types::__wasi_filestat_t {
+    fn from((dev, stat): (u64, Filestat)) -> Self {
+        let mut stat: Self = stat.into();
+        stat.dev = dev;
+        stat
+    }
+}
+
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub struct FileType(pub wasi_types::__wasi_filetype_t::Type);
+impl FileType {
+    pub const UNKNOWN: FileType = FileType(0);
+    pub const BLOCK_DEVICE: FileType = FileType(1);
+    pub const CHARACTER_DEVICE: FileType = FileType(2);
+    pub const DIRECTORY: FileType = FileType(3);
+    pub const REGULAR_FILE: FileType = FileType(4);
+    pub const SOCKET_DGRAM: FileType = FileType(5);
+    pub const SOCKET_STREAM: FileType = FileType(6);
+    pub const SYMBOLIC_LINK: FileType = FileType(7);
+}
+
+bitflags! {
+    #[derive(Debug, Clone)]
+    pub struct FdFlags: wasi_types::__wasi_fdflags_t::Type {
+        const APPEND   = wasi_types::__wasi_fdflags_t::__WASI_FDFLAGS_APPEND; // 0b1
+        const DSYNC    = wasi_types::__wasi_fdflags_t::__WASI_FDFLAGS_DSYNC; // 0b10
+        const NONBLOCK = wasi_types::__wasi_fdflags_t::__WASI_FDFLAGS_NONBLOCK; // 0b100
+        const RSYNC    = wasi_types::__wasi_fdflags_t::__WASI_FDFLAGS_RSYNC; // 0b1000
+        const SYNC     = wasi_types::__wasi_fdflags_t::__WASI_FDFLAGS_SYNC; // 0b10000
+    }
+}
+
+bitflags! {
+    #[derive(PartialEq)]
+    pub struct SdFlags: wasi_types::__wasi_sdflags_t::Type {
+        const RD = wasi_types::__wasi_sdflags_t::__WASI_SDFLAGS_RD;
+        const WR = wasi_types::__wasi_sdflags_t::__WASI_SDFLAGS_WR;
+    }
+}
+
+impl From<SdFlags> for std::net::Shutdown {
+    fn from(val: SdFlags) -> Self {
+        use std::net::Shutdown;
+        if val == SdFlags::RD {
+            Shutdown::Read
+        } else if val == SdFlags::WR {
+            Shutdown::Write
+        } else {
+            Shutdown::Both
+        }
+    }
+}
+
+bitflags! {
+    pub struct SiFlags: wasi_types::__wasi_siflags_t {
+    }
+}
+
+bitflags! {
+    pub struct RiFlags: wasi_types::__wasi_riflags_t::Type {
+        const RECV_PEEK    = wasi_types::__wasi_riflags_t::__WASI_RIFLAGS_RECV_PEEK;
+        const RECV_WAITALL = wasi_types::__wasi_riflags_t::__WASI_RIFLAGS_RECV_WAITALL;
+    }
+}
+
+bitflags! {
+    pub struct RoFlags: wasi_types::__wasi_roflags_t::Type {
+        const RECV_DATA_TRUNCATED = wasi_types::__wasi_roflags_t::__WASI_ROFLAGS_RECV_DATA_TRUNCATED;
+    }
+}
+
+bitflags! {
+    #[derive(Debug, Clone)]
+    pub struct OFlags: wasi_types::__wasi_oflags_t::Type {
+        const CREATE    = wasi_types::__wasi_oflags_t::__WASI_OFLAGS_CREAT;
+        const DIRECTORY = wasi_types::__wasi_oflags_t::__WASI_OFLAGS_DIRECTORY;
+        const EXCLUSIVE = wasi_types::__wasi_oflags_t::__WASI_OFLAGS_EXCL;
+        const TRUNCATE  = wasi_types::__wasi_oflags_t::__WASI_OFLAGS_TRUNC;
+    }
+}
+
+bitflags! {
+    #[derive(Debug, Clone)]
+    pub struct WASIRights : wasi_types::__wasi_rights_t::Type {
+        const  FD_DATASYNC= 1;
+        const  FD_READ  = 2;
+        const  FD_SEEK  = 4;
+        const  FD_FDSTAT_SET_FLAGS  = 8;
+        const  FD_SYNC  = 16;
+        const  FD_TELL  = 32;
+        const  FD_WRITE  = 64;
+        const  FD_ADVISE  = 128;
+        const  FD_ALLOCATE  = 256;
+        const  PATH_CREATE_DIRECTORY  = 512;
+        const  PATH_CREATE_FILE  = 1024;
+        const  PATH_LINK_SOURCE  = 2048;
+        const  PATH_LINK_TARGET  = 4096;
+        const  PATH_OPEN  = 8192;
+        const  FD_READDIR  = 16384;
+        const  PATH_READLINK  = 32768;
+        const  PATH_RENAME_SOURCE  = 65536;
+        const  PATH_RENAME_TARGET  = 131072;
+        const  PATH_FILESTAT_GET  = 262144;
+        const  PATH_FILESTAT_SET_SIZE  = 524288;
+        const  PATH_FILESTAT_SET_TIMES  = 1048576;
+        const  FD_FILESTAT_GET  = 2097152;
+        const  FD_FILESTAT_SET_SIZE  = 4194304;
+        const  FD_FILESTAT_SET_TIMES  = 8388608;
+        const  PATH_SYMLINK  = 16777216;
+        const  PATH_REMOVE_DIRECTORY  = 33554432;
+        const  PATH_UNLINK_FILE  = 67108864;
+        const  POLL_FD_READWRITE  = 134217728;
+        const  SOCK_SHUTDOWN  = 268435456;
+        const  SOCK_OPEN  = 536870912;
+        const  SOCK_CLOSE  = 1073741824;
+        const  SOCK_BIND  = 2147483648;
+        const  SOCK_RECV  = 4294967296;
+        const  SOCK_RECV_FROM  = 8589934592;
+        const  SOCK_SEND  = 17179869184;
+        const  SOCK_SEND_TO  = 34359738368;
+    }
+}
+
+impl Default for WASIRights {
+    fn default() -> Self {
+        Self::empty()
+    }
+}
+
+impl WASIRights {
+    #[inline]
+    pub fn fd_all() -> Self {
+        WASIRights::FD_ADVISE
+            | WASIRights::FD_ALLOCATE
+            | WASIRights::FD_DATASYNC
+            | WASIRights::FD_SYNC
+            | WASIRights::FD_TELL
+            | WASIRights::FD_SEEK
+            | WASIRights::FD_READ
+            | WASIRights::FD_WRITE
+            | WASIRights::FD_FDSTAT_SET_FLAGS
+            | WASIRights::FD_FILESTAT_GET
+            | WASIRights::FD_FILESTAT_SET_SIZE
+            | WASIRights::FD_FILESTAT_SET_TIMES
+    }
+
+    #[inline]
+    pub fn dir_all() -> Self {
+        WASIRights::PATH_CREATE_DIRECTORY
+            | WASIRights::PATH_CREATE_FILE
+            | WASIRights::PATH_LINK_SOURCE
+            | WASIRights::PATH_LINK_TARGET
+            | WASIRights::PATH_OPEN
+            | WASIRights::FD_READDIR
+            | WASIRights::PATH_READLINK
+            | WASIRights::PATH_RENAME_SOURCE
+            | WASIRights::PATH_RENAME_TARGET
+            | WASIRights::PATH_SYMLINK
+            | WASIRights::PATH_REMOVE_DIRECTORY
+            | WASIRights::PATH_UNLINK_FILE
+            | WASIRights::PATH_FILESTAT_GET
+            | WASIRights::PATH_FILESTAT_SET_TIMES
+            | WASIRights::FD_FILESTAT_GET
+            | WASIRights::FD_FILESTAT_SET_TIMES
+    }
+
+    pub fn can(&self, other: Self) -> Result<(), Errno> {
+        if self.contains(other) {
+            Ok(())
+        } else {
+            Err(Errno::__WASI_ERRNO_NOTCAPABLE)
+        }
+    }
+}
+
+bitflags! {
+    pub struct Lookupflags: wasi_types::__wasi_lookupflags_t::Type {
+        const SYMLINK_FOLLOW = wasi_types::__wasi_lookupflags_t::__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW;
+    }
+}
+
+#[derive(Debug, Clone)]
+pub enum Advice {
+    Normal,
+    Sequential,
+    Random,
+    WillNeed,
+    DontNeed,
+    NoReuse,
+}
+
+pub trait WasiNode {
+    fn fd_fdstat_get(&self) -> Result<FdStat, Errno>;
+
+    fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_fdstat_set_rights(
+        &mut self,
+        fs_rights_base: WASIRights,
+        fs_rights_inheriting: WASIRights,
+    ) -> Result<(), Errno> {
+        Ok(())
+    }
+
+    fn fd_filestat_get(&self) -> Result<Filestat, Errno>;
+
+    fn fd_filestat_set_size(&mut self, size: wasi_types::__wasi_filesize_t) -> Result<(), Errno>;
+
+    fn fd_filestat_set_times(
+        &mut self,
+        atim: wasi_types::__wasi_timestamp_t,
+        mtim: wasi_types::__wasi_timestamp_t,
+        fst_flags: wasi_types::__wasi_fstflags_t::Type,
+    ) -> Result<(), Errno>;
+}
+
+pub trait WasiFile: WasiNode {
+    fn fd_advise(
+        &mut self,
+        offset: wasi_types::__wasi_filesize_t,
+        len: wasi_types::__wasi_filesize_t,
+        advice: Advice,
+    ) -> Result<(), Errno> {
+        Ok(())
+    }
+
+    fn fd_allocate(
+        &mut self,
+        offset: wasi_types::__wasi_filesize_t,
+        len: wasi_types::__wasi_filesize_t,
+    ) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_datasync(&mut self) -> Result<(), Errno> {
+        Ok(())
+    }
+
+    fn fd_sync(&mut self) -> Result<(), Errno> {
+        Ok(())
+    }
+
+    fn fd_read(&mut self, bufs: &mut [io::IoSliceMut<'_>]) -> Result<usize, Errno>;
+
+    fn fd_pread(
+        &mut self,
+        bufs: &mut [io::IoSliceMut<'_>],
+        offset: wasi_types::__wasi_filesize_t,
+    ) -> Result<usize, Errno>;
+
+    fn fd_write(&mut self, bufs: &[io::IoSlice<'_>]) -> Result<usize, Errno>;
+
+    fn fd_pwrite(
+        &mut self,
+        bufs: &[io::IoSlice<'_>],
+        offset: wasi_types::__wasi_filesize_t,
+    ) -> Result<usize, Errno>;
+
+    fn fd_seek(
+        &mut self,
+        offset: wasi_types::__wasi_filedelta_t,
+        whence: wasi_types::__wasi_whence_t::Type,
+    ) -> Result<wasi_types::__wasi_filesize_t, Errno>;
+
+    fn fd_tell(&mut self) -> Result<wasi_types::__wasi_filesize_t, Errno>;
+}
+
+pub trait WasiDir: WasiNode {
+    fn get_readdir(&self, start: u64) -> Result<Vec<(String, u64, FileType)>, Errno>;
+
+    fn fd_readdir(&self, cursor: usize, write_buf: &mut [u8]) -> Result<usize, Errno> {
+        fn write_dirent(entity: &ReaddirEntity, write_buf: &mut [u8]) -> usize {
+            unsafe {
+                use wasi_types::__wasi_dirent_t;
+                const __wasi_dirent_t_size: usize = std::mem::size_of::<__wasi_dirent_t>();
+                let ent = __wasi_dirent_t::from(entity);
+                let ent_bytes_ptr = (&ent) as *const __wasi_dirent_t;
+                let ent_bytes =
+                    std::slice::from_raw_parts(ent_bytes_ptr as *const u8, __wasi_dirent_t_size);
+                let dirent_copy_len = write_buf.len().min(__wasi_dirent_t_size);
+                write_buf[..dirent_copy_len].copy_from_slice(&ent_bytes[..dirent_copy_len]);
+                if dirent_copy_len < __wasi_dirent_t_size {
+                    return dirent_copy_len;
+                }
+
+                let name_bytes = entity.name.as_bytes();
+                let name_len = name_bytes.len();
+                let name_copy_len = (write_buf.len() - dirent_copy_len).min(name_len);
+                write_buf[dirent_copy_len..dirent_copy_len + name_copy_len]
+                    .copy_from_slice(&name_bytes[..name_copy_len]);
+
+                dirent_copy_len + name_copy_len
+            }
+        }
+
+        let buflen = write_buf.len();
+
+        let mut bufused = 0;
+        let mut next = cursor as u64;
+
+        for (name, inode, filetype) in self.get_readdir(next)? {
+            next += 1;
+            let entity = ReaddirEntity {
+                next,
+                inode,
+                name,
+                filetype,
+            };
+
+            let n = write_dirent(&entity, &mut write_buf[bufused..]);
+            bufused += n;
+            if bufused == buflen {
+                return Ok(bufused);
+            }
+        }
+
+        Ok(bufused)
+    }
+}
+
+pub trait WasiFileSys {
+    type Index: Sized;
+
+    fn path_open(
+        &mut self,
+        dir_ino: Self::Index,
+        path: &str,
+        oflags: OFlags,
+        fs_rights_base: WASIRights,
+        fs_rights_inheriting: WASIRights,
+        fdflags: FdFlags,
+    ) -> Result<Self::Index, Errno>;
+    fn path_rename(
+        &mut self,
+        old_dir: Self::Index,
+        old_path: &str,
+        new_dir: Self::Index,
+        new_path: &str,
+    ) -> Result<(), Errno>;
+    fn path_create_directory(&mut self, dir_ino: Self::Index, path: &str) -> Result<(), Errno>;
+    fn path_remove_directory(&mut self, dir_ino: Self::Index, path: &str) -> Result<(), Errno>;
+    fn path_unlink_file(&mut self, dir_ino: Self::Index, path: &str) -> Result<(), Errno>;
+    fn path_link_file(
+        &mut self,
+        old_dir: Self::Index,
+        old_path: &str,
+        new_dir: Self::Index,
+        new_path: &str,
+    ) -> Result<(), Errno>;
+    fn path_filestat_get(
+        &self,
+        dir_ino: Self::Index,
+        path: &str,
+        follow_symlinks: bool,
+    ) -> Result<Filestat, Errno>;
+
+    fn fclose(&mut self, ino: Self::Index) -> Result<(), Errno> {
+        Ok(())
+    }
+
+    fn get_mut_inode(&mut self, ino: usize) -> Result<&mut dyn WasiNode, Errno>;
+    fn get_inode(&self, ino: usize) -> Result<&dyn WasiNode, Errno>;
+
+    fn get_mut_file(&mut self, ino: usize) -> Result<&mut dyn WasiFile, Errno>;
+    fn get_file(&self, ino: usize) -> Result<&dyn WasiFile, Errno>;
+
+    fn get_mut_dir(&mut self, ino: usize) -> Result<&mut dyn WasiDir, Errno>;
+    fn get_dir(&self, ino: usize) -> Result<&dyn WasiDir, Errno>;
+}
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/common/vfs/virtual_sys.rs.html b/src/async_wasi/snapshots/common/vfs/virtual_sys.rs.html new file mode 100644 index 000000000..39b1639d7 --- /dev/null +++ b/src/async_wasi/snapshots/common/vfs/virtual_sys.rs.html @@ -0,0 +1,3359 @@ +virtual_sys.rs - source

async_wasi/snapshots/common/vfs/
virtual_sys.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
use std::{
+    io::{Read, Seek, Write},
+    path::{Path, PathBuf},
+    time::Duration,
+};
+
+use futures::future::ok;
+use libc::hostent;
+use slab::Slab;
+
+use crate::snapshots::env::{wasi_types, Errno};
+
+use super::{
+    Advice, FdFlags, FdStat, FileType, Filestat, OFlags, SystemTimeSpec, WASIRights, WasiDir,
+    WasiFile, WasiFileSys, WasiNode,
+};
+
+pub trait WasiVirtualDir: WasiDir {
+    fn create(ino: usize) -> Self;
+    fn add_sub_dir<P: AsRef<Path>>(&mut self, path: &P, ino: usize) -> Result<(), Errno>;
+    fn remove_sub_dir<P: AsRef<Path>>(&mut self, path: &P) -> Result<(), Errno>;
+
+    fn link_inode<P: AsRef<Path>>(&mut self, path: &P, ino: usize) -> Result<(), Errno>;
+    fn unlink_inode<P: AsRef<Path>>(&mut self, path: &P) -> Result<(), Errno>;
+    fn find_inode<P: AsRef<Path>>(&self, path: &P) -> Option<usize>;
+    fn is_empty(&self) -> bool;
+
+    fn is_open(&self) -> bool;
+    fn open(&mut self);
+    fn close(&mut self) -> usize;
+    fn mark_remove(&mut self);
+}
+
+pub trait WasiVirtualFile: WasiFile {
+    fn create(ino: usize) -> Self;
+
+    fn set_ino(&mut self, ino: usize);
+
+    fn inc_link(&mut self) -> Result<usize, Errno>;
+
+    fn dec_link(&mut self) -> Result<usize, Errno>;
+
+    fn is_open(&self) -> bool;
+    fn open(&mut self);
+    fn close(&mut self) -> usize;
+}
+
+pub enum Inode<D: WasiVirtualDir, F: WasiVirtualFile> {
+    Dir(D),
+    File(F),
+}
+
+impl<D: WasiVirtualDir, F: WasiVirtualFile> WasiNode for Inode<D, F> {
+    fn fd_fdstat_get(&self) -> Result<FdStat, Errno> {
+        match self {
+            Inode::Dir(dir) => dir.fd_fdstat_get(),
+            Inode::File(file) => file.fd_fdstat_get(),
+        }
+    }
+
+    fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno> {
+        match self {
+            Inode::Dir(dir) => dir.fd_fdstat_set_flags(flags),
+            Inode::File(file) => file.fd_fdstat_set_flags(flags),
+        }
+    }
+
+    fn fd_fdstat_set_rights(
+        &mut self,
+        fs_rights_base: WASIRights,
+        fs_rights_inheriting: WASIRights,
+    ) -> Result<(), Errno> {
+        match self {
+            Inode::Dir(dir) => dir.fd_fdstat_set_rights(fs_rights_base, fs_rights_inheriting),
+            Inode::File(file) => file.fd_fdstat_set_rights(fs_rights_base, fs_rights_inheriting),
+        }
+    }
+
+    fn fd_filestat_get(&self) -> Result<Filestat, Errno> {
+        match self {
+            Inode::Dir(dir) => dir.fd_filestat_get(),
+            Inode::File(file) => file.fd_filestat_get(),
+        }
+    }
+
+    fn fd_filestat_set_size(&mut self, size: wasi_types::__wasi_filesize_t) -> Result<(), Errno> {
+        match self {
+            Inode::Dir(dir) => dir.fd_filestat_set_size(size),
+            Inode::File(file) => file.fd_filestat_set_size(size),
+        }
+    }
+
+    fn fd_filestat_set_times(
+        &mut self,
+        atim: wasi_types::__wasi_timestamp_t,
+        mtim: wasi_types::__wasi_timestamp_t,
+        fst_flags: wasi_types::__wasi_fstflags_t::Type,
+    ) -> Result<(), Errno> {
+        match self {
+            Inode::Dir(dir) => dir.fd_filestat_set_times(atim, mtim, fst_flags),
+            Inode::File(file) => file.fd_filestat_set_times(atim, mtim, fst_flags),
+        }
+    }
+}
+
+// VFS
+pub struct WasiVirtualSys<D: WasiVirtualDir, F: WasiVirtualFile> {
+    inodes: slab::Slab<Inode<D, F>>,
+    dir_rights: WASIRights,
+    file_rights: WASIRights,
+}
+
+impl<D: WasiVirtualDir, F: WasiVirtualFile> Default for WasiVirtualSys<D, F> {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
+impl<D: WasiVirtualDir, F: WasiVirtualFile> WasiVirtualSys<D, F> {
+    pub fn new() -> Self {
+        let mut inodes = Slab::new();
+        inodes.insert(Inode::Dir(D::create(0)));
+        Self {
+            inodes,
+            dir_rights: WASIRights::dir_all(),
+            file_rights: WASIRights::fd_all(),
+        }
+    }
+
+    pub fn create_file<P: AsRef<Path>>(
+        &mut self,
+        dir_ino: usize,
+        path: &P,
+        mut new_file: F,
+    ) -> Result<usize, Errno> {
+        new_file.inc_link();
+        let new_ino = self.inodes.vacant_key();
+        new_file.set_ino(new_ino);
+        let new_ino = self.inodes.insert(Inode::File(new_file));
+
+        if let Some(Inode::Dir(dir)) = self.inodes.get_mut(dir_ino) {
+            let r = dir.link_inode(path, new_ino);
+            if r.is_err() {
+                self.inodes.remove(new_ino);
+            }
+            r?;
+            Ok(new_ino)
+        } else {
+            self.inodes.remove(new_ino);
+            Err(Errno::__WASI_ERRNO_NOTDIR)
+        }
+    }
+
+    pub fn find_inode_index<P: AsRef<Path>>(
+        &self,
+        dir_ino: usize,
+        path: &P,
+    ) -> Result<usize, Errno> {
+        let mut ino = dir_ino;
+        let path = path.as_ref();
+        let path_iter = path.iter();
+        for entry in path.iter() {
+            let entry = entry.to_str().ok_or(Errno::__WASI_ERRNO_ILSEQ)?;
+            log::trace!("WasiVirtualSys find_inode_index {ino} {entry}");
+
+            if let Inode::Dir(dir) = self.inodes.get(ino).ok_or(Errno::__WASI_ERRNO_NOENT)? {
+                ino = dir.find_inode(&entry).ok_or(Errno::__WASI_ERRNO_NOENT)?;
+            } else {
+                return Err(Errno::__WASI_ERRNO_NOTDIR);
+            }
+        }
+        log::trace!("WasiVirtualSys find_inode_index return {ino}");
+        Ok(ino)
+    }
+
+    pub fn create_file_inode<P: AsRef<Path>>(
+        &mut self,
+        dir_ino: usize,
+        path: &P,
+    ) -> Result<usize, Errno> {
+        let mut new_file = F::create(self.inodes.vacant_key());
+        new_file.inc_link();
+        let new_ino = self.inodes.insert(Inode::File(new_file));
+
+        if let Some(Inode::Dir(dir)) = self.inodes.get_mut(dir_ino) {
+            let r = dir.link_inode(path, new_ino);
+            if r.is_err() {
+                self.inodes.remove(new_ino);
+            }
+            r?;
+            Ok(new_ino)
+        } else {
+            self.inodes.remove(new_ino);
+            Err(Errno::__WASI_ERRNO_NOTDIR)
+        }
+    }
+
+    pub fn create_dir_inode<P: AsRef<Path>>(
+        &mut self,
+        dir_ino: usize,
+        path: &P,
+    ) -> Result<usize, Errno> {
+        let mut new_dir = D::create(self.inodes.vacant_key());
+        new_dir.add_sub_dir(&"..", dir_ino);
+        let new_ino = self.inodes.insert(Inode::Dir(new_dir));
+
+        if let Some(Inode::Dir(dir)) = self.inodes.get_mut(dir_ino) {
+            let r = dir.add_sub_dir(path, new_ino);
+            if r.is_err() {
+                self.inodes.remove(new_ino);
+            }
+            r?;
+            Ok(new_ino)
+        } else {
+            self.inodes.remove(new_ino);
+            Err(Errno::__WASI_ERRNO_NOTDIR)
+        }
+    }
+}
+
+impl<D: WasiVirtualDir, F: WasiVirtualFile> WasiFileSys for WasiVirtualSys<D, F> {
+    type Index = usize;
+
+    fn path_open(
+        &mut self,
+        dir_ino: Self::Index,
+        path: &str,
+        oflags: OFlags,
+        fs_rights_base: WASIRights,
+        fs_rights_inheriting: WASIRights,
+        fdflags: FdFlags,
+    ) -> Result<usize, Errno> {
+        let path: &Path = path.as_ref();
+
+        log::trace!("WasiVirtualSys path_open {oflags:?} {path:?} {dir_ino}");
+
+        if fdflags.intersects(FdFlags::DSYNC | FdFlags::SYNC | FdFlags::RSYNC) {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+
+        if oflags.intersects(OFlags::DIRECTORY)
+            && (oflags.contains(OFlags::CREATE)
+                || oflags.contains(OFlags::EXCLUSIVE)
+                || oflags.contains(OFlags::TRUNCATE))
+        {
+            return Err(Errno::__WASI_ERRNO_INVAL);
+        }
+
+        let read = fs_rights_base.contains(WASIRights::FD_READ);
+        let write = fs_rights_base.contains(WASIRights::FD_WRITE);
+
+        let inode = self.find_inode_index(dir_ino, &path);
+        match inode {
+            Ok(ino) => match self.inodes.get_mut(ino).ok_or(Errno::__WASI_ERRNO_NOENT)? {
+                Inode::Dir(dir) => {
+                    dir.open();
+                    Ok(ino)
+                }
+                Inode::File(file) => {
+                    if oflags.intersects(OFlags::DIRECTORY) {
+                        return Err(Errno::__WASI_ERRNO_NOTDIR);
+                    }
+
+                    if oflags.intersects(OFlags::CREATE | OFlags::EXCLUSIVE) {
+                        return Err(Errno::__WASI_ERRNO_EXIST);
+                    }
+
+                    file.open();
+
+                    Ok(ino)
+                }
+            },
+            Err(e) => {
+                if oflags.intersects(OFlags::DIRECTORY) {
+                    return Err(e);
+                }
+
+                if oflags.intersects(OFlags::CREATE) {
+                    let parent = match path.parent() {
+                        Some(p) => self.find_inode_index(dir_ino, &p)?,
+                        None => dir_ino,
+                    };
+
+                    let ino = self.create_file_inode(
+                        parent,
+                        &path.file_name().ok_or(Errno::__WASI_ERRNO_INVAL)?,
+                    )?;
+                    if let Some(Inode::File(file)) = self.inodes.get_mut(ino) {
+                        file.open();
+                    }
+
+                    return Ok(ino);
+                }
+
+                Err(Errno::__WASI_ERRNO_EXIST)
+            }
+        }
+    }
+
+    fn path_rename(
+        &mut self,
+        old_dir: usize,
+        old_path: &str,
+        new_dir: usize,
+        new_path: &str,
+    ) -> Result<(), Errno> {
+        self.path_link_file(old_dir, old_path, new_dir, new_path)?;
+        self.path_unlink_file(old_dir, old_path)?;
+        Ok(())
+    }
+
+    fn path_create_directory(&mut self, dir_ino: Self::Index, path: &str) -> Result<(), Errno> {
+        let path: &Path = path.as_ref();
+        self.dir_rights.can(WASIRights::PATH_CREATE_DIRECTORY)?;
+
+        let mut ino = dir_ino;
+        let path_iter = path.iter();
+        for entry in path.iter() {
+            let entry = entry.to_str().ok_or(Errno::__WASI_ERRNO_ILSEQ)?;
+
+            match self.inodes.get(ino) {
+                Some(Inode::Dir(dir)) => {
+                    if let Some(sub_ino) = dir.find_inode(&entry) {
+                        ino = sub_ino;
+                    } else {
+                        ino = self.create_dir_inode(ino, &entry)?;
+                    }
+                }
+                Some(Inode::File(_)) => {
+                    return Err(Errno::__WASI_ERRNO_NOTDIR);
+                }
+                None => {
+                    return Err(Errno::__WASI_ERRNO_NOENT);
+                }
+            }
+        }
+        Ok(())
+    }
+
+    fn fclose(&mut self, ino: Self::Index) -> Result<(), Errno> {
+        let i = match self.inodes.get_mut(ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            Inode::Dir(dir) => dir.close(),
+            Inode::File(file) => file.close(),
+        };
+        log::trace!("WasiVirtualSys path_open {ino} close_r={i}");
+        if i == 0 {
+            self.inodes.remove(ino);
+        }
+        Ok(())
+    }
+
+    fn path_remove_directory(&mut self, dir_ino: Self::Index, path: &str) -> Result<(), Errno> {
+        self.dir_rights.can(WASIRights::PATH_REMOVE_DIRECTORY)?;
+        let inode = self.find_inode_index(dir_ino, &path)?;
+        if let (Inode::Dir(dir), Inode::Dir(parent_dir)) = self
+            .inodes
+            .get2_mut(inode, dir_ino)
+            .ok_or(Errno::__WASI_ERRNO_NOENT)?
+        {
+            if dir.is_empty() {
+                parent_dir.remove_sub_dir(&path)?;
+
+                if !dir.is_open() {
+                    self.inodes.remove(inode);
+                } else {
+                    dir.mark_remove();
+                }
+
+                Ok(())
+            } else {
+                Err(Errno::__WASI_ERRNO_NOTEMPTY)
+            }
+        } else {
+            Err(Errno::__WASI_ERRNO_NOTDIR)
+        }
+    }
+
+    fn path_unlink_file(&mut self, dir_ino: Self::Index, path: &str) -> Result<(), Errno> {
+        log::trace!("WasiVirtualSys path_unlink_file {dir_ino} {path}");
+        self.dir_rights.can(WASIRights::PATH_UNLINK_FILE)?;
+
+        let path: &Path = path.as_ref();
+        let parent_dir_ino = if let Some(parent) = path.parent() {
+            self.find_inode_index(dir_ino, &parent)?
+        } else {
+            dir_ino
+        };
+
+        let file_name = path
+            .file_name()
+            .ok_or(Errno::__WASI_ERRNO_INVAL)?
+            .to_str()
+            .ok_or(Errno::__WASI_ERRNO_ILSEQ)?;
+
+        let file_ino = if let Inode::Dir(dir) = self
+            .inodes
+            .get_mut(parent_dir_ino)
+            .ok_or(Errno::__WASI_ERRNO_BADF)?
+        {
+            let file_ino = dir
+                .find_inode(&file_name)
+                .ok_or(Errno::__WASI_ERRNO_NOENT)?;
+            dir.unlink_inode(&file_name)?;
+            file_ino
+        } else {
+            return Err(Errno::__WASI_ERRNO_NOTDIR);
+        };
+
+        if let Inode::File(file) = self
+            .inodes
+            .get_mut(file_ino)
+            .ok_or(Errno::__WASI_ERRNO_BADF)?
+        {
+            let link = file.dec_link()?;
+            log::trace!("WasiVirtualSys path_unlink_file {file_ino} nlink = {link}");
+
+            if link == 0 && !file.is_open() {
+                self.inodes.try_remove(file_ino);
+            }
+            Ok(())
+        } else {
+            Err(Errno::__WASI_ERRNO_ISDIR)
+        }
+    }
+
+    fn path_link_file(
+        &mut self,
+        old_dir: usize,
+        old_path: &str,
+        new_dir: usize,
+        new_path: &str,
+    ) -> Result<(), Errno> {
+        log::trace!("WasiVirtualSys path_link_file ({old_dir} {old_path})  ({new_dir} {new_path})");
+
+        let old_inode = self.find_inode_index(old_dir, &old_path)?;
+
+        let new_path: &Path = new_path.as_ref();
+        let parent_dir_ino = if let Some(parent) = new_path.parent() {
+            self.find_inode_index(new_dir, &parent)?
+        } else {
+            new_dir
+        };
+
+        let file_name = new_path
+            .file_name()
+            .ok_or(Errno::__WASI_ERRNO_INVAL)?
+            .to_str()
+            .ok_or(Errno::__WASI_ERRNO_ILSEQ)?;
+
+        if let Inode::Dir(dir) = self
+            .inodes
+            .get_mut(parent_dir_ino)
+            .ok_or(Errno::__WASI_ERRNO_BADF)?
+        {
+            dir.link_inode(&file_name, old_inode)?;
+        } else {
+            return Err(Errno::__WASI_ERRNO_NOTDIR);
+        };
+
+        if let Inode::File(file) = self
+            .inodes
+            .get_mut(old_inode)
+            .ok_or(Errno::__WASI_ERRNO_BADF)?
+        {
+            let nlink = file.inc_link()?;
+            log::trace!("WasiVirtualSys path_link_file {old_inode} nlink = {nlink}");
+        } else {
+            return Err(Errno::__WASI_ERRNO_ISDIR);
+        };
+
+        Ok(())
+    }
+
+    fn path_filestat_get(
+        &self,
+        dir_ino: Self::Index,
+        path: &str,
+        follow_symlinks: bool,
+    ) -> Result<Filestat, Errno> {
+        let path: &Path = path.as_ref();
+
+        self.dir_rights.can(WASIRights::PATH_FILESTAT_GET)?;
+        let inode = self.find_inode_index(dir_ino, &path)?;
+        self.inodes
+            .get(inode)
+            .ok_or(Errno::__WASI_ERRNO_NOENT)?
+            .fd_filestat_get()
+    }
+
+    fn get_mut_inode(&mut self, ino: usize) -> Result<&mut dyn WasiNode, Errno> {
+        Ok(self.inodes.get_mut(ino).ok_or(Errno::__WASI_ERRNO_BADF)?)
+    }
+
+    fn get_inode(&self, ino: usize) -> Result<&dyn WasiNode, Errno> {
+        Ok(self.inodes.get(ino).ok_or(Errno::__WASI_ERRNO_BADF)?)
+    }
+
+    fn get_mut_file(&mut self, ino: usize) -> Result<&mut dyn WasiFile, Errno> {
+        if let Inode::File(f) = self.inodes.get_mut(ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            Ok(f)
+        } else {
+            Err(Errno::__WASI_ERRNO_ISDIR)
+        }
+    }
+
+    fn get_file(&self, ino: usize) -> Result<&dyn WasiFile, Errno> {
+        if let Inode::File(f) = self.inodes.get(ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            Ok(f)
+        } else {
+            Err(Errno::__WASI_ERRNO_ISDIR)
+        }
+    }
+
+    fn get_mut_dir(&mut self, ino: usize) -> Result<&mut dyn WasiDir, Errno> {
+        if let Inode::Dir(dir) = self.inodes.get_mut(ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            Ok(dir)
+        } else {
+            Err(Errno::__WASI_ERRNO_NOTDIR)
+        }
+    }
+
+    fn get_dir(&self, ino: usize) -> Result<&dyn WasiDir, Errno> {
+        if let Inode::Dir(dir) = self.inodes.get(ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            Ok(dir)
+        } else {
+            Err(Errno::__WASI_ERRNO_NOTDIR)
+        }
+    }
+}
+
+// Real Disk
+
+fn get_file_ino(metadata: &std::fs::Metadata) -> u64 {
+    #[cfg(unix)]
+    {
+        use std::os::unix::prelude::MetadataExt;
+        metadata.ino()
+    }
+    #[cfg(not(unix))]
+    {
+        0
+    }
+}
+
+fn get_file_nlink(metadata: &std::fs::Metadata) -> u64 {
+    #[cfg(unix)]
+    {
+        use std::os::unix::prelude::MetadataExt;
+        metadata.nlink()
+    }
+    #[cfg(not(unix))]
+    {
+        1
+    }
+}
+
+fn systimespec(
+    set: bool,
+    ts: wasi_types::__wasi_timestamp_t,
+    now: bool,
+) -> Result<Option<SystemTimeSpec>, Errno> {
+    if set && now {
+        Err(Errno::__WASI_ERRNO_INVAL)
+    } else if set {
+        Ok(Some(SystemTimeSpec::Absolute(Duration::from_nanos(ts))))
+    } else if now {
+        Ok(Some(SystemTimeSpec::SymbolicNow))
+    } else {
+        Ok(None)
+    }
+}
+
+#[derive(Debug)]
+pub struct DiskDir {
+    // absolutize
+    pub real_path: PathBuf,
+    pub dir_rights: WASIRights,
+    pub file_rights: WASIRights,
+}
+
+impl DiskDir {
+    pub fn get_absolutize_path<P: AsRef<Path>>(&self, sub_path: &P) -> Result<PathBuf, Errno> {
+        use path_absolutize::*;
+        let new_path = self.real_path.join(sub_path);
+        let absolutize = new_path
+            .absolutize_virtually(&self.real_path)
+            .or(Err(Errno::__WASI_ERRNO_NOENT))?;
+        Ok(absolutize.to_path_buf())
+    }
+}
+
+impl WasiNode for DiskDir {
+    fn fd_fdstat_get(&self) -> Result<FdStat, Errno> {
+        Ok(FdStat {
+            filetype: FileType::DIRECTORY,
+            fs_rights_base: self.dir_rights.clone(),
+            fs_rights_inheriting: self.file_rights.clone(),
+            flags: FdFlags::empty(),
+        })
+    }
+
+    fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_fdstat_set_rights(
+        &mut self,
+        fs_rights_base: WASIRights,
+        fs_rights_inheriting: WASIRights,
+    ) -> Result<(), Errno> {
+        self.dir_rights.can(fs_rights_base.clone())?;
+        self.file_rights.can(fs_rights_inheriting.clone())?;
+
+        self.dir_rights = fs_rights_base;
+        self.file_rights = fs_rights_inheriting;
+
+        Ok(())
+    }
+
+    fn fd_filestat_get(&self) -> Result<Filestat, Errno> {
+        self.dir_rights.can(WASIRights::FD_FILESTAT_GET)?;
+        let meta = std::fs::metadata(&self.real_path)?;
+        let filetype = if meta.is_symlink() {
+            FileType::SYMBOLIC_LINK
+        } else {
+            FileType::DIRECTORY
+        };
+
+        let nlink = get_file_nlink(&meta);
+        let inode = get_file_ino(&meta);
+
+        Ok(Filestat {
+            filetype,
+            nlink,
+            inode,
+            size: meta.len(),
+            atim: meta.accessed().ok(),
+            mtim: meta.modified().ok(),
+            ctim: meta.created().ok(),
+        })
+    }
+
+    fn fd_filestat_set_size(&mut self, size: wasi_types::__wasi_filesize_t) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_filestat_set_times(
+        &mut self,
+        atim: wasi_types::__wasi_timestamp_t,
+        mtim: wasi_types::__wasi_timestamp_t,
+        fst_flags: wasi_types::__wasi_fstflags_t::Type,
+    ) -> Result<(), Errno> {
+        use wasi_types::__wasi_fstflags_t;
+        self.dir_rights.can(WASIRights::FD_FILESTAT_SET_TIMES)?;
+        Err(Errno::__WASI_ERRNO_NOSYS)
+    }
+}
+
+impl WasiDir for DiskDir {
+    fn get_readdir(&self, mut index: u64) -> Result<Vec<(String, u64, FileType)>, Errno> {
+        self.dir_rights.can(WASIRights::FD_READDIR)?;
+
+        let mut dirs = vec![];
+        if index == 0 {
+            let dir_meta = std::fs::metadata(&self.real_path)?;
+            let dir_ino = get_file_ino(&dir_meta);
+            dirs.push((".".to_string(), dir_ino, FileType::DIRECTORY));
+            index += 1;
+        }
+
+        if index == 1 {
+            let dir_ino = if let Some(parent) = self.real_path.parent() {
+                let dir_meta = std::fs::metadata(parent)?;
+                get_file_ino(&dir_meta)
+            } else {
+                0
+            };
+            dirs.push(("..".to_string(), dir_ino, FileType::DIRECTORY));
+            index += 1;
+        }
+
+        let read_dir = self.real_path.read_dir()?;
+
+        for dir_entity in read_dir.into_iter().skip((index - 2) as usize) {
+            let dir_entity = dir_entity?;
+            let name = dir_entity
+                .file_name()
+                .into_string()
+                .map_err(|_| Errno::__WASI_ERRNO_ILSEQ)?;
+            let metadata = dir_entity.metadata()?;
+            let inode = get_file_ino(&metadata);
+
+            let filetype = if metadata.is_dir() {
+                FileType::DIRECTORY
+            } else if metadata.is_symlink() {
+                FileType::SYMBOLIC_LINK
+            } else {
+                FileType::REGULAR_FILE
+            };
+
+            dirs.push((name, inode, filetype));
+        }
+
+        Ok(dirs)
+    }
+}
+
+#[derive(Debug)]
+pub struct DiskFile {
+    pub fd: std::fs::File,
+    pub flags: FdFlags,
+    pub right: WASIRights,
+}
+
+impl WasiNode for DiskFile {
+    fn fd_fdstat_get(&self) -> Result<FdStat, Errno> {
+        let meta = self.fd.metadata()?;
+        let fd_flags = FdStat {
+            filetype: if meta.is_symlink() {
+                FileType::SYMBOLIC_LINK
+            } else {
+                FileType::REGULAR_FILE
+            },
+            fs_rights_base: self.right.clone(),
+            fs_rights_inheriting: WASIRights::empty(),
+            flags: self.flags.clone(),
+        };
+        Ok(fd_flags)
+    }
+
+    fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno> {
+        self.right.can(WASIRights::FD_FDSTAT_SET_FLAGS)?;
+        if flags.contains(FdFlags::NONBLOCK)
+            && flags.intersects(FdFlags::DSYNC | FdFlags::SYNC | FdFlags::RSYNC)
+        {
+            return Err(Errno::__WASI_ERRNO_INVAL);
+        }
+        if flags.contains(FdFlags::APPEND) {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+        self.flags = flags;
+        Ok(())
+    }
+
+    fn fd_fdstat_set_rights(
+        &mut self,
+        fs_rights_base: WASIRights,
+        _fs_rights_inheriting: WASIRights,
+    ) -> Result<(), Errno> {
+        self.right.can(fs_rights_base.clone())?;
+        self.right = fs_rights_base;
+        Ok(())
+    }
+
+    fn fd_filestat_get(&self) -> Result<Filestat, Errno> {
+        self.right.can(WASIRights::FD_FILESTAT_GET)?;
+        let meta = self.fd.metadata()?;
+        let filetype = if meta.is_symlink() {
+            FileType::SYMBOLIC_LINK
+        } else {
+            FileType::REGULAR_FILE
+        };
+
+        let nlink = get_file_nlink(&meta);
+        let inode = get_file_ino(&meta);
+
+        Ok(Filestat {
+            filetype,
+            nlink,
+            inode,
+            size: meta.len(),
+            atim: meta.accessed().ok(),
+            mtim: meta.modified().ok(),
+            ctim: meta.created().ok(),
+        })
+    }
+
+    fn fd_filestat_set_size(&mut self, size: wasi_types::__wasi_filesize_t) -> Result<(), Errno> {
+        self.right.can(WASIRights::FD_FILESTAT_SET_SIZE)?;
+        self.fd.set_len(size)?;
+        Ok(())
+    }
+
+    fn fd_filestat_set_times(
+        &mut self,
+        atim: wasi_types::__wasi_timestamp_t,
+        mtim: wasi_types::__wasi_timestamp_t,
+        fst_flags: wasi_types::__wasi_fstflags_t::Type,
+    ) -> Result<(), Errno> {
+        use wasi_types::__wasi_fstflags_t;
+
+        self.right.can(WASIRights::FD_FILESTAT_SET_TIMES)?;
+
+        let set_atim = (fst_flags & __wasi_fstflags_t::__WASI_FSTFLAGS_ATIM) > 0;
+        let set_atim_now = (fst_flags & __wasi_fstflags_t::__WASI_FSTFLAGS_ATIM_NOW) > 0;
+        let set_mtim = (fst_flags & __wasi_fstflags_t::__WASI_FSTFLAGS_MTIM) > 0;
+        let set_mtim_now = (fst_flags & __wasi_fstflags_t::__WASI_FSTFLAGS_MTIM_NOW) > 0;
+
+        let atim = systimespec(set_atim, atim, set_atim_now)?;
+        let mtim = systimespec(set_mtim, mtim, set_mtim_now)?;
+
+        #[cfg(unix)]
+        {
+            use std::os::unix::prelude::AsRawFd;
+            let fd = self.fd.as_raw_fd();
+            let times = [
+                {
+                    match atim {
+                        Some(SystemTimeSpec::Absolute(atim)) => libc::timespec {
+                            tv_sec: atim.as_secs() as i64,
+                            tv_nsec: atim.subsec_nanos() as i64,
+                        },
+                        Some(SystemTimeSpec::SymbolicNow) => libc::timespec {
+                            tv_sec: 0,
+                            tv_nsec: libc::UTIME_NOW,
+                        },
+                        None => libc::timespec {
+                            tv_sec: 0,
+                            tv_nsec: libc::UTIME_OMIT,
+                        },
+                    }
+                },
+                {
+                    match mtim {
+                        Some(SystemTimeSpec::Absolute(mtim)) => libc::timespec {
+                            tv_sec: mtim.as_secs() as i64,
+                            tv_nsec: mtim.subsec_nanos() as i64,
+                        },
+                        Some(SystemTimeSpec::SymbolicNow) => libc::timespec {
+                            tv_sec: 0,
+                            tv_nsec: libc::UTIME_NOW,
+                        },
+                        None => libc::timespec {
+                            tv_sec: 0,
+                            tv_nsec: libc::UTIME_OMIT,
+                        },
+                    }
+                },
+            ];
+            if unsafe { libc::futimens(fd, times.as_ptr()) } < 0 {
+                Err(std::io::Error::last_os_error())?;
+            }
+            Ok(())
+        }
+        #[cfg(not(unix))]
+        {
+            Err(Errno::__WASI_ERRNO_NOSYS)
+        }
+    }
+}
+
+impl WasiFile for DiskFile {
+    fn fd_advise(
+        &mut self,
+        offset: wasi_types::__wasi_filesize_t,
+        len: wasi_types::__wasi_filesize_t,
+        advice: Advice,
+    ) -> Result<(), Errno> {
+        Ok(())
+    }
+
+    fn fd_allocate(
+        &mut self,
+        offset: wasi_types::__wasi_filesize_t,
+        len: wasi_types::__wasi_filesize_t,
+    ) -> Result<(), Errno> {
+        self.right.can(WASIRights::FD_ALLOCATE)?;
+        let f = &mut self.fd;
+        let metadata = f.metadata()?;
+        let file_len = metadata.len();
+        let new_len = offset + len;
+        if new_len > file_len {
+            let old_seek = f.stream_position()?;
+            f.set_len(new_len)?;
+            f.seek(std::io::SeekFrom::Start(old_seek))?;
+        }
+        Ok(())
+    }
+
+    fn fd_datasync(&mut self) -> Result<(), Errno> {
+        self.right.can(WASIRights::FD_DATASYNC)?;
+        self.fd.sync_data()?;
+        Ok(())
+    }
+
+    fn fd_sync(&mut self) -> Result<(), Errno> {
+        self.right.can(WASIRights::FD_SYNC)?;
+        self.fd.sync_all()?;
+        Ok(())
+    }
+
+    fn fd_read(&mut self, bufs: &mut [std::io::IoSliceMut<'_>]) -> Result<usize, Errno> {
+        self.right.can(WASIRights::FD_READ)?;
+        Ok(self.fd.read_vectored(bufs)?)
+    }
+
+    fn fd_pread(
+        &mut self,
+        bufs: &mut [std::io::IoSliceMut<'_>],
+        offset: wasi_types::__wasi_filesize_t,
+    ) -> Result<usize, Errno> {
+        use std::io::SeekFrom;
+
+        self.right.can(WASIRights::FD_READ | WASIRights::FD_SEEK)?;
+
+        let old_seek = self.fd.stream_position()?;
+        self.fd.seek(SeekFrom::Start(offset))?;
+        let r = self.fd.read_vectored(bufs);
+        self.fd.seek(SeekFrom::Start(old_seek))?;
+        Ok(r?)
+    }
+
+    fn fd_write(&mut self, bufs: &[std::io::IoSlice<'_>]) -> Result<usize, Errno> {
+        self.right.can(WASIRights::FD_WRITE)?;
+        Ok(self.fd.write_vectored(bufs)?)
+    }
+
+    fn fd_pwrite(
+        &mut self,
+        bufs: &[std::io::IoSlice<'_>],
+        offset: wasi_types::__wasi_filesize_t,
+    ) -> Result<usize, Errno> {
+        use std::io::SeekFrom;
+
+        self.right.can(WASIRights::FD_WRITE | WASIRights::FD_SEEK)?;
+
+        let old_seek = self.fd.stream_position()?;
+        self.fd.seek(SeekFrom::Start(offset))?;
+        let r = self.fd.write_vectored(bufs);
+        self.fd.seek(SeekFrom::Start(old_seek))?;
+        Ok(r?)
+    }
+
+    fn fd_seek(
+        &mut self,
+        offset: wasi_types::__wasi_filedelta_t,
+        whence: wasi_types::__wasi_whence_t::Type,
+    ) -> Result<wasi_types::__wasi_filesize_t, Errno> {
+        use std::io::SeekFrom;
+
+        let required_rigth =
+            if offset == 0 && whence == wasi_types::__wasi_whence_t::__WASI_WHENCE_CUR {
+                WASIRights::FD_TELL
+            } else {
+                WASIRights::FD_TELL | WASIRights::FD_SEEK
+            };
+
+        self.right.can(required_rigth)?;
+
+        let pos = match whence {
+            wasi_types::__wasi_whence_t::__WASI_WHENCE_CUR => SeekFrom::Current(offset),
+            wasi_types::__wasi_whence_t::__WASI_WHENCE_END => SeekFrom::End(offset),
+            wasi_types::__wasi_whence_t::__WASI_WHENCE_SET => SeekFrom::Start(offset as u64),
+            _ => return Err(Errno::__WASI_ERRNO_INVAL),
+        };
+
+        Ok(self.fd.seek(pos)?)
+    }
+
+    fn fd_tell(&mut self) -> Result<wasi_types::__wasi_filesize_t, Errno> {
+        use std::io::SeekFrom;
+        self.right.can(WASIRights::FD_TELL)?;
+        Ok(self.fd.stream_position()?)
+    }
+}
+
+pub enum DiskInode {
+    Dir(DiskDir),
+    File(DiskFile),
+}
+
+impl WasiNode for DiskInode {
+    fn fd_fdstat_get(&self) -> Result<FdStat, Errno> {
+        match self {
+            DiskInode::Dir(inode) => inode.fd_fdstat_get(),
+            DiskInode::File(inode) => inode.fd_fdstat_get(),
+        }
+    }
+
+    fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno> {
+        match self {
+            DiskInode::Dir(inode) => inode.fd_fdstat_set_flags(flags),
+            DiskInode::File(inode) => inode.fd_fdstat_set_flags(flags),
+        }
+    }
+
+    fn fd_fdstat_set_rights(
+        &mut self,
+        fs_rights_base: WASIRights,
+        fs_rights_inheriting: WASIRights,
+    ) -> Result<(), Errno> {
+        match self {
+            DiskInode::Dir(inode) => {
+                inode.fd_fdstat_set_rights(fs_rights_base, fs_rights_inheriting)
+            }
+            DiskInode::File(inode) => {
+                inode.fd_fdstat_set_rights(fs_rights_base, fs_rights_inheriting)
+            }
+        }
+    }
+
+    fn fd_filestat_get(&self) -> Result<Filestat, Errno> {
+        match self {
+            DiskInode::Dir(inode) => inode.fd_filestat_get(),
+            DiskInode::File(inode) => inode.fd_filestat_get(),
+        }
+    }
+
+    fn fd_filestat_set_size(&mut self, size: wasi_types::__wasi_filesize_t) -> Result<(), Errno> {
+        match self {
+            DiskInode::Dir(inode) => inode.fd_filestat_set_size(size),
+            DiskInode::File(inode) => inode.fd_filestat_set_size(size),
+        }
+    }
+
+    fn fd_filestat_set_times(
+        &mut self,
+        atim: wasi_types::__wasi_timestamp_t,
+        mtim: wasi_types::__wasi_timestamp_t,
+        fst_flags: wasi_types::__wasi_fstflags_t::Type,
+    ) -> Result<(), Errno> {
+        match self {
+            DiskInode::Dir(inode) => inode.fd_filestat_set_times(atim, mtim, fst_flags),
+            DiskInode::File(inode) => inode.fd_filestat_set_times(atim, mtim, fst_flags),
+        }
+    }
+}
+
+pub struct DiskFileSys {
+    real_path: PathBuf,
+    inodes: slab::Slab<DiskInode>,
+    dir_rights: WASIRights,
+    file_rights: WASIRights,
+}
+
+impl DiskFileSys {
+    pub fn new(host_path: PathBuf) -> std::io::Result<Self> {
+        let host_path = host_path.canonicalize()?;
+        let mut inodes = Slab::new();
+
+        inodes.insert(DiskInode::Dir(DiskDir {
+            real_path: host_path.clone(),
+            dir_rights: WASIRights::dir_all(),
+            file_rights: WASIRights::fd_all(),
+        }));
+
+        Ok(DiskFileSys {
+            inodes,
+            real_path: host_path,
+            dir_rights: WASIRights::dir_all(),
+            file_rights: WASIRights::fd_all(),
+        })
+    }
+
+    pub fn get_absolutize_path<P: AsRef<Path>>(&self, sub_path: &P) -> Result<PathBuf, Errno> {
+        use path_absolutize::*;
+        let new_path = self.real_path.join(sub_path);
+        let absolutize = new_path
+            .absolutize_virtually(&self.real_path)
+            .or(Err(Errno::__WASI_ERRNO_NOENT))?;
+        Ok(absolutize.to_path_buf())
+    }
+}
+
+impl WasiFileSys for DiskFileSys {
+    type Index = usize;
+
+    fn path_open(
+        &mut self,
+        dir_ino: Self::Index,
+        path: &str,
+        oflags: OFlags,
+        fs_rights_base: WASIRights,
+        fs_rights_inheriting: WASIRights,
+        fdflags: FdFlags,
+    ) -> Result<Self::Index, Errno> {
+        if fdflags.intersects(FdFlags::DSYNC | FdFlags::SYNC | FdFlags::RSYNC) {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+
+        if oflags.intersects(OFlags::DIRECTORY)
+            && (oflags.contains(OFlags::CREATE)
+                || oflags.contains(OFlags::EXCLUSIVE)
+                || oflags.contains(OFlags::TRUNCATE))
+        {
+            return Err(Errno::__WASI_ERRNO_INVAL);
+        }
+
+        let parent_dir = match self.inodes.get(dir_ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            DiskInode::Dir(dir) => dir,
+            _ => return Err(Errno::__WASI_ERRNO_NOTDIR),
+        };
+
+        let path = parent_dir.get_absolutize_path(&path)?;
+        if path == self.real_path {
+            return Ok(0);
+        }
+
+        log::trace!("DiskFileSys path_open({path:?},{oflags:?})");
+
+        let path_meta = std::fs::metadata(&path).ok();
+        match path_meta {
+            Some(meta) if meta.is_dir() => {
+                let dir_rights = self.dir_rights.clone() & fs_rights_base;
+                let file_rights = self.file_rights.clone() & fs_rights_inheriting;
+                let ino = self.inodes.insert(DiskInode::Dir(DiskDir {
+                    real_path: path,
+                    dir_rights,
+                    file_rights,
+                }));
+                return Ok(ino);
+            }
+            _ => {
+                if oflags.contains(OFlags::DIRECTORY) {
+                    return Err(Errno::__WASI_ERRNO_NOTDIR);
+                }
+            }
+        }
+
+        let read = fs_rights_base.contains(WASIRights::FD_READ);
+        let write = fs_rights_base.contains(WASIRights::FD_WRITE);
+
+        let mut opts = std::fs::OpenOptions::new();
+
+        if oflags.contains(OFlags::CREATE | OFlags::EXCLUSIVE) {
+            opts.create_new(true);
+            opts.write(true);
+        } else if oflags.contains(OFlags::CREATE) {
+            opts.create(true);
+            opts.write(true);
+        }
+
+        if oflags.contains(OFlags::TRUNCATE) {
+            opts.truncate(true);
+        }
+        if read {
+            opts.read(true);
+        }
+
+        if write {
+            opts.write(true);
+        } else {
+            opts.read(true);
+        }
+
+        if fdflags.contains(FdFlags::APPEND) {
+            opts.append(true);
+        }
+
+        let fd = opts.open(path)?;
+
+        let ino = self.inodes.insert(DiskInode::File(DiskFile {
+            fd,
+            flags: fdflags,
+            right: fs_rights_base,
+        }));
+
+        Ok(ino)
+    }
+
+    fn path_rename(
+        &mut self,
+        old_dir: usize,
+        old_path: &str,
+        new_dir: usize,
+        new_path: &str,
+    ) -> Result<(), Errno> {
+        let old_parent_dir = match self.inodes.get(old_dir).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            DiskInode::Dir(dir) => dir,
+            _ => return Err(Errno::__WASI_ERRNO_NOTDIR),
+        };
+
+        let old_path = old_parent_dir.get_absolutize_path(&old_path)?;
+
+        let new_parent_dir = match self.inodes.get(new_dir).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            DiskInode::Dir(dir) => dir,
+            _ => return Err(Errno::__WASI_ERRNO_NOTDIR),
+        };
+        let new_path = new_parent_dir.get_absolutize_path(&new_path)?;
+
+        Ok(std::fs::rename(old_path, new_path)?)
+    }
+
+    fn path_create_directory(&mut self, dir_ino: Self::Index, path: &str) -> Result<(), Errno> {
+        self.dir_rights.can(WASIRights::PATH_CREATE_DIRECTORY)?;
+        let parent_dir = match self.inodes.get(dir_ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            DiskInode::Dir(dir) => dir,
+            _ => return Err(Errno::__WASI_ERRNO_NOTDIR),
+        };
+        let new_path = parent_dir.get_absolutize_path(&path)?;
+        std::fs::DirBuilder::new()
+            .recursive(true)
+            .create(new_path)?;
+        Ok(())
+    }
+
+    fn path_remove_directory(&mut self, dir_ino: Self::Index, path: &str) -> Result<(), Errno> {
+        self.dir_rights.can(WASIRights::PATH_REMOVE_DIRECTORY)?;
+        let parent_dir = match self.inodes.get(dir_ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            DiskInode::Dir(dir) => dir,
+            _ => return Err(Errno::__WASI_ERRNO_NOTDIR),
+        };
+        let new_path = parent_dir.get_absolutize_path(&path)?;
+        log::trace!("DiskFileSys path_remove_directory {new_path:?}");
+        std::fs::remove_dir(new_path)?;
+        Ok(())
+    }
+
+    fn path_unlink_file(&mut self, dir_ino: Self::Index, path: &str) -> Result<(), Errno> {
+        self.dir_rights.can(WASIRights::PATH_REMOVE_DIRECTORY)?;
+        let parent_dir = match self.inodes.get(dir_ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            DiskInode::Dir(dir) => dir,
+            _ => return Err(Errno::__WASI_ERRNO_NOTDIR),
+        };
+        let new_path = parent_dir.get_absolutize_path(&path)?;
+        std::fs::remove_file(new_path)?;
+        Ok(())
+    }
+
+    fn path_link_file(
+        &mut self,
+        old_dir: Self::Index,
+        old_path: &str,
+        new_dir: Self::Index,
+        new_path: &str,
+    ) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_NOSYS)
+    }
+
+    fn path_filestat_get(
+        &self,
+        dir_ino: Self::Index,
+        path: &str,
+        follow_symlinks: bool,
+    ) -> Result<Filestat, Errno> {
+        self.dir_rights.can(WASIRights::PATH_FILESTAT_GET)?;
+
+        let parent_dir = match self.inodes.get(dir_ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            DiskInode::Dir(dir) => dir,
+            _ => return Err(Errno::__WASI_ERRNO_NOTDIR),
+        };
+        let new_path = parent_dir.get_absolutize_path(&path)?;
+
+        let meta = if follow_symlinks {
+            std::fs::metadata(new_path)?
+        } else {
+            std::fs::symlink_metadata(new_path)?
+        };
+
+        let filetype = if meta.is_symlink() {
+            FileType::SYMBOLIC_LINK
+        } else if meta.is_dir() {
+            FileType::DIRECTORY
+        } else {
+            FileType::REGULAR_FILE
+        };
+
+        let nlink = get_file_nlink(&meta);
+        let inode = get_file_ino(&meta);
+
+        Ok(Filestat {
+            filetype,
+            inode,
+            nlink,
+            size: meta.len(),
+            atim: meta.accessed().ok(),
+            mtim: meta.modified().ok(),
+            ctim: meta.created().ok(),
+        })
+    }
+
+    fn fclose(&mut self, ino: Self::Index) -> Result<(), Errno> {
+        self.inodes.try_remove(ino);
+        Ok(())
+    }
+
+    fn get_mut_inode(&mut self, ino: usize) -> Result<&mut dyn WasiNode, Errno> {
+        Ok(self.inodes.get_mut(ino).ok_or(Errno::__WASI_ERRNO_BADF)?)
+    }
+
+    fn get_inode(&self, ino: usize) -> Result<&dyn WasiNode, Errno> {
+        Ok(self.inodes.get(ino).ok_or(Errno::__WASI_ERRNO_BADF)?)
+    }
+
+    fn get_mut_file(&mut self, ino: usize) -> Result<&mut dyn WasiFile, Errno> {
+        match self.inodes.get_mut(ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            DiskInode::File(f) => Ok(f),
+            _ => Err(Errno::__WASI_ERRNO_ISDIR),
+        }
+    }
+
+    fn get_file(&self, ino: usize) -> Result<&dyn WasiFile, Errno> {
+        match self.inodes.get(ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            DiskInode::File(f) => Ok(f),
+            _ => Err(Errno::__WASI_ERRNO_ISDIR),
+        }
+    }
+
+    fn get_mut_dir(&mut self, ino: usize) -> Result<&mut dyn WasiDir, Errno> {
+        match self.inodes.get_mut(ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            DiskInode::Dir(dir) => Ok(dir),
+            _ => Err(Errno::__WASI_ERRNO_NOTDIR),
+        }
+    }
+
+    fn get_dir(&self, ino: usize) -> Result<&dyn WasiDir, Errno> {
+        match self.inodes.get(ino).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            DiskInode::Dir(dir) => Ok(dir),
+            _ => Err(Errno::__WASI_ERRNO_NOTDIR),
+        }
+    }
+}
+
+// pipeline
+pub struct OutPipeline<W: Write>(W);
+impl<W: Write> From<W> for OutPipeline<W> {
+    fn from(value: W) -> Self {
+        Self(value)
+    }
+}
+impl<W: Write> WasiNode for OutPipeline<W> {
+    fn fd_fdstat_get(&self) -> Result<FdStat, Errno> {
+        Ok(FdStat {
+            filetype: FileType::CHARACTER_DEVICE,
+            fs_rights_base: WASIRights::FD_WRITE | WASIRights::POLL_FD_READWRITE,
+            fs_rights_inheriting: WASIRights::empty(),
+            flags: FdFlags::APPEND,
+        })
+    }
+
+    fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_fdstat_set_rights(
+        &mut self,
+        fs_rights_base: WASIRights,
+        _fs_rights_inheriting: WASIRights,
+    ) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_filestat_get(&self) -> Result<Filestat, Errno> {
+        Ok(Filestat {
+            filetype: FileType::CHARACTER_DEVICE,
+            nlink: 0,
+            inode: 0,
+            size: 0,
+            atim: None,
+            mtim: None,
+            ctim: None,
+        })
+    }
+
+    fn fd_filestat_set_size(&mut self, size: wasi_types::__wasi_filesize_t) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_filestat_set_times(
+        &mut self,
+        atim: wasi_types::__wasi_timestamp_t,
+        mtim: wasi_types::__wasi_timestamp_t,
+        fst_flags: wasi_types::__wasi_fstflags_t::Type,
+    ) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+}
+impl<W: Write> WasiFile for OutPipeline<W> {
+    fn fd_advise(
+        &mut self,
+        offset: wasi_types::__wasi_filesize_t,
+        len: wasi_types::__wasi_filesize_t,
+        advice: Advice,
+    ) -> Result<(), Errno> {
+        Ok(())
+    }
+
+    fn fd_allocate(
+        &mut self,
+        offset: wasi_types::__wasi_filesize_t,
+        len: wasi_types::__wasi_filesize_t,
+    ) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_datasync(&mut self) -> Result<(), Errno> {
+        self.0.flush()?;
+        Ok(())
+    }
+
+    fn fd_sync(&mut self) -> Result<(), Errno> {
+        self.0.flush()?;
+        Ok(())
+    }
+
+    fn fd_read(&mut self, bufs: &mut [std::io::IoSliceMut<'_>]) -> Result<usize, Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_pread(
+        &mut self,
+        bufs: &mut [std::io::IoSliceMut<'_>],
+        offset: wasi_types::__wasi_filesize_t,
+    ) -> Result<usize, Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_write(&mut self, bufs: &[std::io::IoSlice<'_>]) -> Result<usize, Errno> {
+        Ok(self.0.write_vectored(bufs)?)
+    }
+
+    fn fd_pwrite(
+        &mut self,
+        bufs: &[std::io::IoSlice<'_>],
+        offset: wasi_types::__wasi_filesize_t,
+    ) -> Result<usize, Errno> {
+        Err(Errno::__WASI_ERRNO_SPIPE)
+    }
+
+    fn fd_seek(
+        &mut self,
+        offset: wasi_types::__wasi_filedelta_t,
+        whence: wasi_types::__wasi_whence_t::Type,
+    ) -> Result<wasi_types::__wasi_filesize_t, Errno> {
+        Err(Errno::__WASI_ERRNO_SPIPE)
+    }
+
+    fn fd_tell(&mut self) -> Result<wasi_types::__wasi_filesize_t, Errno> {
+        Err(Errno::__WASI_ERRNO_SPIPE)
+    }
+}
+
+pub struct InPipline<R: Read>(R);
+impl<R: Read> From<R> for InPipline<R> {
+    fn from(value: R) -> Self {
+        Self(value)
+    }
+}
+impl<R: Read> WasiNode for InPipline<R> {
+    fn fd_fdstat_get(&self) -> Result<FdStat, Errno> {
+        Ok(FdStat {
+            filetype: FileType::CHARACTER_DEVICE,
+            fs_rights_base: WASIRights::FD_READ | WASIRights::POLL_FD_READWRITE,
+            fs_rights_inheriting: WASIRights::empty(),
+            flags: FdFlags::empty(),
+        })
+    }
+
+    fn fd_fdstat_set_flags(&mut self, flags: FdFlags) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_fdstat_set_rights(
+        &mut self,
+        fs_rights_base: WASIRights,
+        _fs_rights_inheriting: WASIRights,
+    ) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_filestat_get(&self) -> Result<Filestat, Errno> {
+        Ok(Filestat {
+            filetype: FileType::CHARACTER_DEVICE,
+            nlink: 0,
+            inode: 0,
+            size: 0,
+            atim: None,
+            mtim: None,
+            ctim: None,
+        })
+    }
+
+    fn fd_filestat_set_size(&mut self, size: wasi_types::__wasi_filesize_t) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_filestat_set_times(
+        &mut self,
+        atim: wasi_types::__wasi_timestamp_t,
+        mtim: wasi_types::__wasi_timestamp_t,
+        fst_flags: wasi_types::__wasi_fstflags_t::Type,
+    ) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+}
+impl<R: Read> WasiFile for InPipline<R> {
+    fn fd_advise(
+        &mut self,
+        offset: wasi_types::__wasi_filesize_t,
+        len: wasi_types::__wasi_filesize_t,
+        advice: Advice,
+    ) -> Result<(), Errno> {
+        Ok(())
+    }
+
+    fn fd_allocate(
+        &mut self,
+        offset: wasi_types::__wasi_filesize_t,
+        len: wasi_types::__wasi_filesize_t,
+    ) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_datasync(&mut self) -> Result<(), Errno> {
+        Ok(())
+    }
+
+    fn fd_sync(&mut self) -> Result<(), Errno> {
+        Ok(())
+    }
+
+    fn fd_read(&mut self, bufs: &mut [std::io::IoSliceMut<'_>]) -> Result<usize, Errno> {
+        Ok(self.0.read_vectored(bufs)?)
+    }
+
+    fn fd_pread(
+        &mut self,
+        bufs: &mut [std::io::IoSliceMut<'_>],
+        offset: wasi_types::__wasi_filesize_t,
+    ) -> Result<usize, Errno> {
+        Err(Errno::__WASI_ERRNO_SPIPE)
+    }
+
+    fn fd_write(&mut self, bufs: &[std::io::IoSlice<'_>]) -> Result<usize, Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_pwrite(
+        &mut self,
+        bufs: &[std::io::IoSlice<'_>],
+        offset: wasi_types::__wasi_filesize_t,
+    ) -> Result<usize, Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn fd_seek(
+        &mut self,
+        offset: wasi_types::__wasi_filedelta_t,
+        whence: wasi_types::__wasi_whence_t::Type,
+    ) -> Result<wasi_types::__wasi_filesize_t, Errno> {
+        Err(Errno::__WASI_ERRNO_SPIPE)
+    }
+
+    fn fd_tell(&mut self) -> Result<wasi_types::__wasi_filesize_t, Errno> {
+        Err(Errno::__WASI_ERRNO_SPIPE)
+    }
+}
+
+pub struct StdioSys<IN, OUT, ERR>
+where
+    IN: std::io::Read,
+    OUT: std::io::Write,
+    ERR: std::io::Write,
+{
+    stdin: InPipline<IN>,
+    stdout: OutPipeline<OUT>,
+    stderr: OutPipeline<ERR>,
+}
+
+impl<IN, OUT, ERR> StdioSys<IN, OUT, ERR>
+where
+    IN: std::io::Read,
+    OUT: std::io::Write,
+    ERR: std::io::Write,
+{
+    pub fn new(stdin: IN, stdout: OUT, stderr: ERR) -> Self {
+        Self {
+            stdin: InPipline(stdin),
+            stdout: OutPipeline(stdout),
+            stderr: OutPipeline(stderr),
+        }
+    }
+}
+
+impl<IN, OUT, ERR> WasiFileSys for StdioSys<IN, OUT, ERR>
+where
+    IN: std::io::Read,
+    OUT: std::io::Write,
+    ERR: std::io::Write,
+{
+    type Index = usize;
+
+    fn path_open(
+        &mut self,
+        dir_ino: usize,
+        path: &str,
+        oflags: OFlags,
+        fs_rights_base: WASIRights,
+        fs_rights_inheriting: WASIRights,
+        fdflags: FdFlags,
+    ) -> Result<Self::Index, Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn path_rename(
+        &mut self,
+        old_dir: usize,
+        old_path: &str,
+        new_dir: usize,
+        new_path: &str,
+    ) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn path_create_directory(&mut self, dir_ino: usize, path: &str) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn path_remove_directory(&mut self, dir_ino: usize, path: &str) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn path_unlink_file(&mut self, dir_ino: Self::Index, path: &str) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn path_link_file(
+        &mut self,
+        old_dir: Self::Index,
+        old_path: &str,
+        new_dir: Self::Index,
+        new_path: &str,
+    ) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn path_filestat_get(
+        &self,
+        dir_ino: usize,
+        path: &str,
+        follow_symlinks: bool,
+    ) -> Result<Filestat, Errno> {
+        Err(Errno::__WASI_ERRNO_BADF)
+    }
+
+    fn get_mut_inode(&mut self, ino: usize) -> Result<&mut dyn WasiNode, Errno> {
+        match ino {
+            0 => Ok(&mut self.stdin),
+            1 => Ok(&mut self.stdout),
+            2 => Ok(&mut self.stderr),
+            _ => Err(Errno::__WASI_ERRNO_BADF),
+        }
+    }
+
+    fn get_inode(&self, ino: usize) -> Result<&dyn WasiNode, Errno> {
+        match ino {
+            0 => Ok(&self.stdin),
+            1 => Ok(&self.stdout),
+            2 => Ok(&self.stderr),
+            _ => Err(Errno::__WASI_ERRNO_BADF),
+        }
+    }
+
+    fn get_mut_file(&mut self, ino: usize) -> Result<&mut dyn WasiFile, Errno> {
+        match ino {
+            0 => Ok(&mut self.stdin),
+            1 => Ok(&mut self.stdout),
+            2 => Ok(&mut self.stderr),
+            _ => Err(Errno::__WASI_ERRNO_BADF),
+        }
+    }
+
+    fn get_file(&self, ino: usize) -> Result<&dyn WasiFile, Errno> {
+        match ino {
+            0 => Ok(&self.stdin),
+            1 => Ok(&self.stdout),
+            2 => Ok(&self.stderr),
+            _ => Err(Errno::__WASI_ERRNO_BADF),
+        }
+    }
+
+    fn get_mut_dir(&mut self, ino: usize) -> Result<&mut dyn WasiDir, Errno> {
+        Err(Errno::__WASI_ERRNO_NOTDIR)
+    }
+
+    fn get_dir(&self, ino: usize) -> Result<&dyn WasiDir, Errno> {
+        Err(Errno::__WASI_ERRNO_NOTDIR)
+    }
+}
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/env.rs.html b/src/async_wasi/snapshots/env.rs.html new file mode 100644 index 000000000..fdb47f69e --- /dev/null +++ b/src/async_wasi/snapshots/env.rs.html @@ -0,0 +1,743 @@ +env.rs - source

async_wasi/snapshots/
env.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
use std::fmt::Debug;
+
+use self::vfs::{virtual_sys::StdioSys, WasiDir, WasiFile, WasiFileSys, WasiNode};
+
+pub use super::common::{error::Errno, types as wasi_types, vfs};
+
+#[cfg(all(unix, feature = "async_tokio"))]
+pub use super::common::net::async_tokio::AsyncWasiSocket;
+
+#[derive(Debug)]
+pub enum VFD {
+    Inode {
+        dev: usize,
+        ino: usize,
+    },
+    #[cfg(all(unix, feature = "async_tokio"))]
+    AsyncSocket(AsyncWasiSocket),
+}
+
+impl VFD {
+    #[cfg(all(unix, feature = "async_tokio"))]
+    pub fn is_socket(&self) -> bool {
+        matches!(self, VFD::AsyncSocket(_))
+    }
+
+    pub fn is_inode(&self) -> bool {
+        matches!(self, VFD::Inode { .. })
+    }
+}
+
+pub trait AsyncVM: Send + Sync {
+    fn yield_now(&mut self) -> Result<(), Errno>;
+}
+
+pub struct VFS {
+    vfs: slab::Slab<Box<dyn WasiFileSys<Index = usize> + Send + Sync>>,
+    preopens: Vec<(String, usize)>,
+    fds: slab::Slab<VFD>,
+}
+
+impl Debug for VFS {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        f.debug_struct("VFS")
+            .field("preopens", &self.preopens)
+            .field("fds", &self.fds)
+            .finish()
+    }
+}
+
+impl VFS {
+    pub fn new_with_stdio<IN, OUT, ERR>(stdio_sys: StdioSys<IN, OUT, ERR>) -> Self
+    where
+        IN: std::io::Read + Send + Sync + 'static,
+        OUT: std::io::Write + Send + Sync + 'static,
+        ERR: std::io::Write + Send + Sync + 'static,
+    {
+        let mut vfs: slab::Slab<Box<dyn WasiFileSys<Index = usize> + Send + Sync>> =
+            slab::Slab::new();
+        let dev = vfs.insert(Box::new(stdio_sys));
+
+        let mut fds = slab::Slab::with_capacity(3);
+        fds.insert(VFD::Inode { dev, ino: 0 });
+        fds.insert(VFD::Inode { dev, ino: 1 });
+        fds.insert(VFD::Inode { dev, ino: 2 });
+
+        Self {
+            vfs,
+            preopens: vec![],
+            fds,
+        }
+    }
+
+    pub fn new() -> Self {
+        let stdio_sys = StdioSys::new(std::io::stdin(), std::io::stdout(), std::io::stderr());
+        let mut vfs: slab::Slab<Box<dyn WasiFileSys<Index = usize> + Send + Sync>> =
+            slab::Slab::new();
+        let dev = vfs.insert(Box::new(stdio_sys));
+
+        let mut fds = slab::Slab::with_capacity(3);
+        fds.insert(VFD::Inode { dev, ino: 0 });
+        fds.insert(VFD::Inode { dev, ino: 1 });
+        fds.insert(VFD::Inode { dev, ino: 2 });
+
+        Self {
+            vfs,
+            preopens: vec![],
+            fds,
+        }
+    }
+
+    pub fn mount_file_sys(
+        &mut self,
+        path: &str,
+        file_sys: Box<dyn WasiFileSys<Index = usize> + Send + Sync>,
+    ) {
+        let vfs_id = self.vfs.insert(file_sys);
+        self.preopens.push((path.to_string(), vfs_id));
+        self.fds.insert(VFD::Inode {
+            dev: vfs_id,
+            ino: 0,
+        });
+    }
+}
+
+impl VFS {
+    pub fn path_open(
+        &mut self,
+        dirfd: usize,
+        path: &str,
+        oflags: vfs::OFlags,
+        fs_rights_base: vfs::WASIRights,
+        fs_rights_inheriting: vfs::WASIRights,
+        fdflags: vfs::FdFlags,
+    ) -> Result<usize, Errno> {
+        log::trace!("path_open {dirfd} {path}");
+        let (dev, ino) = self.get_inode_index(dirfd)?;
+        let vfs = self.vfs.get_mut(dev).ok_or(Errno::__WASI_ERRNO_BADF)?;
+        let ino = vfs.path_open(
+            ino,
+            path,
+            oflags,
+            fs_rights_base,
+            fs_rights_inheriting,
+            fdflags,
+        )?;
+        log::trace!("path_open {dirfd} {path} fd=({dev},{ino})");
+
+        if ino != 0 {
+            Ok(self.fds.insert(VFD::Inode { dev, ino }))
+        } else {
+            Ok(dirfd)
+        }
+    }
+
+    pub fn path_rename(
+        &mut self,
+        old_dir_fd: usize,
+        old_path: &str,
+        new_dir_fd: usize,
+        new_path: &str,
+    ) -> Result<(), Errno> {
+        log::trace!(
+            "path_rename {:?} {:?}",
+            (old_dir_fd, old_path),
+            (new_dir_fd, new_path)
+        );
+
+        let (dev0, ino0, dev1, ino1) = if old_dir_fd == new_dir_fd {
+            if let VFD::Inode { dev, ino } =
+                self.fds.get(old_dir_fd).ok_or(Errno::__WASI_ERRNO_BADF)?
+            {
+                (*dev, *ino, *dev, *ino)
+            } else {
+                return Err(Errno::__WASI_ERRNO_BADF);
+            }
+        } else if let (
+            VFD::Inode {
+                dev: dev0,
+                ino: ino0,
+            },
+            VFD::Inode {
+                dev: dev1,
+                ino: ino1,
+            },
+        ) = self
+            .fds
+            .get2_mut(old_dir_fd, new_dir_fd)
+            .ok_or(Errno::__WASI_ERRNO_BADF)?
+        {
+            (*dev0, *ino0, *dev1, *ino1)
+        } else {
+            return Err(Errno::__WASI_ERRNO_BADF);
+        };
+
+        if dev0 != dev1 {
+            return Err(Errno::__WASI_ERRNO_XDEV);
+        }
+
+        if ino0 != 0 || ino1 != 0 {
+            return Err(Errno::__WASI_ERRNO_ACCES);
+        }
+
+        let vfs = self.vfs.get_mut(dev0).ok_or(Errno::__WASI_ERRNO_BADF)?;
+        vfs.path_rename(ino0, old_path, ino1, new_path)
+    }
+
+    pub fn fd_preopen_get(&mut self, fd: usize) -> Result<String, Errno> {
+        log::trace!("fd_preopen_get({fd})");
+        if fd < 3 {
+            return Err(Errno::__WASI_ERRNO_BADF);
+        }
+        let fd = fd - 3;
+        Ok(self
+            .preopens
+            .get(fd)
+            .ok_or(Errno::__WASI_ERRNO_BADF)?
+            .0
+            .clone())
+    }
+
+    pub fn fd_renumber(&mut self, _from: usize, _to: usize) -> Result<(), Errno> {
+        Err(Errno::__WASI_ERRNO_NOTSUP)
+    }
+
+    pub fn fd_advise(
+        &mut self,
+        _fd: usize,
+        _offset: wasi_types::__wasi_filesize_t,
+        _len: wasi_types::__wasi_filesize_t,
+        _advice: wasi_types::__wasi_advice_t::Type,
+    ) -> Result<(), Errno> {
+        Ok(())
+    }
+
+    pub fn fd_close(&mut self, fd: usize) -> Result<(), Errno> {
+        match self.fds.get(fd) {
+            Some(VFD::Inode { dev, ino }) => {
+                if *ino == 0 {
+                    return Err(Errno::__WASI_ERRNO_NOTSUP);
+                }
+                if let Some(vfs) = self.vfs.get_mut(*dev) {
+                    log::trace!("fclose fd=({},{})", *dev, *ino);
+                    vfs.fclose(*ino)?;
+                }
+                self.fds.remove(fd);
+            }
+            Some(VFD::AsyncSocket(_)) => {
+                self.fds.remove(fd);
+            }
+            None => {}
+        }
+
+        Ok(())
+    }
+
+    pub fn path_filestat_get(
+        &self,
+        dir_fd: usize,
+        path: &str,
+        follow_symlinks: bool,
+    ) -> Result<(u64, vfs::Filestat), Errno> {
+        let (dev, ino) = self.get_inode_index(dir_fd)?;
+        let vfs = self.vfs.get(dev).ok_or(Errno::__WASI_ERRNO_BADF)?;
+        Ok((
+            dev as u64,
+            vfs.path_filestat_get(ino, path, follow_symlinks)?,
+        ))
+    }
+
+    pub fn path_create_directory(&mut self, dir_fd: usize, path: &str) -> Result<(), Errno> {
+        let (dev, ino) = self.get_inode_index(dir_fd)?;
+        let vfs = self.vfs.get_mut(dev).ok_or(Errno::__WASI_ERRNO_BADF)?;
+        vfs.path_create_directory(ino, path)
+    }
+
+    pub fn path_remove_directory(&mut self, dir_fd: usize, path: &str) -> Result<(), Errno> {
+        let (dev, ino) = self.get_inode_index(dir_fd)?;
+        let vfs = self.vfs.get_mut(dev).ok_or(Errno::__WASI_ERRNO_BADF)?;
+        vfs.path_remove_directory(ino, path)
+    }
+
+    pub fn path_unlink_file(&mut self, dir_fd: usize, path: &str) -> Result<(), Errno> {
+        let (dev, ino) = self.get_inode_index(dir_fd)?;
+        let vfs = self.vfs.get_mut(dev).ok_or(Errno::__WASI_ERRNO_BADF)?;
+        vfs.path_unlink_file(ino, path)
+    }
+
+    fn get_inode_index(&self, fd: usize) -> Result<(usize, usize), Errno> {
+        if let VFD::Inode { dev, ino } = self.fds.get(fd).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            Ok((*dev, *ino))
+        } else {
+            Err(Errno::__WASI_ERRNO_NOTDIR)
+        }
+    }
+
+    pub fn get_mut_inode(&mut self, fd: usize) -> Result<&mut dyn WasiNode, Errno> {
+        log::trace!("get_mut_inode {fd}");
+
+        let (dev, ino) =
+            if let VFD::Inode { dev, ino } = self.fds.get(fd).ok_or(Errno::__WASI_ERRNO_BADF)? {
+                (*dev, *ino)
+            } else {
+                return Err(Errno::__WASI_ERRNO_BADF);
+            };
+        let vfs = self.vfs.get_mut(dev).ok_or(Errno::__WASI_ERRNO_BADF)?;
+        vfs.get_mut_inode(ino)
+    }
+    pub fn get_inode(&self, fd: usize) -> Result<&dyn WasiNode, Errno> {
+        log::trace!("get_inode {fd}");
+
+        let (dev, ino) =
+            if let VFD::Inode { dev, ino } = self.fds.get(fd).ok_or(Errno::__WASI_ERRNO_BADF)? {
+                (*dev, *ino)
+            } else {
+                return Err(Errno::__WASI_ERRNO_BADF);
+            };
+        let vfs = self.vfs.get(dev).ok_or(Errno::__WASI_ERRNO_BADF)?;
+        vfs.get_inode(ino)
+    }
+
+    pub fn get_mut_file(&mut self, fd: usize) -> Result<&mut dyn WasiFile, Errno> {
+        log::trace!("get_mut_file {fd}");
+
+        let (dev, ino) =
+            if let VFD::Inode { dev, ino } = self.fds.get(fd).ok_or(Errno::__WASI_ERRNO_BADF)? {
+                (*dev, *ino)
+            } else {
+                return Err(Errno::__WASI_ERRNO_BADF);
+            };
+        let vfs = self.vfs.get_mut(dev).ok_or(Errno::__WASI_ERRNO_BADF)?;
+        vfs.get_mut_file(ino)
+    }
+    pub fn get_file(&self, fd: usize) -> Result<&dyn WasiFile, Errno> {
+        log::trace!("get_file {fd}");
+
+        let (dev, ino) =
+            if let VFD::Inode { dev, ino } = self.fds.get(fd).ok_or(Errno::__WASI_ERRNO_BADF)? {
+                (*dev, *ino)
+            } else {
+                return Err(Errno::__WASI_ERRNO_BADF);
+            };
+        let vfs = self.vfs.get(dev).ok_or(Errno::__WASI_ERRNO_BADF)?;
+        vfs.get_file(ino)
+    }
+
+    pub fn get_mut_dir(&mut self, fd: usize) -> Result<&mut dyn WasiDir, Errno> {
+        log::trace!("get_mut_dir {fd}");
+
+        let (dev, ino) =
+            if let VFD::Inode { dev, ino } = self.fds.get(fd).ok_or(Errno::__WASI_ERRNO_BADF)? {
+                (*dev, *ino)
+            } else {
+                return Err(Errno::__WASI_ERRNO_BADF);
+            };
+        let vfs = self.vfs.get_mut(dev).ok_or(Errno::__WASI_ERRNO_BADF)?;
+        vfs.get_mut_dir(ino)
+    }
+    pub fn get_dir(&self, fd: usize) -> Result<&dyn WasiDir, Errno> {
+        log::trace!("get_dir {fd}");
+
+        let (dev, ino) =
+            if let VFD::Inode { dev, ino } = self.fds.get(fd).ok_or(Errno::__WASI_ERRNO_BADF)? {
+                (*dev, *ino)
+            } else {
+                return Err(Errno::__WASI_ERRNO_BADF);
+            };
+        let vfs = self.vfs.get(dev).ok_or(Errno::__WASI_ERRNO_BADF)?;
+        vfs.get_dir(ino)
+    }
+
+    #[cfg(all(unix, feature = "async_tokio"))]
+    pub fn get_mut_socket(&mut self, fd: usize) -> Result<&mut AsyncWasiSocket, Errno> {
+        if let VFD::AsyncSocket(s) = self.fds.get_mut(fd).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            Ok(s)
+        } else {
+            Err(Errno::__WASI_ERRNO_NOTSOCK)
+        }
+    }
+    #[cfg(all(unix, feature = "async_tokio"))]
+    pub fn get_socket(&self, fd: usize) -> Result<&AsyncWasiSocket, Errno> {
+        if let VFD::AsyncSocket(s) = self.fds.get(fd).ok_or(Errno::__WASI_ERRNO_BADF)? {
+            Ok(s)
+        } else {
+            Err(Errno::__WASI_ERRNO_NOTSOCK)
+        }
+    }
+    #[cfg(all(unix, feature = "async_tokio"))]
+    pub fn insert_socket(&mut self, s: AsyncWasiSocket) -> Result<usize, Errno> {
+        Ok(self.fds.insert(VFD::AsyncSocket(s)))
+    }
+}
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/mod.rs.html b/src/async_wasi/snapshots/mod.rs.html new file mode 100644 index 000000000..37dc6d013 --- /dev/null +++ b/src/async_wasi/snapshots/mod.rs.html @@ -0,0 +1,135 @@ +mod.rs - source

async_wasi/snapshots/
mod.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
pub mod common;
+pub mod env;
+pub mod preview_1;
+
+use common::error::Errno;
+
+use self::env::{vfs::WasiFileSys, VFS};
+
+#[derive(Debug)]
+pub struct WasiCtx {
+    pub args: Vec<String>,
+    envs: Vec<String>,
+    pub(crate) vfs: VFS,
+    pub exit_code: u32,
+}
+impl Default for WasiCtx {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+impl WasiCtx {
+    pub fn new() -> Self {
+        WasiCtx {
+            args: vec![],
+            envs: vec![],
+            vfs: VFS::new(),
+            exit_code: 0,
+        }
+    }
+
+    pub fn create_with_vfs(vfs: VFS) -> Self {
+        Self {
+            args: vec![],
+            envs: vec![],
+            vfs,
+            exit_code: 0,
+        }
+    }
+
+    pub fn mount_file_sys(
+        &mut self,
+        guest_path: &str,
+        file_sys: Box<dyn WasiFileSys<Index = usize> + Send + Sync>,
+    ) {
+        self.vfs.mount_file_sys(guest_path, file_sys)
+    }
+
+    pub fn push_arg(&mut self, arg: String) {
+        self.args.push(arg);
+    }
+
+    pub fn push_args(&mut self, args: Vec<String>) {
+        self.args.extend(args);
+    }
+
+    /// The format of the `env` argument should be "KEY=VALUE"
+    pub fn push_env(&mut self, env: String) {
+        self.envs.push(env);
+    }
+
+    pub fn push_envs(&mut self, envs: Vec<String>) {
+        self.envs.extend(envs);
+    }
+}
+
+// unsafe impl Send for WasiCtx {}
+// unsafe impl Sync for WasiCtx {}
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/preview_1/async_poll.rs.html b/src/async_wasi/snapshots/preview_1/async_poll.rs.html new file mode 100644 index 000000000..475b89801 --- /dev/null +++ b/src/async_wasi/snapshots/preview_1/async_poll.rs.html @@ -0,0 +1,685 @@ +async_poll.rs - source

async_wasi/snapshots/preview_1/
async_poll.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
use crate::snapshots::{
+    common::{
+        memory::{Memory, WasmPtr},
+        net::{self, ConnectState, SubscriptionClock},
+        types::*,
+    },
+    Errno, WasiCtx,
+};
+use futures::{stream::FuturesUnordered, StreamExt};
+use net::{async_tokio::AsyncWasiSocket, PrePoll, SubscriptionFd, SubscriptionFdType};
+use std::time::Duration;
+
+fn handle_event_err(type_: SubscriptionFdType, errno: Errno) -> __wasi_event_t {
+    let mut r = __wasi_event_t {
+        userdata: 0,
+        error: errno.0,
+        type_: 0,
+        fd_readwrite: __wasi_event_fd_readwrite_t {
+            nbytes: 0,
+            flags: 0,
+        },
+    };
+    match type_ {
+        SubscriptionFdType::Read(userdata) => {
+            r.userdata = userdata;
+            r.type_ = __wasi_eventtype_t::__WASI_EVENTTYPE_FD_READ;
+        }
+        SubscriptionFdType::Write(userdata) => {
+            r.userdata = userdata;
+            r.type_ = __wasi_eventtype_t::__WASI_EVENTTYPE_FD_WRITE;
+        }
+        SubscriptionFdType::Both { read: userdata, .. } => {
+            r.userdata = userdata;
+            r.type_ = __wasi_eventtype_t::__WASI_EVENTTYPE_FD_READ;
+        }
+    }
+    r
+}
+
+async fn wait_fd(
+    fd_index: usize,
+    socket: &AsyncWasiSocket,
+    type_: SubscriptionFdType,
+) -> Result<(__wasi_event_t, Option<usize>), Errno> {
+    let connecting = ConnectState::Connecting == socket.state.so_conn_state;
+
+    let handler = |r: Result<(), std::io::Error>, userdata, type_| {
+        log::trace!("wait_fd {fd_index} {r:?}");
+        match r {
+            Ok(_) => (
+                __wasi_event_t {
+                    userdata,
+                    error: 0,
+                    type_,
+                    fd_readwrite: __wasi_event_fd_readwrite_t {
+                        nbytes: 0,
+                        flags: 0,
+                    },
+                },
+                if connecting { Some(fd_index) } else { None },
+            ),
+            Err(e) => (
+                __wasi_event_t {
+                    userdata,
+                    error: Errno::from(e).0,
+                    type_,
+                    fd_readwrite: __wasi_event_fd_readwrite_t {
+                        nbytes: 0,
+                        flags: __wasi_eventrwflags_t::__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP,
+                    },
+                },
+                None,
+            ),
+        }
+    };
+
+    match type_ {
+        SubscriptionFdType::Write(userdata) => {
+            let write_result = socket.writable().await;
+            log::trace!("wait_fd {fd_index} writeable");
+
+            Ok(handler(
+                write_result,
+                userdata,
+                __wasi_eventtype_t::__WASI_EVENTTYPE_FD_WRITE,
+            ))
+        }
+        SubscriptionFdType::Read(userdata) => {
+            let read_result = socket.readable().await;
+            log::trace!("wait_fd {fd_index} readable");
+
+            Ok(handler(
+                read_result,
+                userdata,
+                __wasi_eventtype_t::__WASI_EVENTTYPE_FD_READ,
+            ))
+        }
+        SubscriptionFdType::Both { read, write } => {
+            tokio::select! {
+                read_result=socket.readable()=>{
+                    log::trace!("wait_fd {fd_index} readable");
+
+                    Ok(handler(
+                        read_result,
+                        read,
+                        __wasi_eventtype_t::__WASI_EVENTTYPE_FD_READ,
+                    ))
+                }
+                write_result=socket.writable()=>{
+                    log::trace!("wait_fd {fd_index} writeable");
+
+                    Ok(handler(
+                        write_result,
+                        write,
+                        __wasi_eventtype_t::__WASI_EVENTTYPE_FD_WRITE,
+                    ))
+                }
+            }
+        }
+    }
+}
+
+async fn poll_only_fd<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    out_ptr: WasmPtr<__wasi_event_t>,
+    nsubscriptions: usize,
+    revents_num_ptr: WasmPtr<__wasi_size_t>,
+    fd_vec: Vec<SubscriptionFd>,
+) -> Result<(), Errno> {
+    if fd_vec.is_empty() {
+        mem.write_data(revents_num_ptr, 0)?;
+    } else {
+        let r_events = mem.mut_slice(out_ptr, nsubscriptions)?;
+        let mut wait = FuturesUnordered::new();
+        let mut i = 0;
+        for SubscriptionFd { fd, type_ } in fd_vec {
+            match ctx.vfs.get_socket(fd as usize) {
+                Ok(s) => {
+                    wait.push(wait_fd(fd as usize, s, type_));
+                }
+                Err(e) => {
+                    r_events[i] = handle_event_err(type_, e);
+                    i += 1;
+                }
+            }
+        }
+
+        if i == 0 {
+            let mut connected_fds = vec![];
+
+            let (v, connected_fd) = wait.select_next_some().await?;
+            connected_fds.push(connected_fd);
+            r_events[i] = v;
+            i += 1;
+
+            'wait_poll: loop {
+                if i >= nsubscriptions {
+                    break 'wait_poll;
+                }
+                futures::select! {
+                    v = wait.next() => {
+                        if let Some(v) = v {
+                            let (v, connected_fd) = v?;
+                            connected_fds.push(connected_fd);
+                            r_events[i] = v;
+                            i += 1;
+                        } else {
+                            break 'wait_poll;
+                        }
+                    }
+                    default => {
+                        break 'wait_poll;
+                    }
+                };
+            }
+
+            drop(wait);
+
+            for fd in connected_fds.into_iter().flatten() {
+                if let Ok(socket) = ctx.vfs.get_mut_socket(fd) {
+                    socket.state.so_conn_state = ConnectState::Connected;
+                    socket.writable.set_writable();
+                }
+            }
+        }
+
+        mem.write_data(revents_num_ptr, i as u32)?;
+    }
+    Ok(())
+}
+
+async fn poll_fd_timeout<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    out_ptr: WasmPtr<__wasi_event_t>,
+    nsubscriptions: usize,
+    revents_num_ptr: WasmPtr<__wasi_size_t>,
+    clock: SubscriptionClock,
+    fd_vec: Vec<SubscriptionFd>,
+) -> Result<(), Errno> {
+    let r_events = mem.mut_slice(out_ptr, nsubscriptions)?;
+    let mut wait = FuturesUnordered::new();
+
+    let mut i = 0;
+
+    for SubscriptionFd { fd, type_ } in fd_vec {
+        match ctx.vfs.get_socket(fd as usize) {
+            Ok(s) => {
+                wait.push(wait_fd(fd as usize, s, type_));
+            }
+            Err(e) => {
+                r_events[i] = handle_event_err(type_, e);
+                i += 1;
+            }
+        }
+    }
+
+    if i == 0 {
+        let ddl = clock.timeout.unwrap();
+        let now = std::time::SystemTime::now();
+        let timeout = ddl.duration_since(now).unwrap_or(Duration::from_secs(0));
+        let sleep = tokio::time::timeout(timeout, wait.select_next_some()).await;
+        if sleep.is_err() {
+            let r_event = &mut r_events[0];
+            r_event.userdata = clock.userdata;
+            r_event.type_ = __wasi_eventtype_t::__WASI_EVENTTYPE_CLOCK;
+            mem.write_data(revents_num_ptr, 1)?;
+            return Ok(());
+        }
+
+        let mut connected_fds = vec![];
+
+        let (first, connected_fd) = sleep.unwrap()?;
+        connected_fds.push(connected_fd);
+        r_events[i] = first;
+        i += 1;
+
+        'wait: loop {
+            if i >= nsubscriptions {
+                break 'wait;
+            }
+            futures::select! {
+                v = wait.next() => {
+                    if let Some(v) = v {
+                        let (v,connected_fd) = v?;
+                        connected_fds.push(connected_fd);
+                        r_events[i] = v;
+                        i += 1;
+                    } else {
+                        break 'wait;
+                    }
+                }
+                default => {
+                    break 'wait;
+                }
+            };
+        }
+
+        drop(wait);
+
+        for fd in connected_fds.into_iter().flatten() {
+            if let Ok(socket) = ctx.vfs.get_mut_socket(fd) {
+                socket.state.so_conn_state = ConnectState::Connected;
+            }
+        }
+    }
+
+    mem.write_data(revents_num_ptr, i as u32)?;
+    Ok(())
+}
+
+pub async fn poll_oneoff<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    in_ptr: WasmPtr<__wasi_subscription_t>,
+    out_ptr: WasmPtr<__wasi_event_t>,
+    nsubscriptions: __wasi_size_t,
+    revents_num_ptr: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    log::trace!("poll_oneoff");
+    poll_oneoff_impl(ctx, mem, in_ptr, out_ptr, nsubscriptions, revents_num_ptr).await
+}
+
+async fn poll_oneoff_impl<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    in_ptr: WasmPtr<__wasi_subscription_t>,
+    out_ptr: WasmPtr<__wasi_event_t>,
+    nsubscriptions: __wasi_size_t,
+    revents_num_ptr: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    if nsubscriptions == 0 {
+        return Ok(());
+    }
+
+    let nsubscriptions = nsubscriptions as usize;
+
+    let subs = mem.get_slice(in_ptr, nsubscriptions)?;
+    let prepoll = PrePoll::from_wasi_subscription(subs)?;
+
+    log::trace!("poll_oneoff subs prepoll={:#?}", prepoll);
+
+    match prepoll {
+        PrePoll::OnlyFd(fd_vec) => {
+            poll_only_fd(ctx, mem, out_ptr, nsubscriptions, revents_num_ptr, fd_vec).await?;
+        }
+        PrePoll::ClockAndFd(clock, fd_vec) => {
+            poll_fd_timeout(
+                ctx,
+                mem,
+                out_ptr,
+                nsubscriptions,
+                revents_num_ptr,
+                clock,
+                fd_vec,
+            )
+            .await?;
+        }
+        PrePoll::OnlyClock(clock) => {
+            if let Some(e) = clock.err {
+                let r_event = mem.mut_data(out_ptr)?;
+                r_event.userdata = clock.userdata;
+                r_event.type_ = __wasi_eventtype_t::__WASI_EVENTTYPE_CLOCK;
+                r_event.error = e.0;
+                mem.write_data(revents_num_ptr, 1)?;
+                return Ok(());
+            }
+            if let Some(ddl) = clock.timeout {
+                let now = std::time::SystemTime::now();
+                let dur = ddl.duration_since(now).unwrap_or(Duration::from_secs(0));
+                tokio::time::sleep(dur).await;
+                let r_event = mem.mut_data(out_ptr)?;
+                r_event.userdata = clock.userdata;
+                r_event.type_ = __wasi_eventtype_t::__WASI_EVENTTYPE_CLOCK;
+                mem.write_data(revents_num_ptr, 1)?;
+                return Ok(());
+            }
+        }
+    }
+    Ok(())
+}
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/preview_1/async_socket.rs.html b/src/async_wasi/snapshots/preview_1/async_socket.rs.html new file mode 100644 index 000000000..55c234785 --- /dev/null +++ b/src/async_wasi/snapshots/preview_1/async_socket.rs.html @@ -0,0 +1,1615 @@ +async_socket.rs - source

async_wasi/snapshots/preview_1/
async_socket.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
use crate::snapshots::{
+    common::{
+        memory::{Memory, WasmPtr},
+        net::{self, AddressFamily, SocketType, WasiSocketState},
+        types::*,
+    },
+    Errno, WasiCtx,
+};
+use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
+
+cfg_if::cfg_if! {
+    if #[cfg(any(
+        target_os = "linux", target_os = "android",
+        target_os = "dragonfly", target_os = "freebsd",
+        target_os = "openbsd", target_os = "netbsd",
+        target_os = "haiku", target_os = "nto"))] {
+        use libc::MSG_NOSIGNAL;
+    } else {
+        const MSG_NOSIGNAL: std::ffi::c_int = 0x0;
+    }
+}
+
+fn parse_wasi_ip<M: Memory>(mem: &M, addr_ptr: WasmPtr<__wasi_address_t>) -> Result<IpAddr, Errno> {
+    let wasi_addr = *(mem.get_data(addr_ptr)?);
+    if wasi_addr.buf_len != 4 && wasi_addr.buf_len != 16 {
+        return Err(Errno::__WASI_ERRNO_INVAL);
+    }
+    let addr_buf_ptr = WasmPtr::<u8>::from(wasi_addr.buf as usize);
+
+    let addr = if wasi_addr.buf_len == 4 {
+        let addr_buf = mem.get_slice(addr_buf_ptr, 4)?;
+        IpAddr::V4(Ipv4Addr::new(
+            addr_buf[0],
+            addr_buf[1],
+            addr_buf[2],
+            addr_buf[3],
+        ))
+    } else {
+        let addr_buf_ref = mem.get_slice(addr_buf_ptr, 16)?;
+        let mut addr_buf = [0u8; 16];
+        addr_buf.copy_from_slice(addr_buf_ref);
+        IpAddr::V6(Ipv6Addr::from(addr_buf))
+    };
+    Ok(addr)
+}
+
+pub fn sock_open<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    af: __wasi_address_family_t::Type,
+    ty: __wasi_sock_type_t::Type,
+    ro_fd_ptr: WasmPtr<__wasi_fd_t>,
+) -> Result<(), Errno> {
+    log::trace!("sock_open ...");
+
+    let mut state = WasiSocketState::default();
+    match af {
+        __wasi_address_family_t::__WASI_ADDRESS_FAMILY_INET4 => {
+            state.sock_type.0 = AddressFamily::Inet4
+        }
+        __wasi_address_family_t::__WASI_ADDRESS_FAMILY_INET6 => {
+            state.sock_type.0 = AddressFamily::Inet6
+        }
+        _ => return Err(Errno::__WASI_ERRNO_INVAL),
+    }
+    match ty {
+        __wasi_sock_type_t::__WASI_SOCK_TYPE_SOCK_DGRAM => {
+            state.sock_type.1 = SocketType::Datagram;
+        }
+        __wasi_sock_type_t::__WASI_SOCK_TYPE_SOCK_STREAM => {
+            state.sock_type.1 = SocketType::Stream;
+        }
+        _ => return Err(Errno::__WASI_ERRNO_INVAL),
+    }
+
+    let s = net::async_tokio::AsyncWasiSocket::open(state)?;
+    let fd = ctx.vfs.insert_socket(s)?;
+    log::trace!("sock_open {fd}");
+
+    mem.write_data(ro_fd_ptr, fd as __wasi_fd_t)?;
+    Ok(())
+}
+
+pub fn sock_bind<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    fd: __wasi_fd_t,
+    addr_ptr: WasmPtr<__wasi_address_t>,
+    port: u32,
+) -> Result<(), Errno> {
+    log::trace!("sock_bind {fd}");
+
+    let ip = parse_wasi_ip(mem, addr_ptr)?;
+    let addr = SocketAddr::new(ip, port as u16);
+
+    let s = ctx.vfs.get_mut_socket(fd as usize)?;
+    s.bind(addr)?;
+    Ok(())
+}
+
+pub fn sock_listen<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    backlog: u32,
+) -> Result<(), Errno> {
+    log::trace!("sock_listen {fd}");
+
+    let s = ctx.vfs.get_mut_socket(fd as usize)?;
+    s.listen(backlog)?;
+    Ok(())
+}
+
+pub async fn sock_accept<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    ro_fd_ptr: WasmPtr<__wasi_fd_t>,
+) -> Result<(), Errno> {
+    log::trace!("sock_accept {fd}");
+
+    let s = ctx.vfs.get_mut_socket(fd as usize)?;
+    let cs = s.accept().await?;
+    let new_fd = ctx.vfs.insert_socket(cs)?;
+    mem.write_data(ro_fd_ptr, new_fd as __wasi_fd_t)?;
+    Ok(())
+}
+
+pub async fn sock_connect<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    fd: __wasi_fd_t,
+    addr_ptr: WasmPtr<__wasi_address_t>,
+    port: u32,
+) -> Result<(), Errno> {
+    log::trace!("sock_connect {fd}");
+
+    let ip = parse_wasi_ip(mem, addr_ptr)?;
+    let addr = SocketAddr::new(ip, port as u16);
+
+    ctx.vfs.get_mut_socket(fd as usize)?.connect(addr).await?;
+    Ok(())
+}
+
+pub async fn sock_recv<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf_ptr: WasmPtr<__wasi_iovec_t>,
+    buf_len: __wasi_size_t,
+    flags: __wasi_riflags_t::Type,
+    ro_data_len_ptr: WasmPtr<__wasi_size_t>,
+    ro_flags_ptr: WasmPtr<__wasi_roflags_t::Type>,
+) -> Result<(), Errno> {
+    log::trace!("sock_recv {fd}");
+
+    let s = ctx.vfs.get_mut_socket(fd as usize)?;
+    let mut iovec = mem.mut_iovec(buf_ptr, buf_len)?;
+    let mut native_flags = 0;
+
+    if flags & __wasi_riflags_t::__WASI_RIFLAGS_RECV_PEEK > 0 {
+        native_flags |= libc::MSG_PEEK;
+    }
+    if flags & __wasi_riflags_t::__WASI_RIFLAGS_RECV_WAITALL > 0 {
+        native_flags |= libc::MSG_WAITALL;
+    }
+
+    let (n, trunc) = s.recv(&mut iovec, native_flags).await?;
+    if trunc {
+        mem.write_data(
+            ro_flags_ptr,
+            __wasi_roflags_t::__WASI_ROFLAGS_RECV_DATA_TRUNCATED,
+        )?;
+    }
+
+    s.writable.set_writable();
+    mem.write_data(ro_data_len_ptr, (n as u32).to_le())?;
+    Ok(())
+}
+
+pub async fn sock_recv_from<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf_ptr: WasmPtr<__wasi_iovec_t>,
+    buf_len: __wasi_size_t,
+    wasi_addr_ptr: WasmPtr<__wasi_address_t>,
+    flags: __wasi_riflags_t::Type,
+    port_ptr: WasmPtr<u32>,
+    ro_data_len_ptr: WasmPtr<__wasi_size_t>,
+    ro_flags_ptr: WasmPtr<__wasi_roflags_t::Type>,
+) -> Result<(), Errno> {
+    log::trace!("sock_recv_from {fd}");
+
+    let s = ctx.vfs.get_mut_socket(fd as usize)?;
+
+    let wasi_addr = *(mem.mut_data(wasi_addr_ptr)?);
+    if wasi_addr.buf_len < 128 {
+        return Err(Errno::__WASI_ERRNO_INVAL);
+    }
+
+    let mut iovec = mem.mut_iovec(buf_ptr, buf_len)?;
+    let mut native_flags = 0;
+
+    if flags & __wasi_riflags_t::__WASI_RIFLAGS_RECV_PEEK > 0 {
+        native_flags |= libc::MSG_PEEK;
+    }
+    if flags & __wasi_riflags_t::__WASI_RIFLAGS_RECV_WAITALL > 0 {
+        native_flags |= libc::MSG_WAITALL;
+    }
+
+    let (n, trunc, addr) = s.recv_from(&mut iovec, native_flags).await?;
+
+    match addr {
+        Some(SocketAddr::V4(addrv4)) => {
+            let family_ptr = WasmPtr::<u16>::from(wasi_addr.buf as usize);
+            let wasi_addr_buf_ptr = WasmPtr::<u8>::from(2 + wasi_addr.buf as usize);
+            let wasi_addr_buf = mem.mut_slice(wasi_addr_buf_ptr, 4)?;
+            wasi_addr_buf.copy_from_slice(&addrv4.ip().octets());
+
+            mem.write_data(
+                family_ptr,
+                __wasi_address_family_t::__WASI_ADDRESS_FAMILY_INET4 as u16,
+            )?;
+
+            mem.write_data(port_ptr, (addrv4.port() as u32).to_le())?;
+        }
+        Some(SocketAddr::V6(addrv6)) => {
+            let family_ptr = WasmPtr::<u16>::from(wasi_addr.buf as usize);
+            let wasi_addr_buf_ptr = WasmPtr::<u8>::from(2 + wasi_addr.buf as usize);
+            let wasi_addr_buf = mem.mut_slice(wasi_addr_buf_ptr, 16)?;
+            wasi_addr_buf.copy_from_slice(&addrv6.ip().octets());
+            mem.write_data(
+                family_ptr,
+                __wasi_address_family_t::__WASI_ADDRESS_FAMILY_INET6 as u16,
+            )?;
+            mem.write_data(port_ptr, (addrv6.port() as u32).to_le())?;
+        }
+        None => {}
+    };
+
+    if trunc {
+        mem.write_data(
+            ro_flags_ptr,
+            __wasi_roflags_t::__WASI_ROFLAGS_RECV_DATA_TRUNCATED,
+        )?;
+    }
+
+    s.writable.set_writable();
+    mem.write_data(ro_data_len_ptr, (n as u32).to_le())?;
+    Ok(())
+}
+
+pub async fn sock_send<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf_ptr: WasmPtr<__wasi_ciovec_t>,
+    buf_len: __wasi_size_t,
+    _flags: __wasi_siflags_t,
+    send_len_ptr: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    log::trace!("sock_send {fd}");
+
+    let s = ctx.vfs.get_mut_socket(fd as usize)?;
+    let iovec = mem.get_iovec(buf_ptr, buf_len)?;
+    let n = s.send(&iovec, MSG_NOSIGNAL).await?;
+    s.writable.set_writable();
+    mem.write_data(send_len_ptr, (n as u32).to_le())?;
+    Ok(())
+}
+
+pub async fn sock_send_to<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf_ptr: WasmPtr<__wasi_ciovec_t>,
+    buf_len: __wasi_size_t,
+    wasi_addr_ptr: WasmPtr<__wasi_address_t>,
+    port: u32,
+    _flags: __wasi_siflags_t,
+    send_len_ptr: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    log::trace!("sock_send_to {fd}");
+
+    let s = ctx.vfs.get_mut_socket(fd as usize)?;
+
+    let ip = parse_wasi_ip(mem, wasi_addr_ptr)?;
+    let addr = SocketAddr::new(ip, port as u16);
+    let iovec = mem.get_iovec(buf_ptr, buf_len)?;
+
+    let n = s.send_to(&iovec, addr, MSG_NOSIGNAL).await?;
+    s.writable.set_writable();
+    mem.write_data(send_len_ptr, (n as u32).to_le())?;
+    Ok(())
+}
+
+pub fn sock_shutdown<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    how: __wasi_sdflags_t::Type,
+) -> Result<(), Errno> {
+    log::trace!("sock_shutdown {fd}");
+
+    use std::net::Shutdown;
+
+    let s = ctx.vfs.get_mut_socket(fd as usize)?;
+
+    const BOTH: __wasi_sdflags_t::Type =
+        __wasi_sdflags_t::__WASI_SDFLAGS_WR | __wasi_sdflags_t::__WASI_SDFLAGS_RD;
+
+    let how = match how {
+        __wasi_sdflags_t::__WASI_SDFLAGS_RD => Shutdown::Read,
+        __wasi_sdflags_t::__WASI_SDFLAGS_WR => Shutdown::Write,
+        BOTH => Shutdown::Both,
+        _ => return Err(Errno::__WASI_ERRNO_INVAL),
+    };
+
+    s.shutdown(how)?;
+    Ok(())
+}
+
+pub fn sock_getpeeraddr<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    wasi_addr_ptr: WasmPtr<__wasi_address_t>,
+    addr_type: WasmPtr<u32>,
+    port_ptr: WasmPtr<u32>,
+) -> Result<(), Errno> {
+    log::trace!("sock_getpeeraddr {fd}");
+
+    let s = ctx.vfs.get_mut_socket(fd as usize)?;
+
+    let wasi_addr = *(mem.mut_data(wasi_addr_ptr)?);
+    let addr = s.get_peer()?;
+
+    let addr_len: u32 = match addr {
+        SocketAddr::V4(addrv4) => {
+            let wasi_addr_buf_ptr = WasmPtr::<u8>::from(wasi_addr.buf as usize);
+            let wasi_addr_buf = mem.mut_slice(wasi_addr_buf_ptr, 4)?;
+            wasi_addr_buf.copy_from_slice(&addrv4.ip().octets());
+            mem.write_data(port_ptr, (addrv4.port() as u32).to_le())?;
+            4
+        }
+        SocketAddr::V6(addrv6) => {
+            let wasi_addr_buf_ptr = WasmPtr::<u8>::from(wasi_addr.buf as usize);
+            let wasi_addr_buf = mem.mut_slice(wasi_addr_buf_ptr, 16)?;
+            wasi_addr_buf.copy_from_slice(&addrv6.ip().octets());
+            mem.write_data(port_ptr, (addrv6.port() as u32).to_le())?;
+            16
+        }
+    };
+
+    let wasi_addr = mem.mut_data(wasi_addr_ptr)?;
+    wasi_addr.buf_len = addr_len.to_le();
+    mem.write_data(addr_type, addr_len.to_le())?;
+
+    Ok(())
+}
+
+pub fn sock_getlocaladdr<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    wasi_addr_ptr: WasmPtr<__wasi_address_t>,
+    addr_type: WasmPtr<u32>,
+    port_ptr: WasmPtr<u32>,
+) -> Result<(), Errno> {
+    log::trace!("sock_getlocaladdr {fd}");
+
+    let s = ctx.vfs.get_mut_socket(fd as usize)?;
+
+    let wasi_addr = *(mem.mut_data(wasi_addr_ptr)?);
+
+    let addr = s.get_local()?;
+
+    let addr_len: u32 = match addr {
+        SocketAddr::V4(addrv4) => {
+            let wasi_addr_buf_ptr = WasmPtr::<u8>::from(wasi_addr.buf as usize);
+            let wasi_addr_buf = mem.mut_slice(wasi_addr_buf_ptr, 4)?;
+            wasi_addr_buf.copy_from_slice(&addrv4.ip().octets());
+            mem.write_data(port_ptr, (addrv4.port() as u32).to_le())?;
+            4
+        }
+        SocketAddr::V6(addrv6) => {
+            let wasi_addr_buf_ptr = WasmPtr::<u8>::from(wasi_addr.buf as usize);
+            let wasi_addr_buf = mem.mut_slice(wasi_addr_buf_ptr, 16)?;
+            wasi_addr_buf.copy_from_slice(&addrv6.ip().octets());
+            mem.write_data(port_ptr, (addrv6.port() as u32).to_le())?;
+            16
+        }
+    };
+
+    let wasi_addr = mem.mut_data(wasi_addr_ptr)?;
+    wasi_addr.buf_len = addr_len.to_le();
+    mem.write_data(addr_type, addr_len.to_le())?;
+
+    Ok(())
+}
+
+pub fn sock_getsockopt<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    level: __wasi_sock_opt_level_t::Type,
+    name: __wasi_sock_opt_so_t::Type,
+    flag: WasmPtr<i32>,
+    flag_size_ptr: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    log::trace!("sock_getsockopt {fd}");
+
+    let s = ctx.vfs.get_mut_socket(fd as usize)?;
+
+    let flag_size = *(mem.get_data(flag_size_ptr)?);
+    if level != __wasi_sock_opt_level_t::__WASI_SOCK_OPT_LEVEL_SOL_SOCKET {
+        return Err(Errno::__WASI_ERRNO_NOSYS);
+    }
+    let flag_val = match name {
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_REUSEADDR => {
+            if (flag_size as usize) != std::mem::size_of::<i32>() {
+                return Err(Errno::__WASI_ERRNO_INVAL);
+            }
+            s.get_so_reuseaddr() as i32
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_TYPE => {
+            if (flag_size as usize) != std::mem::size_of::<i32>() {
+                return Err(Errno::__WASI_ERRNO_INVAL);
+            }
+
+            let (_, t) = s.get_so_type();
+            match t {
+                SocketType::Datagram => __wasi_sock_type_t::__WASI_SOCK_TYPE_SOCK_DGRAM as i32,
+                SocketType::Stream => __wasi_sock_type_t::__WASI_SOCK_TYPE_SOCK_STREAM as i32,
+            }
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_ERROR => {
+            if let Some(e) = s.get_so_error()? {
+                Errno::from(e).0 as i32
+            } else {
+                0
+            }
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_DONTROUTE => {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_BROADCAST => {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_SNDBUF => {
+            if (flag_size as usize) != std::mem::size_of::<i32>() {
+                return Err(Errno::__WASI_ERRNO_INVAL);
+            }
+            s.get_so_send_buf_size() as i32
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_RCVBUF => {
+            if (flag_size as usize) != std::mem::size_of::<i32>() {
+                return Err(Errno::__WASI_ERRNO_INVAL);
+            }
+            s.get_so_recv_buf_size() as i32
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_KEEPALIVE => {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_OOBINLINE => {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_LINGER => {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_RCVLOWAT => {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_RCVTIMEO => {
+            if (flag_size as usize) != std::mem::size_of::<__wasi_timeval>() {
+                return Err(Errno::__WASI_ERRNO_INVAL);
+            }
+
+            let timeval = if let Some(timeout) = s.get_so_recv_timeout() {
+                __wasi_timeval {
+                    tv_sec: (timeout.as_secs() as i64).to_le(),
+                    tv_usec: (timeout.subsec_nanos() as i64).to_le(),
+                }
+            } else {
+                __wasi_timeval {
+                    tv_sec: 0,
+                    tv_usec: 0,
+                }
+            };
+
+            let offset = WasmPtr::<__wasi_timeval>::from(flag.0);
+            mem.write_data(offset, timeval)?;
+
+            return Ok(());
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_SNDTIMEO => {
+            if (flag_size as usize) != std::mem::size_of::<__wasi_timeval>() {
+                return Err(Errno::__WASI_ERRNO_INVAL);
+            }
+
+            let timeval = if let Some(timeout) = s.get_so_send_timeout() {
+                __wasi_timeval {
+                    tv_sec: (timeout.as_secs() as i64).to_le(),
+                    tv_usec: (timeout.subsec_nanos() as i64).to_le(),
+                }
+            } else {
+                __wasi_timeval {
+                    tv_sec: 0,
+                    tv_usec: 0,
+                }
+            };
+
+            let offset = WasmPtr::<__wasi_timeval>::from(flag.0);
+            mem.write_data(offset, timeval)?;
+
+            return Ok(());
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_ACCEPTCONN => {
+            if (flag_size as usize) != std::mem::size_of::<i32>() {
+                return Err(Errno::__WASI_ERRNO_INVAL);
+            }
+            s.get_so_accept_conn()? as i32
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_BINDTODEVICE => {
+            let device = s.device()?.unwrap_or_default();
+            let offset = WasmPtr::<u8>::from(flag.0);
+            let copy_len = device.len().min((flag_size.wrapping_sub(1)) as usize);
+            if copy_len > 0 {
+                let wasm_buf = mem.mut_slice(offset, copy_len)?;
+                wasm_buf.copy_from_slice(&device[0..copy_len]);
+                mem.write_data(flag_size_ptr, (copy_len + 1) as u32)?;
+            } else {
+                mem.write_data(flag_size_ptr, 0_u32)?;
+            }
+            return Ok(());
+        }
+        _ => {
+            return Err(Errno::__WASI_ERRNO_NOPROTOOPT);
+        }
+    };
+
+    mem.write_data(flag, flag_val)?;
+
+    Ok(())
+}
+
+pub fn sock_setsockopt<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    fd: __wasi_fd_t,
+    level: __wasi_sock_opt_level_t::Type,
+    name: __wasi_sock_opt_so_t::Type,
+    flag: WasmPtr<i32>,
+    flag_size: __wasi_size_t,
+) -> Result<(), Errno> {
+    log::trace!("sock_setsockopt {fd}");
+
+    let s = ctx.vfs.get_mut_socket(fd as usize)?;
+
+    if level != __wasi_sock_opt_level_t::__WASI_SOCK_OPT_LEVEL_SOL_SOCKET {
+        return Err(Errno::__WASI_ERRNO_NOSYS);
+    }
+
+    match name {
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_REUSEADDR => {
+            if (flag_size as usize) != std::mem::size_of::<i32>() {
+                return Err(Errno::__WASI_ERRNO_INVAL);
+            }
+            let flag_val = *(mem.get_data(flag)?) > 0;
+            s.set_so_reuseaddr(flag_val)?;
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_TYPE => return Err(Errno::__WASI_ERRNO_FAULT),
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_ERROR => return Err(Errno::__WASI_ERRNO_FAULT),
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_DONTROUTE => {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_BROADCAST => {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_SNDBUF => {
+            if (flag_size as usize) != std::mem::size_of::<i32>() {
+                return Err(Errno::__WASI_ERRNO_INVAL);
+            }
+            let flag_val = *(mem.get_data(flag)?);
+            s.set_so_send_buf_size(flag_val as usize)?;
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_RCVBUF => {
+            if (flag_size as usize) != std::mem::size_of::<i32>() {
+                return Err(Errno::__WASI_ERRNO_INVAL);
+            }
+            let flag_val = *(mem.get_data(flag)?);
+            s.set_so_recv_buf_size(flag_val as usize)?;
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_KEEPALIVE => {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_OOBINLINE => {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_LINGER => {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_RCVLOWAT => {
+            return Err(Errno::__WASI_ERRNO_NOSYS);
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_RCVTIMEO => {
+            if (flag_size as usize) != std::mem::size_of::<__wasi_timeval>() {
+                return Err(Errno::__WASI_ERRNO_INVAL);
+            }
+            let offset = WasmPtr::<__wasi_timeval>::from(flag.0);
+            let timeval = *(mem.get_data(offset)?);
+            let (tv_sec, tv_usec) = (i64::from_le(timeval.tv_sec), i64::from_le(timeval.tv_usec));
+
+            let timeout = if tv_sec == 0 && tv_usec == 0 {
+                None
+            } else {
+                Some(std::time::Duration::new(tv_sec as u64, tv_usec as u32))
+            };
+
+            s.set_so_recv_timeout(timeout)?;
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_SNDTIMEO => {
+            if (flag_size as usize) != std::mem::size_of::<__wasi_timeval>() {
+                return Err(Errno::__WASI_ERRNO_INVAL);
+            }
+            let offset = WasmPtr::<__wasi_timeval>::from(flag.0);
+            let timeval = *(mem.get_data(offset)?);
+            let (tv_sec, tv_usec) = (i64::from_le(timeval.tv_sec), i64::from_le(timeval.tv_usec));
+
+            let timeout = if tv_sec == 0 && tv_usec == 0 {
+                None
+            } else {
+                Some(std::time::Duration::new(tv_sec as u64, tv_usec as u32))
+            };
+
+            s.set_so_send_timeout(timeout)?;
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_ACCEPTCONN => {
+            return Err(Errno::__WASI_ERRNO_FAULT);
+        }
+        __wasi_sock_opt_so_t::__WASI_SOCK_OPT_SO_BINDTODEVICE => {
+            if flag_size == 0 {
+                s.bind_device(None)?;
+            } else {
+                let buf_ptr = WasmPtr::<u8>::from(flag.0);
+                let wasm_buf = mem.get_slice(buf_ptr, flag_size as usize)?;
+                s.bind_device(Some(wasm_buf))?;
+            }
+            return Ok(());
+        }
+        _ => {
+            return Err(Errno::__WASI_ERRNO_NOPROTOOPT);
+        }
+    };
+
+    Ok(())
+}
+
+pub async fn sock_lookup_ip<M: Memory>(
+    _ctx: &mut WasiCtx,
+    mem: &mut M,
+    host_name_ptr: WasmPtr<u8>,
+    host_name_len: __wasi_size_t,
+    lookup_type: __wasi_address_family_t::Type,
+    addr_buf: WasmPtr<u8>,
+    addr_buf_max_len: __wasi_size_t,
+    raddr_num_ptr: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    log::trace!("sock_lookup_ip");
+
+    match lookup_type {
+        __wasi_address_family_t::__WASI_ADDRESS_FAMILY_INET4 => {
+            let host_name_buf = mem.get_slice(host_name_ptr, host_name_len as usize)?;
+            let host_name =
+                std::str::from_utf8(host_name_buf).or(Err(Errno::__WASI_ERRNO_ILSEQ))?;
+            let addrs = tokio::net::lookup_host(format!("{host_name}:0")).await?;
+            let write_buf = mem.mut_slice(addr_buf, addr_buf_max_len as usize)?;
+            let mut i = 0;
+            for addr in addrs {
+                if let SocketAddr::V4(ip) = addr {
+                    let buf = ip.ip().octets();
+                    if let Some(w_buf) = write_buf.get_mut(i * 4..(i + 1) * 4) {
+                        w_buf.copy_from_slice(&buf);
+                        i += 1;
+                    } else {
+                        break;
+                    }
+                }
+            }
+            mem.write_data(raddr_num_ptr, i as u32)?;
+            Ok(())
+        }
+        __wasi_address_family_t::__WASI_ADDRESS_FAMILY_INET6 => {
+            let host_name_buf = mem.get_slice(host_name_ptr, host_name_len as usize)?;
+            let host_name =
+                std::str::from_utf8(host_name_buf).or(Err(Errno::__WASI_ERRNO_ILSEQ))?;
+            let addrs = tokio::net::lookup_host(format!("{host_name}:0")).await?;
+            let write_buf = mem.mut_slice(addr_buf, addr_buf_max_len as usize)?;
+            let mut i = 0;
+            for addr in addrs {
+                if let SocketAddr::V6(ip) = addr {
+                    let buf = ip.ip().octets();
+                    if let Some(w_buf) = write_buf.get_mut(i * 16..(i + 1) * 16) {
+                        w_buf.copy_from_slice(&buf);
+                        i += 1;
+                    } else {
+                        break;
+                    }
+                }
+            }
+            mem.write_data(raddr_num_ptr, i as u32)?;
+            Ok(())
+        }
+        _ => Err(Errno::__WASI_ERRNO_INVAL),
+    }
+}
+
+pub mod addrinfo {
+    use crate::snapshots::{
+        common::memory::{Memory, WasmPtr},
+        env::Errno,
+        WasiCtx,
+    };
+
+    #[allow(dead_code)]
+    #[derive(Copy, Clone, Debug)]
+    #[repr(u8, align(1))]
+    pub enum AddressFamily {
+        Unspec,
+        Inet4,
+        Inet6,
+    }
+
+    #[derive(Debug, Clone)]
+    #[repr(C)]
+    pub struct WasiSockaddr {
+        pub family: AddressFamily,
+        pub sa_data_len: u32,
+        pub sa_data: u32, //*mut u8,
+    }
+
+    #[derive(Debug, Clone)]
+    #[repr(C, packed(4))]
+    pub struct WasiAddrinfo {
+        pub ai_flags: u16,
+        pub ai_family: AddressFamily,
+        pub ai_socktype: u8,
+        pub ai_protocol: u8,
+        pub ai_addrlen: u32,
+        pub ai_addr: u32,      //*mut WasiSockaddr,
+        pub ai_canonname: u32, //*mut u8,
+        pub ai_canonnamelen: u32,
+        pub ai_next: u32, //*mut WasiAddrinfo,
+    }
+
+    pub fn sock_getaddrinfo<M: Memory>(
+        _ctx: &mut WasiCtx,
+        mem: &mut M,
+        node: WasmPtr<u8>,
+        node_len: u32,
+        _server: WasmPtr<u8>,
+        _server_len: u32,
+        _hint: WasmPtr<()>,
+        res: WasmPtr<u32>, // WasmPtr<WasmPtr<WasiAddrinfo>>
+        max_len: u32,
+        res_len: WasmPtr<u32>,
+    ) -> Result<(), Errno> {
+        use std::net::ToSocketAddrs;
+        if max_len == 0 {
+            return Err(Errno::__WASI_ERRNO_INVAL);
+        }
+        let node =
+            std::ffi::CString::from_vec_with_nul(mem.get_slice(node, node_len as usize)?.to_vec())
+                .unwrap_or_default();
+        let node = node.to_str().unwrap_or_default();
+
+        let addr = if node.is_empty() {
+            None
+        } else {
+            (node, 0).to_socket_addrs()?.find(|addr| addr.is_ipv4())
+        };
+
+        if let Some(std::net::SocketAddr::V4(ipv4)) = addr {
+            let addr_info_ptr = *mem.get_data(res)?;
+            let addr_info = mem.mut_data(WasmPtr::<WasiAddrinfo>::from(addr_info_ptr as usize))?;
+
+            addr_info.ai_addrlen = 4;
+            let wasi_addr_ptr: WasmPtr<WasiSockaddr> = (addr_info.ai_addr as usize).into();
+            let wasi_addr = mem.mut_data(wasi_addr_ptr)?;
+            wasi_addr.family = AddressFamily::Inet4;
+            let sa_data_ptr: WasmPtr<u8> = (wasi_addr.sa_data as usize).into();
+            let sa_data_len = wasi_addr.sa_data_len;
+            let sa_data = mem.mut_slice(sa_data_ptr, sa_data_len as usize)?;
+            let port_buf = ipv4.port().to_be_bytes();
+            sa_data[0] = port_buf[0];
+            sa_data[1] = port_buf[1];
+            let ip = ipv4.ip().octets();
+            sa_data[2..6].copy_from_slice(&ip);
+            mem.write_data(res_len, 1)?;
+        } else {
+            mem.write_data(res_len, 0)?;
+        }
+
+        Ok(())
+    }
+}
+
\ No newline at end of file diff --git a/src/async_wasi/snapshots/preview_1/mod.rs.html b/src/async_wasi/snapshots/preview_1/mod.rs.html new file mode 100644 index 000000000..49282e490 --- /dev/null +++ b/src/async_wasi/snapshots/preview_1/mod.rs.html @@ -0,0 +1,1323 @@ +mod.rs - source

async_wasi/snapshots/preview_1/
mod.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
use super::{
+    common::{
+        clock,
+        error::Errno,
+        memory::{Memory, WasmPtr},
+        types::*,
+    },
+    env::{
+        vfs::{self, FdFlags, WASIRights},
+        AsyncVM,
+    },
+    WasiCtx,
+};
+
+#[cfg(all(unix, feature = "async_tokio"))]
+pub mod async_poll;
+#[cfg(all(unix, feature = "async_tokio"))]
+pub mod async_socket;
+
+pub fn args_get<M: Memory>(
+    ctx: &WasiCtx,
+    mem: &mut M,
+    argv: WasmPtr<__wasi_size_t>,
+    argv_buf: WasmPtr<u8>,
+) -> Result<(), Errno> {
+    log::trace!("args_get");
+
+    let mut header_offset = 0;
+    for (argv_index, arg) in ctx.args.iter().enumerate() {
+        let arg_buf = mem.mut_data(argv + argv_index)?;
+        *arg_buf = ((argv_buf.0 + header_offset) as u32).to_le();
+
+        let arg_bytes = arg.as_bytes();
+        let arg_buf = mem.mut_slice(argv_buf + header_offset, arg.len())?;
+        arg_buf.copy_from_slice(arg_bytes);
+        let ptr = mem.mut_data::<u8>(argv_buf + header_offset + arg.len())?;
+        *ptr = 0u8;
+
+        header_offset += arg.len() + 1;
+    }
+    Ok(())
+}
+
+pub fn args_sizes_get<M: Memory>(
+    ctx: &WasiCtx,
+    mem: &mut M,
+    argc: WasmPtr<__wasi_size_t>,
+    argv_buf_size: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    log::trace!("args_sizes_get");
+
+    let wasi_argc = ctx.args.len();
+    debug_assert!(wasi_argc < __wasi_size_t::MAX as usize);
+    let argc = mem.mut_data(argc)?;
+    *argc = (wasi_argc as u32).to_le();
+
+    let mut wasi_argv_buf_size = 0;
+    for argv in &ctx.args {
+        // add \0
+        wasi_argv_buf_size += argv.len() + 1;
+    }
+    let argv_buf_size = mem.mut_data(argv_buf_size)?;
+    *argv_buf_size = (wasi_argv_buf_size as u32).to_le();
+
+    Ok(())
+}
+
+pub fn environ_get<M: Memory>(
+    ctx: &WasiCtx,
+    mem: &mut M,
+    environ: WasmPtr<__wasi_size_t>,
+    environ_buf: WasmPtr<u8>,
+) -> Result<(), Errno> {
+    log::trace!("environ_get");
+
+    let mut header_offset = 0;
+
+    for (environ_index, env) in ctx.envs.iter().enumerate() {
+        let environ_ptr = mem.mut_data(environ + environ_index)?;
+        *environ_ptr = ((environ_buf.0 + header_offset) as u32).to_le();
+
+        let env_bytes = env.as_bytes();
+        let env_buf = mem.mut_slice(environ_buf + header_offset, env.len())?;
+        env_buf.copy_from_slice(env_bytes);
+        let ptr = mem.mut_data::<u8>(environ_buf + header_offset + env.len())?;
+        *ptr = 0u8;
+
+        header_offset += env.len() + 1;
+    }
+    Ok(())
+}
+
+pub fn environ_sizes_get<M: Memory>(
+    ctx: &WasiCtx,
+    mem: &mut M,
+    environ_count: WasmPtr<__wasi_size_t>,
+    environ_buf_size: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    log::trace!("environ_sizes_get");
+
+    let wasi_envs_len = ctx.envs.len();
+    debug_assert!(
+        wasi_envs_len < __wasi_size_t::MAX as usize,
+        "wasi_envs_len({wasi_envs_len})"
+    );
+    let environ_count = mem.mut_data(environ_count)?;
+    *environ_count = (wasi_envs_len as u32).to_le();
+
+    let mut wasi_envs_buf_size = 0;
+    for env in &ctx.envs {
+        // add \0
+        wasi_envs_buf_size += env.len() + 1;
+    }
+    let environ_buf_size = mem.mut_data(environ_buf_size)?;
+    *environ_buf_size = (wasi_envs_buf_size as u32).to_le();
+
+    Ok(())
+}
+
+pub fn clock_res_get<M: Memory>(
+    _ctx: &mut WasiCtx,
+    mem: &mut M,
+    clock_id: __wasi_clockid_t::Type,
+    resolution_ptr: WasmPtr<__wasi_timestamp_t>,
+) -> Result<(), Errno> {
+    log::trace!("clock_res_get");
+
+    let resolution = clock::wasi_clock_res_get(clock_id)?;
+    let resolution_ptr = mem.mut_data(resolution_ptr)?;
+    *resolution_ptr = resolution.to_le();
+    Ok(())
+}
+
+pub fn clock_time_get<M: Memory>(
+    ctx: &WasiCtx,
+    mem: &mut M,
+    clock_id: __wasi_clockid_t::Type,
+    precision: __wasi_timestamp_t,
+    time_ptr: WasmPtr<__wasi_timestamp_t>,
+) -> Result<(), Errno> {
+    log::trace!("clock_time_get");
+
+    let time = clock::wasi_clock_time_get(ctx, clock_id, precision)?;
+    let time_ptr = mem.mut_data(time_ptr)?;
+    *time_ptr = time.to_le();
+    Ok(())
+}
+
+pub fn random_get<M: Memory>(
+    _ctx: &mut WasiCtx,
+    mem: &mut M,
+    buf: WasmPtr<u8>,
+    buf_len: __wasi_size_t,
+) -> Result<(), Errno> {
+    log::trace!("random_get");
+
+    let u8_buffer = mem.mut_slice(buf, buf_len as usize)?;
+    getrandom::getrandom(u8_buffer).map_err(|_| Errno(__wasi_errno_t::__WASI_ERRNO_IO))
+}
+
+pub fn fd_prestat_get<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    prestat_ptr: WasmPtr<__wasi_prestat_t>,
+) -> Result<(), Errno> {
+    log::trace!("fd_prestat_get({fd})");
+
+    let prestat = mem.mut_data(prestat_ptr)?;
+
+    let pr_name_len = ctx.vfs.fd_preopen_get(fd as usize)?.as_bytes().len() as u32;
+
+    prestat.tag = __wasi_preopentype_t::__WASI_PREOPENTYPE_DIR;
+    prestat.u = __wasi_prestat_u_t {
+        dir: __wasi_prestat_dir_t { pr_name_len },
+    };
+    Ok(())
+}
+
+pub fn fd_prestat_dir_name<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    path_buf_ptr: WasmPtr<u8>,
+    path_max_len: __wasi_size_t,
+) -> Result<(), Errno> {
+    log::trace!("fd_prestat_dir_name({fd})");
+
+    let path = ctx.vfs.fd_preopen_get(fd as usize)?;
+    let path_bytes = path.as_bytes();
+    let path_len = path_bytes.len();
+    if path_len > path_max_len as usize {
+        return Err(Errno::__WASI_ERRNO_NAMETOOLONG);
+    }
+    let path_buf = mem.mut_slice(path_buf_ptr, path_max_len as usize)?;
+    path_buf.clone_from_slice(&path_bytes[0..path_max_len as usize]);
+    Ok(())
+}
+
+pub fn fd_renumber<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    from: __wasi_fd_t,
+    to: __wasi_fd_t,
+) -> Result<(), Errno> {
+    log::trace!("fd_renumber {from} {to}");
+
+    ctx.vfs.fd_renumber(from as usize, to as usize)
+}
+
+pub fn fd_advise<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    offset: __wasi_filesize_t,
+    len: __wasi_filesize_t,
+    advice: __wasi_advice_t::Type,
+) -> Result<(), Errno> {
+    log::trace!("fd_advise {fd}");
+
+    ctx.vfs.fd_advise(fd as usize, offset, len, advice)
+}
+
+pub fn fd_allocate<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    offset: __wasi_filesize_t,
+    len: __wasi_filesize_t,
+) -> Result<(), Errno> {
+    log::trace!("fd_allocate {fd}");
+
+    ctx.vfs.get_mut_file(fd as usize)?.fd_allocate(offset, len)
+}
+
+pub fn fd_close<M: Memory>(ctx: &mut WasiCtx, _mem: &mut M, fd: __wasi_fd_t) -> Result<(), Errno> {
+    log::trace!("fd_close {fd}");
+
+    ctx.vfs.fd_close(fd as usize)
+}
+
+pub fn fd_seek<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    offset: __wasi_filedelta_t,
+    whence: __wasi_whence_t::Type,
+    newoffset_ptr: WasmPtr<__wasi_filesize_t>,
+) -> Result<(), Errno> {
+    log::trace!("fd_seek {fd}");
+
+    let fs = ctx.vfs.get_mut_file(fd as usize)?;
+    let newoffset = mem.mut_data(newoffset_ptr)?;
+    *newoffset = fs.fd_seek(offset, whence)?.to_le();
+    Ok(())
+}
+
+pub fn fd_sync<M: Memory>(ctx: &mut WasiCtx, _mem: &mut M, fd: __wasi_fd_t) -> Result<(), Errno> {
+    log::trace!("fd_sync {fd}");
+
+    let fs = ctx.vfs.get_mut_file(fd as usize)?;
+    fs.fd_sync()
+}
+
+pub fn fd_datasync<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+) -> Result<(), Errno> {
+    log::trace!("fd_datasync {fd}");
+
+    let fs = ctx.vfs.get_mut_file(fd as usize)?;
+    fs.fd_datasync()
+}
+
+pub fn fd_tell<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    offset: WasmPtr<__wasi_filesize_t>,
+) -> Result<(), Errno> {
+    log::trace!("fd_tell {fd}");
+
+    let fs = ctx.vfs.get_mut_file(fd as usize)?;
+    mem.write_data(offset, fs.fd_tell()?)
+}
+
+pub fn fd_fdstat_get<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf_ptr: WasmPtr<__wasi_fdstat_t>,
+) -> Result<(), Errno> {
+    log::trace!("fd_fdstat_get {fd}");
+
+    let fd_stat;
+    #[cfg(all(unix, feature = "async_tokio"))]
+    {
+        if let Ok(s) = ctx.vfs.get_socket(fd as usize) {
+            fd_stat = s.fd_fdstat_get()?;
+        } else {
+            fd_stat = ctx.vfs.get_inode(fd as usize)?.fd_fdstat_get()?;
+        }
+    }
+    #[cfg(not(all(unix, feature = "async_tokio")))]
+    {
+        fd_stat = ctx.vfs.get_inode(fd as usize)?.fd_fdstat_get()?;
+    }
+
+    mem.write_data(buf_ptr, __wasi_fdstat_t::from(fd_stat))
+}
+
+pub fn fd_fdstat_set_flags<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    flags: __wasi_fdflags_t::Type,
+) -> Result<(), Errno> {
+    log::trace!("fd_fdstat_set_flags {fd}");
+
+    let fdflags = FdFlags::from_bits_truncate(flags);
+
+    if let Ok(fs) = ctx.vfs.get_mut_file(fd as usize) {
+        fs.fd_fdstat_set_flags(fdflags)?;
+        return Ok(());
+    }
+    #[cfg(all(unix, feature = "async_tokio"))]
+    if let Ok(s) = ctx.vfs.get_mut_socket(fd as usize) {
+        s.set_nonblocking(fdflags.contains(FdFlags::NONBLOCK))?;
+        return Ok(());
+    }
+
+    Err(Errno::__WASI_ERRNO_BADF)
+}
+
+pub fn fd_fdstat_set_rights<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    fs_rights_base: __wasi_rights_t::Type,
+    fs_rights_inheriting: __wasi_rights_t::Type,
+) -> Result<(), Errno> {
+    log::trace!("fd_fdstat_set_rights {fd}");
+
+    let fs_rights_base = WASIRights::from_bits_truncate(fs_rights_base);
+    let fs_rights_inheriting = WASIRights::from_bits_truncate(fs_rights_inheriting);
+    ctx.vfs
+        .get_mut_inode(fd as usize)?
+        .fd_fdstat_set_rights(fs_rights_base, fs_rights_inheriting)
+}
+
+pub fn fd_filestat_get<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf: WasmPtr<__wasi_filestat_t>,
+) -> Result<(), Errno> {
+    log::trace!("fd_filestat_get {fd}");
+
+    let filestat = ctx.vfs.get_inode(fd as usize)?.fd_filestat_get()?;
+    mem.write_data(buf, __wasi_filestat_t::from(filestat))
+}
+
+pub fn fd_filestat_set_size<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    st_size: __wasi_filesize_t,
+) -> Result<(), Errno> {
+    log::trace!("fd_filestat_set_size {fd}");
+
+    let fs = ctx.vfs.get_mut_file(fd as usize)?;
+    fs.fd_filestat_set_size(st_size)
+}
+
+pub fn fd_filestat_set_times<M: Memory>(
+    ctx: &mut WasiCtx,
+    _mem: &mut M,
+    fd: __wasi_fd_t,
+    st_atim: __wasi_timestamp_t,
+    st_mtim: __wasi_timestamp_t,
+    fst_flags: __wasi_fstflags_t::Type,
+) -> Result<(), Errno> {
+    log::trace!("fd_filestat_set_times {fd}");
+
+    let inode = ctx.vfs.get_mut_inode(fd as usize)?;
+    inode.fd_filestat_set_times(st_atim, st_mtim, fst_flags)
+}
+
+pub fn fd_read<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    iovs: WasmPtr<__wasi_iovec_t>,
+    iovs_len: __wasi_size_t,
+    nread: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    log::trace!("fd_read {fd}");
+
+    let fs = ctx.vfs.get_mut_file(fd as usize)?;
+    let mut bufs = mem.mut_iovec(iovs, iovs_len)?;
+    let n = fs.fd_read(&mut bufs)? as __wasi_size_t;
+    mem.write_data(nread, n.to_le())
+}
+
+pub fn fd_pread<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    iovs: WasmPtr<__wasi_iovec_t>,
+    iovs_len: __wasi_size_t,
+    offset: __wasi_filesize_t,
+    nread: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    log::trace!("fd_pread {fd}");
+
+    let fs = ctx.vfs.get_mut_file(fd as usize)?;
+    let mut bufs = mem.mut_iovec(iovs, iovs_len)?;
+    let n = fs.fd_pread(&mut bufs, offset)? as __wasi_size_t;
+    mem.write_data(nread, n.to_le())
+}
+
+pub fn fd_write<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    iovs: WasmPtr<__wasi_ciovec_t>,
+    iovs_len: __wasi_size_t,
+    nwritten: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    log::trace!("fd_write {fd}");
+
+    let fs = ctx.vfs.get_mut_file(fd as usize)?;
+    let bufs = mem.get_iovec(iovs, iovs_len)?;
+    let n = fs.fd_write(&bufs)? as __wasi_size_t;
+    mem.write_data(nwritten, n.to_le())
+}
+
+pub fn fd_pwrite<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    iovs: WasmPtr<__wasi_ciovec_t>,
+    iovs_len: __wasi_size_t,
+    offset: __wasi_filesize_t,
+    nwritten: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    log::trace!("fd_pwrite {fd}");
+
+    let fs = ctx.vfs.get_mut_file(fd as usize)?;
+    let bufs = mem.get_iovec(iovs, iovs_len)?;
+    let n = fs.fd_pwrite(&bufs, offset)? as __wasi_size_t;
+    mem.write_data(nwritten, n.to_le())
+}
+
+pub fn fd_readdir<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    fd: __wasi_fd_t,
+    buf: WasmPtr<u8>,
+    buf_len: __wasi_size_t,
+    cookie: __wasi_dircookie_t,
+    bufused_ptr: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    log::trace!("fd_readdir {fd}");
+
+    let dir = ctx.vfs.get_dir(fd as usize)?;
+    let buf = mem.mut_slice(buf, buf_len as usize)?;
+    let bufused = dir.fd_readdir(cookie as usize, buf)? as __wasi_size_t;
+    let bufused_ptr = mem.mut_data(bufused_ptr)?;
+    *bufused_ptr = bufused.to_le();
+    Ok(())
+}
+
+pub fn path_create_directory<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    dirfd: __wasi_fd_t,
+    path_ptr: WasmPtr<u8>,
+    path_len: __wasi_size_t,
+) -> Result<(), Errno> {
+    log::trace!("path_create_directory");
+
+    let path_buf = mem.get_slice(path_ptr, path_len as usize)?;
+    let path_str = std::str::from_utf8(path_buf).or(Err(Errno::__WASI_ERRNO_ILSEQ))?;
+
+    log::trace!("path_create_directory({dirfd} {path_str})");
+    ctx.vfs.path_create_directory(dirfd as usize, path_str)
+}
+
+pub fn path_filestat_get<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    dirfd: __wasi_fd_t,
+    flags: __wasi_lookupflags_t::Type,
+    path_ptr: WasmPtr<u8>,
+    path_len: __wasi_size_t,
+    file_stat_ptr: WasmPtr<__wasi_filestat_t>,
+) -> Result<(), Errno> {
+    let path_buf = mem.get_slice(path_ptr, path_len as usize)?;
+    let path_str = std::str::from_utf8(path_buf).or(Err(Errno::__WASI_ERRNO_ILSEQ))?;
+
+    log::trace!("path_filestat_get {dirfd} {path_str}");
+
+    let flags = flags & __wasi_lookupflags_t::__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW > 0;
+    let file_stat = ctx.vfs.path_filestat_get(dirfd as usize, path_str, flags)?;
+    let stat = mem.mut_data(file_stat_ptr)?;
+    *stat = file_stat.into();
+    Ok(())
+}
+
+pub fn path_filestat_set_times<M: Memory>(
+    _ctx: &mut WasiCtx,
+    _mem: &mut M,
+    _dirfd: __wasi_fd_t,
+    _flags: __wasi_lookupflags_t::Type,
+    _path: WasmPtr<u8>,
+    _path_len: __wasi_size_t,
+    _st_atim: __wasi_timestamp_t,
+    _st_mtim: __wasi_timestamp_t,
+    _fst_flags: __wasi_fstflags_t::Type,
+) -> Result<(), Errno> {
+    Err(Errno::__WASI_ERRNO_NOSYS)
+}
+
+pub fn path_link<M: Memory>(
+    _ctx: &mut WasiCtx,
+    _mem: &mut M,
+    _old_fd: __wasi_fd_t,
+    _old_flags: __wasi_lookupflags_t::Type,
+    _old_path: WasmPtr<u8>,
+    _old_path_len: __wasi_size_t,
+    _new_fd: __wasi_fd_t,
+    _new_path: WasmPtr<u8>,
+    _new_path_len: __wasi_size_t,
+) -> Result<(), Errno> {
+    Err(Errno::__WASI_ERRNO_NOSYS)
+}
+
+pub fn path_open<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &mut M,
+    dirfd: __wasi_fd_t,
+    _dirflags: __wasi_lookupflags_t::Type,
+    path: WasmPtr<u8>,
+    path_len: __wasi_size_t,
+    o_flags: __wasi_oflags_t::Type,
+    fs_rights_base: __wasi_rights_t::Type,
+    fs_rights_inheriting: __wasi_rights_t::Type,
+    fs_flags: __wasi_fdflags_t::Type,
+    fd_ptr: WasmPtr<__wasi_fd_t>,
+) -> Result<(), Errno> {
+    let path_buf = mem.get_slice(path, path_len as usize)?;
+    let path = std::str::from_utf8(path_buf).or(Err(Errno::__WASI_ERRNO_ILSEQ))?;
+
+    let oflags = vfs::OFlags::from_bits_truncate(o_flags);
+    let fdflags = vfs::FdFlags::from_bits_truncate(fs_flags);
+    let fs_rights_base = vfs::WASIRights::from_bits_truncate(fs_rights_base);
+    let fs_rights_inheriting = vfs::WASIRights::from_bits_truncate(fs_rights_inheriting);
+
+    let vfd = ctx.vfs.path_open(
+        dirfd as usize,
+        path,
+        oflags,
+        fs_rights_base,
+        fs_rights_inheriting,
+        fdflags,
+    )?;
+
+    mem.write_data(fd_ptr, vfd as i32)
+}
+
+pub fn path_readlink<M: Memory>(
+    _ctx: &mut WasiCtx,
+    _mem: &mut M,
+    _dir_fd: __wasi_fd_t,
+    _path: WasmPtr<u8>,
+    _path_len: __wasi_size_t,
+    _buf: WasmPtr<u8>,
+    _buf_len: __wasi_size_t,
+    _buf_used: WasmPtr<__wasi_size_t>,
+) -> Result<(), Errno> {
+    Err(Errno::__WASI_ERRNO_NOSYS)
+}
+
+pub fn path_remove_directory<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    dirfd: __wasi_fd_t,
+    path_ptr: WasmPtr<u8>,
+    path_len: __wasi_size_t,
+) -> Result<(), Errno> {
+    let path_buf = mem.get_slice(path_ptr, path_len as usize)?;
+    let path = std::str::from_utf8(path_buf).or(Err(Errno::__WASI_ERRNO_ILSEQ))?;
+    log::trace!("path_remove_directory {dirfd} {path}");
+    ctx.vfs.path_remove_directory(dirfd as usize, path)
+}
+
+pub fn path_rename<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    old_fd: __wasi_fd_t,
+    old_path: WasmPtr<u8>,
+    old_path_len: __wasi_size_t,
+    new_fd: __wasi_fd_t,
+    new_path: WasmPtr<u8>,
+    new_path_len: __wasi_size_t,
+) -> Result<(), Errno> {
+    let old_path = mem.get_slice(old_path, old_path_len as usize)?;
+    let old_path = std::str::from_utf8(old_path).or(Err(Errno::__WASI_ERRNO_ILSEQ))?;
+
+    let new_path = mem.get_slice(new_path, new_path_len as usize)?;
+    let new_path = std::str::from_utf8(new_path).or(Err(Errno::__WASI_ERRNO_ILSEQ))?;
+
+    log::trace!("path_rename {old_fd} {old_path} {new_fd} {new_path}");
+
+    ctx.vfs
+        .path_rename(old_fd as usize, old_path, new_fd as usize, new_path)
+}
+
+pub fn path_symlink<M: Memory>(
+    _ctx: &mut WasiCtx,
+    _mem: &mut M,
+    _old_path: WasmPtr<u8>,
+    _old_path_len: __wasi_size_t,
+    _fd: __wasi_fd_t,
+    _new_path: WasmPtr<u8>,
+    _new_path_len: __wasi_size_t,
+) -> Result<(), Errno> {
+    Err(Errno::__WASI_ERRNO_NOSYS)
+}
+
+pub fn path_unlink_file<M: Memory>(
+    ctx: &mut WasiCtx,
+    mem: &M,
+    dirfd: __wasi_fd_t,
+    path_ptr: WasmPtr<u8>,
+    path_len: __wasi_size_t,
+) -> Result<(), Errno> {
+    let path_buf = mem.get_slice(path_ptr, path_len as usize)?;
+    let path = std::str::from_utf8(path_buf).or(Err(Errno::__WASI_ERRNO_ILSEQ))?;
+
+    log::trace!("path_unlink_file {dirfd} {path}");
+    ctx.vfs.path_unlink_file(dirfd as usize, path)
+}
+
+pub fn proc_exit<M: Memory>(ctx: &mut WasiCtx, _mem: &mut M, code: __wasi_exitcode_t) {
+    ctx.exit_code = u32::from_le(code)
+}
+
+pub fn proc_raise<M: Memory>(
+    _ctx: &mut WasiCtx,
+    _mem: &mut M,
+    _sig: __wasi_signal_t::Type,
+) -> Result<(), Errno> {
+    Err(Errno::__WASI_ERRNO_NOSYS)
+}
+
+pub fn sched_yield<VM: AsyncVM>(_ctx: &mut WasiCtx, vm: &mut VM) -> Result<(), Errno> {
+    vm.yield_now()
+}
+
\ No newline at end of file diff --git a/src/wasmedge_macro/lib.rs.html b/src/wasmedge_macro/lib.rs.html new file mode 100644 index 000000000..be8ee4384 --- /dev/null +++ b/src/wasmedge_macro/lib.rs.html @@ -0,0 +1,1547 @@ +lib.rs - source

wasmedge_macro/
lib.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
#![doc(
+    html_logo_url = "https://github.com/cncf/artwork/blob/master/projects/wasm-edge-runtime/icon/color/wasm-edge-runtime-icon-color.png?raw=true",
+    html_favicon_url = "https://raw.githubusercontent.com/cncf/artwork/49169bdbc88a7ce3c4a722c641cc2d548bd5c340/projects/wasm-edge-runtime/icon/color/wasm-edge-runtime-icon-color.svg"
+)]
+
+//! # Overview
+//! The [wasmedge-macro](https://crates.io/crates/wasmedge-macro) crate defines a group of procedural macros used by both [wasmedge-sdk](https://crates.io/crates/wasmedge-sdk) and [wasmedge-sys](https://crates.io/crates/wasmedge-sys) crates.
+
+use proc_macro::TokenStream;
+use quote::quote;
+use syn::{parse_macro_input, parse_quote, spanned::Spanned, FnArg, Item, Pat, PatType};
+
+// ================== macros for wasmedge-sdk ==================
+
+/// Declare a native function that will be used to create a host function instance.
+#[proc_macro_attribute]
+pub fn host_function(_attr: TokenStream, item: TokenStream) -> TokenStream {
+    let body_ast = parse_macro_input!(item as Item);
+    if let Item::Fn(item_fn) = body_ast {
+        match expand_host_func(&item_fn) {
+            Ok(token_stream) => token_stream.into(),
+            Err(err) => err.to_compile_error().into(),
+        }
+    } else {
+        TokenStream::new()
+    }
+}
+
+fn expand_host_func(item_fn: &syn::ItemFn) -> syn::Result<proc_macro2::TokenStream> {
+    // extract T from Option<&mut T>
+    let ret = match &item_fn.sig.inputs.len() {
+        2 => expand_host_func_with_two_args(item_fn),
+        3 => expand_host_func_with_three_args(item_fn),
+        _ => panic!(
+            "Invalid numbers of host function arguments: {}",
+            &item_fn.sig.inputs.len()
+        ),
+    };
+
+    Ok(ret)
+}
+
+fn expand_host_func_with_two_args(item_fn: &syn::ItemFn) -> proc_macro2::TokenStream {
+    // * define the signature of wrapper function
+    // name of wrapper function
+    let wrapper_fn_name_ident = item_fn.sig.ident.clone();
+    let wrapper_fn_name_literal = wrapper_fn_name_ident.to_string();
+    // arguments of wrapper function
+    let wrapper_fn_inputs: syn::punctuated::Punctuated<FnArg, syn::token::Comma> = parse_quote!(
+        frame: wasmedge_sdk::CallingFrame,
+        args: Vec<wasmedge_sdk::WasmValue>,
+        _data: *mut std::os::raw::c_void
+    );
+    // return type of wrapper function
+    let wrapper_fn_return = item_fn.sig.output.clone();
+    // visibility of wrapper function
+    let wrapper_visibility = item_fn.vis.clone();
+
+    // get the name of the first argument
+    let (ident_first_arg, mutability) = match &item_fn.sig.inputs[0] {
+        FnArg::Typed(PatType { pat, .. }) => match &**pat {
+            Pat::Ident(pat_ident) => (pat_ident.ident.clone(), pat_ident.mutability),
+            Pat::Wild(_) => (
+                proc_macro2::Ident::new("_caller", proc_macro2::Span::call_site()),
+                None,
+            ),
+            _ => panic!("The argument pattern of the first argument is not a simple ident"),
+        },
+        FnArg::Receiver(_) => panic!("The first argument is a receiver"),
+    };
+
+    // get the name of the second argument
+    let ident_second_arg = match &item_fn.sig.inputs[1] {
+        FnArg::Typed(PatType { pat, .. }) => match &**pat {
+            Pat::Ident(pat_ident) => pat_ident.ident.clone(),
+            Pat::Wild(_) => proc_macro2::Ident::new("_args", proc_macro2::Span::call_site()),
+            _ => panic!("The argument pattern of the second argument is not a simple ident"),
+        },
+        FnArg::Receiver(_) => panic!("The second argument is a receiver"),
+    };
+
+    // * define the signature of inner function
+    // name of inner function
+    let inner_fn_name_literal = format!("inner_{wrapper_fn_name_literal}");
+    let inner_fn_name_ident = syn::Ident::new(&inner_fn_name_literal, item_fn.sig.span());
+    // arguments of inner function
+    let inner_fn_inputs = item_fn.sig.inputs.clone();
+    // return type of inner function
+    let inner_fn_return = item_fn.sig.output.clone();
+    // body of inner function
+    let inner_fn_block = item_fn.block.clone();
+
+    quote!(
+        # wrapper_visibility fn #wrapper_fn_name_ident (#wrapper_fn_inputs) #wrapper_fn_return {
+            // define inner function
+            fn #inner_fn_name_ident (#inner_fn_inputs) #inner_fn_return {
+                #inner_fn_block
+            }
+
+            // create a Caller instance
+            let #mutability #ident_first_arg = Caller::new(frame);
+
+            let #ident_second_arg = args;
+
+            #inner_fn_name_ident(#ident_first_arg, #ident_second_arg)
+        }
+    )
+}
+
+fn expand_host_func_with_three_args(item_fn: &syn::ItemFn) -> proc_macro2::TokenStream {
+    // * define the signature of wrapper function
+    // name of wrapper function
+    let wrapper_fn_name_ident = item_fn.sig.ident.clone();
+    let wrapper_fn_name_literal = wrapper_fn_name_ident.to_string();
+    // arguments of wrapper function
+    let wrapper_fn_inputs: syn::punctuated::Punctuated<FnArg, syn::token::Comma> = parse_quote!(
+        frame: wasmedge_sdk::CallingFrame,
+        args: Vec<wasmedge_sdk::WasmValue>,
+        data: *mut std::os::raw::c_void
+    );
+    // return type of wrapper function
+    let wrapper_fn_return = item_fn.sig.output.clone();
+    // visibility of wrapper function
+    let wrapper_visibility = item_fn.vis.clone();
+
+    // * define the signature of inner function
+    // name of inner function
+    let inner_fn_name_literal = format!("inner_{wrapper_fn_name_literal}");
+    let inner_fn_name_ident = syn::Ident::new(&inner_fn_name_literal, item_fn.sig.span());
+    // arguments of inner function
+    let inner_fn_inputs = item_fn.sig.inputs.clone();
+    // return type of inner function
+    let inner_fn_return = item_fn.sig.output.clone();
+    // body of inner function
+    let inner_fn_block = item_fn.block.clone();
+
+    // extract T from Option<&mut T>
+
+    let data_arg = item_fn.sig.inputs.last().unwrap().clone();
+    let ty_ptr = match &data_arg {
+        FnArg::Typed(PatType { ref ty, .. }) => match **ty {
+            syn::Type::Reference(syn::TypeReference { ref elem, .. }) => syn::TypePtr {
+                star_token: parse_quote!(*),
+                const_token: None,
+                mutability: Some(parse_quote!(mut)),
+                elem: elem.clone(),
+            },
+            syn::Type::Path(syn::TypePath { ref path, .. }) => match path.segments.last() {
+                Some(segment) => {
+                    let id = segment.ident.to_string();
+                    match id == "Option" {
+                        true => match segment.arguments {
+                            syn::PathArguments::AngleBracketed(
+                                syn::AngleBracketedGenericArguments { ref args, .. },
+                            ) => {
+                                let last_generic_arg = args.last();
+                                match last_generic_arg {
+                                    Some(arg) => match arg {
+                                        syn::GenericArgument::Type(ty) => match ty {
+                                            syn::Type::Reference(syn::TypeReference {
+                                                ref elem,
+                                                ..
+                                            }) => syn::TypePtr {
+                                                star_token: parse_quote!(*),
+                                                const_token: None,
+                                                mutability: Some(parse_quote!(mut)),
+                                                elem: elem.clone(),
+                                            },
+                                            _ => panic!("Not found syn::Type::Reference"),
+                                        },
+                                        _ => {
+                                            panic!("Not found syn::GenericArgument::Type")
+                                        }
+                                    },
+                                    None => panic!("Not found the last GenericArgument"),
+                                }
+                            }
+                            _ => panic!("Not found syn::PathArguments::AngleBracketed"),
+                        },
+                        false => panic!("Not found segment ident: Option"),
+                    }
+                }
+                None => panic!("Not found path segments"),
+            },
+            _ => panic!("Unsupported syn::Type type"),
+        },
+        _ => panic!("Unsupported syn::FnArg type"),
+    };
+
+    // generate token stream
+    quote!(
+        # wrapper_visibility fn #wrapper_fn_name_ident (#wrapper_fn_inputs) #wrapper_fn_return {
+            // define inner function
+            fn #inner_fn_name_ident (#inner_fn_inputs) #inner_fn_return {
+                #inner_fn_block
+            }
+
+            // create a Caller instance
+            let caller = Caller::new(frame);
+
+            let data = unsafe { &mut *(data as #ty_ptr) };
+
+            #inner_fn_name_ident(caller, args, data)
+        }
+    )
+}
+
+/// Declare a native async function that will be used to create an async host function instance.
+#[proc_macro_attribute]
+pub fn async_host_function(_attr: TokenStream, item: TokenStream) -> TokenStream {
+    let body_ast = parse_macro_input!(item as Item);
+    if let Item::Fn(item_fn) = body_ast {
+        if item_fn.sig.asyncness.is_none() {
+            panic!("The function must be async");
+        }
+
+        match expand_async_host_func(&item_fn) {
+            Ok(token_stream) => token_stream.into(),
+            Err(err) => err.to_compile_error().into(),
+        }
+    } else {
+        TokenStream::new()
+    }
+}
+
+fn expand_async_host_func(item_fn: &syn::ItemFn) -> syn::Result<proc_macro2::TokenStream> {
+    // extract T from Option<&mut T>
+    let ret = match &item_fn.sig.inputs.len() {
+        2 => expand_async_host_func_with_two_args(item_fn),
+        3 => expand_async_host_func_with_three_args(item_fn),
+        _ => panic!(
+            "Invalid numbers of host function arguments: {}",
+            &item_fn.sig.inputs.len()
+        ),
+    };
+
+    Ok(ret)
+}
+
+fn expand_async_host_func_with_two_args(item_fn: &syn::ItemFn) -> proc_macro2::TokenStream {
+    // * define the signature of wrapper function
+    // name of wrapper function
+    let wrapper_fn_name_ident = item_fn.sig.ident.clone();
+    // arguments of wrapper function
+    let wrapper_fn_inputs: syn::punctuated::Punctuated<FnArg, syn::token::Comma> = parse_quote!(
+        frame: wasmedge_sdk::CallingFrame,
+        args: Vec<wasmedge_sdk::WasmValue>,
+        _data: *mut std::ffi::c_void
+    );
+
+    // visibility of wrapper function
+    let wrapper_visibility = item_fn.vis.clone();
+
+    // get the name of the first argument
+    let (ident_first_arg, mutability) = match &item_fn.sig.inputs[0] {
+        FnArg::Typed(PatType { pat, .. }) => match &**pat {
+            Pat::Ident(pat_ident) => (pat_ident.ident.clone(), pat_ident.mutability),
+            Pat::Wild(_) => (
+                proc_macro2::Ident::new("_caller", proc_macro2::Span::call_site()),
+                None,
+            ),
+            _ => panic!("The argument pattern of the first argument is not a simple ident"),
+        },
+        FnArg::Receiver(_) => panic!("The first argument is a receiver"),
+    };
+
+    // get the name of the second argument
+    let ident_second_arg = match &item_fn.sig.inputs[1] {
+        FnArg::Typed(PatType { pat, .. }) => match &**pat {
+            Pat::Ident(pat_ident) => pat_ident.ident.clone(),
+            Pat::Wild(_) => proc_macro2::Ident::new("_args", proc_macro2::Span::call_site()),
+            _ => panic!("The argument pattern of the second argument is not a simple ident"),
+        },
+        FnArg::Receiver(_) => panic!("The second argument is a receiver"),
+    };
+
+    // func body
+    let fn_block = item_fn.block.clone();
+
+    quote!(
+        #wrapper_visibility fn #wrapper_fn_name_ident (#wrapper_fn_inputs) -> Box<(dyn std::future::Future<Output = Result<Vec<WasmValue>, HostFuncError>> + Send)> {
+
+            // create a Caller instance
+            let #mutability #ident_first_arg = Caller::new(frame);
+
+            let #ident_second_arg = args;
+
+            Box::new(async move {
+                #fn_block
+            })
+        }
+    )
+}
+
+fn expand_async_host_func_with_three_args(item_fn: &syn::ItemFn) -> proc_macro2::TokenStream {
+    // * define the signature of wrapper function
+    // name of wrapper function
+    let wrapper_fn_name_ident = item_fn.sig.ident.clone();
+    // arguments of wrapper function
+    let wrapper_fn_inputs: syn::punctuated::Punctuated<FnArg, syn::token::Comma> = parse_quote!(
+        frame: wasmedge_sdk::CallingFrame,
+        args: Vec<wasmedge_sdk::WasmValue>,
+        data: *mut std::ffi::c_void
+    );
+    // visibility of wrapper function
+    let wrapper_visibility = item_fn.vis.clone();
+
+    // get the name of the first argument
+    let (ident_first_arg, mutability) = match &item_fn.sig.inputs[0] {
+        FnArg::Typed(PatType { pat, .. }) => match &**pat {
+            Pat::Ident(pat_ident) => (pat_ident.ident.clone(), pat_ident.mutability),
+            Pat::Wild(_) => (
+                proc_macro2::Ident::new("_caller", proc_macro2::Span::call_site()),
+                None,
+            ),
+            _ => panic!("The argument pattern of the first argument is not a simple ident"),
+        },
+        FnArg::Receiver(_) => panic!("The first argument is a receiver"),
+    };
+
+    // get the name of the second argument
+    let ident_second_arg = match &item_fn.sig.inputs[1] {
+        FnArg::Typed(PatType { pat, .. }) => match &**pat {
+            Pat::Ident(pat_ident) => pat_ident.ident.clone(),
+            Pat::Wild(_) => proc_macro2::Ident::new("_args", proc_macro2::Span::call_site()),
+            _ => panic!("The argument pattern of the second argument is not a simple ident"),
+        },
+        FnArg::Receiver(_) => panic!("The second argument is a receiver"),
+    };
+
+    // get the name of the third argument
+    let ident_third_arg = match &item_fn.sig.inputs[2] {
+        FnArg::Typed(PatType { pat, .. }) => match &**pat {
+            Pat::Ident(pat_ident) => pat_ident.ident.clone(),
+            Pat::Wild(_) => proc_macro2::Ident::new("_data", proc_macro2::Span::call_site()),
+            _ => panic!("The argument pattern of the third argument is not a simple ident"),
+        },
+        FnArg::Receiver(_) => panic!("The third argument is a receiver"),
+    };
+
+    // get the type of the third argument
+    let data_arg = item_fn.sig.inputs.last().unwrap().clone();
+    let ty_third_arg = match &data_arg {
+        FnArg::Typed(PatType { ref ty, .. }) => match **ty {
+            syn::Type::Reference(syn::TypeReference { ref elem, .. }) => syn::TypePtr {
+                star_token: parse_quote!(*),
+                const_token: None,
+                mutability: Some(parse_quote!(mut)),
+                elem: elem.clone(),
+            },
+            syn::Type::Path(syn::TypePath { ref path, .. }) => match path.segments.last() {
+                Some(segment) => {
+                    let id = segment.ident.to_string();
+                    match id == "Option" {
+                        true => match segment.arguments {
+                            syn::PathArguments::AngleBracketed(
+                                syn::AngleBracketedGenericArguments { ref args, .. },
+                            ) => {
+                                let last_generic_arg = args.last();
+                                match last_generic_arg {
+                                    Some(arg) => match arg {
+                                        syn::GenericArgument::Type(ty) => match ty {
+                                            syn::Type::Reference(syn::TypeReference {
+                                                ref elem,
+                                                ..
+                                            }) => syn::TypePtr {
+                                                star_token: parse_quote!(*),
+                                                const_token: None,
+                                                mutability: Some(parse_quote!(mut)),
+                                                elem: elem.clone(),
+                                            },
+                                            _ => panic!("Not found syn::Type::Reference"),
+                                        },
+                                        _ => {
+                                            panic!("Not found syn::GenericArgument::Type")
+                                        }
+                                    },
+                                    None => panic!("Not found the last GenericArgument"),
+                                }
+                            }
+                            _ => panic!("Not found syn::PathArguments::AngleBracketed"),
+                        },
+                        false => panic!("Not found segment ident: Option"),
+                    }
+                }
+                None => panic!("Not found path segments"),
+            },
+            _ => panic!("Unsupported syn::Type type"),
+        },
+        _ => panic!("Unsupported syn::FnArg type"),
+    };
+
+    // func body
+    let fn_block = item_fn.block.clone();
+
+    quote!(
+        #wrapper_visibility fn #wrapper_fn_name_ident (#wrapper_fn_inputs) -> Box<(dyn std::future::Future<Output = Result<Vec<WasmValue>, HostFuncError>> + Send)> {
+
+            // create a Caller instance
+            let #mutability #ident_first_arg = Caller::new(frame);
+
+            let #ident_second_arg = args;
+
+            // host context data
+            let #ident_third_arg = unsafe { &mut *(data as #ty_third_arg) };
+
+            Box::new(async move {
+                #fn_block
+            })
+        }
+    )
+}
+
+// ================== macros for wasmedge-sys ==================
+
+#[doc(hidden)]
+#[proc_macro_attribute]
+pub fn sys_async_host_function(_attr: TokenStream, item: TokenStream) -> TokenStream {
+    let body_ast = parse_macro_input!(item as Item);
+    if let Item::Fn(item_fn) = body_ast {
+        if item_fn.sig.asyncness.is_none() {
+            panic!("The function must be async");
+        }
+
+        match sys_expand_async_host_func(&item_fn) {
+            Ok(token_stream) => token_stream.into(),
+            Err(err) => err.to_compile_error().into(),
+        }
+    } else {
+        TokenStream::new()
+    }
+}
+
+fn sys_expand_async_host_func(item_fn: &syn::ItemFn) -> syn::Result<proc_macro2::TokenStream> {
+    // extract T from Option<&mut T>
+    let ret = match &item_fn.sig.inputs.len() {
+        2 => sys_expand_async_host_func_with_two_args(item_fn),
+        3 => sys_expand_async_host_func_with_three_args(item_fn),
+        _ => panic!("Invalid numbers of host function arguments"),
+    };
+
+    Ok(ret)
+}
+
+fn sys_expand_async_host_func_with_two_args(item_fn: &syn::ItemFn) -> proc_macro2::TokenStream {
+    // function name
+    let fn_name_ident = &item_fn.sig.ident;
+
+    // function visibility
+    let fn_visibility = &item_fn.vis;
+
+    // generic types
+    let fn_generics = &item_fn.sig.generics;
+
+    // arguments
+    let mut fn_inputs = item_fn.sig.inputs.clone();
+    fn_inputs.push(parse_quote!(_: *mut std::os::raw::c_void));
+
+    // function body
+    let fn_block = &item_fn.block;
+
+    quote!(
+        #fn_visibility fn #fn_name_ident #fn_generics (#fn_inputs) -> Box<(dyn std::future::Future<Output = Result<Vec<WasmValue>, HostFuncError>> + Send)> {
+            Box::new(async move {
+                #fn_block
+            })
+        }
+    )
+}
+
+fn sys_expand_async_host_func_with_three_args(item_fn: &syn::ItemFn) -> proc_macro2::TokenStream {
+    // function name
+    let fn_name_ident = &item_fn.sig.ident;
+
+    // function visibility
+    let fn_visibility = &item_fn.vis;
+
+    // generic types
+    let fn_generics = &item_fn.sig.generics;
+
+    // arguments
+    let fn_inputs = &item_fn.sig.inputs;
+
+    // function body
+    let fn_block = &item_fn.block;
+
+    quote!(
+        #fn_visibility fn #fn_name_ident #fn_generics (#fn_inputs) -> Box<(dyn std::future::Future<Output = Result<Vec<WasmValue>, HostFuncError>> + Send)> {
+            Box::new(async move {
+                #fn_block
+            })
+        }
+    )
+}
+
+#[doc(hidden)]
+#[proc_macro_attribute]
+pub fn sys_host_function(_attr: TokenStream, item: TokenStream) -> TokenStream {
+    let body_ast = parse_macro_input!(item as Item);
+    if let Item::Fn(item_fn) = body_ast {
+        match sys_expand_host_func_new(&item_fn) {
+            Ok(token_stream) => token_stream.into(),
+            Err(err) => err.to_compile_error().into(),
+        }
+    } else {
+        TokenStream::new()
+    }
+}
+
+fn sys_expand_host_func_new(item_fn: &syn::ItemFn) -> syn::Result<proc_macro2::TokenStream> {
+    // * define the signature of wrapper function
+    // name of wrapper function
+    let wrapper_fn_name_ident = item_fn.sig.ident.clone();
+    let wrapper_fn_name_literal = wrapper_fn_name_ident.to_string();
+    // return type of wrapper function
+    let wrapper_fn_return = item_fn.sig.output.clone();
+    // visibility of wrapper function
+    let wrapper_fn_visibility = item_fn.vis.clone();
+
+    // * define the signature of inner function
+    // name of inner function
+    let inner_fn_name_literal = format!("inner_{wrapper_fn_name_literal}");
+    let inner_fn_name_ident = syn::Ident::new(&inner_fn_name_literal, item_fn.sig.span());
+    // arguments of inner function
+    let inner_fn_inputs = item_fn.sig.inputs.clone();
+    // return type of inner function
+    let inner_fn_return = item_fn.sig.output.clone();
+    // body of inner function
+    let inner_fn_block = item_fn.block.clone();
+
+    // extract the identities of the first two arguments
+    let arg1 = match &item_fn.sig.inputs[0] {
+        FnArg::Typed(PatType { pat, .. }) => match &**pat {
+            Pat::Ident(pat_ident) => pat_ident.ident.clone(),
+            Pat::Wild(_) => proc_macro2::Ident::new("_", proc_macro2::Span::call_site()),
+            _ => panic!("argument pattern is not a simple ident"),
+        },
+        FnArg::Receiver(_) => panic!("argument is a receiver"),
+    };
+    let arg2 = match &item_fn.sig.inputs[1] {
+        FnArg::Typed(PatType { pat, .. }) => match &**pat {
+            Pat::Ident(pat_ident) => pat_ident.ident.clone(),
+            Pat::Wild(_) => proc_macro2::Ident::new("_", proc_macro2::Span::call_site()),
+            _ => panic!("argument pattern is not a simple ident"),
+        },
+        FnArg::Receiver(_) => panic!("argument is a receiver"),
+    };
+
+    // extract T from Option<&mut T>
+    let ret = match item_fn.sig.inputs.len() {
+        2 => {
+            // insert the third argument
+            // let wrapper_fn_inputs = item_fn.sig.inputs.clone();
+            let mut wrapper_fn_inputs = item_fn.sig.inputs.clone();
+            wrapper_fn_inputs.push(parse_quote!(_data: *mut std::os::raw::c_void));
+
+            quote!(
+                #wrapper_fn_visibility fn #wrapper_fn_name_ident (#wrapper_fn_inputs) #wrapper_fn_return {
+                    // define inner function
+                    fn #inner_fn_name_ident (#inner_fn_inputs) #inner_fn_return {
+                        #inner_fn_block
+                    }
+
+                    #inner_fn_name_ident(#arg1, #arg2)
+                }
+            )
+        }
+        3 => {
+            let data_arg = item_fn.sig.inputs.last().unwrap().clone();
+            let ty_ptr = match &data_arg {
+                FnArg::Typed(PatType { ref ty, .. }) => match **ty {
+                    syn::Type::Reference(syn::TypeReference { ref elem, .. }) => syn::TypePtr {
+                        star_token: parse_quote!(*),
+                        const_token: None,
+                        mutability: Some(parse_quote!(mut)),
+                        elem: elem.clone(),
+                    },
+                    syn::Type::Path(syn::TypePath { ref path, .. }) => match path.segments.last() {
+                        Some(segment) => {
+                            let id = segment.ident.to_string();
+                            match id == "Option" {
+                                true => match segment.arguments {
+                                    syn::PathArguments::AngleBracketed(
+                                        syn::AngleBracketedGenericArguments { ref args, .. },
+                                    ) => {
+                                        let last_generic_arg = args.last();
+                                        match last_generic_arg {
+                                            Some(arg) => match arg {
+                                                syn::GenericArgument::Type(ty) => match ty {
+                                                    syn::Type::Reference(syn::TypeReference {
+                                                        ref elem,
+                                                        ..
+                                                    }) => syn::TypePtr {
+                                                        star_token: parse_quote!(*),
+                                                        const_token: None,
+                                                        mutability: Some(parse_quote!(mut)),
+                                                        elem: elem.clone(),
+                                                    },
+                                                    _ => panic!("Not found syn::Type::Reference"),
+                                                },
+                                                _ => {
+                                                    panic!("Not found syn::GenericArgument::Type")
+                                                }
+                                            },
+                                            None => panic!("Not found the last GenericArgument"),
+                                        }
+                                    }
+                                    _ => panic!("Not found syn::PathArguments::AngleBracketed"),
+                                },
+                                false => panic!("Not found segment ident: Option"),
+                            }
+                        }
+                        None => panic!("Not found path segments"),
+                    },
+                    _ => panic!("Unsupported syn::Type type"),
+                },
+                _ => panic!("Unsupported syn::FnArg type"),
+            };
+
+            // inputs of wrapper function
+            let mut wrapper_fn_inputs = item_fn.sig.inputs.clone();
+            wrapper_fn_inputs.pop();
+            wrapper_fn_inputs.push(parse_quote!(data: *mut std::os::raw::c_void));
+
+            // generate token stream
+            quote!(
+                #wrapper_fn_visibility fn #wrapper_fn_name_ident (#wrapper_fn_inputs) #wrapper_fn_return {
+                    // define inner function
+                    fn #inner_fn_name_ident (#inner_fn_inputs) #inner_fn_return {
+                        #inner_fn_block
+                    }
+
+                    let data = unsafe { &mut *(data as #ty_ptr) };
+
+                    #inner_fn_name_ident(#arg1, #arg2, data)
+                }
+            )
+        }
+        _ => panic!("Invalid numbers of host function arguments"),
+    };
+
+    Ok(ret)
+}
+
+// ================== macros for wasmedge-sys wasi host functions ==================
+
+#[doc(hidden)]
+#[proc_macro_attribute]
+pub fn sys_wasi_host_function(_attr: TokenStream, item: TokenStream) -> TokenStream {
+    let body_ast = parse_macro_input!(item as Item);
+    if let Item::Fn(item_fn) = body_ast {
+        match sys_expand_wasi_host_func(&item_fn) {
+            Ok(token_stream) => token_stream.into(),
+            Err(err) => err.to_compile_error().into(),
+        }
+    } else {
+        TokenStream::new()
+    }
+}
+
+fn sys_expand_wasi_host_func(item_fn: &syn::ItemFn) -> syn::Result<proc_macro2::TokenStream> {
+    // * define the signature of wrapper function
+    // name of wrapper function
+    let fn_name_ident = &item_fn.sig.ident;
+    // return type of wrapper function
+    let fn_return = &item_fn.sig.output;
+    // visibility of wrapper function
+    let fn_visibility = &item_fn.vis;
+
+    // extract T from Option<&mut T>
+    let ret = match item_fn.sig.inputs.len() {
+        3 => {
+            let fn_generics = &item_fn.sig.generics;
+
+            // inputs of wrapper function
+            let fn_inputs = &item_fn.sig.inputs;
+
+            let fn_block = item_fn.block.clone();
+
+            quote!(
+                #fn_visibility fn #fn_name_ident #fn_generics (#fn_inputs) #fn_return
+                    #fn_block
+            )
+        }
+        _ => panic!("Invalid numbers of host function arguments"),
+    };
+
+    Ok(ret)
+}
+
+#[doc(hidden)]
+#[proc_macro_attribute]
+pub fn sys_async_wasi_host_function(_attr: TokenStream, item: TokenStream) -> TokenStream {
+    let body_ast = parse_macro_input!(item as Item);
+    if let Item::Fn(item_fn) = body_ast {
+        if item_fn.sig.asyncness.is_none() {
+            panic!("The function must be async");
+        }
+
+        match sys_expand_async_wasi_host_func(&item_fn) {
+            Ok(token_stream) => token_stream.into(),
+            Err(err) => err.to_compile_error().into(),
+        }
+    } else {
+        TokenStream::new()
+    }
+}
+
+fn sys_expand_async_wasi_host_func(item_fn: &syn::ItemFn) -> syn::Result<proc_macro2::TokenStream> {
+    // extract T from Option<&mut T>
+    let ret = match &item_fn.sig.inputs.len() {
+        2 => sys_expand_async_wasi_host_func_with_two_args(item_fn),
+        3 => sys_expand_async_wasi_host_func_with_three_args(item_fn),
+        _ => panic!("Invalid numbers of host function arguments"),
+    };
+
+    Ok(ret)
+}
+
+fn sys_expand_async_wasi_host_func_with_two_args(
+    item_fn: &syn::ItemFn,
+) -> proc_macro2::TokenStream {
+    // function name
+    let fn_name_ident = &item_fn.sig.ident;
+
+    // function visibility
+    let fn_visibility = &item_fn.vis;
+
+    // generic types
+    let fn_generics = &item_fn.sig.generics;
+
+    // arguments
+    let mut fn_inputs = item_fn.sig.inputs.clone();
+    fn_inputs.push(parse_quote!(_: *mut std::os::raw::c_void));
+
+    // function body
+    let fn_block = &item_fn.block;
+
+    quote!(
+        #fn_visibility fn #fn_name_ident #fn_generics (#fn_inputs) -> Box<(dyn std::future::Future<Output = Result<Vec<WasmValue>, HostFuncError>> + Send)> {
+            Box::new(async move {
+                #fn_block
+            })
+        }
+    )
+}
+
+fn sys_expand_async_wasi_host_func_with_three_args(
+    item_fn: &syn::ItemFn,
+) -> proc_macro2::TokenStream {
+    // function name
+    let fn_name_ident = &item_fn.sig.ident;
+
+    // function visibility
+    let fn_visibility = &item_fn.vis;
+
+    // generic types
+    let fn_generics = &item_fn.sig.generics;
+
+    // arguments
+    let fn_inputs = &item_fn.sig.inputs;
+
+    // function body
+    let fn_block = &item_fn.block;
+
+    quote!(
+        #fn_visibility fn #fn_name_ident #fn_generics (#fn_inputs) -> Box<(dyn std::future::Future<Output = Result<Vec<WasmValue>, HostFuncError>> + Send)> {
+            Box::new(async move {
+                #fn_block
+            })
+        }
+    )
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/async/import.rs.html b/src/wasmedge_sdk/async/import.rs.html new file mode 100644 index 000000000..c15766273 --- /dev/null +++ b/src/wasmedge_sdk/async/import.rs.html @@ -0,0 +1,303 @@ +import.rs - source

wasmedge_sdk/async/
import.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
use crate::{io::WasmValTypeList, FuncType, WasmEdgeResult};
+use sys::r#async::{
+    function::{AsyncFn, AsyncFunction},
+    module::AsyncImportObject,
+};
+use wasmedge_sys::{self as sys};
+
+/// Creates a [async import object](sys::r#async::module::AsyncImportObject).
+///
+#[derive(Debug)]
+pub struct ImportObjectBuilder<Data: Send> {
+    import_object: AsyncImportObject<Data>,
+}
+impl<Data: Send> ImportObjectBuilder<Data> {
+    /// Creates a new [ImportObjectBuilder].
+    pub fn new(name: impl AsRef<str>, data: Data) -> WasmEdgeResult<Self> {
+        let import_object = AsyncImportObject::create(name, Box::new(data))?;
+        Ok(Self { import_object })
+    }
+
+    /// Adds a [host function](crate::Func) to the [ImportObject] to create.
+    ///
+    /// N.B. that this function can be used in thread-safe scenarios.
+    ///
+    /// # Arguments
+    ///
+    /// * `name` - The exported name of the [host function](crate::Func) to add.
+    ///
+    /// * `real_func` - The native function.
+    ///
+    /// * `data` - The host context data used in this function.
+    ///
+    /// # error
+    ///
+    /// If fail to create or add the [host function](crate::Func), then an error is returned.
+    pub fn with_func<Args, Rets>(
+        &mut self,
+        name: impl AsRef<str>,
+        real_func: AsyncFn<Data>,
+    ) -> WasmEdgeResult<&mut Self>
+    where
+        Args: WasmValTypeList,
+        Rets: WasmValTypeList,
+    {
+        let args = Args::wasm_types();
+        let returns = Rets::wasm_types();
+        let ty = FuncType::new(args.to_vec(), returns.to_vec());
+        let func = AsyncFunction::create_async_func(
+            &ty,
+            real_func,
+            self.import_object.get_host_data_mut(),
+            0,
+        )?;
+
+        self.import_object.add_async_func(name, func);
+        Ok(self)
+    }
+
+    /// Adds a [host function](crate::Func) to the [ImportObject] to create.
+    ///
+    /// N.B. that this function can be used in thread-safe scenarios.
+    ///
+    /// # Arguments
+    ///
+    /// * `name` - The exported name of the [host function](crate::Func) to add.
+    ///
+    /// * `ty` - The function type.
+    ///
+    /// * `real_func` - The native function.
+    ///
+    /// * `data` - The host context data used in this function.
+    ///
+    /// # error
+    ///
+    /// If fail to create or add the [host function](crate::Func), then an error is returned.
+    pub fn with_func_by_type(
+        &mut self,
+        name: impl AsRef<str>,
+        ty: FuncType,
+        real_func: AsyncFn<Data>,
+    ) -> WasmEdgeResult<&mut Self> {
+        let func = AsyncFunction::create_async_func(
+            &ty,
+            real_func,
+            self.import_object.get_host_data_mut(),
+            0,
+        )?;
+
+        self.import_object.add_async_func(name, func);
+        Ok(self)
+    }
+
+    /// Adds a [global](crate::Global) to the [ImportObject] to create.
+    ///
+    /// # Arguments
+    ///
+    /// * `name` - The exported name of the [global](crate::Global) to add.
+    ///
+    /// * `global` - The wasm [global instance](crate::Global) to add.
+    ///
+    pub fn with_global(mut self, name: impl AsRef<str>, global: sys::Global) -> Self {
+        self.import_object.add_global(name, global);
+        self
+    }
+
+    /// Adds a [memory](crate::Memory) to the [ImportObject] to create.
+    ///
+    /// # Arguments
+    ///
+    /// * `name` - The exported name of the [memory](crate::Memory) to add.
+    ///
+    /// * `memory` - The wasm [memory instance](crate::Memory) to add.
+    ///
+    pub fn with_memory(mut self, name: impl AsRef<str>, memory: sys::Memory) -> Self {
+        self.import_object.add_memory(name, memory);
+        self
+    }
+
+    /// Adds a [table](crate::Table) to the [ImportObject] to create.
+    ///
+    /// # Arguments
+    ///
+    /// * `name` - The exported name of the [table](crate::Table) to add.
+    ///
+    /// * `table` - The wasm [table instance](crate::Table) to add.
+    ///
+    pub fn with_table(mut self, name: impl AsRef<str>, table: sys::Table) -> Self {
+        self.import_object.add_table(name, table);
+        self
+    }
+
+    /// Creates a new [ImportObject].
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the [ImportObject] to create.
+    ///
+    /// * `host_data` - The host context data to be stored in the module instance.
+    ///
+    /// # Error
+    ///
+    /// If fail to create the [ImportObject], then an error is returned.
+    pub fn build(self) -> ImportObject<Data> {
+        self.import_object
+    }
+}
+
+/// Defines an import object that contains the required import data used when instantiating a [module](crate::Module).
+///
+/// An [ImportObject] instance is created with [ImportObjectBuilder](crate::ImportObjectBuilder).
+pub type ImportObject<T> = sys::r#async::module::AsyncImportObject<T>;
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/async/mod.rs.html b/src/wasmedge_sdk/async/mod.rs.html new file mode 100644 index 000000000..8ba83d0d2 --- /dev/null +++ b/src/wasmedge_sdk/async/mod.rs.html @@ -0,0 +1,17 @@ +mod.rs - source

wasmedge_sdk/async/
mod.rs

+1
+2
+3
+4
+5
+6
+7
+8
pub mod import;
+pub mod vm;
+
+pub use wasmedge_sys::r#async::module::AsyncInstance;
+pub mod wasi {
+    pub use async_wasi;
+    pub use wasmedge_sys::r#async::AsyncWasiModule;
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/async/vm.rs.html b/src/wasmedge_sdk/async/vm.rs.html new file mode 100644 index 000000000..595aec3cb --- /dev/null +++ b/src/wasmedge_sdk/async/vm.rs.html @@ -0,0 +1,837 @@ +vm.rs - source

wasmedge_sdk/async/
vm.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
//! Defines WasmEdge Vm struct.
+use crate::{
+    error::{VmError, WasmEdgeError},
+    vm::SyncInst,
+    Instance, Module, Store, WasmEdgeResult, WasmValue,
+};
+use sys::{r#async::fiber::AsyncState, AsInstance};
+use wasmedge_sys as sys;
+
+use super::import::ImportObject;
+
+pub trait AsyncInst: AsInstance {}
+
+impl<T: Send> AsyncInst for ImportObject<T> {}
+impl<T: Send + SyncInst> AsyncInst for T {}
+
+/// A [Vm] defines a virtual environment for managing WebAssembly programs.
+///
+/// # Example
+///
+/// The example below presents how to register a module as named module in a Vm instance and run a target wasm function.
+///
+/// ```rust
+/// // If the version of rust used is less than v1.63, please uncomment the follow attribute.
+/// // #![feature(explicit_generic_args_with_impl_trait)]
+/// #[cfg(not(feature = "async"))]
+/// use wasmedge_sdk::{params, VmBuilder, WasmVal, wat2wasm, ValType, NeverType};
+///
+/// #[cfg_attr(test, test)]
+/// fn main() -> Result<(), Box<dyn std::error::Error>> {
+///     #[cfg(not(feature = "async"))]
+///     {
+///         // create a Vm context
+///         let vm = VmBuilder::new().build()?;
+///
+///         // register a wasm module from the given in-memory wasm bytes
+///         let wasm_bytes = wat2wasm(
+///             br#"(module
+///             (export "fib" (func $fib))
+///             (func $fib (param $n i32) (result i32)
+///              (if
+///               (i32.lt_s
+///                (local.get $n)
+///                (i32.const 2)
+///               )
+///               (then
+///                (return (i32.const 1))
+///               )
+///              )
+///              (return
+///               (i32.add
+///                (call $fib
+///                 (i32.sub
+///                  (local.get $n)
+///                  (i32.const 2)
+///                 )
+///                )
+///                (call $fib
+///                 (i32.sub
+///                  (local.get $n)
+///                  (i32.const 1)
+///                 )
+///                )
+///               )
+///              )
+///             )
+///            )
+///         "#,
+///         )?;
+///         let mut vm = vm.register_module_from_bytes("extern", wasm_bytes)?;
+///
+///         // run `fib` function in the named module instance
+///         let returns = vm.run_func(Some("extern"), "fib", params!(10))?;
+///         assert_eq!(returns.len(), 1);
+///         assert_eq!(returns[0].to_i32(), 89);
+///     }
+///
+///     Ok(())
+/// }
+/// ```
+#[derive(Debug)]
+pub struct Vm<'inst, T: ?Sized + Send + AsyncInst> {
+    store: Store<'inst, T>,
+    active_instance: Option<sys::Instance>,
+    async_state: AsyncState,
+}
+impl<'inst, T: ?Sized + Send + AsyncInst> Vm<'inst, T> {
+    pub fn new(store: Store<'inst, T>) -> Self {
+        // create a Vm instance
+        Self {
+            store,
+            active_instance: None,
+            async_state: AsyncState::new(),
+        }
+    }
+
+    /// Registers a [wasm module](crate::Module) into this vm as a named or active module [instance](crate::Instance).
+    ///
+    /// # Arguments
+    ///
+    /// * `mod_name` - The exported name for the registered module. If `None`, then the module is registered as an active instance.
+    ///
+    /// * `module` - The module to be registered.
+    ///
+    /// # Error
+    ///
+    /// If fail to register the given [module](crate::Module), then an error is returned.
+    ///
+    pub fn register_module(
+        &mut self,
+        mod_name: Option<&str>,
+        module: Module,
+    ) -> WasmEdgeResult<&mut Self> {
+        match mod_name {
+            Some(name) => {
+                self.store.register_named_module(name, &module)?;
+            }
+            None => {
+                self.active_instance = Some(self.store.register_active_module(&module)?);
+            }
+        };
+
+        Ok(self)
+    }
+
+    /// Runs an exported wasm function in a (named or active) [module instance](crate::Instance).
+    ///
+    /// # Arguments
+    ///
+    /// * `mod_name` - The exported name of the module instance, which holds the target function. If `None`, then the active module is used.
+    ///
+    /// * `func_name` - The exported name of the target wasm function.
+    ///
+    /// * `args` - The arguments to be passed to the target wasm function.
+    ///
+    /// # Error
+    ///
+    /// If fail to run the wasm function, then an error is returned.
+    pub async fn run_func(
+        &mut self,
+        mod_name: Option<&str>,
+        func_name: impl AsRef<str>,
+        args: impl IntoIterator<Item = WasmValue> + Send,
+    ) -> WasmEdgeResult<Vec<WasmValue>> {
+        let (mut func, executor) = match mod_name {
+            Some(mod_name) => {
+                if let Some((inst, executor)) = self.store.get_instance_and_executor(mod_name) {
+                    (inst.get_func_mut(func_name.as_ref())?, executor)
+                } else if let Some((wasm_mod, executor)) =
+                    self.store.get_named_wasm_and_executor(mod_name)
+                {
+                    (wasm_mod.get_func_mut(func_name.as_ref())?, executor)
+                } else {
+                    return Err(Box::new(WasmEdgeError::Vm(VmError::NotFoundModule(
+                        mod_name.into(),
+                    ))));
+                }
+            }
+            None => {
+                let active_inst = self
+                    .active_instance
+                    .as_mut()
+                    .ok_or(Box::new(WasmEdgeError::Vm(VmError::NotFoundActiveModule)))?;
+
+                (
+                    active_inst.get_func_mut(func_name.as_ref())?,
+                    self.store.executor(),
+                )
+            }
+        };
+        executor
+            .call_func_async(&self.async_state, &mut func, args)
+            .await
+    }
+
+    /// Runs an exported wasm function in a (named or active) [module instance](crate::Instance) with a timeout setting
+    ///
+    /// # Arguments
+    ///
+    /// * `mod_name` - The exported name of the module instance, which holds the target function. If `None`, then the active module is used.
+    ///
+    /// * `func_name` - The exported name of the target wasm function.
+    ///
+    /// * `args` - The arguments to be passed to the target wasm function.
+    ///
+    /// * `timeout` - The maximum execution time of the function to be run.
+    ///
+    /// # Error
+    ///
+    /// If fail to run the wasm function, then an error is returned.
+    #[cfg(all(target_os = "linux", not(target_env = "musl")))]
+    pub async fn run_func_with_timeout(
+        &mut self,
+        mod_name: Option<&str>,
+        func_name: impl AsRef<str>,
+        args: impl IntoIterator<Item = WasmValue> + Send,
+        timeout: std::time::Duration,
+    ) -> WasmEdgeResult<Vec<WasmValue>> {
+        let (mut func, executor) = match mod_name {
+            Some(mod_name) => {
+                if let Some((inst, executor)) = self.store.get_instance_and_executor(mod_name) {
+                    (inst.get_func_mut(func_name.as_ref())?, executor)
+                } else if let Some((wasm_mod, executor)) =
+                    self.store.get_named_wasm_and_executor(mod_name)
+                {
+                    (wasm_mod.get_func_mut(func_name.as_ref())?, executor)
+                } else {
+                    return Err(Box::new(WasmEdgeError::Vm(VmError::NotFoundModule(
+                        mod_name.into(),
+                    ))));
+                }
+            }
+            None => {
+                let active_inst = self
+                    .active_instance
+                    .as_mut()
+                    .ok_or(Box::new(WasmEdgeError::Vm(VmError::NotFoundActiveModule)))?;
+
+                (
+                    active_inst.get_func_mut(func_name.as_ref())?,
+                    self.store.executor(),
+                )
+            }
+        };
+        executor
+            .call_func_async_with_timeout(&self.async_state, &mut func, args, timeout)
+            .await
+    }
+
+    /// Returns a reference to the internal [store](crate::Store) from this vm.
+    pub fn store(&self) -> &Store<'inst, T> {
+        &self.store
+    }
+
+    /// Returns a mutable reference to the internal [store](crate::Store) from this vm.
+    pub fn store_mut(&mut self) -> &mut Store<'inst, T> {
+        &mut self.store
+    }
+
+    /// Returns a reference to the active [module instance](crate::Instance) from this vm.
+    ///
+    /// # Error
+    ///
+    /// If fail to get the reference to the active module instance, then an error is returned.
+    pub fn active_module(&self) -> Option<&Instance> {
+        self.active_instance.as_ref()
+    }
+
+    /// Returns a mutable reference to the active [module instance](crate::Instance) from this vm.
+    ///
+    /// # Error
+    ///
+    /// If fail to get the mutable reference to the active module instance, then an error is returned.
+    pub fn active_module_mut(&mut self) -> Option<&mut Instance> {
+        self.active_instance.as_mut()
+    }
+
+    /// Checks if the vm contains a named module instance.
+    ///
+    /// # Argument
+    ///
+    /// * `mod_name` - The exported name of the target module instance.
+    ///
+    pub fn contains_module(&self, mod_name: impl AsRef<str>) -> bool {
+        self.store.contains(mod_name)
+    }
+
+    /// Returns the count of the named [module instances](crate::Instance) this vm holds.
+    pub fn named_instance_count(&self) -> usize {
+        self.store.named_instance_count()
+    }
+
+    /// Returns the names of all named [module instances](crate::Instance) this vm holds.
+    pub fn instance_names(&self) -> Vec<String> {
+        self.store.instance_names()
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use std::collections::HashMap;
+
+    use wasmedge_types::wat2wasm;
+
+    use super::*;
+    use crate::{io::WasmVal, params};
+
+    #[tokio::test]
+    async fn test_vm_run_func_from_file() {
+        // create a Vm context
+        let mut vm = Vm::new(
+            Store::new(None, HashMap::<String, &mut (dyn AsyncInst + Send)>::new()).unwrap(),
+        );
+
+        // register a wasm module from a specified wasm file
+        let file = std::env::current_dir()
+            .unwrap()
+            .join("examples/wasmedge-sys/data/fibonacci.wat");
+
+        // run `fib` function from the wasm file
+        let fib_module = Module::from_file(None, file).unwrap();
+        vm.register_module(None, fib_module).unwrap();
+        let result = vm.run_func(None, "fib", params!(10)).await;
+        assert!(result.is_ok());
+        let returns = result.unwrap();
+        assert_eq!(returns.len(), 1);
+        assert_eq!(returns[0].to_i32(), 89);
+    }
+
+    #[tokio::test]
+    async fn test_vm_run_func_from_bytes() {
+        // create a Vm context
+        let mut vm = Vm::new(
+            Store::new(None, HashMap::<String, &mut (dyn AsyncInst + Send)>::new()).unwrap(),
+        );
+
+        // register a wasm module from the given in-memory wasm bytes
+        // load wasm module
+        let result = wat2wasm(
+            br#"(module
+            (export "fib" (func $fib))
+            (func $fib (param $n i32) (result i32)
+             (if
+              (i32.lt_s
+               (local.get $n)
+               (i32.const 2)
+              )
+              (then
+                (return (i32.const 1))
+              )
+             )
+             (return
+              (i32.add
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 2)
+                )
+               )
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 1)
+                )
+               )
+              )
+             )
+            )
+           )
+        "#,
+        );
+        assert!(result.is_ok());
+        let wasm_bytes = result.unwrap();
+
+        // run `fib` function from the wasm bytes
+        let fib_module = Module::from_bytes(None, wasm_bytes).unwrap();
+        vm.register_module(None, fib_module).unwrap();
+        let result = vm.run_func(None, "fib", params!(10)).await;
+        assert!(result.is_ok());
+        let returns = result.unwrap();
+        assert_eq!(returns.len(), 1);
+        assert_eq!(returns[0].to_i32(), 89);
+    }
+
+    #[tokio::test]
+    async fn test_vm_run_func_in_named_module_instance() {
+        // create a Vm context
+        let mut vm = Vm::new(
+            Store::new(None, HashMap::<String, &mut (dyn AsyncInst + Send)>::new()).unwrap(),
+        );
+
+        // register a wasm module from the given in-memory wasm bytes
+        // load wasm module
+        let result = wat2wasm(
+            br#"(module
+            (export "fib" (func $fib))
+            (func $fib (param $n i32) (result i32)
+             (if
+              (i32.lt_s
+               (local.get $n)
+               (i32.const 2)
+              )
+              (then
+                (return (i32.const 1))
+              )
+             )
+             (return
+              (i32.add
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 2)
+                )
+               )
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 1)
+                )
+               )
+              )
+             )
+            )
+           )
+        "#,
+        );
+        assert!(result.is_ok());
+        let wasm_bytes = result.unwrap();
+        let fib_module = Module::from_bytes(None, wasm_bytes).unwrap();
+        vm.register_module(Some("extern"), fib_module).unwrap();
+        // run `fib` function in the named module instance
+        let result = vm.run_func(Some("extern"), "fib", params!(10)).await;
+        assert!(result.is_ok());
+        let returns = result.unwrap();
+        assert_eq!(returns.len(), 1);
+        assert_eq!(returns[0].to_i32(), 89);
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/compiler.rs.html b/src/wasmedge_sdk/compiler.rs.html new file mode 100644 index 000000000..d893f963c --- /dev/null +++ b/src/wasmedge_sdk/compiler.rs.html @@ -0,0 +1,443 @@ +compiler.rs - source

wasmedge_sdk/
compiler.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
//! Defines WasmEdge ahead-of-time compiler.
+
+use crate::{config::Config, WasmEdgeResult};
+use std::path::{Path, PathBuf};
+use wasmedge_sys as sys;
+
+/// Defines WasmEdge ahead-of-time(AOT) compiler and the relevant APIs.
+#[derive(Debug)]
+pub struct Compiler {
+    pub(crate) inner: sys::Compiler,
+}
+impl Compiler {
+    /// Creates a new AOT compiler.
+    ///
+    /// # Error
+    ///
+    /// If fail to create a AOT compiler, then an error is returned.
+    pub fn new(config: Option<&Config>) -> WasmEdgeResult<Self> {
+        let inner = match config {
+            Some(cfg) => sys::Compiler::create(Some(&cfg.inner))?,
+            None => sys::Compiler::create(None)?,
+        };
+
+        Ok(Self { inner })
+    }
+
+    /// Compiles the given wasm file into a shared library file (*.so in Linux, *.dylib in macOS, or *.dll in Windows). The file path of the generated shared library file will be returned if the method works successfully.
+    ///
+    /// # Arguments
+    ///
+    /// * `wasm_file` - The target wasm file.
+    ///
+    /// * `filename` - The filename of the generated shared library file.
+    ///
+    /// * `out_dir` - The target directory to save the generated shared library file.
+    ///
+    /// # Error
+    ///
+    /// If fail to compile, then an error is returned.
+    pub fn compile_from_file(
+        &self,
+        wasm_file: impl AsRef<Path>,
+        filename: impl AsRef<str>,
+        out_dir: impl AsRef<Path>,
+    ) -> WasmEdgeResult<PathBuf> {
+        #[cfg(target_os = "linux")]
+        let extension = "so";
+        #[cfg(target_os = "macos")]
+        let extension = "dylib";
+        #[cfg(target_os = "windows")]
+        let extension = "dll";
+        let aot_file = out_dir
+            .as_ref()
+            .join(format!("{}.{}", filename.as_ref(), extension));
+        self.inner.compile_from_file(wasm_file, &aot_file)?;
+
+        Ok(aot_file)
+    }
+
+    /// Compiles the given wasm bytes into a shared library file (*.so in Linux, *.dylib in macOS, or *.dll in Windows). The file path of the generated shared library file will be returned if the method works successfully.
+    ///
+    /// # Argument
+    ///
+    /// * `bytes` - A in-memory WASM bytes.
+    ///
+    /// * `filename` - The filename of the generated shared library file.
+    ///
+    /// * `out_dir` - The target directory to save the generated shared library file.
+    ///
+    /// # Error
+    ///
+    /// If fail to compile, then an error is returned.
+    pub fn compile_from_bytes(
+        &self,
+        bytes: impl AsRef<[u8]>,
+        filename: impl AsRef<str>,
+        out_dir: impl AsRef<Path>,
+    ) -> WasmEdgeResult<PathBuf> {
+        #[cfg(target_os = "linux")]
+        let extension = "so";
+        #[cfg(target_os = "macos")]
+        let extension = "dylib";
+        #[cfg(target_os = "windows")]
+        let extension = "dll";
+        let aot_file = out_dir
+            .as_ref()
+            .join(format!("{}.{}", filename.as_ref(), extension));
+        self.inner.compile_from_bytes(bytes, &aot_file)?;
+
+        Ok(aot_file)
+    }
+}
+
+#[cfg(not(feature = "async"))]
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{
+        config::{CompilerConfigOptions, ConfigBuilder},
+        params, wat2wasm, CompilerOutputFormat, VmBuilder, WasmVal,
+    };
+    use std::io::Read;
+
+    #[test]
+    fn test_compiler_compile_from_file() -> Result<(), Box<dyn std::error::Error>> {
+        // compile from file
+        {
+            let config = ConfigBuilder::default()
+                .with_compiler_config(
+                    CompilerConfigOptions::new().out_format(CompilerOutputFormat::Native),
+                )
+                .build()?;
+
+            let compiler = Compiler::new(Some(&config))?;
+            let wasm_file = std::env::current_dir()
+                .unwrap()
+                .join("examples/wasmedge-sys/data/fibonacci.wat");
+            let out_dir = std::env::current_dir()?;
+            let aot_filename = "aot_fibonacci_1";
+            let aot_file_path = compiler.compile_from_file(wasm_file, aot_filename, out_dir)?;
+            assert!(aot_file_path.exists());
+            #[cfg(target_os = "macos")]
+            assert!(aot_file_path.ends_with("aot_fibonacci_1.dylib"));
+            #[cfg(target_os = "linux")]
+            assert!(aot_file_path.ends_with("aot_fibonacci_1.so"));
+            #[cfg(target_os = "windows")]
+            assert!(aot_file_path.ends_with("aot_fibonacci_1.dll"));
+
+            // read buffer
+            let mut aot_file = std::fs::File::open(&aot_file_path)?;
+            let mut buffer = [0u8; 4];
+            aot_file.read_exact(&mut buffer)?;
+            let wasm_magic: [u8; 4] = [0x00, 0x61, 0x73, 0x6D];
+            assert_ne!(buffer, wasm_magic);
+
+            let res =
+                VmBuilder::new()
+                    .build()?
+                    .run_func_from_file(&aot_file_path, "fib", params!(5))?;
+            assert_eq!(res[0].to_i32(), 8);
+
+            // cleanup
+            assert!(std::fs::remove_file(aot_file_path).is_ok());
+        }
+
+        // compile from bytes
+        {
+            let wasm_bytes = wat2wasm(
+                br#"(module
+                    (export "fib" (func $fib))
+                    (func $fib (param $n i32) (result i32)
+                     (if
+                      (i32.lt_s
+                       (local.get $n)
+                       (i32.const 2)
+                      )
+                      (then
+                        (return (i32.const 1))
+                      )
+                     )
+                     (return
+                      (i32.add
+                       (call $fib
+                        (i32.sub
+                         (local.get $n)
+                         (i32.const 2)
+                        )
+                       )
+                       (call $fib
+                        (i32.sub
+                         (local.get $n)
+                         (i32.const 1)
+                        )
+                       )
+                      )
+                     )
+                    )
+                   )
+              "#,
+            )?;
+
+            // create a aot compiler
+            let config = ConfigBuilder::default()
+                .with_compiler_config(
+                    CompilerConfigOptions::new().out_format(CompilerOutputFormat::Native),
+                )
+                .build()?;
+            let compiler = Compiler::new(Some(&config))?;
+
+            // compile wasm bytes into a shared library file
+            let out_dir = std::env::current_dir()?;
+            let aot_filename = "aot_fibonacci_2";
+            let aot_file_path = compiler.compile_from_bytes(wasm_bytes, aot_filename, out_dir)?;
+            assert!(aot_file_path.exists());
+            #[cfg(target_os = "macos")]
+            assert!(aot_file_path.ends_with("aot_fibonacci_2.dylib"));
+            #[cfg(target_os = "linux")]
+            assert!(aot_file_path.ends_with("aot_fibonacci_2.so"));
+            #[cfg(target_os = "windows")]
+            assert!(aot_file_path.ends_with("aot_fibonacci_2.dll"));
+
+            // read buffer
+            let mut aot_file = std::fs::File::open(&aot_file_path)?;
+            let mut buffer = [0u8; 4];
+            aot_file.read_exact(&mut buffer)?;
+            let wasm_magic: [u8; 4] = [0x00, 0x61, 0x73, 0x6D];
+            assert_ne!(buffer, wasm_magic);
+
+            let res =
+                VmBuilder::new()
+                    .build()?
+                    .run_func_from_file(&aot_file_path, "fib", params!(5))?;
+            assert_eq!(res[0].to_i32(), 8);
+
+            // cleanup
+            assert!(std::fs::remove_file(aot_file_path).is_ok());
+        }
+
+        Ok(())
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/config.rs.html b/src/wasmedge_sdk/config.rs.html new file mode 100644 index 000000000..ce98b3d22 --- /dev/null +++ b/src/wasmedge_sdk/config.rs.html @@ -0,0 +1,1673 @@ +config.rs - source

wasmedge_sdk/
config.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
//! Defines the structs used to construct configurations.
+
+use std::sync::Arc;
+
+use crate::WasmEdgeResult;
+#[cfg(feature = "aot")]
+use crate::{CompilerOptimizationLevel, CompilerOutputFormat};
+use wasmedge_sys as sys;
+
+/// Defines a builder for creating a [Config].
+#[derive(Debug, Default)]
+pub struct ConfigBuilder {
+    common_config: CommonConfigOptions,
+    stat_config: Option<StatisticsConfigOptions>,
+    #[cfg(feature = "aot")]
+    compiler_config: Option<CompilerConfigOptions>,
+    runtime_config: Option<RuntimeConfigOptions>,
+}
+impl ConfigBuilder {
+    /// Creates a new [ConfigBuilder] with the given [CommonConfigOptions] setting.
+    pub fn new(options: CommonConfigOptions) -> Self {
+        Self {
+            common_config: options,
+            stat_config: None,
+            #[cfg(feature = "aot")]
+            compiler_config: None,
+            runtime_config: None,
+        }
+    }
+
+    /// Sets the [StatisticsConfigOptions] for the [ConfigBuilder].
+    ///
+    /// # Argument
+    ///
+    /// - `options` specifies the [StatisticsConfigOptions] settings to set.
+    pub fn with_statistics_config(self, options: StatisticsConfigOptions) -> Self {
+        Self {
+            stat_config: Some(options),
+            ..self
+        }
+    }
+
+    /// Sets the [RuntimeConfigOptions] for the [ConfigBuilder].
+    ///
+    /// # Argument
+    ///
+    /// - `options` specifies the [RuntimeConfigOptions] settings to set.
+    pub fn with_runtime_config(self, options: RuntimeConfigOptions) -> Self {
+        Self {
+            runtime_config: Some(options),
+            ..self
+        }
+    }
+
+    /// Sets the [CompilerConfigOptions] for the [ConfigBuilder].
+    ///
+    /// # Argument
+    ///
+    /// - `options` specifies the [CompilerConfigOptions] settings to set.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn with_compiler_config(self, options: CompilerConfigOptions) -> Self {
+        Self {
+            compiler_config: Some(options),
+            ..self
+        }
+    }
+
+    /// Creates a new [Config] from the [ConfigBuilder].
+    ///
+    /// # Errors
+    ///
+    /// If fail to create a [Config], then an error is returned.
+    pub fn build(self) -> WasmEdgeResult<Config> {
+        let mut inner = sys::Config::create()?;
+        inner.mutable_globals(self.common_config.mutable_globals);
+        inner.non_trap_conversions(self.common_config.non_trap_conversions);
+        inner.sign_extension_operators(self.common_config.sign_extension_operators);
+        inner.multi_value(self.common_config.multi_value);
+        inner.bulk_memory_operations(self.common_config.bulk_memory_operations);
+        inner.reference_types(self.common_config.reference_types);
+        inner.simd(self.common_config.simd);
+        inner.multi_memories(self.common_config.multi_memories);
+        inner.threads(self.common_config.threads);
+        inner.gc(self.common_config.gc);
+        inner.tail_call(self.common_config.tail_call);
+        inner.function_references(self.common_config.function_references);
+        inner.interpreter_mode(self.common_config.interpreter_mode);
+
+        if let Some(stat_config) = self.stat_config {
+            inner.count_instructions(stat_config.count_instructions);
+            inner.measure_cost(stat_config.measure_cost);
+            inner.measure_time(stat_config.measure_time);
+        }
+        #[cfg(feature = "aot")]
+        if let Some(compiler_config) = self.compiler_config {
+            inner.set_aot_compiler_output_format(compiler_config.out_format);
+            inner.set_aot_optimization_level(compiler_config.opt_level);
+            inner.dump_ir(compiler_config.dump_ir);
+            inner.generic_binary(compiler_config.generic_binary);
+            inner.interruptible(compiler_config.interruptible);
+        }
+        if let Some(runtim_config) = self.runtime_config {
+            inner.set_max_memory_pages(runtim_config.max_memory_pages);
+        }
+
+        Ok(Config {
+            inner: Arc::new(inner),
+        })
+    }
+}
+
+/// Defines [Config] struct used to check/set the configuration options.
+///
+/// # Example
+///
+/// The following code shows how to create a [Config] with [ConfigBuilder].
+///
+/// ```rust
+///
+/// use wasmedge_sdk::{config::{Config, ConfigBuilder, CommonConfigOptions, StatisticsConfigOptions, RuntimeConfigOptions}};
+/// use wasmedge_types::{CompilerOutputFormat, CompilerOptimizationLevel};
+///
+/// let common_options = CommonConfigOptions::default()
+///     .bulk_memory_operations(true)
+///     .multi_value(true)
+///     .mutable_globals(true)
+///     .non_trap_conversions(true)
+///     .reference_types(true)
+///     .sign_extension_operators(true)
+///     .simd(true);
+///
+/// let stat_options = StatisticsConfigOptions::default()
+///     .count_instructions(true)
+///     .measure_cost(true)
+///     .measure_time(true);
+///
+/// let runtime_options = RuntimeConfigOptions::default().max_memory_pages(1024);
+///
+///
+/// let result = ConfigBuilder::new(common_options)
+///     .with_statistics_config(stat_options)
+///     .with_runtime_config(runtime_options)
+///     .build();
+/// assert!(result.is_ok());
+/// let config = result.unwrap();
+/// ```
+#[derive(Debug, Clone)]
+pub struct Config {
+    pub(crate) inner: Arc<sys::Config>,
+}
+impl Config {
+    /// Returns the number of the memory pages available.
+    pub fn max_memory_pages(&self) -> u32 {
+        self.inner.get_max_memory_pages()
+    }
+
+    /// Checks if the ImportExportMutGlobals option turns on or not.
+    pub fn mutable_globals_enabled(&self) -> bool {
+        self.inner.mutable_globals_enabled()
+    }
+
+    /// Checks if the NonTrapFloatToIntConversions option turns on or not.
+    pub fn non_trap_conversions_enabled(&self) -> bool {
+        self.inner.non_trap_conversions_enabled()
+    }
+
+    /// Checks if the SignExtensionOperators option turns on or not.
+    pub fn sign_extension_operators_enabled(&self) -> bool {
+        self.inner.sign_extension_operators_enabled()
+    }
+
+    /// Checks if the MultiValue option turns on or not.
+    pub fn multi_value_enabled(&self) -> bool {
+        self.inner.multi_value_enabled()
+    }
+
+    /// Checks if the BulkMemoryOperations option turns on or not.
+    pub fn bulk_memory_operations_enabled(&self) -> bool {
+        self.inner.bulk_memory_operations_enabled()
+    }
+
+    /// Checks if the ReferenceTypes option turns on or not.
+    pub fn reference_types_enabled(&self) -> bool {
+        self.inner.reference_types_enabled()
+    }
+
+    /// Checks if the SIMD option turns on or not.
+    pub fn simd_enabled(&self) -> bool {
+        self.inner.simd_enabled()
+    }
+
+    /// Checks if the MultiMemories option turns on or not.
+    pub fn multi_memories_enabled(&self) -> bool {
+        self.inner.multi_memories_enabled()
+    }
+
+    /// Checks if the Threads option turns on or not.
+    pub fn threads_enabled(&self) -> bool {
+        self.inner.threads_enabled()
+    }
+
+    /// Checks if the TailCall option turns on or not.
+    pub fn tail_call_enabled(&self) -> bool {
+        self.inner.tail_call_enabled()
+    }
+
+    /// Checks if the FunctionReferences option turns on or not.
+    pub fn function_references_enabled(&self) -> bool {
+        self.inner.function_references_enabled()
+    }
+
+    /// Checks if the `ForceInterpreter` option turns on or not.
+    pub fn interpreter_mode_enabled(&self) -> bool {
+        self.inner.interpreter_mode_enabled()
+    }
+
+    /// Returns the optimization level of AOT compiler.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn optimization_level(&self) -> CompilerOptimizationLevel {
+        self.inner.get_aot_optimization_level()
+    }
+
+    /// Returns the output binary format of AOT compiler.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn out_format(&self) -> CompilerOutputFormat {
+        self.inner.get_aot_compiler_output_format()
+    }
+
+    /// Checks if the dump IR option turns on or not.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn dump_ir_enabled(&self) -> bool {
+        self.inner.dump_ir_enabled()
+    }
+
+    /// Checks if the generic binary option of AOT compiler turns on or not.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn generic_binary_enabled(&self) -> bool {
+        self.inner.generic_binary_enabled()
+    }
+
+    /// Checks if the `Interruptible` option of AOT Compiler turns on or not.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn interruptible_enabled(&self) -> bool {
+        self.inner.interruptible_enabled()
+    }
+
+    /// Checks if the instruction counting option turns on or not.
+    pub fn instruction_counting_enabled(&self) -> bool {
+        self.inner.is_instruction_counting()
+    }
+
+    /// Checks if the cost measuring option turns on or not.
+    pub fn cost_measuring_enabled(&self) -> bool {
+        self.inner.is_cost_measuring()
+    }
+
+    /// Checks if the cost measuring option turns on or not.
+    pub fn time_measuring_enabled(&self) -> bool {
+        self.inner.is_time_measuring()
+    }
+}
+
+/// Defines the common configuration options.
+///
+/// [CommonConfigOptions] is used to set the common configuration options, which are
+///     
+///  - `ImportExportMutGlobals` supports mutable imported and exported globals.
+///
+///    Also see [Import/Export Mutable Globals Proposal](https://github.com/WebAssembly/mutable-global/blob/master/proposals/mutable-global/Overview.md#importexport-mutable-globals).
+///
+///  - `NonTrapFloatToIntConversions` supports the non-trapping float-to-int conversion.
+///
+///    Also see [Non-trapping Float-to-int Conversions Proposal](https://github.com/WebAssembly/spec/blob/main/proposals/nontrapping-float-to-int-conversion/Overview.md).
+///
+///  - `SignExtensionOperators` supports new integer instructions for sign-extending 8-bit, 16-bit, and 32-bit values.
+///     
+///    Also see [Sign-extension Operators Proposal](https://github.com/WebAssembly/spec/blob/main/proposals/sign-extension-ops/Overview.md).
+///
+///  - `MultiValue` supports functions and instructions with multiple return values, and blocks with inputs.
+///     
+///    Also see [Multi-value Extension](https://github.com/WebAssembly/spec/blob/main/proposals/multi-value/Overview.md).
+///
+///  - `BulkMemoryOperations` supports bulk memory operations.
+///
+///    Also see [Bulk Memory Operations Proposal](https://github.com/WebAssembly/spec/blob/main/proposals/bulk-memory-operations/Overview.md#motivation-for-bulk-memory-operations).
+///
+///  - `ReferenceTypes` supports reference types.
+///
+///    Also see [Reference Types Proposal](https://github.com/WebAssembly/spec/blob/main/proposals/reference-types/Overview.md).
+///
+///  - `SIMD` supports 128-bit packed SIMD extension to WebAssembly.
+///
+///    Also see [SIMD Proposal](https://github.com/WebAssembly/spec/blob/main/proposals/simd/SIMD.md).
+#[derive(Debug, Clone, Copy)]
+pub struct CommonConfigOptions {
+    mutable_globals: bool,
+    non_trap_conversions: bool,
+    sign_extension_operators: bool,
+    multi_value: bool,
+    bulk_memory_operations: bool,
+    reference_types: bool,
+    simd: bool,
+    multi_memories: bool,
+    threads: bool,
+    gc: bool,
+    tail_call: bool,
+    function_references: bool,
+    interpreter_mode: bool,
+}
+impl CommonConfigOptions {
+    /// Creates a new instance of [CommonConfigOptions].
+    ///
+    /// The default options are:
+    /// * mutable_globals: true,
+    /// * non_trap_conversions: true,
+    /// * sign_extension_operators: true,
+    /// * multi_value: true,
+    /// * bulk_memory_operations: true,
+    /// * reference_types: true,
+    /// * simd: true,
+    /// * multi_memories: false,
+    /// * threads: false,
+    /// * gc: false,
+    /// * tail_call: false,
+    /// * function_references: false,
+    /// * interpreter_mode: false,
+    pub fn new() -> Self {
+        Self {
+            mutable_globals: true,
+            non_trap_conversions: true,
+            sign_extension_operators: true,
+            multi_value: true,
+            bulk_memory_operations: true,
+            reference_types: true,
+            simd: true,
+            multi_memories: false,
+            threads: false,
+            gc: false,
+            tail_call: false,
+            function_references: false,
+            interpreter_mode: false,
+        }
+    }
+
+    /// Enables or disables the ImportExportMutGlobals option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if the option turns on or not.
+    pub fn mutable_globals(self, enable: bool) -> Self {
+        Self {
+            mutable_globals: enable,
+            ..self
+        }
+    }
+
+    /// Enables or disables the NonTrapFloatToIntConversions option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if the option turns on or not.
+    pub fn non_trap_conversions(self, enable: bool) -> Self {
+        Self {
+            non_trap_conversions: enable,
+            ..self
+        }
+    }
+
+    /// Enables or disables the SignExtensionOperators option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if the option turns on or not.
+    pub fn sign_extension_operators(self, enable: bool) -> Self {
+        Self {
+            sign_extension_operators: enable,
+            ..self
+        }
+    }
+
+    /// Enables or disables the MultiValue option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if the option turns on or not.
+    pub fn multi_value(self, enable: bool) -> Self {
+        Self {
+            multi_value: enable,
+            ..self
+        }
+    }
+
+    /// Enables or disables the BulkMemoryOperations option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if the option turns on or not.
+    pub fn bulk_memory_operations(self, enable: bool) -> Self {
+        Self {
+            bulk_memory_operations: enable,
+            ..self
+        }
+    }
+
+    /// Enables or disables the ReferenceTypes option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if the option turns on or not.
+    pub fn reference_types(self, enable: bool) -> Self {
+        Self {
+            reference_types: enable,
+            ..self
+        }
+    }
+
+    /// Enables or disables the SIMD option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if the option turns on or not.
+    pub fn simd(self, enable: bool) -> Self {
+        Self {
+            simd: enable,
+            ..self
+        }
+    }
+
+    /// Enables or disables the MultiMemories option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if the option turns on or not.
+    pub fn multi_memories(self, enable: bool) -> Self {
+        Self {
+            multi_memories: enable,
+            ..self
+        }
+    }
+
+    /// Enables or disables the Threads option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if the option turns on or not.
+    pub fn threads(self, enable: bool) -> Self {
+        Self {
+            threads: enable,
+            ..self
+        }
+    }
+
+    /// Enables or disables the GC option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if the option turns on or not.
+    pub fn gc(self, enable: bool) -> Self {
+        Self { gc: enable, ..self }
+    }
+
+    /// Enables or disables the TailCall option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if the option turns on or not.
+    pub fn tail_call(self, enable: bool) -> Self {
+        Self {
+            tail_call: enable,
+            ..self
+        }
+    }
+
+    /// Enables or disables the FunctionReferences option.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn function_references(self, enable: bool) -> Self {
+        Self {
+            function_references: enable,
+            ..self
+        }
+    }
+
+    /// Enables or disables the `ForceInterpreter` option.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn interpreter_mode(self, enable: bool) -> Self {
+        Self {
+            interpreter_mode: enable,
+            ..self
+        }
+    }
+}
+impl Default for CommonConfigOptions {
+    /// Creates a new default instance of [CommonConfigOptions].
+    ///
+    /// The default options are:
+    /// * mutable_globals: true,
+    /// * non_trap_conversions: true,
+    /// * sign_extension_operators: true,
+    /// * multi_value: true,
+    /// * bulk_memory_operations: true,
+    /// * reference_types: true,
+    /// * simd: true,
+    /// * multi_memories: false,
+    /// * threads: false,
+    /// * tail_call: false,
+    /// * function_references: false,
+    /// * interpreter_mode: false,
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
+/// Defines a group of configuration options for AOT compiler.
+///
+/// [CompilerConfigOptions] is used to set the AOT compiler related configuration options, which are
+///
+///  - Compiler Optimization Levels
+///    - `O0` performs as many optimizations as possible.
+///    
+///    - `O1` optimizes quickly without destroying debuggability  
+///    - `02` optimizes for fast execution as much as possible without triggering significant incremental
+///           compile time or code size growth  
+///    - `O3` optimizes for fast execution as much as possible  
+///    - `Os` optimizes for small code size as much as possible without triggering significant incremental
+///           compile time or execution time slowdowns  
+///    - `Oz` optimizes for small code size as much as possible  
+///  - Compiler Output Formats
+///    - `Native` specifies the output format is native dynamic library (`*.wasm.so`)  
+///    - `Wasm` specifies the output format is WebAssembly with AOT compiled codes in custom section (`*.wasm`).
+///  
+///  - `dump_ir` determines if AOT compiler generates IR or not  
+///  - `generic_binary` determines if AOT compiler generates the generic binary or not.
+///  - `interruptible` determines if AOT compiler generates interruptible binary or not.
+///  
+///  The configuration options above are only effective to [AOT compiler](crate::Compiler).
+#[cfg(feature = "aot")]
+#[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+#[derive(Debug, Clone, Copy)]
+pub struct CompilerConfigOptions {
+    out_format: CompilerOutputFormat,
+    opt_level: CompilerOptimizationLevel,
+    dump_ir: bool,
+    generic_binary: bool,
+    interruptible: bool,
+}
+#[cfg(feature = "aot")]
+#[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+impl CompilerConfigOptions {
+    /// Creates a new instance of [CompilerConfigOptions].
+    pub fn new() -> Self {
+        Self {
+            out_format: CompilerOutputFormat::Wasm,
+            opt_level: CompilerOptimizationLevel::O3,
+            dump_ir: false,
+            generic_binary: false,
+            interruptible: false,
+        }
+    }
+
+    /// Sets the output binary format of AOT compiler.
+    ///
+    /// # Argument
+    ///
+    /// - `format` specifies the format of the output binary.
+    pub fn out_format(self, format: CompilerOutputFormat) -> Self {
+        Self {
+            out_format: format,
+            ..self
+        }
+    }
+
+    /// Sets the optimization level of AOT compiler.
+    ///
+    /// # Argument
+    ///
+    /// - `level` specifies the optimization level of AOT compiler.
+    pub fn optimization_level(self, level: CompilerOptimizationLevel) -> Self {
+        Self {
+            opt_level: level,
+            ..self
+        }
+    }
+
+    /// Sets the dump IR option of AOT compiler.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if dump ir or not.
+    pub fn dump_ir(self, enable: bool) -> Self {
+        Self {
+            dump_ir: enable,
+            ..self
+        }
+    }
+
+    /// Sets the generic binary option of AOT compiler.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if generate the generic binary or not when perform AOT compilation.
+    pub fn generic_binary(self, enable: bool) -> Self {
+        Self {
+            generic_binary: enable,
+            ..self
+        }
+    }
+
+    /// Enables or Disables the `Interruptible` option of AOT compiler.
+    ///
+    /// This option determines to generate interruptible binary or not when compilation in AOT compiler.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if turn on the `Interruptible` option.
+    pub fn interruptible(self, enable: bool) -> Self {
+        Self {
+            interruptible: enable,
+            ..self
+        }
+    }
+}
+#[cfg(feature = "aot")]
+#[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+impl Default for CompilerConfigOptions {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
+/// Defines a group of runtime configuration options.
+///
+/// [RuntimeConfigOptions] is used to set the runtime configuration options, which are
+///
+/// - `maximum_memory_page` limits the page size of [Memory](crate::Memory). This option is only effective to
+///       [Executor](crate::Executor).
+#[derive(Debug, Clone, Copy)]
+pub struct RuntimeConfigOptions {
+    max_memory_pages: u32,
+}
+impl RuntimeConfigOptions {
+    /// Creates a new instance of [RuntimeConfigOptions].
+    pub fn new() -> Self {
+        Self {
+            max_memory_pages: 65536,
+        }
+    }
+
+    /// Sets the maximum number of the memory pages available.
+    ///
+    /// # Argument
+    ///
+    /// - `count` specifies the page count (64KB per page).
+    pub fn max_memory_pages(self, count: u32) -> Self {
+        Self {
+            max_memory_pages: count,
+        }
+    }
+}
+impl Default for RuntimeConfigOptions {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
+/// Defines a group of the statistics configuration options.
+///
+/// [StatisticsConfigOptions] is used to set the statistics configuration options, which are
+///
+///  - `count_instructions` determines if measuring the count of instructions when running a compiled or pure WASM.
+///   
+///  - `measure_cost` determines if measuring the instruction costs when running a compiled or pure WASM.
+///   
+///  - `measure_time` determines if measuring the running time when running a compiled or pure WASM.
+#[derive(Debug, Default, Clone, Copy)]
+pub struct StatisticsConfigOptions {
+    count_instructions: bool,
+    measure_cost: bool,
+    measure_time: bool,
+}
+impl StatisticsConfigOptions {
+    /// Creates a new instance of [StatisticsConfigOptions].
+    pub fn new() -> Self {
+        Self::default()
+    }
+
+    /// Sets the instruction counting option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if support instruction counting or not when execution after AOT compilation.
+    pub fn count_instructions(self, enable: bool) -> Self {
+        Self {
+            count_instructions: enable,
+            ..self
+        }
+    }
+
+    /// Sets the cost measuring option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if support cost measuring or not when execution after AOT compilation.
+    pub fn measure_cost(self, enable: bool) -> Self {
+        Self {
+            measure_cost: enable,
+            ..self
+        }
+    }
+
+    /// Sets the time measuring option.
+    ///
+    /// # Argument
+    ///
+    /// - `enable` specifies if support time measuring or not when execution after AOT compilation.
+    pub fn measure_time(self, enable: bool) -> Self {
+        Self {
+            measure_time: enable,
+            ..self
+        }
+    }
+}
+
+#[cfg(test)]
+#[cfg(feature = "aot")]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn test_config_create() {
+        let common_options = CommonConfigOptions::default()
+            .bulk_memory_operations(true)
+            .multi_value(true)
+            .mutable_globals(true)
+            .non_trap_conversions(true)
+            .reference_types(true)
+            .sign_extension_operators(true)
+            .simd(true)
+            .multi_memories(true)
+            .interpreter_mode(true);
+
+        let compiler_options = CompilerConfigOptions::default()
+            .dump_ir(true)
+            .generic_binary(true)
+            .interruptible(true)
+            .optimization_level(CompilerOptimizationLevel::O0)
+            .out_format(CompilerOutputFormat::Native);
+
+        let stat_options = StatisticsConfigOptions::default()
+            .count_instructions(true)
+            .measure_cost(true)
+            .measure_time(true);
+
+        let runtime_options = RuntimeConfigOptions::default().max_memory_pages(1024);
+
+        let result = ConfigBuilder::new(common_options)
+            .with_statistics_config(stat_options)
+            .with_compiler_config(compiler_options)
+            .with_runtime_config(runtime_options)
+            .build();
+        assert!(result.is_ok());
+        let config = result.unwrap();
+
+        // check common config options
+        assert!(config.bulk_memory_operations_enabled());
+        assert!(config.multi_value_enabled());
+        assert!(config.mutable_globals_enabled());
+        assert!(config.non_trap_conversions_enabled());
+        assert!(config.reference_types_enabled());
+        assert!(config.sign_extension_operators_enabled());
+        assert!(config.simd_enabled());
+        assert!(config.multi_memories_enabled());
+        assert!(config.interpreter_mode_enabled());
+
+        // check compiler config options
+        assert!(config.dump_ir_enabled());
+        assert!(config.generic_binary_enabled());
+        assert!(config.interruptible_enabled());
+        assert_eq!(config.optimization_level(), CompilerOptimizationLevel::O0);
+        assert_eq!(config.out_format(), CompilerOutputFormat::Native);
+
+        // check statistics config options
+        assert!(config.instruction_counting_enabled());
+        assert!(config.cost_measuring_enabled());
+        assert!(config.time_measuring_enabled());
+
+        // check runtime config options
+        assert_eq!(config.max_memory_pages(), 1024);
+    }
+
+    #[test]
+    fn test_config_copy() {
+        let common_config = CommonConfigOptions::default()
+            .simd(false)
+            .multi_memories(true);
+        let compiler_config =
+            CompilerConfigOptions::default().optimization_level(CompilerOptimizationLevel::O0);
+        let stat_config = StatisticsConfigOptions::default().measure_time(false);
+        let runtime_config = RuntimeConfigOptions::default().max_memory_pages(1024);
+
+        let result = ConfigBuilder::new(common_config)
+            .with_statistics_config(stat_config)
+            .with_compiler_config(compiler_config)
+            .with_runtime_config(runtime_config)
+            .build();
+        assert!(result.is_ok());
+        let config = result.unwrap();
+        assert!(!config.simd_enabled());
+        assert!(config.multi_memories_enabled());
+        assert_eq!(config.optimization_level(), CompilerOptimizationLevel::O0);
+        assert!(!config.time_measuring_enabled());
+        assert_eq!(config.max_memory_pages(), 1024);
+
+        // make a copy
+        let config_copied = config.clone();
+        assert!(!config_copied.simd_enabled());
+        assert!(config_copied.multi_memories_enabled());
+        assert_eq!(
+            config_copied.optimization_level(),
+            CompilerOptimizationLevel::O0
+        );
+        assert!(!config.time_measuring_enabled());
+        assert_eq!(config_copied.max_memory_pages(), 1024);
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/import.rs.html b/src/wasmedge_sdk/import.rs.html new file mode 100644 index 000000000..11b410bdf --- /dev/null +++ b/src/wasmedge_sdk/import.rs.html @@ -0,0 +1,285 @@ +import.rs - source

wasmedge_sdk/
import.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
use crate::{io::WasmValTypeList, FuncType, WasmEdgeResult};
+pub use sys::AsInstance;
+use sys::Function;
+use wasmedge_sys::{self as sys};
+
+/// Creates a [import object](crate::ImportObject).
+///
+#[derive(Debug)]
+pub struct ImportObjectBuilder<Data> {
+    import_object: ImportObject<Data>,
+}
+impl<Data> ImportObjectBuilder<Data> {
+    /// Creates a new [ImportObjectBuilder].
+    pub fn new(name: &str, data: Data) -> WasmEdgeResult<Self> {
+        let import_object = ImportObject::create(name, Box::new(data))?;
+        Ok(Self { import_object })
+    }
+
+    /// Adds a [host function](crate::Func) to the [ImportObject] to create.
+    ///
+    /// N.B. that this function can be used in thread-safe scenarios.
+    ///
+    /// # Arguments
+    ///
+    /// * `name` - The exported name of the [host function](crate::Func) to add.
+    ///
+    /// * `real_func` - The native function.
+    ///
+    /// * `data` - The host context data used in this function.
+    ///
+    /// # error
+    ///
+    /// If fail to create or add the [host function](crate::Func), then an error is returned.
+    pub fn with_func<Args, Rets>(
+        &mut self,
+        name: impl AsRef<str>,
+        real_func: sys::SyncFn<Data>,
+    ) -> WasmEdgeResult<&mut Self>
+    where
+        Args: WasmValTypeList,
+        Rets: WasmValTypeList,
+    {
+        let args = Args::wasm_types();
+        let returns = Rets::wasm_types();
+        let ty = FuncType::new(args.to_vec(), returns.to_vec());
+        let func = unsafe {
+            Function::create_sync_func(&ty, real_func, self.import_object.get_host_data_mut(), 0)
+        }?;
+        self.import_object.add_func(name, func);
+
+        Ok(self)
+    }
+
+    /// Adds a [host function](crate::Func) to the [ImportObject] to create.
+    ///
+    /// N.B. that this function can be used in thread-safe scenarios.
+    ///
+    /// # Arguments
+    ///
+    /// * `name` - The exported name of the [host function](crate::Func) to add.
+    ///
+    /// * `ty` - The function type.
+    ///
+    /// * `real_func` - The native function.
+    ///
+    /// * `data` - The host context data used in this function.
+    ///
+    /// # error
+    ///
+    /// If fail to create or add the [host function](crate::Func), then an error is returned.
+    pub fn with_func_by_type(
+        &mut self,
+        name: impl AsRef<str>,
+        ty: FuncType,
+        real_func: sys::SyncFn<Data>,
+    ) -> WasmEdgeResult<&mut Self> {
+        let func = unsafe {
+            Function::create_sync_func(&ty, real_func, self.import_object.get_host_data_mut(), 0)
+        }?;
+        self.import_object.add_func(name, func);
+        Ok(self)
+    }
+
+    /// Adds a [global](crate::Global) to the [ImportObject] to create.
+    ///
+    /// # Arguments
+    ///
+    /// * `name` - The exported name of the [global](crate::Global) to add.
+    ///
+    /// * `global` - The wasm [global instance](crate::Global) to add.
+    ///
+    pub fn with_global(mut self, name: impl AsRef<str>, global: sys::Global) -> Self {
+        self.import_object.add_global(name, global);
+        self
+    }
+
+    /// Adds a [memory](crate::Memory) to the [ImportObject] to create.
+    ///
+    /// # Arguments
+    ///
+    /// * `name` - The exported name of the [memory](crate::Memory) to add.
+    ///
+    /// * `memory` - The wasm [memory instance](crate::Memory) to add.
+    ///
+    pub fn with_memory(mut self, name: impl AsRef<str>, memory: sys::Memory) -> Self {
+        self.import_object.add_memory(name, memory);
+        self
+    }
+
+    /// Adds a [table](crate::Table) to the [ImportObject] to create.
+    ///
+    /// # Arguments
+    ///
+    /// * `name` - The exported name of the [table](crate::Table) to add.
+    ///
+    /// * `table` - The wasm [table instance](crate::Table) to add.
+    ///
+    pub fn with_table(mut self, name: impl AsRef<str>, table: sys::Table) -> Self {
+        self.import_object.add_table(name, table);
+        self
+    }
+
+    /// Creates a new [ImportObject].
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the [ImportObject] to create.
+    ///
+    /// * `host_data` - The host context data to be stored in the module instance.
+    ///
+    /// # Error
+    ///
+    /// If fail to create the [ImportObject], then an error is returned.
+    pub fn build(self) -> ImportObject<Data> {
+        self.import_object
+    }
+}
+
+/// Defines an import object that contains the required import data used when instantiating a [module](crate::Module).
+///
+/// An [ImportObject] instance is created with [ImportObjectBuilder](crate::ImportObjectBuilder).
+pub type ImportObject<T> = sys::ImportModule<T>;
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/instance.rs.html b/src/wasmedge_sdk/instance.rs.html new file mode 100644 index 000000000..49e5007b0 --- /dev/null +++ b/src/wasmedge_sdk/instance.rs.html @@ -0,0 +1,15 @@ +instance.rs - source

wasmedge_sdk/
instance.rs

+1
+2
+3
+4
+5
+6
+7
//! Defines WasmEdge Instance.
+use wasmedge_sys as sys;
+
+/// Represents an instantiated module.
+///
+/// An [Instance] represents an instantiated module. In the instantiation process, A [module instance](crate::Instance) is created based on a [compiled module](crate::Module). From a [module instance] the exported [host function](crate::Func), [table](crate::Table), [memory](crate::Memory), and [global](crate::Global) instances can be fetched.
+pub type Instance = sys::Instance;
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/io.rs.html b/src/wasmedge_sdk/io.rs.html new file mode 100644 index 000000000..400b06ecb --- /dev/null +++ b/src/wasmedge_sdk/io.rs.html @@ -0,0 +1,621 @@ +io.rs - source

wasmedge_sdk/
io.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
use crate::{types::ExternRef, ValType, WasmValue};
+
+/// Describes the mapping of Rust type to Wasm type.
+///
+/// ```rust
+/// use wasmedge_sdk::{WasmValType, ValType};
+///
+/// assert_eq!(i32::WASM_TYPE, ValType::I32);
+/// ```
+///
+pub trait WasmValType {
+    /// The Wasm type.
+    const WASM_TYPE: ValType;
+}
+
+/// The `impl_wasm_val_type` macro is used to generate the following struct
+///
+/// ```ignore
+/// impl WasmValType for i32 {
+///     const WASM_TYPE: ValType = ValType::I32;
+/// }
+/// ```
+macro_rules! impl_wasm_val_type {
+    ($t:ty, $w:expr) => {
+        impl WasmValType for $t {
+            const WASM_TYPE: ValType = $w;
+        }
+    };
+}
+
+impl_wasm_val_type!(i8, ValType::I32);
+impl_wasm_val_type!(u8, ValType::I32);
+impl_wasm_val_type!(i16, ValType::I32);
+impl_wasm_val_type!(u16, ValType::I32);
+impl_wasm_val_type!(i32, ValType::I32);
+impl_wasm_val_type!(u32, ValType::I64);
+impl_wasm_val_type!(i64, ValType::I64);
+impl_wasm_val_type!(f32, ValType::F32);
+impl_wasm_val_type!(f64, ValType::F64);
+impl_wasm_val_type!(i128, ValType::V128);
+// impl_wasm_val_type!(FuncRef, ValType::FuncRef);
+impl_wasm_val_type!(ExternRef, ValType::ExternRef);
+
+#[cfg(test)]
+mod test_wasm_val_type {
+    use super::*;
+
+    #[test]
+    fn test_wasm_types() {
+        assert_eq!(i8::WASM_TYPE, ValType::I32);
+        assert_eq!(u8::WASM_TYPE, ValType::I32);
+        assert_eq!(i16::WASM_TYPE, ValType::I32);
+        assert_eq!(u16::WASM_TYPE, ValType::I32);
+        assert_eq!(i32::WASM_TYPE, ValType::I32);
+        assert_eq!(u32::WASM_TYPE, ValType::I64);
+        assert_eq!(i64::WASM_TYPE, ValType::I64);
+        assert_eq!(f32::WASM_TYPE, ValType::F32);
+        assert_eq!(f64::WASM_TYPE, ValType::F64);
+        assert_eq!(i128::WASM_TYPE, ValType::V128);
+        // assert_eq!(FuncRef::WASM_TYPE, ValType::FuncRef);
+        assert_eq!(ExternRef::WASM_TYPE, ValType::ExternRef);
+    }
+}
+
+/// Describes the mapping of a tuple of Rust types to Wasm types.
+///
+/// ```rust
+/// use wasmedge_sdk::{types::ExternRef, ValType, WasmValTypeList};
+///
+/// assert_eq!(
+///      <(i32, i64, f32, f64, ExternRef)>::wasm_types(),
+///      [ValType::I32, ValType::I64, ValType::F32, ValType::F64, ValType::ExternRef]
+/// );
+/// ```
+pub trait WasmValTypeList
+where
+    Self: Sized,
+{
+    /// The array type that can hold all the represented values.
+    ///
+    /// Note that all values are stored in their binary form.
+    type Array: AsMut<[i128]>;
+
+    /// Get the Wasm types for the tuple (list) of currently
+    /// represented values.
+    fn wasm_types() -> &'static [ValType];
+}
+
+macro_rules! impl_wasm_val_type_list {
+    ( $($o:ident),* ) => {
+        #[allow(unused_parens, dead_code)]
+        impl< $( $o ),* >
+            WasmValTypeList
+        for ( $( $o ),* )
+        where
+            $( $o: WasmValType ),*
+        {
+            type Array = [i128; count_idents!( $( $o ),* )];
+
+            fn wasm_types() -> &'static [ValType] {
+                &[
+                    $(
+                        $o::WASM_TYPE
+                    ),*
+                ]
+            }
+        }
+    };
+}
+
+// Count the number of identifiers at compile-time.
+macro_rules! count_idents {
+    ( $($idents:ident),* ) => {
+        {
+            #[allow(dead_code, non_camel_case_types)]
+            enum Idents { $( $idents, )* __CountIdentsLast }
+            const COUNT: usize = Idents::__CountIdentsLast as usize;
+            COUNT
+        }
+    };
+}
+
+impl_wasm_val_type_list!();
+impl_wasm_val_type_list!(A1);
+impl_wasm_val_type_list!(A1, A2);
+impl_wasm_val_type_list!(A1, A2, A3);
+impl_wasm_val_type_list!(A1, A2, A3, A4);
+impl_wasm_val_type_list!(A1, A2, A3, A4, A5);
+impl_wasm_val_type_list!(A1, A2, A3, A4, A5, A6);
+impl_wasm_val_type_list!(A1, A2, A3, A4, A5, A6, A7);
+impl_wasm_val_type_list!(A1, A2, A3, A4, A5, A6, A7, A8);
+impl_wasm_val_type_list!(A1, A2, A3, A4, A5, A6, A7, A8, A9);
+impl_wasm_val_type_list!(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10);
+impl_wasm_val_type_list!(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11);
+impl_wasm_val_type_list!(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12);
+impl_wasm_val_type_list!(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13);
+impl_wasm_val_type_list!(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14);
+impl_wasm_val_type_list!(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15);
+impl_wasm_val_type_list!(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21,
+    A22
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21,
+    A22, A23
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21,
+    A22, A23, A24
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21,
+    A22, A23, A24, A25
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21,
+    A22, A23, A24, A25, A26
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21,
+    A22, A23, A24, A25, A26, A27
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21,
+    A22, A23, A24, A25, A26, A27, A28
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21,
+    A22, A23, A24, A25, A26, A27, A28, A29
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21,
+    A22, A23, A24, A25, A26, A27, A28, A29, A30
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21,
+    A22, A23, A24, A25, A26, A27, A28, A29, A30, A31
+);
+impl_wasm_val_type_list!(
+    A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21,
+    A22, A23, A24, A25, A26, A27, A28, A29, A30, A31, A32
+);
+
+#[cfg(test)]
+mod test_wasm_val_type_list {
+    use super::*;
+
+    #[test]
+    fn test_wasm_types_for_multi_values() {
+        assert_eq!(<()>::wasm_types(), []);
+        assert_eq!(<(i32, i32)>::wasm_types(), [ValType::I32, ValType::I32]);
+        assert_eq!(<(i64, i64)>::wasm_types(), [ValType::I64, ValType::I64]);
+        assert_eq!(<(f32, f32)>::wasm_types(), [ValType::F32, ValType::F32]);
+        assert_eq!(<(f64, f64)>::wasm_types(), [ValType::F64, ValType::F64]);
+        // assert_eq!(
+        //     <(i32, i64, f32, f64, FuncRef, ExternRef)>::wasm_types(),
+        //     [
+        //         ValType::I32,
+        //         ValType::I64,
+        //         ValType::F32,
+        //         ValType::F64,
+        //         ValType::FuncRef,
+        //         ValType::ExternRef,
+        //     ]
+        // );
+        // assert_eq!(
+        //     <(FuncRef, ExternRef)>::wasm_types(),
+        //     [ValType::FuncRef, ValType::ExternRef]
+        // );
+    }
+}
+
+/// Defines the function converting a value of Rust type to the one of Wasm type.
+pub trait WasmVal {
+    fn to_wasm_value(self) -> WasmValue;
+}
+impl WasmVal for i8 {
+    fn to_wasm_value(self) -> WasmValue {
+        WasmValue::from_i32(self as i32)
+    }
+}
+impl WasmVal for u8 {
+    fn to_wasm_value(self) -> WasmValue {
+        WasmValue::from_i32(self as i32)
+    }
+}
+impl WasmVal for i16 {
+    fn to_wasm_value(self) -> WasmValue {
+        WasmValue::from_i32(self as i32)
+    }
+}
+impl WasmVal for u16 {
+    fn to_wasm_value(self) -> WasmValue {
+        WasmValue::from_i32(self as i32)
+    }
+}
+impl WasmVal for i32 {
+    fn to_wasm_value(self) -> WasmValue {
+        WasmValue::from_i32(self)
+    }
+}
+impl WasmVal for u32 {
+    fn to_wasm_value(self) -> WasmValue {
+        WasmValue::from_i64(self as i64)
+    }
+}
+impl WasmVal for i64 {
+    fn to_wasm_value(self) -> WasmValue {
+        WasmValue::from_i64(self)
+    }
+}
+impl WasmVal for f32 {
+    fn to_wasm_value(self) -> WasmValue {
+        WasmValue::from_f32(self)
+    }
+}
+impl WasmVal for f64 {
+    fn to_wasm_value(self) -> WasmValue {
+        WasmValue::from_f64(self)
+    }
+}
+impl WasmVal for i128 {
+    fn to_wasm_value(self) -> WasmValue {
+        WasmValue::from_v128(self)
+    }
+}
+// impl WasmVal for FuncRef {
+//     fn to_wasm_value(self) -> WasmValue {
+//         WasmValue::from_func_ref(self.inner)
+//     }
+// }
+impl WasmVal for ExternRef {
+    fn to_wasm_value(self) -> WasmValue {
+        self.inner
+    }
+}
+
+/// Generates arguments of [WasmValue](crate::WasmValue) types.
+///
+/// Notice that to use the macro, it is required to use `WasmVal` trait.
+#[macro_export]
+macro_rules! params {
+    ( $( $x:expr ),* ) => {
+        #[allow(unused_mut)]
+        {
+            let mut temp_vec = vec![];
+            $(
+                temp_vec.push($x.to_wasm_value());
+
+            )*
+            temp_vec
+        }
+    };
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/lib.rs.html b/src/wasmedge_sdk/lib.rs.html new file mode 100644 index 000000000..0b9b3d8f4 --- /dev/null +++ b/src/wasmedge_sdk/lib.rs.html @@ -0,0 +1,333 @@ +lib.rs - source

wasmedge_sdk/
lib.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
#![doc(
+    html_logo_url = "https://github.com/cncf/artwork/blob/master/projects/wasm-edge-runtime/icon/color/wasm-edge-runtime-icon-color.png?raw=true",
+    html_favicon_url = "https://raw.githubusercontent.com/cncf/artwork/49169bdbc88a7ce3c4a722c641cc2d548bd5c340/projects/wasm-edge-runtime/icon/color/wasm-edge-runtime-icon-color.svg"
+)]
+// If the version of rust used is less than v1.63, please uncomment the follow attribute.
+// #![feature(explicit_generic_args_with_impl_trait)]
+#![allow(clippy::vec_init_then_push)]
+#![cfg_attr(docsrs, feature(doc_cfg))]
+
+//! # Overview
+//!
+//! WasmEdge Rust SDK provides idiomatic [Rust](https://www.rust-lang.org/) language bindings for [WasmEdge](https://wasmedge.org/)
+//!
+//! **Notice:** This project is still under active development and not guaranteed to have a stable API.
+//!
+//! - [WasmEdge website](https://wasmedge.org/)
+//! - [WasmEdge Docs](https://wasmedge.org/docs/)
+//! - [WasmEdge GitHub Page](https://github.com/WasmEdge/WasmEdge)
+//! - [WasmEdge Rust SDK GitHub Page](https://github.com/WasmEdge/wasmedge-rust-sdk)
+//! - [WasmEdge Rust SDK Examples](https://github.com/second-state/wasmedge-rustsdk-examples)
+//!
+//! ## Get Started
+//!
+//! Since this crate depends on the WasmEdge C API, it needs to be installed in your system first. Please refer to [WasmEdge Installation and Uninstallation](https://wasmedge.org/book/en/quick_start/install.html) to install the WasmEdge library. The versioning table below shows the version of the WasmEdge library required by each version of the `wasmedge-sdk` crate.
+//!
+//! | wasmedge-sdk  | WasmEdge lib  | wasmedge-sys  | wasmedge-types| wasmedge-macro| async-wasi|
+//! | :-----------: | :-----------: | :-----------: | :-----------: | :-----------: | :-------: |
+//! | 0.14.1        | 0.14.0        | 0.19.2        | 0.6.0         | 0.6.1         | 0.2.0     |
+//! | 0.14.0        | 0.14.0        | 0.19.0        | 0.6.0         | 0.6.1         | 0.2.0     |
+//! | 0.13.5-newapi | 0.13.5        | 0.18.0        | 0.5.0         | 0.6.1         | 0.2.0     |
+//! | 0.13.2        | 0.13.5        | 0.17.5        | 0.4.4         | 0.6.1         | 0.1.0     |
+//! | 0.13.1        | 0.13.5        | 0.17.4        | 0.4.4         | 0.6.1         | 0.1.0     |
+//! | 0.13.0        | 0.13.5        | 0.17.3        | 0.4.4         | 0.6.1         | 0.1.0     |
+//! | 0.12.2        | 0.13.4        | 0.17.2        | 0.4.4         | 0.6.1         | 0.1.0     |
+//! | 0.12.1        | 0.13.4        | 0.17.1        | 0.4.4         | 0.6.1         | 0.1.0     |
+//! | 0.12.0        | 0.13.4        | 0.17.0        | 0.4.4         | 0.6.1         | 0.1.0     |
+//! | 0.11.2        | 0.13.3        | 0.16.2        | 0.4.3         | 0.6.1         | 0.1.0     |
+//! | 0.11.0        | 0.13.3        | 0.16.0        | 0.4.3         | 0.6.0         | 0.0.3     |
+//! | 0.10.1        | 0.13.3        | 0.15.1        | 0.4.2         | 0.5.0         | 0.0.2     |
+//! | 0.10.0        | 0.13.2        | 0.15.0        | 0.4.2         | 0.5.0         | 0.0.2     |
+//! | 0.9.0         | 0.13.1        | 0.14.0        | 0.4.2         | 0.4.0         | 0.0.1     |
+//! | 0.9.0         | 0.13.0        | 0.14.0        | 0.4.2         | 0.4.0         | 0.0.1     |
+//! | 0.8.1         | 0.12.1        | 0.13.1        | 0.4.1         | 0.3.0         | -         |
+//! | 0.8.0         | 0.12.0        | 0.13.0        | 0.4.1         | 0.3.0         | -         |
+//! | 0.7.1         | 0.11.2        | 0.12.2        | 0.3.1         | 0.3.0         | -         |
+//! | 0.7.0         | 0.11.2        | 0.12          | 0.3.1         | 0.3.0         | -         |
+//! | 0.6.0         | 0.11.2        | 0.11          | 0.3.0         | 0.2.0         | -         |
+//! | 0.5.0         | 0.11.1        | 0.10          | 0.3.0         | 0.1.0         | -         |
+//! | 0.4.0         | 0.11.0        | 0.9           | 0.2.1         | -             | -         |
+//! | 0.3.0         | 0.10.1        | 0.8           | 0.2           | -             | -         |
+//! | 0.1.0         | 0.10.0        | 0.7           | 0.1           | -             | -         |
+//!
+//!
+//! WasmEdge Rust SDK will automatically search for the WasmEdge library in your system. Alternatively you can set the `WASMEDGE_DIR` environment variable to the path of the WasmEdge library (or the `WASMEDGE_INCLUDE_DIR` and `WASMEDGE_LIB_DIR` variables for more fine-grained control). If you want to use a local `cmake` build of WasmEdge you can set the `WASMEDGE_BUILD_DIR` instead.
+//!
+//! WasmEdge Rust SDK will search for the WasmEdge library in the following paths in order:
+//!
+//! - `$WASMEDGE_[INCLUDE|LIB]_DIR`
+//! - `$WASMEDGE_DIR`
+//! - `$WASMEDGE_BUILD_DIR`
+//! - `$HOME/.wasmedge`
+//! - `/usr/local`
+//! - `$HOME/.local`
+//!
+//! When the `standalone` feature is enabled the correct library will be downloaded during build time and the previous locations are ignored. You can specify a proxy for the download process using the `WASMEDGE_STANDALONE_PROXY`, `WASMEDGE_STANDALONE_PROXY_USER` and `WASMEDGE_STANDALONE_PROXY_PASS` environment variables. You can set the `WASMEDGE_STANDALONE_ARCHIVE` environment variable to use a local archive instead of downloading one.
+//! The following architectures are supported for automatic downloads:
+//!
+//! | os    | libc    | architecture        | linking type    |
+//! | :---: | :-----: | :-----------------: | :-------------: |
+//! | macos | -       | `x86_64`, `aarch64` | dynamic         |
+//! | linux | `glibc` | `x86_64`, `aarch64` | static, dynamic |
+//! | linux | `musl`  | `x86_64`, `aarch64` | static          |
+//!
+//! This crate uses `rust-bindgen` during the build process. If you would like to use an external `rust-bindgen` you can set the `WASMEDGE_RUST_BINDGEN_PATH` environment variable to the `bindgen` executable path. This is particularly useful in systems like Alpine Linux (see [rust-lang/rust-bindgen#2360](https://github.com/rust-lang/rust-bindgen/issues/2360#issuecomment-1595869379), [rust-lang/rust-bindgen#2333](https://github.com/rust-lang/rust-bindgen/issues/2333)).
+//!
+//! **Notice:** The minimum supported Rust version is 1.71.
+//!
+//! ## API Reference
+//!
+//! - [API Reference](https://wasmedge.github.io/wasmedge-rust-sdk/wasmedge_sdk/index.html)
+//! - [Async API Reference](https://second-state.github.io/wasmedge-async-rust-sdk/wasmedge_sdk/index.html)
+//!
+//! ## Examples
+//!
+//! The [Examples of WasmEdge RustSDK](https://github.com/second-state/wasmedge-rustsdk-examples) repo contains a number of examples that demonstrate how to use the WasmEdge Rust SDK.
+//!
+//! ## Contributing
+//!
+//! Please read the [contribution guidelines](https://github.com/WasmEdge/wasmedge-rust-sdk/blob/main/CONTRIBUTING.md) on how to contribute code.
+//!
+//! ## License
+//!
+//! This project is licensed under the terms of the [Apache 2.0 license](https://github.com/tensorflow/rust/blob/HEAD/LICENSE).
+//!
+
+#[doc(hidden)]
+#[cfg(feature = "aot")]
+#[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+mod compiler;
+pub mod config;
+
+// #[cfg(feature = "dock")]
+// pub mod dock;
+
+mod import;
+mod instance;
+#[doc(hidden)]
+pub mod io;
+#[doc(hidden)]
+pub mod log;
+mod module;
+pub mod plugin;
+mod statistics;
+mod store;
+pub mod types;
+pub mod utils;
+#[doc(hidden)]
+pub mod vm;
+
+#[cfg(all(feature = "async", target_os = "linux"))]
+pub mod r#async;
+
+#[doc(inline)]
+#[cfg(feature = "aot")]
+#[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+pub use compiler::Compiler;
+
+#[doc(inline)]
+pub use import::{AsInstance, ImportObject, ImportObjectBuilder};
+pub use instance::Instance;
+#[doc(inline)]
+pub use io::{WasmVal, WasmValType, WasmValTypeList};
+#[doc(inline)]
+pub use log::LogManager;
+#[doc(inline)]
+pub use module::{ExportType, ImportType, Module};
+#[doc(inline)]
+pub use statistics::Statistics;
+#[doc(inline)]
+pub use store::Store;
+#[doc(inline)]
+pub use vm::Vm;
+
+pub use wasmedge_types::{
+    error, wat2wasm, CompilerOptimizationLevel, CompilerOutputFormat, ExternalInstanceType,
+    FuncType, GlobalType, HostRegistration, MemoryType, Mutability, RefType, TableType, ValType,
+    WasmEdgeResult,
+};
+
+#[cfg(all(feature = "async", target_os = "linux"))]
+#[cfg_attr(docsrs, doc(cfg(all(feature = "async", target_os = "linux"))))]
+pub use wasmedge_macro::async_host_function;
+pub use wasmedge_macro::host_function;
+
+/// WebAssembly value type.
+pub type WasmValue = wasmedge_sys::types::WasmValue;
+
+/// This is a workaround solution to the [`never`](https://doc.rust-lang.org/std/primitive.never.html) type in Rust. It will be replaced by `!` once it is stable.
+pub type NeverType = wasmedge_types::NeverType;
+
+#[doc(hidden)]
+pub type CallingFrame = wasmedge_sys::CallingFrame;
+
+pub mod wasi {
+    pub use wasmedge_sys::WasiModule;
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/log.rs.html b/src/wasmedge_sdk/log.rs.html new file mode 100644 index 000000000..8b2c74907 --- /dev/null +++ b/src/wasmedge_sdk/log.rs.html @@ -0,0 +1,47 @@ +log.rs - source

wasmedge_sdk/
log.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
//! Defines WasmEdge LogManager struct
+
+use wasmedge_sys as sys;
+
+/// Manipulates the runtime logger.
+#[derive(Debug)]
+pub struct LogManager {}
+impl LogManager {
+    /// Logs the debug information.
+    pub fn log_debug_info() {
+        sys::utils::log_debug_info()
+    }
+
+    /// Logs the error information.
+    pub fn log_error_info() {
+        sys::utils::log_error_info()
+    }
+
+    /// Sets the logging system off.
+    pub fn log_off() {
+        sys::utils::log_off()
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/module.rs.html b/src/wasmedge_sdk/module.rs.html new file mode 100644 index 000000000..a019ee48d --- /dev/null +++ b/src/wasmedge_sdk/module.rs.html @@ -0,0 +1,613 @@ +module.rs - source

wasmedge_sdk/
module.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
//! Defines WasmEdge AST Module, ImportType, and ExportType.
+
+use crate::{config::Config, ExternalInstanceType, WasmEdgeResult};
+use std::{borrow::Cow, marker::PhantomData, path::Path, sync::Arc};
+use wasmedge_sys as sys;
+
+/// Defines compiled in-memory representation of an input WASM binary.
+///
+/// A [Module] is a compiled in-memory representation of an input WebAssembly binary. In the instantiation process, a [Module] is instatiated to a module [instance](crate::Instance), from which the exported [function](crate::Func), [table](crate::Table), [memory](crate::Memory), and [global](crate::Global) instances can be fetched.
+#[derive(Debug, Clone)]
+pub struct Module {
+    pub(crate) inner: Arc<sys::Module>,
+}
+impl Module {
+    /// Returns a validated module from a file.
+    ///
+    /// # Arguments
+    ///
+    /// * `config` - The global configuration.
+    ///
+    /// * `file` - A wasm file or an AOT wasm file.
+    ///
+    /// # Error
+    ///
+    /// If fail to load and valiate a module from a file, returns an error.
+    pub fn from_file(config: Option<&Config>, file: impl AsRef<Path>) -> WasmEdgeResult<Self> {
+        let inner_config = config.map(|cfg| cfg.inner.as_ref());
+
+        // load module
+        let inner_module = sys::Loader::create(inner_config)?.from_file(file.as_ref())?;
+
+        // validate module
+        sys::Validator::create(inner_config)?.validate(&inner_module)?;
+
+        Ok(Self {
+            inner: inner_module,
+        })
+    }
+
+    /// Loads a WebAssembly binary module from in-memory bytes.
+    ///
+    /// # Arguments
+    ///
+    /// * `config` - The global configuration.
+    ///
+    /// * `bytes` - The in-memory bytes to be parsed.
+    ///
+    /// # Error
+    ///
+    /// If fail to load and valiate the WebAssembly module from the given in-memory bytes, returns an error.
+    pub fn from_bytes(config: Option<&Config>, bytes: impl AsRef<[u8]>) -> WasmEdgeResult<Self> {
+        let inner_config = config.map(|cfg| cfg.inner.as_ref());
+
+        // load module
+        let inner_module = sys::Loader::create(inner_config)?.from_bytes(bytes.as_ref())?;
+
+        // validate module
+        sys::Validator::create(inner_config)?.validate(&inner_module)?;
+
+        Ok(Self {
+            inner: inner_module,
+        })
+    }
+
+    /// Returns the count of the imported WasmEdge instances in the [module](crate::Module).
+    pub fn count_of_imports(&self) -> u32 {
+        self.inner.count_of_imports()
+    }
+
+    /// Returns the [import types](crate::ImportType) of all imported WasmEdge instances in the [module](crate::Module).
+    pub fn imports(&self) -> Vec<ImportType> {
+        let mut imports = Vec::new();
+        for inner_import in self.inner.imports() {
+            let import = ImportType {
+                inner: inner_import,
+                _marker: PhantomData,
+            };
+            imports.push(import);
+        }
+        imports
+    }
+
+    /// Returns the count of the exported WasmEdge instances from the [module](crate::Module).
+    pub fn count_of_exports(&self) -> u32 {
+        self.inner.count_of_exports()
+    }
+
+    /// Returns the [export types](crate::ExportType) of all exported WasmEdge instances (including funcs, tables, globals and memories) from the [module](crate::Module).
+    pub fn exports(&self) -> Vec<ExportType> {
+        let mut exports = Vec::new();
+        for inner_export in self.inner.export() {
+            let export = ExportType {
+                inner: inner_export,
+                _marker: PhantomData,
+            };
+            exports.push(export);
+        }
+        exports
+    }
+
+    /// Gets the [export type](crate::ExportType) by the name of a specific exported WasmEdge instance, such as func, table, global or memory instance.
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the target exported WasmEdge instance, such as func, table, global or memory instance.
+    pub fn get_export(&self, name: impl AsRef<str>) -> Option<ExternalInstanceType> {
+        let exports = self
+            .exports()
+            .into_iter()
+            .filter(|x| x.name() == name.as_ref())
+            .collect::<Vec<_>>();
+        match exports.is_empty() {
+            true => None,
+            false => exports[0].ty().ok(),
+        }
+    }
+}
+
+/// Defines the types of the imported instances.
+#[derive(Debug)]
+pub struct ImportType<'module> {
+    inner: sys::ImportType<'module>,
+    _marker: PhantomData<&'module Module>,
+}
+impl ImportType<'_> {
+    /// Returns the imported name of the WasmEdge instance.
+    pub fn name(&self) -> Cow<'_, str> {
+        self.inner.name()
+    }
+
+    /// Returns the name of the module hosting the imported WasmEdge instance.
+    pub fn module_name(&self) -> Cow<'_, str> {
+        self.inner.module_name()
+    }
+
+    /// Returns the type of the imported WasmEdge instance, which is one of the types defined in [ExternalInstanceType](wasmedge_types::ExternalInstanceType).
+    pub fn ty(&self) -> WasmEdgeResult<ExternalInstanceType> {
+        let ty = self.inner.ty()?;
+        Ok(ty)
+    }
+}
+
+/// Defines the types of the exported instances.
+#[derive(Debug)]
+pub struct ExportType<'module> {
+    inner: sys::ExportType<'module>,
+    _marker: PhantomData<&'module Module>,
+}
+impl ExportType<'_> {
+    /// Returns the exported name of the WasmEdge instance.
+    pub fn name(&self) -> Cow<'_, str> {
+        self.inner.name()
+    }
+
+    /// Returns the type of the exported WasmEdge instance, which is one of the types defined in [ExternalInstanceType](wasmedge_types::ExternalInstanceType).
+    pub fn ty(&self) -> WasmEdgeResult<ExternalInstanceType> {
+        let ty = self.inner.ty()?;
+        Ok(ty)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{
+        error::{CoreError, CoreLoadError, WasmEdgeError},
+        wat2wasm,
+    };
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_module_from_wasm() {
+        // load wasm module from a specified wasm file
+        let file = std::env::current_dir()
+            .unwrap()
+            .join("examples/wasmedge-sys/data/fibonacci.wat");
+
+        let result = Module::from_file(None, file);
+        assert!(result.is_ok());
+
+        // attempt to load a non-existent wasm file
+        let result = Module::from_file(None, "not_exist_file.wasm");
+        assert!(result.is_err());
+        assert_eq!(
+            result.unwrap_err(),
+            Box::new(WasmEdgeError::Core(CoreError::Load(
+                CoreLoadError::IllegalPath
+            )))
+        );
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_module_from_wat() {
+        // load wasm module from a specified wasm file
+        let file = std::env::current_dir()
+            .unwrap()
+            .join("examples/wasmedge-sys/data/fibonacci.wat");
+
+        let result = Module::from_file(None, file);
+        assert!(result.is_ok());
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_module_from_bytes() {
+        // read the wasm bytes
+        let wasm_bytes = wat2wasm(
+            br#"
+        (module
+            (export "fib" (func $fib))
+            (func $fib (param $n i32) (result i32)
+             (if
+              (i32.lt_s
+               (local.get $n)
+               (i32.const 2)
+              )
+              (then
+                (return (i32.const 1))
+              )
+             )
+             (return
+              (i32.add
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 2)
+                )
+               )
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 1)
+                )
+               )
+              )
+             )
+            )
+           )
+"#,
+        )
+        .unwrap();
+
+        let result = Module::from_bytes(None, wasm_bytes);
+        assert!(result.is_ok());
+
+        // attempt to load an empty buffer
+        let result = Module::from_bytes(None, []);
+        assert_eq!(
+            result.unwrap_err(),
+            Box::new(WasmEdgeError::Core(CoreError::Load(
+                CoreLoadError::UnexpectedEnd
+            ))),
+        );
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_module_clone() {
+        // read the wasm bytes
+        let wasm_bytes = wat2wasm(
+            br#"
+        (module
+            (export "fib" (func $fib))
+            (func $fib (param $n i32) (result i32)
+             (if
+              (i32.lt_s
+               (local.get $n)
+               (i32.const 2)
+              )
+              (then
+                (return (i32.const 1))
+              )
+             )
+             (return
+              (i32.add
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 2)
+                )
+               )
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 1)
+                )
+               )
+              )
+             )
+            )
+           )
+"#,
+        )
+        .unwrap();
+
+        let result = Module::from_bytes(None, wasm_bytes);
+        assert!(result.is_ok());
+        let module = result.unwrap();
+        assert_eq!(module.exports().len(), 1);
+
+        // clone the module
+        let module_clone = module.clone();
+        assert_eq!(module.exports().len(), module_clone.exports().len());
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/plugin.rs.html b/src/wasmedge_sdk/plugin.rs.html new file mode 100644 index 000000000..427882467 --- /dev/null +++ b/src/wasmedge_sdk/plugin.rs.html @@ -0,0 +1,915 @@ +plugin.rs - source

wasmedge_sdk/
plugin.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
//! Defines plugin related structs.
+
+use crate::{instance::Instance, WasmEdgeResult};
+use wasmedge_sys::{self as sys};
+
+#[cfg(feature = "wasi_nn")]
+use wasmedge_types::error::WasmEdgeError;
+
+/// Defines low-level types used in Plugin development.
+pub mod ffi {
+    pub use wasmedge_sys::ffi::{
+        WasmEdge_ModuleDescriptor, WasmEdge_ModuleInstanceContext, WasmEdge_PluginDescriptor,
+    };
+}
+
+/// Preload config for initializing the wasi_nn plug-in.
+#[cfg(feature = "wasi_nn")]
+#[cfg_attr(docsrs, doc(cfg(feature = "wasi_nn")))]
+#[derive(Debug)]
+pub struct NNPreload {
+    /// The alias of the model in the WASI-NN environment.
+    alias: String,
+    /// The inference backend.
+    backend: GraphEncoding,
+    /// The execution target, on which the inference runs.
+    target: ExecutionTarget,
+    /// The path to the model file. Note that the path is the guest path instead of the host path.
+    path: std::path::PathBuf,
+}
+#[cfg(feature = "wasi_nn")]
+#[cfg_attr(docsrs, doc(cfg(feature = "wasi_nn")))]
+impl NNPreload {
+    /// Creates a new preload config.
+    ///
+    /// # Arguments
+    ///
+    /// * `alias` - The alias of the model in the WASI-NN environment.
+    ///
+    /// * `backend` - The inference backend.
+    ///
+    /// * `target` - The execution target, on which the inference runs.
+    ///
+    /// * `path` - The path to the model file. Note that the path is the guest path instead of the host path.
+    ///
+    pub fn new(
+        alias: impl AsRef<str>,
+        backend: GraphEncoding,
+        target: ExecutionTarget,
+        path: impl AsRef<std::path::Path>,
+    ) -> Self {
+        Self {
+            alias: alias.as_ref().to_owned(),
+            backend,
+            target,
+            path: path.as_ref().to_owned(),
+        }
+    }
+}
+#[cfg(feature = "wasi_nn")]
+#[cfg_attr(docsrs, doc(cfg(feature = "wasi_nn")))]
+impl std::fmt::Display for NNPreload {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        write!(
+            f,
+            "{alias}:{backend}:{target}:{path}",
+            alias = self.alias,
+            backend = self.backend,
+            target = self.target,
+            path = self.path.to_string_lossy().into_owned()
+        )
+    }
+}
+#[cfg(feature = "wasi_nn")]
+#[cfg_attr(docsrs, doc(cfg(feature = "wasi_nn")))]
+impl std::str::FromStr for NNPreload {
+    type Err = WasmEdgeError;
+
+    fn from_str(preload: &str) -> std::result::Result<Self, Self::Err> {
+        let nn_preload: Vec<&str> = preload.split(':').collect();
+        if nn_preload.len() != 4 {
+            return Err(WasmEdgeError::Operation(format!(
+                "Failed to convert to NNPreload value. Invalid preload string: {}. The correct format is: 'alias:backend:target:path'",
+                preload
+            )));
+        }
+        let (alias, backend, target, path) = (
+            nn_preload[0].to_string(),
+            nn_preload[1]
+                .parse::<GraphEncoding>()
+                .map_err(|err| WasmEdgeError::Operation(err.to_string()))?,
+            nn_preload[2]
+                .parse::<ExecutionTarget>()
+                .map_err(|err| WasmEdgeError::Operation(err.to_string()))?,
+            std::path::PathBuf::from(nn_preload[3]),
+        );
+
+        Ok(Self::new(alias, backend, target, path))
+    }
+}
+
+#[cfg(feature = "wasi_nn")]
+#[test]
+fn test_generate_nnpreload_from_str() {
+    use std::str::FromStr;
+
+    // valid preload string
+    let preload = "default:GGML:CPU:llama-2-7b-chat.Q5_K_M.gguf";
+    let result = NNPreload::from_str(preload);
+    assert!(result.is_ok());
+    let nnpreload = result.unwrap();
+    assert_eq!(nnpreload.alias, "default");
+    assert_eq!(nnpreload.backend, GraphEncoding::GGML);
+    assert_eq!(nnpreload.target, ExecutionTarget::CPU);
+    assert_eq!(
+        nnpreload.path,
+        std::path::PathBuf::from("llama-2-7b-chat.Q5_K_M.gguf")
+    );
+
+    // invalid preload string
+    let preload = "default:CPU:GGML:llama-2-7b-chat.Q5_K_M.gguf";
+    let result = NNPreload::from_str(preload);
+    assert!(result.is_err());
+    let err = result.unwrap_err();
+    assert_eq!(
+        WasmEdgeError::Operation(
+            "Failed to convert to NNBackend value. Unknown NNBackend type: CPU".to_string()
+        ),
+        err
+    );
+
+    // invalid preload string: unsupported target
+    let preload = "default:GGML:NPU:llama-2-7b-chat.Q5_K_M.gguf";
+    let result = NNPreload::from_str(preload);
+    assert!(result.is_err());
+    let err = result.unwrap_err();
+    assert_eq!(
+        WasmEdgeError::Operation(
+            "Failed to convert to ExecutionTarget value. Unknown ExecutionTarget type: NPU"
+                .to_string()
+        ),
+        err
+    );
+
+    // invalid preload string: invalid format
+    let preload = "default:GGML:CPU";
+    let result = NNPreload::from_str(preload);
+    assert!(result.is_err());
+    let err = result.unwrap_err();
+    assert_eq!(
+        WasmEdgeError::Operation(
+            "Failed to convert to NNPreload value. Invalid preload string: default:GGML:CPU. The correct format is: 'alias:backend:target:path'"
+                .to_string()
+        ),
+        err
+    );
+}
+
+/// Describes the encoding of the graph.
+#[cfg(feature = "wasi_nn")]
+#[cfg_attr(docsrs, doc(cfg(feature = "wasi_nn")))]
+#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
+#[allow(non_camel_case_types)]
+pub enum GraphEncoding {
+    OpenVINO,
+    ONNX,
+    TensorFlow,
+    PyTorch,
+    TensorFlowLite,
+    Autodetect,
+    GGML,
+}
+#[cfg(feature = "wasi_nn")]
+#[cfg_attr(docsrs, doc(cfg(feature = "wasi_nn")))]
+impl std::fmt::Display for GraphEncoding {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        match self {
+            GraphEncoding::PyTorch => write!(f, "PyTorch"),
+            GraphEncoding::TensorFlowLite => write!(f, "TensorflowLite"),
+            GraphEncoding::TensorFlow => write!(f, "Tensorflow"),
+            GraphEncoding::OpenVINO => write!(f, "OpenVINO"),
+            GraphEncoding::GGML => write!(f, "GGML"),
+            GraphEncoding::ONNX => write!(f, "ONNX"),
+            GraphEncoding::Autodetect => write!(f, "Autodetect"),
+        }
+    }
+}
+#[cfg(feature = "wasi_nn")]
+#[cfg_attr(docsrs, doc(cfg(feature = "wasi_nn")))]
+impl std::str::FromStr for GraphEncoding {
+    type Err = WasmEdgeError;
+
+    fn from_str(s: &str) -> Result<Self, Self::Err> {
+        match s.to_lowercase().as_str() {
+            "openvino" => Ok(GraphEncoding::OpenVINO),
+            "onnx" => Ok(GraphEncoding::ONNX),
+            "tensorflow" => Ok(GraphEncoding::TensorFlow),
+            "pytorch" => Ok(GraphEncoding::PyTorch),
+            "tensorflowlite" => Ok(GraphEncoding::TensorFlowLite),
+            "autodetect" => Ok(GraphEncoding::Autodetect),
+            "ggml" => Ok(GraphEncoding::GGML),
+            _ => Err(WasmEdgeError::Operation(format!(
+                "Failed to convert to NNBackend value. Unknown NNBackend type: {}",
+                s
+            ))),
+        }
+    }
+}
+
+/// Define where the graph should be executed.
+#[cfg(feature = "wasi_nn")]
+#[cfg_attr(docsrs, doc(cfg(feature = "wasi_nn")))]
+#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
+#[allow(non_camel_case_types)]
+pub enum ExecutionTarget {
+    CPU,
+    GPU,
+    TPU,
+    AUTO,
+}
+#[cfg(feature = "wasi_nn")]
+#[cfg_attr(docsrs, doc(cfg(feature = "wasi_nn")))]
+impl std::fmt::Display for ExecutionTarget {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        match self {
+            ExecutionTarget::CPU => write!(f, "CPU"),
+            ExecutionTarget::GPU => write!(f, "GPU"),
+            ExecutionTarget::TPU => write!(f, "TPU"),
+            ExecutionTarget::AUTO => write!(f, "AUTO"),
+        }
+    }
+}
+#[cfg(feature = "wasi_nn")]
+#[cfg_attr(docsrs, doc(cfg(feature = "wasi_nn")))]
+impl std::str::FromStr for ExecutionTarget {
+    type Err = WasmEdgeError;
+
+    fn from_str(s: &str) -> Result<Self, Self::Err> {
+        match s.to_uppercase().as_str() {
+            "CPU" => Ok(ExecutionTarget::CPU),
+            "GPU" => Ok(ExecutionTarget::GPU),
+            "TPU" => Ok(ExecutionTarget::TPU),
+            "AUTO" => Ok(ExecutionTarget::AUTO),
+            _ => Err(WasmEdgeError::Operation(format!(
+                "Failed to convert to ExecutionTarget value. Unknown ExecutionTarget type: {}",
+                s
+            ))),
+        }
+    }
+}
+
+/// Defines the API to manage plugins.
+#[derive(Debug)]
+pub struct PluginManager {}
+impl PluginManager {
+    /// Load plugins from the given path.
+    ///
+    /// * If the path is not given, then the default plugin paths will be used. The default plugin paths are
+    ///
+    ///     * The environment variable "WASMEDGE_PLUGIN_PATH".
+    ///
+    ///     * The `../plugin/` directory related to the WasmEdge installation path.
+    ///
+    ///     * The `wasmedge/` directory under the library path if the WasmEdge is installed under the "/usr".
+    ///
+    /// * If the path is given, then
+    ///
+    ///     * If the path is pointing at a file , then it indicates that a single plugin will be loaded from the file.
+    ///
+    ///     * If the path is pointing at a directory, then the method will load plugins from the files in the directory.
+    ///
+    /// # Argument
+    ///
+    /// * `path` - A path to a plugin file or a directory holding plugin files. If `None`, then the default plugin path will be used.
+    pub fn load(path: Option<&std::path::Path>) -> WasmEdgeResult<()> {
+        match path {
+            Some(p) => sys::plugin::PluginManager::load_plugins(p),
+            None => {
+                sys::plugin::PluginManager::load_plugins_from_default_paths();
+                Ok(())
+            }
+        }
+    }
+
+    /// Initialize the wasi_nn plug-in with the preloads.
+    ///
+    /// Note that this function is only available after loading the wasi_nn plug-in and before creating, and before creating the module instance from the plug-in.
+    ///
+    /// # Argument
+    ///
+    /// * `preloads` - The preload list.
+    ///
+    /// # Example
+    ///
+    /// ```ignore
+    /// // load wasinn-pytorch-plugin from the default plugin directory: /usr/local/lib/wasmedge
+    /// PluginManager::load(None)?;
+    /// // preload named model
+    /// PluginManager::nn_preload(vec![NNPreload::new(
+    ///     "default",
+    ///     GraphEncoding::GGML,
+    ///     ExecutionTarget::CPU,
+    ///     "llama-2-7b-chat.Q5_K_M.gguf",
+    /// )]);
+    /// ```
+    ///
+    /// If a preload is string, then use `NNPreload::from_str` to create a `NNPreload` instance:
+    ///
+    /// ```ignore
+    /// use std::str::FromStr;
+    ///
+    /// // load wasinn-pytorch-plugin from the default plugin directory: /usr/local/lib/wasmedge
+    /// PluginManager::load(None)?;
+    /// // preload named model
+    /// PluginManager::nn_preload(vec![NNPreload::from_str("default:GGML:CPU:llama-2-7b-chat.Q5_K_M.gguf")?]);
+    ///
+    /// ```
+    #[cfg(feature = "wasi_nn")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "wasi_nn")))]
+    pub fn nn_preload(preloads: Vec<NNPreload>) {
+        let mut nn_preloads = Vec::new();
+        for preload in preloads {
+            nn_preloads.push(preload.to_string());
+        }
+
+        let nn_preloads_str: Vec<&str> = nn_preloads.iter().map(|s| s.as_str()).collect();
+
+        sys::plugin::PluginManager::nn_preload(nn_preloads_str);
+    }
+
+    /// Returns the count of loaded plugins.
+    pub fn count() -> u32 {
+        sys::plugin::PluginManager::count()
+    }
+
+    /// Returns the names of all loaded plugins.
+    pub fn names() -> Vec<String> {
+        sys::plugin::PluginManager::names()
+    }
+
+    /// Returns the target plugin by its name.
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the target plugin.
+    ///
+    /// # Error
+    ///
+    /// If failed to return the plugin module instance, then return [PluginError::NotFound](wasmedge_types::error::PluginError::NotFound) error.
+    pub fn find(name: impl AsRef<str>) -> WasmEdgeResult<Plugin> {
+        sys::plugin::PluginManager::find(name.as_ref()).map(|p| Plugin { inner: p })
+    }
+
+    pub fn create_plugin_instance(
+        pname: impl AsRef<str>,
+        mname: impl AsRef<str>,
+    ) -> WasmEdgeResult<PluginInstance> {
+        let plugin = sys::plugin::PluginManager::create_plugin_instance(pname, mname)?;
+        Ok(plugin)
+    }
+
+    /// Initializes the `wasmedge_process` plugin module instance with the parameters.
+    ///
+    /// # Arguments
+    ///
+    /// * `allowed_cmds` - A white list of commands.
+    ///
+    /// * `allowed` - Determines if wasmedge_process is allowed to execute all commands on the white list.
+    #[cfg(all(
+        target_os = "linux",
+        feature = "wasmedge_process",
+        not(feature = "static")
+    ))]
+    #[cfg_attr(
+        docsrs,
+        doc(cfg(all(
+            target_os = "linux",
+            feature = "wasmedge_process",
+            not(feature = "static")
+        )))
+    )]
+    pub fn init_wasmedge_process(allowed_cmds: Option<Vec<&str>>, allowed: bool) {
+        sys::plugin::PluginManager::init_wasmedge_process(allowed_cmds, allowed);
+    }
+
+    pub fn auto_detect_plugins() -> WasmEdgeResult<Vec<Instance>> {
+        let mut plugin_mods = vec![];
+        for plugin_name in PluginManager::names().iter() {
+            if let Ok(plugin) = PluginManager::find(plugin_name) {
+                for mod_name in plugin.mod_names().iter() {
+                    if let Ok(mod_instance) = plugin.mod_instance(mod_name) {
+                        plugin_mods.push(mod_instance)
+                    }
+                }
+            }
+        }
+        Ok(plugin_mods)
+    }
+}
+
+impl PluginManager {
+    pub fn load_plugin_wasi_nn() -> WasmEdgeResult<Instance> {
+        Self::create_plugin_instance("wasi_nn", "wasi_nn")
+    }
+
+    pub fn load_wasi_crypto_common() -> WasmEdgeResult<Instance> {
+        Self::create_plugin_instance("wasi_crypto", "wasi_crypto_common")
+    }
+    pub fn load_wasi_crypto_asymmetric_common() -> WasmEdgeResult<Instance> {
+        Self::create_plugin_instance("wasi_crypto", "wasi_crypto_asymmetric_common")
+    }
+    pub fn load_wasi_crypto_kx() -> WasmEdgeResult<Instance> {
+        Self::create_plugin_instance("wasi_crypto", "wasi_crypto_kx")
+    }
+    pub fn load_wasi_crypto_signatures() -> WasmEdgeResult<Instance> {
+        Self::create_plugin_instance("wasi_crypto", "wasi_crypto_signatures")
+    }
+    pub fn load_wasi_crypto_symmetric() -> WasmEdgeResult<Instance> {
+        Self::create_plugin_instance("wasi_crypto", "wasi_crypto_symmetric")
+    }
+}
+
+/// Represents a loaded plugin. It provides the APIs for accessing the plugin.
+#[derive(Debug)]
+pub struct Plugin {
+    inner: sys::plugin::Plugin,
+}
+impl Plugin {
+    /// Returns the name of this plugin.
+    pub fn name(&self) -> String {
+        self.inner.name()
+    }
+
+    /// Returns the count of the module instances in this plugin.
+    pub fn mod_count(&self) -> u32 {
+        self.inner.mod_count()
+    }
+
+    /// Returns the names of all module instances in this plugin.
+    pub fn mod_names(&self) -> Vec<String> {
+        self.inner.mod_names()
+    }
+
+    /// Returns a module instance that is generated from the module with the given name in this plugin.
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the target module.
+    ///
+    /// # Error
+    ///
+    /// If failed to return the plugin module instance, then return [PluginError::Create](wasmedge_types::error::PluginError::Create) error.
+    pub fn mod_instance(&self, name: impl AsRef<str>) -> WasmEdgeResult<PluginInstance> {
+        self.inner.mod_instance(name.as_ref())
+    }
+}
+
+pub type PluginInstance = Instance;
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/statistics.rs.html b/src/wasmedge_sdk/statistics.rs.html new file mode 100644 index 000000000..bfffadfae --- /dev/null +++ b/src/wasmedge_sdk/statistics.rs.html @@ -0,0 +1,149 @@ +statistics.rs - source

wasmedge_sdk/
statistics.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
//! Defines WasmEdge Statistics struct.
+
+use crate::WasmEdgeResult;
+use wasmedge_sys as sys;
+
+/// Used to collect statistics of the WasmEdge runtime, such as the count of instructions in execution.
+#[derive(Debug, Clone)]
+pub struct Statistics {
+    pub(crate) inner: sys::Statistics,
+}
+impl Statistics {
+    /// Creates a new [Statistics].
+    ///
+    /// # Error
+    ///
+    /// If fail to create a [Statistics], then an error is returned.
+    pub fn new() -> WasmEdgeResult<Self> {
+        let inner = sys::Statistics::create()?;
+        Ok(Self { inner })
+    }
+
+    /// Returns the instruction count in execution.
+    pub fn count(&self) -> u64 {
+        self.inner.instr_count()
+    }
+
+    /// Returns the instruction count per second in execution.
+    ///
+    /// # Notice
+    ///
+    /// For the following cases,
+    /// - [Statistics] is not enabled, or
+    /// - the total execution time is 0
+    ///
+    /// The instructions per second could be `NaN`, which represents `divided-by-zero`.
+    /// Use the `is_nan` function of F64 to check the return value before use it,
+    /// for example,
+    ///
+    /// ```
+    /// use wasmedge_sdk::Statistics;
+    ///
+    /// // create a Statistics instance
+    /// let stat = Statistics::new().expect("fail to create a Statistics");
+    ///
+    /// // check instruction count per second
+    /// assert!(stat.count_per_second().is_nan());
+    /// ```
+    pub fn count_per_second(&self) -> f64 {
+        self.inner.instr_per_sec()
+    }
+
+    /// Returns the total cost in execution.
+    pub fn cost(&self) -> u64 {
+        self.inner.cost_in_total()
+    }
+
+    /// Sets the cost of instructions.
+    ///
+    /// # Arguments
+    ///
+    /// - `cost_table` specifies the slice of cost table.
+    pub fn set_cost_table(&mut self, cost_table: impl AsRef<[u64]>) {
+        self.inner.set_cost_table(cost_table)
+    }
+
+    /// Sets the cost limit in execution.
+    ///
+    /// # Arguments
+    ///
+    /// - `limit` specifies the cost limit.
+    pub fn set_cost_limit(&mut self, limit: u64) {
+        self.inner.set_cost_limit(limit)
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/store.rs.html b/src/wasmedge_sdk/store.rs.html new file mode 100644 index 000000000..2d3e6d6df --- /dev/null +++ b/src/wasmedge_sdk/store.rs.html @@ -0,0 +1,277 @@ +store.rs - source

wasmedge_sdk/
store.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
//! Defines WasmEdge Store struct.
+
+use std::{collections::HashMap, fmt::Debug};
+
+use crate::{config::Config, Module, WasmEdgeResult};
+use sys::{AsInstance, Instance};
+use wasmedge_sys as sys;
+
+/// The [Store] is a collection of registered modules and assists wasm modules in finding the import modules they need.
+// #[derive(Debug)]
+pub struct Store<'inst, T: ?Sized> {
+    pub(crate) inner: sys::Store,
+    pub(crate) instances: HashMap<String, &'inst mut T>,
+    pub(crate) wasm_instance_map: HashMap<String, Instance>,
+    pub(crate) executor: sys::Executor,
+}
+
+impl<T: ?Sized> Debug for Store<'_, T> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        f.debug_struct("Store")
+            .field("inner", &self.inner)
+            .field("instance_map", &self.instances.keys())
+            .field("wasm_instance_map", &self.wasm_instance_map.keys())
+            .field("wasm_instance_map", &self.executor)
+            .finish()
+    }
+}
+
+impl<'inst, T: AsInstance + ?Sized> Store<'inst, T> {
+    /// Creates a new [Store].
+    ///
+    /// # Error
+    ///
+    /// If fail to create a new [Store], then an error is returned.
+    pub fn new(
+        config: Option<&Config>,
+        instances: HashMap<String, &'inst mut T>,
+    ) -> WasmEdgeResult<Self> {
+        let mut store = sys::Store::create()?;
+        let mut executor = sys::Executor::create(config.map(|cfg| cfg.inner.as_ref()), None)?;
+
+        for v in instances.values() {
+            executor.register_import_module(&mut store, *v)?;
+        }
+
+        Ok(Self {
+            inner: store,
+            instances,
+            wasm_instance_map: Default::default(),
+            executor,
+        })
+    }
+
+    /// Registers and instantiates a WasmEdge [compiled module](crate::Module) into this [store](crate::Store) as an anonymous active [module instance](crate::Instance), and returns the module instance.
+    ///
+    /// # Arguments
+    ///
+    /// * `executor` - The [executor](crate::Executor) that runs the host functions in this [store](crate::Store).
+    ///
+    /// * `module` - The validated [module](crate::Module) to be registered.
+    ///
+    /// # Error
+    ///
+    /// If fail to register the given [module](crate::Module), then an error is returned.
+    pub fn register_active_module(&mut self, module: &Module) -> WasmEdgeResult<Instance> {
+        let Store {
+            inner, executor, ..
+        } = self;
+        let inner = executor.register_active_module(inner, &module.inner)?;
+        Ok(inner)
+    }
+
+    pub fn register_named_module(
+        &mut self,
+        name: impl AsRef<str>,
+        module: &Module,
+    ) -> WasmEdgeResult<()> {
+        let Store {
+            inner,
+            executor,
+            wasm_instance_map,
+            ..
+        } = self;
+        let name = name.as_ref().to_string();
+        let inst = executor.register_named_module(inner, &module.inner, &name)?;
+        wasm_instance_map.insert(name, inst);
+        Ok(())
+    }
+
+    /// Returns the number of the named [module instances](crate::Instance) in this [store](crate::Store).
+    pub fn named_instance_count(&self) -> usize {
+        self.instances.len() + self.wasm_instance_map.len()
+    }
+
+    /// Returns the names of all registered named [module instances](crate::Instance).
+    pub fn instance_names(&self) -> Vec<String> {
+        self.instances
+            .keys()
+            .chain(self.wasm_instance_map.keys())
+            .cloned()
+            .collect()
+    }
+
+    /// Checks if the [store](crate::Store) contains a named module instance.
+    ///
+    /// # Argument
+    ///
+    /// * `mod_name` - The name of the named module.
+    ///
+    pub fn contains(&self, mod_name: impl AsRef<str>) -> bool {
+        let mod_name = mod_name.as_ref().to_string();
+        self.instances.contains_key(&mod_name) || self.wasm_instance_map.contains_key(&mod_name)
+    }
+
+    pub fn get_instance_and_executor(
+        &mut self,
+        mod_name: impl AsRef<str>,
+    ) -> Option<(&mut T, &mut sys::Executor)> {
+        let inst = self
+            .instances
+            .get_mut(mod_name.as_ref())
+            .map(|p| *p as &mut T)?;
+
+        Some((inst, &mut self.executor))
+    }
+
+    pub fn get_named_wasm_and_executor(
+        &mut self,
+        mod_name: impl AsRef<str>,
+    ) -> Option<(&mut Instance, &mut sys::Executor)> {
+        let wasm_mod = self.wasm_instance_map.get_mut(mod_name.as_ref())?;
+        Some((wasm_mod, &mut self.executor))
+    }
+
+    pub fn executor(&mut self) -> &mut sys::Executor {
+        &mut self.executor
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/types.rs.html b/src/wasmedge_sdk/types.rs.html new file mode 100644 index 000000000..6f0a8ab49 --- /dev/null +++ b/src/wasmedge_sdk/types.rs.html @@ -0,0 +1,185 @@ +types.rs - source

wasmedge_sdk/
types.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
//! Defines the general types.
+
+use wasmedge_sys::WasmValue;
+
+/// Defines runtime values that a WebAssembly module can either consume or produce.
+#[derive(Debug, Clone)]
+pub enum Val {
+    /// 32-bit integer.
+    ///
+    /// Integers are not inherently signed or unsigned, their interpretation is determined by individual operations.
+    I32(i32),
+    /// 64-bit integer.
+    ///
+    /// Integers are not inherently signed or unsigned, their interpretation is determined by individual operations.
+    I64(i64),
+    /// 32-bit floating-point data as defined by the [IEEE 754-2019](https://ieeexplore.ieee.org/document/8766229).
+    F32(f32),
+    /// 64-bit floating-point data as defined by the [IEEE 754-2019](https://ieeexplore.ieee.org/document/8766229).
+    F64(f64),
+    /// 128-bit vector of packed integer or floating-point data.
+    ///
+    /// The packed data can be interpreted as signed or unsigned integers, single or double precision floating-point
+    /// values, or a single 128 bit type. The interpretation is determined by individual operations.
+    V128(i128),
+    /// A reference to a [host function](crate::Func).
+    ///
+    /// `FuncRef(None)` is the null function reference, created by `ref.null
+    /// func` in Wasm.
+    // FuncRef(Option<FuncRef>),
+    /// A reference to opaque data in the wasm instance.
+    ///
+    /// `ExternRef(None)` is the null external reference, created by `ref.null
+    /// extern` in Wasm.
+    ExternRef(Option<ExternRef>),
+}
+impl From<Val> for WasmValue {
+    fn from(val: Val) -> Self {
+        match val {
+            Val::I32(i) => WasmValue::from_i32(i),
+            Val::I64(i) => WasmValue::from_i64(i),
+            Val::F32(i) => WasmValue::from_f32(i),
+            Val::F64(i) => WasmValue::from_f64(i),
+            Val::V128(i) => WasmValue::from_v128(i),
+            // Val::FuncRef(Some(func_ref)) => WasmValue::from_func_ref(func_ref.inner),
+            // Val::FuncRef(None) => WasmValue::from_null_ref(RefType::FuncRef),
+            Val::ExternRef(Some(extern_ref)) => extern_ref.inner,
+            Val::ExternRef(None) => WasmValue::null_extern_ref(),
+        }
+    }
+}
+impl From<WasmValue> for Val {
+    fn from(value: WasmValue) -> Self {
+        match value.ty() {
+            wasmedge_types::ValType::I32 => Val::I32(value.to_i32()),
+            wasmedge_types::ValType::I64 => Val::I64(value.to_i64()),
+            wasmedge_types::ValType::F32 => Val::F32(value.to_f32()),
+            wasmedge_types::ValType::F64 => Val::F64(value.to_f64()),
+            wasmedge_types::ValType::V128 => Val::V128(value.to_v128()),
+            wasmedge_types::ValType::FuncRef => {
+                // Waiting for the fun-ref related proposals to stabilize
+                Val::ExternRef(None)
+            }
+            wasmedge_types::ValType::ExternRef => {
+                if value.is_null_ref() {
+                    Val::ExternRef(None)
+                } else {
+                    Val::ExternRef(Some(ExternRef { inner: value }))
+                }
+            }
+            wasmedge_types::ValType::UnsupportedRef => {
+                // Waiting for more GC-related C APIs.
+                Val::ExternRef(None)
+            }
+        }
+    }
+}
+
+/// A reference to opaque data in the wasm instance.
+#[derive(Debug, Clone, Copy)]
+pub struct ExternRef {
+    pub(crate) inner: WasmValue,
+}
+impl ExternRef {
+    /// Creates a new instance of [ExternRef] wrapping the given value.
+    pub fn new<T>(extern_obj: &mut T) -> Self
+    where
+        T: 'static + Send + Sync,
+    {
+        let inner = WasmValue::from_extern_ref::<T>(extern_obj);
+        Self { inner }
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/utils.rs.html b/src/wasmedge_sdk/utils.rs.html new file mode 100644 index 000000000..60d99d81e --- /dev/null +++ b/src/wasmedge_sdk/utils.rs.html @@ -0,0 +1,117 @@ +utils.rs - source

wasmedge_sdk/
utils.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
//! Defines WasmEdge Driver and CoreVersion types
+use wasmedge_sys::utils;
+
+/// Defines WasmEdge Driver functions
+#[derive(Debug)]
+pub struct Driver {}
+impl Driver {
+    /// Triggers the WasmEdge AOT compiler tool
+    pub fn aot_compiler<I, V>(args: I) -> i32
+    where
+        I: IntoIterator<Item = V>,
+        V: AsRef<str>,
+    {
+        utils::driver_aot_compiler(args)
+    }
+
+    /// Triggers the WasmEdge runtime tool
+    pub fn runtime_tool<I, V>(args: I) -> i32
+    where
+        I: IntoIterator<Item = V>,
+        V: AsRef<str>,
+    {
+        utils::driver_runtime_tool(args)
+    }
+
+    /// Triggers the WasmEdge unified tool
+    pub fn unified_tool<I, V>(args: I) -> i32
+    where
+        I: IntoIterator<Item = V>,
+        V: AsRef<str>,
+    {
+        utils::driver_unified_tool(args)
+    }
+}
+
+/// The version info of WasmEdge core
+pub struct CoreVersion {}
+impl CoreVersion {
+    /// Returns the major version value of WasmEdge core.
+    pub fn major() -> u32 {
+        wasmedge_sys::utils::version_major_value()
+    }
+
+    /// Returns the minor version value of WasmEdge core.
+    pub fn minor() -> u32 {
+        wasmedge_sys::utils::version_minor_value()
+    }
+
+    /// Returns the patch version value of WasmEdge core.
+    pub fn patch() -> u32 {
+        wasmedge_sys::utils::version_patch_value()
+    }
+
+    /// Returns the version string of WasmEdge core.
+    pub fn version_string() -> String {
+        wasmedge_sys::utils::version_string()
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sdk/vm.rs.html b/src/wasmedge_sdk/vm.rs.html new file mode 100644 index 000000000..ab9ca83f6 --- /dev/null +++ b/src/wasmedge_sdk/vm.rs.html @@ -0,0 +1,893 @@ +vm.rs - source

wasmedge_sdk/
vm.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
//! Defines WasmEdge Vm struct.
+use crate::{
+    error::{VmError, WasmEdgeError},
+    ImportObject, Instance, Module, Store, WasmEdgeResult, WasmValue,
+};
+use sys::AsInstance;
+use wasmedge_sys as sys;
+
+pub trait SyncInst: AsInstance {}
+impl<T> SyncInst for ImportObject<T> {}
+impl SyncInst for Instance {}
+
+/// A [Vm] defines a virtual environment for managing WebAssembly programs.
+///
+/// # Example
+///
+/// The example below presents how to register a module as named module in a Vm instance and run a target wasm function.
+///
+/// ```rust
+/// use std::collections::HashMap;
+/// use wasmedge_sdk::{params, Store, Module, WasmVal, wat2wasm, ValType, NeverType, Vm, vm::SyncInst};
+///
+/// // create a Vm context
+/// let mut vm =
+///     Vm::new(Store::new(None, HashMap::<String, &mut dyn SyncInst>::new()).unwrap());
+/// // register a wasm module from the given in-memory wasm bytes
+/// // load wasm module
+/// let result = wat2wasm(
+///     br#"(module
+///     (export "fib" (func $fib))
+///     (func $fib (param $n i32) (result i32)
+///      (if
+///       (i32.lt_s
+///        (local.get $n)
+///        (i32.const 2)
+///       )
+///       (then
+///         (return i32.const 1)
+///       )
+///      )
+///      (return
+///       (i32.add
+///        (call $fib
+///         (i32.sub
+///          (local.get $n)
+///          (i32.const 2)
+///         )
+///        )
+///        (call $fib
+///         (i32.sub
+///          (local.get $n)
+///          (i32.const 1)
+///         )
+///        )
+///       )
+///      )
+///     )
+///    )
+/// "#,
+/// );
+/// assert!(result.is_ok());
+/// let wasm_bytes = result.unwrap();
+/// // run `fib` function from the wasm bytes
+/// let fib_module = Module::from_bytes(None, wasm_bytes).unwrap();
+/// vm.register_module(None, fib_module).unwrap();
+/// let result = vm.run_func(None, "fib", params!(10i32));
+/// assert!(result.is_ok());
+/// let returns = result.unwrap();
+/// assert_eq!(returns.len(), 1);
+/// assert_eq!(returns[0].to_i32(), 89);
+/// ```
+#[derive(Debug)]
+pub struct Vm<'inst, T: ?Sized + SyncInst> {
+    store: Store<'inst, T>,
+    active_instance: Option<sys::Instance>,
+}
+impl<'inst, T: ?Sized + SyncInst> Vm<'inst, T> {
+    pub fn new(store: Store<'inst, T>) -> Self {
+        // create a Vm instance
+        Vm {
+            store,
+            active_instance: None,
+        }
+    }
+
+    /// Registers a [wasm module](crate::Module) into this vm as a named or active module [instance](crate::Instance).
+    ///
+    /// # Arguments
+    ///
+    /// * `mod_name` - The exported name for the registered module. If `None`, then the module is registered as an active instance.
+    ///
+    /// * `module` - The module to be registered.
+    ///
+    /// # Error
+    ///
+    /// If fail to register the given [module](crate::Module), then an error is returned.
+    ///
+    pub fn register_module(
+        &mut self,
+        mod_name: Option<&str>,
+        module: Module,
+    ) -> WasmEdgeResult<&mut Self> {
+        match mod_name {
+            Some(name) => {
+                self.store.register_named_module(name, &module)?;
+            }
+            None => {
+                self.active_instance = Some(self.store.register_active_module(&module)?);
+            }
+        };
+
+        Ok(self)
+    }
+
+    /// Runs an exported wasm function in a (named or active) [module instance](crate::Instance).
+    ///
+    /// # Arguments
+    ///
+    /// * `mod_name` - The exported name of the module instance, which holds the target function. If `None`, then the active module is used.
+    ///
+    /// * `func_name` - The exported name of the target wasm function.
+    ///
+    /// * `args` - The arguments to be passed to the target wasm function.
+    ///
+    /// # Error
+    ///
+    /// If fail to run the wasm function, then an error is returned.
+    pub fn run_func(
+        &mut self,
+        mod_name: Option<&str>,
+        func_name: impl AsRef<str>,
+        args: impl IntoIterator<Item = WasmValue>,
+    ) -> WasmEdgeResult<Vec<WasmValue>> {
+        let (mut func, executor) = match mod_name {
+            Some(mod_name) => {
+                if let Some((inst, executor)) = self.store.get_instance_and_executor(mod_name) {
+                    (inst.get_func_mut(func_name.as_ref())?, executor)
+                } else if let Some((wasm_mod, executor)) =
+                    self.store.get_named_wasm_and_executor(mod_name)
+                {
+                    (wasm_mod.get_func_mut(func_name.as_ref())?, executor)
+                } else {
+                    return Err(Box::new(WasmEdgeError::Vm(VmError::NotFoundModule(
+                        mod_name.into(),
+                    ))));
+                }
+            }
+            None => {
+                let active_inst = self
+                    .active_instance
+                    .as_mut()
+                    .ok_or(Box::new(WasmEdgeError::Vm(VmError::NotFoundActiveModule)))?;
+
+                (
+                    active_inst.get_func_mut(func_name.as_ref())?,
+                    self.store.executor(),
+                )
+            }
+        };
+        executor.call_func(&mut func, args)
+    }
+
+    /// Runs an exported wasm function in a (named or active) [module instance](crate::Instance) with a timeout setting
+    ///
+    /// # Arguments
+    ///
+    /// * `mod_name` - The exported name of the module instance, which holds the target function. If `None`, then the active module is used.
+    ///
+    /// * `func_name` - The exported name of the target wasm function.
+    ///
+    /// * `args` - The arguments to be passed to the target wasm function.
+    ///
+    /// * `timeout` - The maximum execution time of the function to be run.
+    ///
+    /// # Error
+    ///
+    /// If fail to run the wasm function, then an error is returned.
+    #[cfg(all(target_os = "linux", not(target_env = "musl")))]
+    pub fn run_func_with_timeout(
+        &mut self,
+        mod_name: Option<&str>,
+        func_name: impl AsRef<str>,
+        args: impl IntoIterator<Item = WasmValue>,
+        timeout: std::time::Duration,
+    ) -> WasmEdgeResult<Vec<WasmValue>> {
+        let (mut func, executor) = match mod_name {
+            Some(mod_name) => {
+                if let Some((inst, executor)) = self.store.get_instance_and_executor(mod_name) {
+                    (inst.get_func_mut(func_name.as_ref())?, executor)
+                } else if let Some((wasm_mod, executor)) =
+                    self.store.get_named_wasm_and_executor(mod_name)
+                {
+                    (wasm_mod.get_func_mut(func_name.as_ref())?, executor)
+                } else {
+                    return Err(Box::new(WasmEdgeError::Vm(VmError::NotFoundModule(
+                        mod_name.into(),
+                    ))));
+                }
+            }
+            None => {
+                let active_inst = self
+                    .active_instance
+                    .as_mut()
+                    .ok_or(Box::new(WasmEdgeError::Vm(VmError::NotFoundActiveModule)))?;
+
+                (
+                    active_inst.get_func_mut(func_name.as_ref())?,
+                    self.store.executor(),
+                )
+            }
+        };
+        executor.call_func_with_timeout(&mut func, args, timeout)
+    }
+
+    /// Returns a reference to the internal [store](crate::Store) from this vm.
+    pub fn store(&self) -> &Store<'inst, T> {
+        &self.store
+    }
+
+    /// Returns a mutable reference to the internal [store](crate::Store) from this vm.
+    pub fn store_mut(&mut self) -> &mut Store<'inst, T> {
+        &mut self.store
+    }
+
+    /// Returns a reference to the active [module instance](crate::Instance) from this vm.
+    ///
+    /// # Error
+    ///
+    /// If fail to get the reference to the active module instance, then an error is returned.
+    pub fn active_module(&self) -> Option<&Instance> {
+        self.active_instance.as_ref()
+    }
+
+    /// Returns a mutable reference to the active [module instance](crate::Instance) from this vm.
+    ///
+    /// # Error
+    ///
+    /// If fail to get the mutable reference to the active module instance, then an error is returned.
+    pub fn active_module_mut(&mut self) -> Option<&mut Instance> {
+        self.active_instance.as_mut()
+    }
+
+    /// Checks if the vm contains a named module instance.
+    ///
+    /// # Argument
+    ///
+    /// * `mod_name` - The exported name of the target module instance.
+    ///
+    pub fn contains_module(&self, mod_name: impl AsRef<str>) -> bool {
+        self.store.contains(mod_name)
+    }
+
+    /// Returns the count of the named [module instances](crate::Instance) this vm holds.
+    pub fn named_instance_count(&self) -> usize {
+        self.store.named_instance_count()
+    }
+
+    /// Returns the names of all named [module instances](crate::Instance) this vm holds.
+    pub fn instance_names(&self) -> Vec<String> {
+        self.store.instance_names()
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use std::collections::HashMap;
+
+    use wasmedge_types::wat2wasm;
+
+    use super::*;
+    use crate::{params, WasmVal};
+
+    #[test]
+    #[cfg(target_os = "linux")]
+    // To enable this test function, please install `wasi_crypto` plugin first.
+    fn test_vmbuilder() -> Result<(), Box<dyn std::error::Error>> {
+        use crate::{params, plugin::PluginManager};
+
+        // load plugins from the default plugin path
+        PluginManager::load(None)?;
+
+        PluginManager::names().iter().for_each(|name| {
+            println!("plugin name: {}", name);
+        });
+
+        let wasm_app_file = "examples/wasmedge-sys/data/test_crypto.wasm";
+
+        let mut wasi = crate::wasi::WasiModule::create(None, None, None).unwrap();
+        let mut wasi_crypto_asymmetric_common =
+            PluginManager::load_wasi_crypto_asymmetric_common().unwrap();
+        let mut wasi_crypto_signatures = PluginManager::load_wasi_crypto_signatures().unwrap();
+        let mut wasi_crypto_symmetric = PluginManager::load_wasi_crypto_symmetric().unwrap();
+
+        let mut instances = HashMap::new();
+        instances.insert(wasi.name().to_string(), wasi.as_mut());
+        instances.insert(
+            wasi_crypto_asymmetric_common.name().unwrap(),
+            &mut wasi_crypto_asymmetric_common,
+        );
+        instances.insert(
+            wasi_crypto_signatures.name().unwrap(),
+            &mut wasi_crypto_signatures,
+        );
+        instances.insert(
+            wasi_crypto_symmetric.name().unwrap(),
+            &mut wasi_crypto_symmetric,
+        );
+
+        let mut vm = Vm::new(Store::new(None, instances).unwrap());
+
+        let module = Module::from_file(None, &wasm_app_file).unwrap();
+
+        vm.register_module(Some("wasm-app"), module).unwrap();
+        vm.run_func(Some("wasm-app"), "_start", params!())?;
+
+        Ok(())
+    }
+
+    #[test]
+    fn test_vm_run_func_from_file() {
+        // create a Vm context
+        let mut vm =
+            Vm::new(Store::new(None, HashMap::<String, &mut dyn SyncInst>::new()).unwrap());
+
+        // register a wasm module from a specified wasm file
+        let file = std::env::current_dir()
+            .unwrap()
+            .join("examples/wasmedge-sys/data/fibonacci.wat");
+
+        // run `fib` function from the wasm file
+        let fib_module = Module::from_file(None, file).unwrap();
+        vm.register_module(None, fib_module).unwrap();
+        let result = vm.run_func(None, "fib", params!(10i32));
+        assert!(result.is_ok());
+        let returns = result.unwrap();
+        assert_eq!(returns.len(), 1);
+        assert_eq!(returns[0].to_i32(), 89);
+    }
+
+    #[test]
+    fn test_vm_run_func_from_bytes() {
+        // create a Vm context
+        let mut vm =
+            Vm::new(Store::new(None, HashMap::<String, &mut dyn SyncInst>::new()).unwrap());
+
+        // register a wasm module from the given in-memory wasm bytes
+        // load wasm module
+        let result = wat2wasm(
+            br#"(module
+            (export "fib" (func $fib))
+            (func $fib (param $n i32) (result i32)
+             (if
+              (i32.lt_s
+               (local.get $n)
+               (i32.const 2)
+              )
+              (then
+                (return (i32.const 1))
+              )
+             )
+             (return
+              (i32.add
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 2)
+                )
+               )
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 1)
+                )
+               )
+              )
+             )
+            )
+           )
+        "#,
+        );
+        assert!(result.is_ok());
+        let wasm_bytes = result.unwrap();
+
+        // run `fib` function from the wasm bytes
+        let fib_module = Module::from_bytes(None, wasm_bytes).unwrap();
+        vm.register_module(None, fib_module).unwrap();
+        let result = vm.run_func(None, "fib", params!(10i32));
+        assert!(result.is_ok());
+        let returns = result.unwrap();
+        assert_eq!(returns.len(), 1);
+        assert_eq!(returns[0].to_i32(), 89);
+    }
+
+    #[test]
+    fn test_vm_run_func_in_named_module_instance() {
+        // create a Vm context
+        let mut vm =
+            Vm::new(Store::new(None, HashMap::<String, &mut dyn SyncInst>::new()).unwrap());
+
+        // register a wasm module from the given in-memory wasm bytes
+        // load wasm module
+        let result = wat2wasm(
+            br#"(module
+            (export "fib" (func $fib))
+            (func $fib (param $n i32) (result i32)
+             (if
+              (i32.lt_s
+               (local.get $n)
+               (i32.const 2)
+              )
+              (then
+                (return (i32.const 1))
+              )
+             )
+             (return
+              (i32.add
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 2)
+                )
+               )
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 1)
+                )
+               )
+              )
+             )
+            )
+           )
+        "#,
+        );
+        assert!(result.is_ok());
+        let wasm_bytes = result.unwrap();
+        let fib_module = Module::from_bytes(None, wasm_bytes).unwrap();
+        vm.register_module(Some("extern"), fib_module).unwrap();
+        // run `fib` function in the named module instance
+        let result = vm.run_func(Some("extern"), "fib", params!(10));
+        assert!(result.is_ok());
+        let returns = result.unwrap();
+        assert_eq!(returns.len(), 1);
+        assert_eq!(returns[0].to_i32(), 89);
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/__w/wasmedge-rust-sdk/wasmedge-rust-sdk/target/debug/build/wasmedge-sys-8425d5502c04cfd8/out/wasmedge.rs.html b/src/wasmedge_sys/__w/wasmedge-rust-sdk/wasmedge-rust-sdk/target/debug/build/wasmedge-sys-8425d5502c04cfd8/out/wasmedge.rs.html new file mode 100644 index 000000000..48ef41481 --- /dev/null +++ b/src/wasmedge_sys/__w/wasmedge-rust-sdk/wasmedge-rust-sdk/target/debug/build/wasmedge-sys-8425d5502c04cfd8/out/wasmedge.rs.html @@ -0,0 +1,6 @@ +wasmedge.rs - source

wasmedge_sys/__w/wasmedge-rust-sdk/wasmedge-rust-sdk/target/debug/build/wasmedge-sys-8425d5502c04cfd8/out/
wasmedge.rs

+1
+2
+3
/* automatically generated by rust-bindgen 0.69.5 */
+
+pub const WasmEdge_Plugin_CurrentAPIVersion : u32 = 4 ; pub const WasmEdge_Proposal_ImportExportMutGlobals : WasmEdge_Proposal = 0 ; pub const WasmEdge_Proposal_NonTrapFloatToIntConversions : WasmEdge_Proposal = 1 ; pub const WasmEdge_Proposal_SignExtensionOperators : WasmEdge_Proposal = 2 ; pub const WasmEdge_Proposal_MultiValue : WasmEdge_Proposal = 3 ; pub const WasmEdge_Proposal_BulkMemoryOperations : WasmEdge_Proposal = 4 ; pub const WasmEdge_Proposal_ReferenceTypes : WasmEdge_Proposal = 5 ; pub const WasmEdge_Proposal_SIMD : WasmEdge_Proposal = 6 ; pub const WasmEdge_Proposal_TailCall : WasmEdge_Proposal = 7 ; pub const WasmEdge_Proposal_ExtendedConst : WasmEdge_Proposal = 8 ; pub const WasmEdge_Proposal_FunctionReferences : WasmEdge_Proposal = 9 ; pub const WasmEdge_Proposal_GC : WasmEdge_Proposal = 10 ; pub const WasmEdge_Proposal_MultiMemories : WasmEdge_Proposal = 11 ; pub const WasmEdge_Proposal_Threads : WasmEdge_Proposal = 12 ; pub const WasmEdge_Proposal_RelaxSIMD : WasmEdge_Proposal = 13 ; pub const WasmEdge_Proposal_Annotations : WasmEdge_Proposal = 14 ; pub const WasmEdge_Proposal_Memory64 : WasmEdge_Proposal = 15 ; pub const WasmEdge_Proposal_ExceptionHandling : WasmEdge_Proposal = 16 ; pub const WasmEdge_Proposal_Component : WasmEdge_Proposal = 17 ; pub type WasmEdge_Proposal = :: std :: os :: raw :: c_uint ; pub const WasmEdge_HostRegistration_Wasi : WasmEdge_HostRegistration = 0 ; pub type WasmEdge_HostRegistration = :: std :: os :: raw :: c_uint ; pub const WasmEdge_CompilerOptimizationLevel_O0 : WasmEdge_CompilerOptimizationLevel = 0 ; pub const WasmEdge_CompilerOptimizationLevel_O1 : WasmEdge_CompilerOptimizationLevel = 1 ; pub const WasmEdge_CompilerOptimizationLevel_O2 : WasmEdge_CompilerOptimizationLevel = 2 ; pub const WasmEdge_CompilerOptimizationLevel_O3 : WasmEdge_CompilerOptimizationLevel = 3 ; pub const WasmEdge_CompilerOptimizationLevel_Os : WasmEdge_CompilerOptimizationLevel = 4 ; pub const WasmEdge_CompilerOptimizationLevel_Oz : WasmEdge_CompilerOptimizationLevel = 5 ; pub type WasmEdge_CompilerOptimizationLevel = :: std :: os :: raw :: c_uint ; pub const WasmEdge_CompilerOutputFormat_Native : WasmEdge_CompilerOutputFormat = 0 ; pub const WasmEdge_CompilerOutputFormat_Wasm : WasmEdge_CompilerOutputFormat = 1 ; pub type WasmEdge_CompilerOutputFormat = :: std :: os :: raw :: c_uint ; pub const WasmEdge_ErrCategory_WASM : WasmEdge_ErrCategory = 0 ; pub const WasmEdge_ErrCategory_UserLevelError : WasmEdge_ErrCategory = 1 ; pub type WasmEdge_ErrCategory = :: std :: os :: raw :: c_uint ; pub const WasmEdge_ErrCode_Success : WasmEdge_ErrCode = 0 ; pub const WasmEdge_ErrCode_Terminated : WasmEdge_ErrCode = 1 ; pub const WasmEdge_ErrCode_RuntimeError : WasmEdge_ErrCode = 2 ; pub const WasmEdge_ErrCode_CostLimitExceeded : WasmEdge_ErrCode = 3 ; pub const WasmEdge_ErrCode_WrongVMWorkflow : WasmEdge_ErrCode = 4 ; pub const WasmEdge_ErrCode_FuncNotFound : WasmEdge_ErrCode = 5 ; pub const WasmEdge_ErrCode_AOTDisabled : WasmEdge_ErrCode = 6 ; pub const WasmEdge_ErrCode_Interrupted : WasmEdge_ErrCode = 7 ; pub const WasmEdge_ErrCode_NotValidated : WasmEdge_ErrCode = 8 ; pub const WasmEdge_ErrCode_NonNullRequired : WasmEdge_ErrCode = 9 ; pub const WasmEdge_ErrCode_SetValueToConst : WasmEdge_ErrCode = 10 ; pub const WasmEdge_ErrCode_SetValueErrorType : WasmEdge_ErrCode = 11 ; pub const WasmEdge_ErrCode_UserDefError : WasmEdge_ErrCode = 12 ; pub const WasmEdge_ErrCode_IllegalPath : WasmEdge_ErrCode = 256 ; pub const WasmEdge_ErrCode_ReadError : WasmEdge_ErrCode = 257 ; pub const WasmEdge_ErrCode_UnexpectedEnd : WasmEdge_ErrCode = 258 ; pub const WasmEdge_ErrCode_MalformedMagic : WasmEdge_ErrCode = 259 ; pub const WasmEdge_ErrCode_MalformedVersion : WasmEdge_ErrCode = 260 ; pub const WasmEdge_ErrCode_MalformedSection : WasmEdge_ErrCode = 261 ; pub const WasmEdge_ErrCode_SectionSizeMismatch : WasmEdge_ErrCode = 262 ; pub const WasmEdge_ErrCode_LengthOutOfBounds : WasmEdge_ErrCode = 263 ; pub const WasmEdge_ErrCode_JunkSection : WasmEdge_ErrCode = 264 ; pub const WasmEdge_ErrCode_IncompatibleFuncCode : WasmEdge_ErrCode = 265 ; pub const WasmEdge_ErrCode_IncompatibleDataCount : WasmEdge_ErrCode = 266 ; pub const WasmEdge_ErrCode_DataCountRequired : WasmEdge_ErrCode = 267 ; pub const WasmEdge_ErrCode_MalformedImportKind : WasmEdge_ErrCode = 268 ; pub const WasmEdge_ErrCode_MalformedExportKind : WasmEdge_ErrCode = 269 ; pub const WasmEdge_ErrCode_ExpectedZeroByte : WasmEdge_ErrCode = 270 ; pub const WasmEdge_ErrCode_InvalidMut : WasmEdge_ErrCode = 271 ; pub const WasmEdge_ErrCode_TooManyLocals : WasmEdge_ErrCode = 272 ; pub const WasmEdge_ErrCode_MalformedValType : WasmEdge_ErrCode = 273 ; pub const WasmEdge_ErrCode_MalformedElemType : WasmEdge_ErrCode = 274 ; pub const WasmEdge_ErrCode_MalformedRefType : WasmEdge_ErrCode = 275 ; pub const WasmEdge_ErrCode_MalformedUTF8 : WasmEdge_ErrCode = 276 ; pub const WasmEdge_ErrCode_IntegerTooLarge : WasmEdge_ErrCode = 277 ; pub const WasmEdge_ErrCode_IntegerTooLong : WasmEdge_ErrCode = 278 ; pub const WasmEdge_ErrCode_IllegalOpCode : WasmEdge_ErrCode = 279 ; pub const WasmEdge_ErrCode_ENDCodeExpected : WasmEdge_ErrCode = 280 ; pub const WasmEdge_ErrCode_IllegalGrammar : WasmEdge_ErrCode = 281 ; pub const WasmEdge_ErrCode_SharedMemoryNoMax : WasmEdge_ErrCode = 282 ; pub const WasmEdge_ErrCode_IntrinsicsTableNotFound : WasmEdge_ErrCode = 283 ; pub const WasmEdge_ErrCode_MalformedTable : WasmEdge_ErrCode = 284 ; pub const WasmEdge_ErrCode_InvalidStoreAlignment : WasmEdge_ErrCode = 285 ; pub const WasmEdge_ErrCode_InvalidAlignment : WasmEdge_ErrCode = 512 ; pub const WasmEdge_ErrCode_TypeCheckFailed : WasmEdge_ErrCode = 513 ; pub const WasmEdge_ErrCode_InvalidLabelIdx : WasmEdge_ErrCode = 514 ; pub const WasmEdge_ErrCode_InvalidLocalIdx : WasmEdge_ErrCode = 515 ; pub const WasmEdge_ErrCode_InvalidFieldIdx : WasmEdge_ErrCode = 516 ; pub const WasmEdge_ErrCode_InvalidFuncTypeIdx : WasmEdge_ErrCode = 517 ; pub const WasmEdge_ErrCode_InvalidFuncIdx : WasmEdge_ErrCode = 518 ; pub const WasmEdge_ErrCode_InvalidTableIdx : WasmEdge_ErrCode = 519 ; pub const WasmEdge_ErrCode_InvalidMemoryIdx : WasmEdge_ErrCode = 520 ; pub const WasmEdge_ErrCode_InvalidGlobalIdx : WasmEdge_ErrCode = 521 ; pub const WasmEdge_ErrCode_InvalidTagIdx : WasmEdge_ErrCode = 522 ; pub const WasmEdge_ErrCode_InvalidElemIdx : WasmEdge_ErrCode = 523 ; pub const WasmEdge_ErrCode_InvalidDataIdx : WasmEdge_ErrCode = 524 ; pub const WasmEdge_ErrCode_InvalidRefIdx : WasmEdge_ErrCode = 525 ; pub const WasmEdge_ErrCode_ConstExprRequired : WasmEdge_ErrCode = 526 ; pub const WasmEdge_ErrCode_DupExportName : WasmEdge_ErrCode = 527 ; pub const WasmEdge_ErrCode_ImmutableGlobal : WasmEdge_ErrCode = 528 ; pub const WasmEdge_ErrCode_ImmutableField : WasmEdge_ErrCode = 529 ; pub const WasmEdge_ErrCode_ImmutableArray : WasmEdge_ErrCode = 530 ; pub const WasmEdge_ErrCode_InvalidResultArity : WasmEdge_ErrCode = 531 ; pub const WasmEdge_ErrCode_MultiTables : WasmEdge_ErrCode = 532 ; pub const WasmEdge_ErrCode_MultiMemories : WasmEdge_ErrCode = 533 ; pub const WasmEdge_ErrCode_InvalidLimit : WasmEdge_ErrCode = 534 ; pub const WasmEdge_ErrCode_InvalidMemPages : WasmEdge_ErrCode = 535 ; pub const WasmEdge_ErrCode_InvalidStartFunc : WasmEdge_ErrCode = 536 ; pub const WasmEdge_ErrCode_InvalidLaneIdx : WasmEdge_ErrCode = 537 ; pub const WasmEdge_ErrCode_InvalidUninitLocal : WasmEdge_ErrCode = 538 ; pub const WasmEdge_ErrCode_InvalidNotDefaultableField : WasmEdge_ErrCode = 539 ; pub const WasmEdge_ErrCode_InvalidNotDefaultableArray : WasmEdge_ErrCode = 540 ; pub const WasmEdge_ErrCode_InvalidPackedField : WasmEdge_ErrCode = 541 ; pub const WasmEdge_ErrCode_InvalidPackedArray : WasmEdge_ErrCode = 542 ; pub const WasmEdge_ErrCode_InvalidUnpackedField : WasmEdge_ErrCode = 543 ; pub const WasmEdge_ErrCode_InvalidUnpackedArray : WasmEdge_ErrCode = 544 ; pub const WasmEdge_ErrCode_InvalidBrRefType : WasmEdge_ErrCode = 545 ; pub const WasmEdge_ErrCode_ArrayTypesMismatch : WasmEdge_ErrCode = 546 ; pub const WasmEdge_ErrCode_ArrayTypesNumtypeRequired : WasmEdge_ErrCode = 547 ; pub const WasmEdge_ErrCode_InvalidSubType : WasmEdge_ErrCode = 548 ; pub const WasmEdge_ErrCode_InvalidTagResultType : WasmEdge_ErrCode = 549 ; pub const WasmEdge_ErrCode_ModuleNameConflict : WasmEdge_ErrCode = 768 ; pub const WasmEdge_ErrCode_IncompatibleImportType : WasmEdge_ErrCode = 769 ; pub const WasmEdge_ErrCode_UnknownImport : WasmEdge_ErrCode = 770 ; pub const WasmEdge_ErrCode_DataSegDoesNotFit : WasmEdge_ErrCode = 771 ; pub const WasmEdge_ErrCode_ElemSegDoesNotFit : WasmEdge_ErrCode = 772 ; pub const WasmEdge_ErrCode_InvalidCoreSort : WasmEdge_ErrCode = 773 ; pub const WasmEdge_ErrCode_InvalidCanonOption : WasmEdge_ErrCode = 774 ; pub const WasmEdge_ErrCode_WrongInstanceAddress : WasmEdge_ErrCode = 1024 ; pub const WasmEdge_ErrCode_WrongInstanceIndex : WasmEdge_ErrCode = 1025 ; pub const WasmEdge_ErrCode_InstrTypeMismatch : WasmEdge_ErrCode = 1026 ; pub const WasmEdge_ErrCode_FuncSigMismatch : WasmEdge_ErrCode = 1027 ; pub const WasmEdge_ErrCode_DivideByZero : WasmEdge_ErrCode = 1028 ; pub const WasmEdge_ErrCode_IntegerOverflow : WasmEdge_ErrCode = 1029 ; pub const WasmEdge_ErrCode_InvalidConvToInt : WasmEdge_ErrCode = 1030 ; pub const WasmEdge_ErrCode_TableOutOfBounds : WasmEdge_ErrCode = 1031 ; pub const WasmEdge_ErrCode_MemoryOutOfBounds : WasmEdge_ErrCode = 1032 ; pub const WasmEdge_ErrCode_ArrayOutOfBounds : WasmEdge_ErrCode = 1033 ; pub const WasmEdge_ErrCode_Unreachable : WasmEdge_ErrCode = 1034 ; pub const WasmEdge_ErrCode_UninitializedElement : WasmEdge_ErrCode = 1035 ; pub const WasmEdge_ErrCode_UndefinedElement : WasmEdge_ErrCode = 1036 ; pub const WasmEdge_ErrCode_IndirectCallTypeMismatch : WasmEdge_ErrCode = 1037 ; pub const WasmEdge_ErrCode_HostFuncError : WasmEdge_ErrCode = 1038 ; pub const WasmEdge_ErrCode_RefTypeMismatch : WasmEdge_ErrCode = 1039 ; pub const WasmEdge_ErrCode_UnalignedAtomicAccess : WasmEdge_ErrCode = 1040 ; pub const WasmEdge_ErrCode_ExpectSharedMemory : WasmEdge_ErrCode = 1041 ; pub const WasmEdge_ErrCode_CastNullToNonNull : WasmEdge_ErrCode = 1042 ; pub const WasmEdge_ErrCode_AccessNullFunc : WasmEdge_ErrCode = 1043 ; pub const WasmEdge_ErrCode_AccessNullStruct : WasmEdge_ErrCode = 1044 ; pub const WasmEdge_ErrCode_AccessNullArray : WasmEdge_ErrCode = 1045 ; pub const WasmEdge_ErrCode_AccessNullI31 : WasmEdge_ErrCode = 1046 ; pub const WasmEdge_ErrCode_AccessNullException : WasmEdge_ErrCode = 1047 ; pub const WasmEdge_ErrCode_CastFailed : WasmEdge_ErrCode = 1048 ; pub const WasmEdge_ErrCode_UncaughtException : WasmEdge_ErrCode = 1049 ; pub const WasmEdge_ErrCode_MalformedSort : WasmEdge_ErrCode = 1280 ; pub const WasmEdge_ErrCode_MalformedAliasTarget : WasmEdge_ErrCode = 1281 ; pub const WasmEdge_ErrCode_MalformedCoreInstance : WasmEdge_ErrCode = 1282 ; pub const WasmEdge_ErrCode_MalformedInstance : WasmEdge_ErrCode = 1283 ; pub const WasmEdge_ErrCode_MalformedDefType : WasmEdge_ErrCode = 1284 ; pub const WasmEdge_ErrCode_MalformedRecordType : WasmEdge_ErrCode = 1285 ; pub const WasmEdge_ErrCode_MalformedVariantType : WasmEdge_ErrCode = 1286 ; pub const WasmEdge_ErrCode_MalformedTupleType : WasmEdge_ErrCode = 1287 ; pub const WasmEdge_ErrCode_MalformedFlagsType : WasmEdge_ErrCode = 1288 ; pub const WasmEdge_ErrCode_MalformedCanonical : WasmEdge_ErrCode = 1289 ; pub const WasmEdge_ErrCode_UnknownCanonicalOption : WasmEdge_ErrCode = 1290 ; pub const WasmEdge_ErrCode_MalformedName : WasmEdge_ErrCode = 1291 ; pub const WasmEdge_ErrCode_CoreInvalidExport : WasmEdge_ErrCode = 1536 ; pub type WasmEdge_ErrCode = :: std :: os :: raw :: c_uint ; pub const WasmEdge_TypeCode_TypeIndex : WasmEdge_TypeCode = 0 ; pub const WasmEdge_TypeCode_I32 : WasmEdge_TypeCode = 127 ; pub const WasmEdge_TypeCode_I64 : WasmEdge_TypeCode = 126 ; pub const WasmEdge_TypeCode_F32 : WasmEdge_TypeCode = 125 ; pub const WasmEdge_TypeCode_F64 : WasmEdge_TypeCode = 124 ; pub const WasmEdge_TypeCode_V128 : WasmEdge_TypeCode = 123 ; pub const WasmEdge_TypeCode_I8 : WasmEdge_TypeCode = 120 ; pub const WasmEdge_TypeCode_I16 : WasmEdge_TypeCode = 119 ; pub const WasmEdge_TypeCode_NullFuncRef : WasmEdge_TypeCode = 115 ; pub const WasmEdge_TypeCode_NullExternRef : WasmEdge_TypeCode = 114 ; pub const WasmEdge_TypeCode_NullRef : WasmEdge_TypeCode = 113 ; pub const WasmEdge_TypeCode_FuncRef : WasmEdge_TypeCode = 112 ; pub const WasmEdge_TypeCode_ExternRef : WasmEdge_TypeCode = 111 ; pub const WasmEdge_TypeCode_AnyRef : WasmEdge_TypeCode = 110 ; pub const WasmEdge_TypeCode_EqRef : WasmEdge_TypeCode = 109 ; pub const WasmEdge_TypeCode_I31Ref : WasmEdge_TypeCode = 108 ; pub const WasmEdge_TypeCode_StructRef : WasmEdge_TypeCode = 107 ; pub const WasmEdge_TypeCode_ArrayRef : WasmEdge_TypeCode = 106 ; pub const WasmEdge_TypeCode_ExnRef : WasmEdge_TypeCode = 105 ; pub const WasmEdge_TypeCode_Ref : WasmEdge_TypeCode = 100 ; pub const WasmEdge_TypeCode_RefNull : WasmEdge_TypeCode = 99 ; pub const WasmEdge_TypeCode_Func : WasmEdge_TypeCode = 96 ; pub const WasmEdge_TypeCode_Struct : WasmEdge_TypeCode = 95 ; pub const WasmEdge_TypeCode_Array : WasmEdge_TypeCode = 94 ; pub const WasmEdge_TypeCode_Sub : WasmEdge_TypeCode = 80 ; pub const WasmEdge_TypeCode_SubFinal : WasmEdge_TypeCode = 79 ; pub const WasmEdge_TypeCode_Rec : WasmEdge_TypeCode = 78 ; pub const WasmEdge_TypeCode_Epsilon : WasmEdge_TypeCode = 64 ; pub const WasmEdge_TypeCode_String : WasmEdge_TypeCode = 128 ; pub type WasmEdge_TypeCode = :: std :: os :: raw :: c_uint ; pub const WasmEdge_Mutability_Const : WasmEdge_Mutability = 0 ; pub const WasmEdge_Mutability_Var : WasmEdge_Mutability = 1 ; pub type WasmEdge_Mutability = :: std :: os :: raw :: c_uint ; pub const WasmEdge_ExternalType_Function : WasmEdge_ExternalType = 0 ; pub const WasmEdge_ExternalType_Table : WasmEdge_ExternalType = 1 ; pub const WasmEdge_ExternalType_Memory : WasmEdge_ExternalType = 2 ; pub const WasmEdge_ExternalType_Global : WasmEdge_ExternalType = 3 ; pub const WasmEdge_ExternalType_Tag : WasmEdge_ExternalType = 4 ; pub type WasmEdge_ExternalType = :: std :: os :: raw :: c_uint ; pub type uint128_t = u128 ; pub type int128_t = i128 ; # [doc = " WasmEdge WASM value type struct."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_ValType { pub Data : [u8 ; 8usize] , } # [doc = " WasmEdge WASM value struct."] # [repr (C)] # [repr (align (16))] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_Value { pub Value : uint128_t , pub Type : WasmEdge_ValType , } # [doc = " WasmEdge string struct."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_String { pub Length : u32 , pub Buf : * const :: std :: os :: raw :: c_char , } # [doc = " WasmEdge bytes struct."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_Bytes { pub Length : u32 , pub Buf : * const u8 , } # [doc = " WasmEdge result struct."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_Result { pub Code : u32 , } # [doc = " Struct of WASM limit."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_Limit { # [doc = " Boolean to describe has max value or not."] pub HasMax : bool , # [doc = " Boolean to describe is shared memory or not."] pub Shared : bool , # [doc = " Minimum value."] pub Min : u32 , # [doc = " Maximum value. Will be ignored if the `HasMax` is false."] pub Max : u32 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_ConfigureContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_StatisticsContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_ASTModuleContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_FunctionTypeContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_MemoryTypeContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_TableTypeContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_TagTypeContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_GlobalTypeContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_ImportTypeContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_ExportTypeContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_CompilerContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_LoaderContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_ValidatorContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_ExecutorContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_StoreContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_ModuleInstanceContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_FunctionInstanceContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_TableInstanceContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_MemoryInstanceContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_TagInstanceContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_GlobalInstanceContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_CallingFrameContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_Async { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_VMContext { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_PluginContext { _unused : [u8 ; 0] , } # [doc = " No option value."] pub const WasmEdge_ProgramOptionType_None : WasmEdge_ProgramOptionType = 0 ; # [doc = " Boolean value."] pub const WasmEdge_ProgramOptionType_Toggle : WasmEdge_ProgramOptionType = 1 ; # [doc = " Boolean value."] pub const WasmEdge_ProgramOptionType_Int8 : WasmEdge_ProgramOptionType = 2 ; # [doc = " Boolean value."] pub const WasmEdge_ProgramOptionType_Int16 : WasmEdge_ProgramOptionType = 3 ; # [doc = " Boolean value."] pub const WasmEdge_ProgramOptionType_Int32 : WasmEdge_ProgramOptionType = 4 ; # [doc = " Boolean value."] pub const WasmEdge_ProgramOptionType_Int64 : WasmEdge_ProgramOptionType = 5 ; # [doc = " Boolean value."] pub const WasmEdge_ProgramOptionType_UInt8 : WasmEdge_ProgramOptionType = 6 ; # [doc = " Boolean value."] pub const WasmEdge_ProgramOptionType_UInt16 : WasmEdge_ProgramOptionType = 7 ; # [doc = " Boolean value."] pub const WasmEdge_ProgramOptionType_UInt32 : WasmEdge_ProgramOptionType = 8 ; # [doc = " Boolean value."] pub const WasmEdge_ProgramOptionType_UInt64 : WasmEdge_ProgramOptionType = 9 ; # [doc = " Boolean value."] pub const WasmEdge_ProgramOptionType_Float : WasmEdge_ProgramOptionType = 10 ; # [doc = " Boolean value."] pub const WasmEdge_ProgramOptionType_Double : WasmEdge_ProgramOptionType = 11 ; # [doc = " WasmEdge_String."] pub const WasmEdge_ProgramOptionType_String : WasmEdge_ProgramOptionType = 12 ; # [doc = " Type of option value."] pub type WasmEdge_ProgramOptionType = :: std :: os :: raw :: c_uint ; # [doc = " Program option for plugins."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_ProgramOption { pub Name : * const :: std :: os :: raw :: c_char , pub Description : * const :: std :: os :: raw :: c_char , pub Type : WasmEdge_ProgramOptionType , pub Storage : * mut :: std :: os :: raw :: c_void , pub DefaultValue : * const :: std :: os :: raw :: c_void , } # [doc = " Module descriptor for plugins."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_ModuleDescriptor { pub Name : * const :: std :: os :: raw :: c_char , pub Description : * const :: std :: os :: raw :: c_char , pub Create : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * const WasmEdge_ModuleDescriptor) -> * mut WasmEdge_ModuleInstanceContext > , } # [doc = " Version data for plugins."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_PluginVersionData { pub Major : u32 , pub Minor : u32 , pub Patch : u32 , pub Build : u32 , } # [doc = " Plugin descriptor for plugins."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct WasmEdge_PluginDescriptor { pub Name : * const :: std :: os :: raw :: c_char , pub Description : * const :: std :: os :: raw :: c_char , pub APIVersion : u32 , pub Version : WasmEdge_PluginVersionData , pub ModuleCount : u32 , pub ProgramOptionCount : u32 , pub ModuleDescriptions : * mut WasmEdge_ModuleDescriptor , pub ProgramOptions : * mut WasmEdge_ProgramOption , } extern "C" { # [doc = " Get the version string of the WasmEdge C API.\n\n The returned string must __NOT__ be destroyed.\n\n \\returns NULL-terminated C string of version."] pub fn WasmEdge_VersionGet () -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the major version value of the WasmEdge C API.\n\n \\returns Value of the major version."] pub fn WasmEdge_VersionGetMajor () -> u32 ; } extern "C" { # [doc = " Get the minor version value of the WasmEdge C API.\n\n \\returns Value of the minor version."] pub fn WasmEdge_VersionGetMinor () -> u32 ; } extern "C" { # [doc = " Get the patch version value of the WasmEdge C API.\n\n \\returns Value of the patch version."] pub fn WasmEdge_VersionGetPatch () -> u32 ; } extern "C" { # [doc = " Set the logging system to filter to error level."] pub fn WasmEdge_LogSetErrorLevel () ; } extern "C" { # [doc = " Set the logging system to filter to debug level."] pub fn WasmEdge_LogSetDebugLevel () ; } extern "C" { # [doc = " Set the logging system off."] pub fn WasmEdge_LogOff () ; } extern "C" { # [doc = " Generate the I32 WASM value type.\n\n \\returns WasmEdge_ValType struct with the I32 value type."] pub fn WasmEdge_ValTypeGenI32 () -> WasmEdge_ValType ; } extern "C" { # [doc = " Generate the I64 WASM value type.\n\n \\returns WasmEdge_ValType struct with the I64 value type."] pub fn WasmEdge_ValTypeGenI64 () -> WasmEdge_ValType ; } extern "C" { # [doc = " Generate the F32 WASM value type.\n\n \\returns WasmEdge_ValType struct with the F32 value type."] pub fn WasmEdge_ValTypeGenF32 () -> WasmEdge_ValType ; } extern "C" { # [doc = " Generate the F64 WASM value type.\n\n \\returns WasmEdge_ValType struct with the F64 value type."] pub fn WasmEdge_ValTypeGenF64 () -> WasmEdge_ValType ; } extern "C" { # [doc = " Generate the V128 WASM value type.\n\n \\returns WasmEdge_ValType struct with the V128 value type."] pub fn WasmEdge_ValTypeGenV128 () -> WasmEdge_ValType ; } extern "C" { # [doc = " Generate the FuncRef WASM value type.\n\n \\returns WasmEdge_ValType struct with the FuncRef value type."] pub fn WasmEdge_ValTypeGenFuncRef () -> WasmEdge_ValType ; } extern "C" { # [doc = " Generate the ExternRef WASM value type.\n\n \\returns WasmEdge_ValType struct with the ExternRef value type."] pub fn WasmEdge_ValTypeGenExternRef () -> WasmEdge_ValType ; } extern "C" { # [doc = " Compare the two WasmEdge_ValType objects.\n\n \\param ValType1 the first WasmEdge_ValType object to compare.\n \\param ValType2 the second WasmEdge_ValType object to compare.\n\n \\returns true if the content of two WasmEdge_ValType objects are the same,\n false if not."] pub fn WasmEdge_ValTypeIsEqual (ValType1 : WasmEdge_ValType , ValType2 : WasmEdge_ValType) -> bool ; } extern "C" { # [doc = " Specify the WASM value type is an I32 or not.\n\n \\param ValType the WasmEdge_ValType object to check.\n\n \\returns true if the value type is an I32, false if not."] pub fn WasmEdge_ValTypeIsI32 (ValType : WasmEdge_ValType) -> bool ; } extern "C" { # [doc = " Specify the WASM value type is an I64 or not.\n\n \\param ValType the WasmEdge_ValType object to check.\n\n \\returns true if the value type is an I64, false if not."] pub fn WasmEdge_ValTypeIsI64 (ValType : WasmEdge_ValType) -> bool ; } extern "C" { # [doc = " Specify the WASM value type is a F32 or not.\n\n \\param ValType the WasmEdge_ValType object to check.\n\n \\returns true if the value type is a F32, false if not."] pub fn WasmEdge_ValTypeIsF32 (ValType : WasmEdge_ValType) -> bool ; } extern "C" { # [doc = " Specify the WASM value type is a F64 or not.\n\n \\param ValType the WasmEdge_ValType object to check.\n\n \\returns true if the value type is a F64, false if not."] pub fn WasmEdge_ValTypeIsF64 (ValType : WasmEdge_ValType) -> bool ; } extern "C" { # [doc = " Specify the WASM value type is a V128 or not.\n\n \\param ValType the WasmEdge_ValType object to check.\n\n \\returns true if the value type is a V128, false if not."] pub fn WasmEdge_ValTypeIsV128 (ValType : WasmEdge_ValType) -> bool ; } extern "C" { # [doc = " Specify the WASM value type is a FuncRef or not.\n\n \\param ValType the WasmEdge_ValType object to check.\n\n \\returns true if the value type is a FuncRef, false if not."] pub fn WasmEdge_ValTypeIsFuncRef (ValType : WasmEdge_ValType) -> bool ; } extern "C" { # [doc = " Specify the WASM value type is an ExternRef or not.\n\n \\param ValType the WasmEdge_ValType object to check.\n\n \\returns true if the value type is an ExternRef, false if not."] pub fn WasmEdge_ValTypeIsExternRef (ValType : WasmEdge_ValType) -> bool ; } extern "C" { # [doc = " Specify the WASM value type is a Ref (includes nullable and non-nullable) or\n not.\n\n \\param ValType the WasmEdge_ValType object to check.\n\n \\returns true if the value type is a Ref, false if not."] pub fn WasmEdge_ValTypeIsRef (ValType : WasmEdge_ValType) -> bool ; } extern "C" { # [doc = " Specify the WASM value type is a nullable Ref or not.\n\n \\param ValType the WasmEdge_ValType object to check.\n\n \\returns true if the value type is a nullable Ref, false if not."] pub fn WasmEdge_ValTypeIsRefNull (ValType : WasmEdge_ValType) -> bool ; } extern "C" { # [doc = " Generate the I32 WASM value.\n\n \\param Val the I32 value.\n\n \\returns WasmEdge_Value struct with the I32 value."] pub fn WasmEdge_ValueGenI32 (Val : i32) -> WasmEdge_Value ; } extern "C" { # [doc = " Generate the I64 WASM value.\n\n \\param Val the I64 value.\n\n \\returns WasmEdge_Value struct with the I64 value."] pub fn WasmEdge_ValueGenI64 (Val : i64) -> WasmEdge_Value ; } extern "C" { # [doc = " Generate the F32 WASM value.\n\n \\param Val the F32 value.\n\n \\returns WasmEdge_Value struct with the F32 value."] pub fn WasmEdge_ValueGenF32 (Val : f32) -> WasmEdge_Value ; } extern "C" { # [doc = " Generate the F64 WASM value.\n\n \\param Val the F64 value.\n\n \\returns WasmEdge_Value struct with the F64 value."] pub fn WasmEdge_ValueGenF64 (Val : f64) -> WasmEdge_Value ; } extern "C" { # [doc = " Generate the V128 WASM value.\n\n \\param Val the V128 value.\n\n \\returns WasmEdge_Value struct with the V128 value."] pub fn WasmEdge_ValueGenV128 (Val : int128_t) -> WasmEdge_Value ; } extern "C" { # [doc = " Generate the function reference WASM value.\n\n The values generated by this function are only meaningful when the\n `WasmEdge_Proposal_BulkMemoryOperations` or the\n `WasmEdge_Proposal_ReferenceTypes` turns on in configuration.\n\n \\param Cxt the function instance context to convert to the reference.\n\n \\returns WasmEdge_Value struct with the function reference."] pub fn WasmEdge_ValueGenFuncRef (Cxt : * const WasmEdge_FunctionInstanceContext) -> WasmEdge_Value ; } extern "C" { # [doc = " Generate the function reference WASM value.\n\n The values generated by this function are only meaningful when the\n `WasmEdge_Proposal_ReferenceTypes` turns on in configuration.\n\n \\param Ref the reference to the external object.\n\n \\returns WasmEdge_Value struct with the external reference."] pub fn WasmEdge_ValueGenExternRef (Ref : * mut :: std :: os :: raw :: c_void) -> WasmEdge_Value ; } extern "C" { # [doc = " Retrieve the I32 value from the WASM value.\n\n \\param Val the WasmEdge_Value struct.\n\n \\returns I32 value in the input struct."] pub fn WasmEdge_ValueGetI32 (Val : WasmEdge_Value) -> i32 ; } extern "C" { # [doc = " Retrieve the I64 value from the WASM value.\n\n \\param Val the WasmEdge_Value struct.\n\n \\returns I64 value in the input struct."] pub fn WasmEdge_ValueGetI64 (Val : WasmEdge_Value) -> i64 ; } extern "C" { # [doc = " Retrieve the F32 value from the WASM value.\n\n \\param Val the WasmEdge_Value struct.\n\n \\returns F32 value in the input struct."] pub fn WasmEdge_ValueGetF32 (Val : WasmEdge_Value) -> f32 ; } extern "C" { # [doc = " Retrieve the F64 value from the WASM value.\n\n \\param Val the WasmEdge_Value struct.\n\n \\returns F64 value in the input struct."] pub fn WasmEdge_ValueGetF64 (Val : WasmEdge_Value) -> f64 ; } extern "C" { # [doc = " Retrieve the V128 value from the WASM value.\n\n \\param Val the WasmEdge_Value struct.\n\n \\returns V128 value in the input struct."] pub fn WasmEdge_ValueGetV128 (Val : WasmEdge_Value) -> int128_t ; } extern "C" { # [doc = " Specify the WASM value is a null reference or not.\n\n \\param Val the WasmEdge_Value struct.\n\n \\returns true if the value is a null reference, false if not."] pub fn WasmEdge_ValueIsNullRef (Val : WasmEdge_Value) -> bool ; } extern "C" { # [doc = " Retrieve the function instance context from the WASM value.\n\n \\param Val the WasmEdge_Value struct.\n\n \\returns pointer to function instance context in the input struct."] pub fn WasmEdge_ValueGetFuncRef (Val : WasmEdge_Value) -> * const WasmEdge_FunctionInstanceContext ; } extern "C" { # [doc = " Retrieve the external reference from the WASM value.\n\n \\param Val the WasmEdge_Value struct.\n\n \\returns external reference in the input struct."] pub fn WasmEdge_ValueGetExternRef (Val : WasmEdge_Value) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = " Creation of the WasmEdge_String with the C string.\n\n The caller owns the object and should call `WasmEdge_StringDelete` to\n destroy it. This function only supports the C string with NULL termination.\n If the input string may have `\\0` character, please use the\n `WasmEdge_StringCreateByBuffer` instead.\n\n \\param Str the NULL-terminated C string to copy into the WasmEdge_String\n object.\n\n \\returns string object. Length will be 0 and Buf will be NULL if failed or\n the input string is a NULL."] pub fn WasmEdge_StringCreateByCString (Str : * const :: std :: os :: raw :: c_char) -> WasmEdge_String ; } extern "C" { # [doc = " Creation of the WasmEdge_String with the buffer and its length.\n\n The caller owns the object and should call `WasmEdge_StringDelete` to\n destroy it.\n\n \\param Buf the buffer to wrap to the WasmEdge_String object.\n \\param Len the buffer length.\n\n \\returns string object. Length will be 0 and Buf will be NULL if failed or\n the input buffer is a NULL."] pub fn WasmEdge_StringCreateByBuffer (Buf : * const :: std :: os :: raw :: c_char , Len : u32) -> WasmEdge_String ; } extern "C" { # [doc = " Create the WasmEdge_String wraps to the buffer.\n\n This function creates a `WasmEdge_String` object which wraps to the input\n buffer. The caller should guarantee the life cycle of the input buffer, and\n should __NOT__ call the `WasmEdge_StringDelete`.\n\n \\param Buf the buffer to copy into the WasmEdge_String object.\n \\param Len the buffer length.\n\n \\returns string object refer to the input buffer with its length."] pub fn WasmEdge_StringWrap (Buf : * const :: std :: os :: raw :: c_char , Len : u32) -> WasmEdge_String ; } extern "C" { # [doc = " Compare the two WasmEdge_String objects.\n\n \\param Str1 the first WasmEdge_String object to compare.\n \\param Str2 the second WasmEdge_String object to compare.\n\n \\returns true if the content of two WasmEdge_String objects are the same,\n false if not."] pub fn WasmEdge_StringIsEqual (Str1 : WasmEdge_String , Str2 : WasmEdge_String) -> bool ; } extern "C" { # [doc = " Copy the content of WasmEdge_String object to the buffer.\n\n This function copy at most `Len` characters from the `WasmEdge_String`\n object to the destination buffer. If the string length is less than `Len`\n characters long, the remainder of the buffer is filled with `\\0' characters.\n Otherwise, the destination is not terminated.\n\n \\param Str the source WasmEdge_String object to copy.\n \\param Buf the buffer to fill the string content.\n \\param Len the buffer length.\n\n \\returns the copied length of string."] pub fn WasmEdge_StringCopy (Str : WasmEdge_String , Buf : * mut :: std :: os :: raw :: c_char , Len : u32) -> u32 ; } extern "C" { # [doc = " Deletion of the WasmEdge_String.\n\n After calling this function, the resources in the WasmEdge_String object\n will be released and the object should __NOT__ be used.\n\n \\param Str the WasmEdge_String object to destroy."] pub fn WasmEdge_StringDelete (Str : WasmEdge_String) ; } extern "C" { # [doc = " Creation of the WasmEdge_Bytes with the buffer and its length.\n\n The caller owns the object and should call `WasmEdge_BytesDelete` to destroy\n it.\n\n \\param Buf the buffer to copy into the WasmEdge_Bytes object.\n \\param Len the buffer length.\n\n \\returns bytes object. Length will be 0 and Buf will be NULL if failed or\n the input buffer is a NULL."] pub fn WasmEdge_BytesCreate (Buf : * const u8 , Len : u32) -> WasmEdge_Bytes ; } extern "C" { # [doc = " Create the WasmEdge_Bytes wraps to the buffer.\n\n This function creates a `WasmEdge_Bytes` object which wraps to the input\n buffer. The caller should guarantee the life cycle of the input buffer, and\n should __NOT__ call the `WasmEdge_BytesDelete`.\n\n \\param Buf the buffer to wrap to the WasmEdge_Bytes object.\n \\param Len the buffer length.\n\n \\returns bytes object refer to the input buffer with its length."] pub fn WasmEdge_BytesWrap (Buf : * const u8 , Len : u32) -> WasmEdge_Bytes ; } extern "C" { # [doc = " Deletion of the WasmEdge_Bytes.\n\n After calling this function, the resources in the WasmEdge_Bytes object\n will be released and the object should __NOT__ be used.\n\n \\param Bytes the WasmEdge_Bytes object to destroy."] pub fn WasmEdge_BytesDelete (Bytes : WasmEdge_Bytes) ; } extern "C" { # [doc = " Check the result is a success or not.\n\n \\param Res the WasmEdge_Result struct.\n\n \\returns true if the error code is WasmEdge_Result_Success or\n WasmEdge_Result_Terminate, false for others."] pub fn WasmEdge_ResultOK (Res : WasmEdge_Result) -> bool ; } extern "C" { # [doc = " Generate the result with code.\n\n \\param Category the WasmEdge_ErrCategory to specify the error category.\n \\param Code the 24-bit length error code. The data exceeds 24 bits will be\n stripped.\n\n \\returns WasmEdge_Result struct with the given data."] pub fn WasmEdge_ResultGen (Category : WasmEdge_ErrCategory , Code : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Get the result code.\n\n \\param Res the WasmEdge_Result struct.\n\n \\returns result code (24-bit size data) in the WasmEdge_Result struct."] pub fn WasmEdge_ResultGetCode (Res : WasmEdge_Result) -> u32 ; } extern "C" { # [doc = " Get the error category.\n\n \\param Res the WasmEdge_Result struct.\n\n \\returns error category in the WasmEdge_Result struct."] pub fn WasmEdge_ResultGetCategory (Res : WasmEdge_Result) -> WasmEdge_ErrCategory ; } extern "C" { # [doc = " Get the result message.\n\n The returned string must __NOT__ be destroyed.\n If the error category of the result is __NOT__ `WasmEdge_ErrCategory_WASM`,\n the message will always be \"user defined error code\".\n\n \\param Res the WasmEdge_Result struct.\n\n \\returns NULL-terminated C string of the corresponding error message."] pub fn WasmEdge_ResultGetMessage (Res : WasmEdge_Result) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Compare the two WasmEdge_Limit objects.\n\n \\param Lim1 the first WasmEdge_Limit object to compare.\n \\param Lim2 the second WasmEdge_Limit object to compare.\n\n \\returns true if the content of two WasmEdge_Limit objects are the same,\n false if not."] pub fn WasmEdge_LimitIsEqual (Lim1 : WasmEdge_Limit , Lim2 : WasmEdge_Limit) -> bool ; } extern "C" { # [doc = " Creation of the WasmEdge_ConfigureContext.\n\n The caller owns the object and should call `WasmEdge_ConfigureDelete` to\n destroy it.\n\n \\returns pointer to the context, NULL if failed."] pub fn WasmEdge_ConfigureCreate () -> * mut WasmEdge_ConfigureContext ; } extern "C" { # [doc = " Add a proposal setting into the WasmEdge_ConfigureContext.\n\n For turning on a specific WASM proposal in VM, loader, or compiler contexts,\n etc., you can set the proposal value into the WasmEdge_ConfigureContext and\n create the VM, loader, or compiler contexts, etc. with this context.\n\n ```c\n WasmEdge_ConfigureContext *Conf = WasmEdge_ConfigureCreate();\n WasmEdge_ConfigureAddProposal(Conf, WasmEdge_Proposal_BulkMemoryOperations);\n WasmEdge_ConfigureAddProposal(Conf, WasmEdge_Proposal_ReferenceTypes);\n WasmEdge_ConfigureAddProposal(Conf, WasmEdge_Proposal_SIMD);\n WasmEdge_VMContext *VM = WasmEdge_VMCreate(Conf, NULL);\n ```\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to add the proposal value.\n \\param Prop the proposal value."] pub fn WasmEdge_ConfigureAddProposal (Cxt : * mut WasmEdge_ConfigureContext , Prop : WasmEdge_Proposal) ; } extern "C" { # [doc = " Remove a proposal setting in the WasmEdge_ConfigureContext.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to remove the proposal.\n \\param Prop the proposal value."] pub fn WasmEdge_ConfigureRemoveProposal (Cxt : * mut WasmEdge_ConfigureContext , Prop : WasmEdge_Proposal) ; } extern "C" { # [doc = " Check if a proposal setting exists in the WasmEdge_ConfigureContext or not.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to check the proposal value.\n \\param Prop the proposal value.\n\n \\returns true if the proposal setting exists, false if not."] pub fn WasmEdge_ConfigureHasProposal (Cxt : * const WasmEdge_ConfigureContext , Prop : WasmEdge_Proposal) -> bool ; } extern "C" { # [doc = " Add a built-in host registration setting into WasmEdge_ConfigureContext.\n\n For turning on the Wasi support in `WasmEdge_VMContext`, you can set the\n built-in host registration value into the `WasmEdge_ConfigureContext` and\n create VM with this context.\n\n ```c\n WasmEdge_ConfigureContext *Conf = WasmEdge_ConfigureCreate();\n WasmEdge_ConfigureAddHostRegistration(Conf, WasmEdge_HostRegistration_Wasi);\n WasmEdge_VMContext *VM = WasmEdge_VMCreate(Conf, NULL);\n ```\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to add built-in host registration.\n \\param Host the built-in host registration value."] pub fn WasmEdge_ConfigureAddHostRegistration (Cxt : * mut WasmEdge_ConfigureContext , Host : WasmEdge_HostRegistration) ; } extern "C" { # [doc = " Remove a built-in host registration setting in the\n WasmEdge_ConfigureContext.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to remove the host\n pre-registration.\n \\param Host the built-in host registration value."] pub fn WasmEdge_ConfigureRemoveHostRegistration (Cxt : * mut WasmEdge_ConfigureContext , Host : WasmEdge_HostRegistration) ; } extern "C" { # [doc = " Check if a built-in host registration setting exists in the\n WasmEdge_ConfigureContext or not.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to check the host pre-registration.\n \\param Host the built-in host registration value.\n\n \\returns true if the built-in host registration setting exists, false if\n not."] pub fn WasmEdge_ConfigureHasHostRegistration (Cxt : * const WasmEdge_ConfigureContext , Host : WasmEdge_HostRegistration) -> bool ; } extern "C" { # [doc = " Set the page limit of memory instances.\n\n Limit the page count (64KiB per page) in memory instances.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to set the maximum page count.\n \\param Page the maximum page count."] pub fn WasmEdge_ConfigureSetMaxMemoryPage (Cxt : * mut WasmEdge_ConfigureContext , Page : u32) ; } extern "C" { # [doc = " Get the setting of the page limit of memory instances.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to get the maximum page count\n setting.\n\n \\returns the page count limitation value."] pub fn WasmEdge_ConfigureGetMaxMemoryPage (Cxt : * const WasmEdge_ConfigureContext) -> u32 ; } extern "C" { # [doc = " Set the force interpreter mode execution option.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to set the boolean value.\n \\param IsForceInterpreter the boolean value to determine to forcibly run\n WASM in interpreter mode or not."] pub fn WasmEdge_ConfigureSetForceInterpreter (Cxt : * mut WasmEdge_ConfigureContext , IsForceInterpreter : bool) ; } extern "C" { # [doc = " Get the force interpreter mode execution option.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to get the boolean value.\n\n \\returns the boolean value to determine to forcibly run WASM in interpreter\n mode or not."] pub fn WasmEdge_ConfigureIsForceInterpreter (Cxt : * const WasmEdge_ConfigureContext) -> bool ; } extern "C" { # [doc = " Set the option of enabling/disabling AF_UNIX support in the WASI socket.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to set the boolean value.\n \\param EnableAFUNIX the boolean value to determine to enable\n the AF_UNIX support in the WASI socket or not."] pub fn WasmEdge_ConfigureSetAllowAFUNIX (Cxt : * mut WasmEdge_ConfigureContext , EnableAFUNIX : bool) ; } extern "C" { # [doc = " Get the AllowAFUNIX option.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to get the boolean value.\n\n \\returns the boolean value to determine to enable AF_UNIX support in the\n WASI socket or not."] pub fn WasmEdge_ConfigureIsAllowAFUNIX (Cxt : * const WasmEdge_ConfigureContext) -> bool ; } extern "C" { # [doc = " Set the optimization level of the AOT compiler.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to set the optimization level.\n \\param Level the AOT compiler optimization level."] pub fn WasmEdge_ConfigureCompilerSetOptimizationLevel (Cxt : * mut WasmEdge_ConfigureContext , Level : WasmEdge_CompilerOptimizationLevel) ; } extern "C" { # [doc = " Get the optimization level of the AOT compiler.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to get the optimization level.\n\n \\returns the AOT compiler optimization level."] pub fn WasmEdge_ConfigureCompilerGetOptimizationLevel (Cxt : * const WasmEdge_ConfigureContext) -> WasmEdge_CompilerOptimizationLevel ; } extern "C" { # [doc = " Set the output binary format of the AOT compiler.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to set the output binary format.\n \\param Format the AOT compiler output binary format."] pub fn WasmEdge_ConfigureCompilerSetOutputFormat (Cxt : * mut WasmEdge_ConfigureContext , Format : WasmEdge_CompilerOutputFormat) ; } extern "C" { # [doc = " Get the output binary format of the AOT compiler.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to get the output binary format.\n\n \\returns the AOT compiler output binary format."] pub fn WasmEdge_ConfigureCompilerGetOutputFormat (Cxt : * const WasmEdge_ConfigureContext) -> WasmEdge_CompilerOutputFormat ; } extern "C" { # [doc = " Set the dump IR option of the AOT compiler.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to set the boolean value.\n \\param IsDump the boolean value to determine to dump IR or not when\n compilation in AOT compiler."] pub fn WasmEdge_ConfigureCompilerSetDumpIR (Cxt : * mut WasmEdge_ConfigureContext , IsDump : bool) ; } extern "C" { # [doc = " Get the dump IR option of the AOT compiler.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to get the boolean value.\n\n \\returns the boolean value to determine to dump IR or not when compilation\n in AOT compiler."] pub fn WasmEdge_ConfigureCompilerIsDumpIR (Cxt : * const WasmEdge_ConfigureContext) -> bool ; } extern "C" { # [doc = " Set the generic binary option of the AOT compiler.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to set the boolean value.\n \\param IsGeneric the boolean value to determine to generate the generic\n binary or not when compilation in AOT compiler."] pub fn WasmEdge_ConfigureCompilerSetGenericBinary (Cxt : * mut WasmEdge_ConfigureContext , IsGeneric : bool) ; } extern "C" { # [doc = " Get the generic binary option of the AOT compiler.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to get the boolean value.\n\n \\returns the boolean value to determine to generate the generic binary or\n not when compilation in AOT compiler."] pub fn WasmEdge_ConfigureCompilerIsGenericBinary (Cxt : * const WasmEdge_ConfigureContext) -> bool ; } extern "C" { # [doc = " Set the interruptible option of the AOT compiler.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to set the boolean value.\n \\param IsInterruptible the boolean value to determine to generate\n interruptible binary or not when compilation in AOT compiler."] pub fn WasmEdge_ConfigureCompilerSetInterruptible (Cxt : * mut WasmEdge_ConfigureContext , IsInterruptible : bool) ; } extern "C" { # [doc = " Get the interruptible option of the AOT compiler.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to get the boolean value.\n\n \\returns the boolean value to determine to generate interruptible binary or\n not when compilation in AOT compiler."] pub fn WasmEdge_ConfigureCompilerIsInterruptible (Cxt : * const WasmEdge_ConfigureContext) -> bool ; } extern "C" { # [doc = " Set the instruction counting option for the statistics.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to set the boolean value.\n \\param IsCount the boolean value to determine to support instruction\n counting when execution or not after compilation by the AOT compiler."] pub fn WasmEdge_ConfigureStatisticsSetInstructionCounting (Cxt : * mut WasmEdge_ConfigureContext , IsCount : bool) ; } extern "C" { # [doc = " Get the instruction counting option for the statistics.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to get the boolean value.\n\n \\returns the boolean value to determine to support instruction counting when\n execution or not after compilation by the AOT compiler."] pub fn WasmEdge_ConfigureStatisticsIsInstructionCounting (Cxt : * const WasmEdge_ConfigureContext) -> bool ; } extern "C" { # [doc = " Set the cost measuring option for the statistics.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to set the boolean value.\n \\param IsMeasure the boolean value to determine to support cost measuring\n when execution or not after compilation by the AOT compiler."] pub fn WasmEdge_ConfigureStatisticsSetCostMeasuring (Cxt : * mut WasmEdge_ConfigureContext , IsMeasure : bool) ; } extern "C" { # [doc = " Get the cost measuring option for the statistics.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to get the boolean value.\n\n \\returns the boolean value to determine to support cost measuring when\n execution or not after compilation by the AOT compiler."] pub fn WasmEdge_ConfigureStatisticsIsCostMeasuring (Cxt : * const WasmEdge_ConfigureContext) -> bool ; } extern "C" { # [doc = " Set the time measuring option for the statistics.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to set the boolean value.\n \\param IsMeasure the boolean value to determine to support time when\n execution or not after compilation by the AOT compiler."] pub fn WasmEdge_ConfigureStatisticsSetTimeMeasuring (Cxt : * mut WasmEdge_ConfigureContext , IsMeasure : bool) ; } extern "C" { # [doc = " Get the time measuring option for the statistics.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to get the boolean value.\n\n \\returns the boolean value to determine to support time measuring when\n execution or not after compilation by the AOT compiler."] pub fn WasmEdge_ConfigureStatisticsIsTimeMeasuring (Cxt : * const WasmEdge_ConfigureContext) -> bool ; } extern "C" { # [doc = " Deletion of the WasmEdge_ConfigureContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ConfigureContext to destroy."] pub fn WasmEdge_ConfigureDelete (Cxt : * mut WasmEdge_ConfigureContext) ; } extern "C" { # [doc = " Creation of the WasmEdge_StatisticsContext.\n\n The caller owns the object and should call `WasmEdge_StatisticsDelete` to\n destroy it.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_StatisticsCreate () -> * mut WasmEdge_StatisticsContext ; } extern "C" { # [doc = " Get the instruction count in execution.\n\n \\param Cxt the WasmEdge_StatisticsContext to get data.\n\n \\returns the instruction count in total execution."] pub fn WasmEdge_StatisticsGetInstrCount (Cxt : * const WasmEdge_StatisticsContext) -> u64 ; } extern "C" { # [doc = " Get the instruction count per second in execution.\n\n \\param Cxt the WasmEdge_StatisticsContext to get data.\n\n \\returns the instruction count per second."] pub fn WasmEdge_StatisticsGetInstrPerSecond (Cxt : * const WasmEdge_StatisticsContext) -> f64 ; } extern "C" { # [doc = " Get the total cost in execution.\n\n \\param Cxt the WasmEdge_StatisticsContext to get data.\n\n \\returns the total cost."] pub fn WasmEdge_StatisticsGetTotalCost (Cxt : * const WasmEdge_StatisticsContext) -> u64 ; } extern "C" { # [doc = " Set the costs of instructions.\n\n \\param Cxt the WasmEdge_StatisticsContext to set the cost table.\n \\param CostArr the cost table array.\n \\param Len the length of the cost table array."] pub fn WasmEdge_StatisticsSetCostTable (Cxt : * mut WasmEdge_StatisticsContext , CostArr : * mut u64 , Len : u32) ; } extern "C" { # [doc = " Set the cost limit in execution.\n\n The WASM execution will be aborted if the instruction costs exceeded the\n limit and the ErrCode::Value::CostLimitExceeded will be returned.\n\n \\param Cxt the WasmEdge_StatisticsContext to set the cost table.\n \\param Limit the cost limit."] pub fn WasmEdge_StatisticsSetCostLimit (Cxt : * mut WasmEdge_StatisticsContext , Limit : u64) ; } extern "C" { # [doc = " Clear all data in the WasmEdge_StatisticsContext.\n\n \\param Cxt the WasmEdge_StatisticsContext to clear."] pub fn WasmEdge_StatisticsClear (Cxt : * mut WasmEdge_StatisticsContext) ; } extern "C" { # [doc = " Deletion of the WasmEdge_StatisticsContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_StatisticsContext to destroy."] pub fn WasmEdge_StatisticsDelete (Cxt : * mut WasmEdge_StatisticsContext) ; } extern "C" { # [doc = " Get the length of imports list of the AST module.\n\n \\param Cxt the WasmEdge_ASTModuleContext.\n\n \\returns length of the imports list."] pub fn WasmEdge_ASTModuleListImportsLength (Cxt : * const WasmEdge_ASTModuleContext) -> u32 ; } extern "C" { # [doc = " List the imports of the AST module.\n\n If the `Imports` buffer length is smaller than the result of the imports\n list size, the overflowed return values will be discarded.\n\n \\param Cxt the WasmEdge_ASTModuleContext.\n \\param [out] Imports the import type contexts buffer. Can be NULL if import\n types are not needed.\n \\param Len the buffer length.\n\n \\returns actual exported function list size."] pub fn WasmEdge_ASTModuleListImports (Cxt : * const WasmEdge_ASTModuleContext , Imports : * mut * const WasmEdge_ImportTypeContext , Len : u32) -> u32 ; } extern "C" { # [doc = " Get the length of exports list of the AST module.\n\n \\param Cxt the WasmEdge_ASTModuleContext.\n\n \\returns length of the exports list."] pub fn WasmEdge_ASTModuleListExportsLength (Cxt : * const WasmEdge_ASTModuleContext) -> u32 ; } extern "C" { # [doc = " List the exports of the AST module.\n\n If the `Exports` buffer length is smaller than the result of the exports\n list size, the overflowed return values will be discarded.\n\n \\param Cxt the WasmEdge_ASTModuleContext.\n \\param [out] Exports the export type contexts buffer. Can be NULL if export\n types are not needed.\n \\param Len the buffer length.\n\n \\returns actual exported function list size."] pub fn WasmEdge_ASTModuleListExports (Cxt : * const WasmEdge_ASTModuleContext , Exports : * mut * const WasmEdge_ExportTypeContext , Len : u32) -> u32 ; } extern "C" { # [doc = " Deletion of the WasmEdge_ASTModuleContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_ASTModuleContext to destroy."] pub fn WasmEdge_ASTModuleDelete (Cxt : * mut WasmEdge_ASTModuleContext) ; } extern "C" { # [doc = " Creation of the WasmEdge_FunctionTypeContext.\n\n The caller owns the object and should call `WasmEdge_FunctionTypeDelete` to\n destroy it.\n\n \\param ParamList the value types list of parameters. NULL if the length is\n 0.\n \\param ParamLen the ParamList buffer length.\n \\param ReturnList the value types list of returns. NULL if the length is 0.\n \\param ReturnLen the ReturnList buffer length.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_FunctionTypeCreate (ParamList : * const WasmEdge_ValType , ParamLen : u32 , ReturnList : * const WasmEdge_ValType , ReturnLen : u32) -> * mut WasmEdge_FunctionTypeContext ; } extern "C" { # [doc = " Get the parameter types list length from the WasmEdge_FunctionTypeContext.\n\n \\param Cxt the WasmEdge_FunctionTypeContext.\n\n \\returns the parameter types list length."] pub fn WasmEdge_FunctionTypeGetParametersLength (Cxt : * const WasmEdge_FunctionTypeContext) -> u32 ; } extern "C" { # [doc = " Get the parameter types list from the WasmEdge_FunctionTypeContext.\n\n If the `List` buffer length is smaller than the length of the parameter type\n list, the overflowed values will be discarded.\n\n \\param Cxt the WasmEdge_FunctionTypeContext.\n \\param [out] List the WasmEdge_ValType buffer to fill the parameter value\n types.\n \\param Len the value type buffer length.\n\n \\returns the actual parameter types list length."] pub fn WasmEdge_FunctionTypeGetParameters (Cxt : * const WasmEdge_FunctionTypeContext , List : * mut WasmEdge_ValType , Len : u32) -> u32 ; } extern "C" { # [doc = " Get the return types list length from the WasmEdge_FunctionTypeContext.\n\n \\param Cxt the WasmEdge_FunctionTypeContext.\n\n \\returns the return types list length."] pub fn WasmEdge_FunctionTypeGetReturnsLength (Cxt : * const WasmEdge_FunctionTypeContext) -> u32 ; } extern "C" { # [doc = " Get the return types list from the WasmEdge_FunctionTypeContext.\n\n If the `List` buffer length is smaller than the length of the return type\n list, the overflowed values will be discarded.\n\n \\param Cxt the WasmEdge_FunctionTypeContext.\n \\param [out] List the WasmEdge_ValType buffer to fill the return value\n types.\n \\param Len the value type buffer length.\n\n \\returns the actual return types list length."] pub fn WasmEdge_FunctionTypeGetReturns (Cxt : * const WasmEdge_FunctionTypeContext , List : * mut WasmEdge_ValType , Len : u32) -> u32 ; } extern "C" { # [doc = " Deletion of the WasmEdge_FunctionTypeContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_FunctionTypeContext to destroy."] pub fn WasmEdge_FunctionTypeDelete (Cxt : * mut WasmEdge_FunctionTypeContext) ; } extern "C" { # [doc = " Creation of the WasmEdge_TableTypeContext.\n\n The caller owns the object and should call `WasmEdge_TableTypeDelete` to\n destroy it.\n\n \\param RefType the value type of the table type. This value type should be a\n reference type, or this function will fail.\n \\param Limit the limit struct of the table type.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_TableTypeCreate (RefType : WasmEdge_ValType , Limit : WasmEdge_Limit) -> * mut WasmEdge_TableTypeContext ; } extern "C" { # [doc = " Get the reference type from a table type.\n\n \\param Cxt the WasmEdge_TableTypeContext.\n\n \\returns the value type of the table type. This value type will must be a\n reference type."] pub fn WasmEdge_TableTypeGetRefType (Cxt : * const WasmEdge_TableTypeContext) -> WasmEdge_ValType ; } extern "C" { # [doc = " Get the limit from a table type.\n\n \\param Cxt the WasmEdge_TableTypeContext.\n\n \\returns the limit struct of the table type."] pub fn WasmEdge_TableTypeGetLimit (Cxt : * const WasmEdge_TableTypeContext) -> WasmEdge_Limit ; } extern "C" { # [doc = " Deletion of the WasmEdge_TableTypeContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_TableTypeContext to destroy."] pub fn WasmEdge_TableTypeDelete (Cxt : * mut WasmEdge_TableTypeContext) ; } extern "C" { # [doc = " Creation of the WasmEdge_MemoryTypeContext.\n\n The caller owns the object and should call `WasmEdge_MemoryTypeDelete` to\n destroy it.\n\n \\param Limit the limit struct of the memory type.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_MemoryTypeCreate (Limit : WasmEdge_Limit) -> * mut WasmEdge_MemoryTypeContext ; } extern "C" { # [doc = " Get the limit from a memory type.\n\n \\param Cxt the WasmEdge_MemoryTypeContext.\n\n \\returns the limit struct of the memory type."] pub fn WasmEdge_MemoryTypeGetLimit (Cxt : * const WasmEdge_MemoryTypeContext) -> WasmEdge_Limit ; } extern "C" { # [doc = " Deletion of the WasmEdge_MemoryTypeContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_MemoryTypeContext to destroy."] pub fn WasmEdge_MemoryTypeDelete (Cxt : * mut WasmEdge_MemoryTypeContext) ; } extern "C" { # [doc = " Get the function type from a tag type.\n\n \\param Cxt the WasmEdge_TagTypeContext.\n\n \\returns pointer to function type context of the tag type, NULL if failed."] pub fn WasmEdge_TagTypeGetFunctionType (Cxt : * const WasmEdge_TagTypeContext) -> * const WasmEdge_FunctionTypeContext ; } extern "C" { # [doc = " Creation of the WasmEdge_GlobalTypeContext.\n\n The caller owns the object and should call `WasmEdge_GlobalTypeDelete` to\n destroy it.\n\n \\param ValType the value type of the global type.\n \\param Mut the mutation of the global type.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_GlobalTypeCreate (ValType : WasmEdge_ValType , Mut : WasmEdge_Mutability) -> * mut WasmEdge_GlobalTypeContext ; } extern "C" { # [doc = " Get the value type from a global type.\n\n \\param Cxt the WasmEdge_GlobalTypeContext.\n\n \\returns the value type of the global type."] pub fn WasmEdge_GlobalTypeGetValType (Cxt : * const WasmEdge_GlobalTypeContext) -> WasmEdge_ValType ; } extern "C" { # [doc = " Get the mutability from a global type.\n\n \\param Cxt the WasmEdge_GlobalTypeContext.\n\n \\returns the mutability of the global type."] pub fn WasmEdge_GlobalTypeGetMutability (Cxt : * const WasmEdge_GlobalTypeContext) -> WasmEdge_Mutability ; } extern "C" { # [doc = " Deletion of the WasmEdge_GlobalTypeContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_GlobalTypeContext to destroy."] pub fn WasmEdge_GlobalTypeDelete (Cxt : * mut WasmEdge_GlobalTypeContext) ; } extern "C" { # [doc = " Get the external type from an import type.\n\n \\param Cxt the WasmEdge_ImportTypeContext.\n\n \\returns the external type of the import type."] pub fn WasmEdge_ImportTypeGetExternalType (Cxt : * const WasmEdge_ImportTypeContext) -> WasmEdge_ExternalType ; } extern "C" { # [doc = " Get the module name from an import type.\n\n The returned string object is linked to the module name of the import type,\n and the caller should __NOT__ call the `WasmEdge_StringDelete`.\n\n \\param Cxt the WasmEdge_ImportTypeContext.\n\n \\returns string object. Length will be 0 and Buf will be NULL if failed."] pub fn WasmEdge_ImportTypeGetModuleName (Cxt : * const WasmEdge_ImportTypeContext) -> WasmEdge_String ; } extern "C" { # [doc = " Get the external name from an import type.\n\n The returned string object is linked to the external name of the import\n type, and the caller should __NOT__ call the `WasmEdge_StringDelete`.\n\n \\param Cxt the WasmEdge_ImportTypeContext.\n\n \\returns string object. Length will be 0 and Buf will be NULL if failed."] pub fn WasmEdge_ImportTypeGetExternalName (Cxt : * const WasmEdge_ImportTypeContext) -> WasmEdge_String ; } extern "C" { # [doc = " Get the external value (which is function type) from an import type.\n\n The import type context should be the one queried from the AST module\n context, or this function will cause unexpected error.\n The function type context links to the function type in the import type\n context and the AST module context. The caller should __NOT__ call the\n `WasmEdge_FunctionTypeDelete`.\n\n \\param ASTCxt the WasmEdge_ASTModuleContext.\n \\param Cxt the WasmEdge_ImportTypeContext which queried from the `ASTCxt`.\n\n \\returns the function type. NULL if failed or the external type of the\n import type is not `WasmEdge_ExternalType_Function`."] pub fn WasmEdge_ImportTypeGetFunctionType (ASTCxt : * const WasmEdge_ASTModuleContext , Cxt : * const WasmEdge_ImportTypeContext) -> * const WasmEdge_FunctionTypeContext ; } extern "C" { # [doc = " Get the external value (which is table type) from an import type.\n\n The import type context should be the one queried from the AST module\n context, or this function will cause unexpected error.\n The table type context links to the table type in the import type context\n and the AST module context. The caller should __NOT__ call the\n `WasmEdge_TableTypeDelete`.\n\n \\param ASTCxt the WasmEdge_ASTModuleContext.\n \\param Cxt the WasmEdge_ImportTypeContext which queried from the `ASTCxt`.\n\n \\returns the table type. NULL if failed or the external type of the import\n type is not `WasmEdge_ExternalType_Table`."] pub fn WasmEdge_ImportTypeGetTableType (ASTCxt : * const WasmEdge_ASTModuleContext , Cxt : * const WasmEdge_ImportTypeContext) -> * const WasmEdge_TableTypeContext ; } extern "C" { # [doc = " Get the external value (which is memory type) from an import type.\n\n The import type context should be the one queried from the AST module\n context, or this function will cause unexpected error.\n The memory type context links to the memory type in the import type context\n and the AST module context. The caller should __NOT__ call the\n `WasmEdge_MemoryTypeDelete`.\n\n \\param ASTCxt the WasmEdge_ASTModuleContext.\n \\param Cxt the WasmEdge_ImportTypeContext which queried from the `ASTCxt`.\n\n \\returns the memory type. NULL if failed or the external type of the import\n type is not `WasmEdge_ExternalType_Memory`."] pub fn WasmEdge_ImportTypeGetMemoryType (ASTCxt : * const WasmEdge_ASTModuleContext , Cxt : * const WasmEdge_ImportTypeContext) -> * const WasmEdge_MemoryTypeContext ; } extern "C" { # [doc = " Get the external value (which is tag type) from an import type.\n\n The import type context should be the one queried from the AST module\n context, or this function will cause unexpected error.\n The tag type context links to the tag type in the import type context\n and the AST module context.\n\n \\param ASTCxt the WasmEdge_ASTModuleContext.\n \\param Cxt the WasmEdge_ImportTypeContext which queried from the `ASTCxt`.\n\n \\returns the tag type. NULL if failed or the external type of the import\n type is not `WasmEdge_ExternalType_TagType`."] pub fn WasmEdge_ImportTypeGetTagType (ASTCxt : * const WasmEdge_ASTModuleContext , Cxt : * const WasmEdge_ImportTypeContext) -> * const WasmEdge_TagTypeContext ; } extern "C" { # [doc = " Get the external value (which is global type) from an import type.\n\n The import type context should be the one queried from the AST module\n context, or this function will cause unexpected error.\n The global type context links to the global type in the import type context\n and the AST module context. The caller should __NOT__ call the\n `WasmEdge_GlobalTypeDelete`.\n\n \\param ASTCxt the WasmEdge_ASTModuleContext.\n \\param Cxt the WasmEdge_ImportTypeContext which queried from the `ASTCxt`.\n\n \\returns the global type. NULL if failed or the external type of the import\n type is not `WasmEdge_ExternalType_Global`."] pub fn WasmEdge_ImportTypeGetGlobalType (ASTCxt : * const WasmEdge_ASTModuleContext , Cxt : * const WasmEdge_ImportTypeContext) -> * const WasmEdge_GlobalTypeContext ; } extern "C" { # [doc = " Get the external type from an export type.\n\n \\param Cxt the WasmEdge_ExportTypeContext.\n\n \\returns the external type of the export type."] pub fn WasmEdge_ExportTypeGetExternalType (Cxt : * const WasmEdge_ExportTypeContext) -> WasmEdge_ExternalType ; } extern "C" { # [doc = " Get the external name from an export type.\n\n The returned string object is linked to the external name of the export\n type, and the caller should __NOT__ call the `WasmEdge_StringDelete`.\n\n \\param Cxt the WasmEdge_ExportTypeContext.\n\n \\returns string object. Length will be 0 and Buf will be NULL if failed."] pub fn WasmEdge_ExportTypeGetExternalName (Cxt : * const WasmEdge_ExportTypeContext) -> WasmEdge_String ; } extern "C" { # [doc = " Get the external value (which is function type) from an export type.\n\n The export type context should be the one queried from the AST module\n context, or this function will cause unexpected error.\n The function type context links to the function type in the export type\n context and the AST module context. The caller should __NOT__ call the\n `WasmEdge_FunctionTypeDelete`.\n\n \\param ASTCxt the WasmEdge_ASTModuleContext.\n \\param Cxt the WasmEdge_ExportTypeContext which queried from the `ASTCxt`.\n\n \\returns the function type. NULL if failed or the external type of the\n export type is not `WasmEdge_ExternalType_Function`."] pub fn WasmEdge_ExportTypeGetFunctionType (ASTCxt : * const WasmEdge_ASTModuleContext , Cxt : * const WasmEdge_ExportTypeContext) -> * const WasmEdge_FunctionTypeContext ; } extern "C" { # [doc = " Get the external value (which is table type) from an export type.\n\n The export type context should be the one queried from the AST module\n context, or this function will cause unexpected error.\n The table type context links to the table type in the export type context\n and the AST module context. The caller should __NOT__ call the\n `WasmEdge_TableTypeDelete`.\n\n \\param ASTCxt the WasmEdge_ASTModuleContext.\n \\param Cxt the WasmEdge_ExportTypeContext which queried from the `ASTCxt`.\n\n \\returns the table type. NULL if failed or the external type of the export\n type is not `WasmEdge_ExternalType_Table`."] pub fn WasmEdge_ExportTypeGetTableType (ASTCxt : * const WasmEdge_ASTModuleContext , Cxt : * const WasmEdge_ExportTypeContext) -> * const WasmEdge_TableTypeContext ; } extern "C" { # [doc = " Get the external value (which is memory type) from an export type.\n\n The export type context should be the one queried from the AST module\n context, or this function will cause unexpected error.\n The memory type context links to the memory type in the export type context\n and the AST module context. The caller should __NOT__ call the\n `WasmEdge_MemoryTypeDelete`.\n\n \\param ASTCxt the WasmEdge_ASTModuleContext.\n \\param Cxt the WasmEdge_ExportTypeContext which queried from the `ASTCxt`.\n\n \\returns the memory type. NULL if failed or the external type of the export\n type is not `WasmEdge_ExternalType_Memory`."] pub fn WasmEdge_ExportTypeGetMemoryType (ASTCxt : * const WasmEdge_ASTModuleContext , Cxt : * const WasmEdge_ExportTypeContext) -> * const WasmEdge_MemoryTypeContext ; } extern "C" { # [doc = " Get the external value (which is tag type) from an export type.\n\n The export type context should be the one queried from the AST module\n context, or this function will cause unexpected error.\n The tag type context links to the tag type in the export type context\n and the AST module context.\n\n \\param ASTCxt the WasmEdge_ASTModuleContext.\n \\param Cxt the WasmEdge_ExportTypeContext which queried from the `ASTCxt`.\n\n \\returns the tag type. NULL if failed or the external type of the export\n type is not `WasmEdge_ExternalType_Tag`."] pub fn WasmEdge_ExportTypeGetTagType (ASTCxt : * const WasmEdge_ASTModuleContext , Cxt : * const WasmEdge_ExportTypeContext) -> * const WasmEdge_TagTypeContext ; } extern "C" { # [doc = " Get the external value (which is global type) from an export type.\n\n The export type context should be the one queried from the AST module\n context, or this function will cause unexpected error.\n The global type context links to the global type in the export type context\n and the AST module context. The caller should __NOT__ call the\n `WasmEdge_GlobalTypeDelete`.\n\n \\param ASTCxt the WasmEdge_ASTModuleContext.\n \\param Cxt the WasmEdge_ExportTypeContext which queried from the `ASTCxt`.\n\n \\returns the global type. NULL if failed or the external type of the export\n type is not `WasmEdge_ExternalType_Global`."] pub fn WasmEdge_ExportTypeGetGlobalType (ASTCxt : * const WasmEdge_ASTModuleContext , Cxt : * const WasmEdge_ExportTypeContext) -> * const WasmEdge_GlobalTypeContext ; } extern "C" { # [doc = " Creation of the WasmEdge_CompilerContext.\n\n The caller owns the object and should call `WasmEdge_CompilerDelete` to\n delete it.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_CompilerCreate (ConfCxt : * const WasmEdge_ConfigureContext) -> * mut WasmEdge_CompilerContext ; } extern "C" { # [doc = " Compile the input WASM from the file path.\n\n The compiler compiles the WASM from file path for the ahead-of-time mode and\n store the result to the output file path.\n\n \\param Cxt the WasmEdge_CompilerContext.\n \\param InPath the input WASM file path.\n \\param OutPath the output WASM file path.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_CompilerCompile (Cxt : * mut WasmEdge_CompilerContext , InPath : * const :: std :: os :: raw :: c_char , OutPath : * const :: std :: os :: raw :: c_char) -> WasmEdge_Result ; } extern "C" { # [doc = " Compile the input WASM from the given buffer.\n\n CAUTION: This function will be deprecated and replaced by\n `WasmEdge_CompilerCompileFromBytes()` API in the future.\n\n The compiler compiles the WASM from the given buffer for the\n ahead-of-time mode and store the result to the output file path.\n\n \\param Cxt the WasmEdge_CompilerContext.\n \\param InBuffer the input WASM binary buffer.\n \\param InBufferLen the length of the input WASM binary buffer.\n \\param OutPath the output WASM file path.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_CompilerCompileFromBuffer (Cxt : * mut WasmEdge_CompilerContext , InBuffer : * const u8 , InBufferLen : u64 , OutPath : * const :: std :: os :: raw :: c_char) -> WasmEdge_Result ; } extern "C" { # [doc = " Compile the input WASM from a WasmEdge_Bytes.\n\n The compiler compiles the WASM from the WasmEdge_Bytes for the\n ahead-of-time mode and store the result to the output file path.\n\n \\param Cxt the WasmEdge_CompilerContext.\n \\param Bytes the WasmEdge_Bytes of WASM binary.\n \\param OutPath the output WASM file path.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_CompilerCompileFromBytes (Cxt : * mut WasmEdge_CompilerContext , Bytes : WasmEdge_Bytes , OutPath : * const :: std :: os :: raw :: c_char) -> WasmEdge_Result ; } extern "C" { # [doc = " Deletion of the WasmEdge_CompilerContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_CompilerContext to destroy."] pub fn WasmEdge_CompilerDelete (Cxt : * mut WasmEdge_CompilerContext) ; } extern "C" { # [doc = " Creation of the WasmEdge_LoaderContext.\n\n The caller owns the object and should call `WasmEdge_LoaderDelete` to\n destroy it.\n\n \\param ConfCxt the WasmEdge_ConfigureContext as the configuration of Loader.\n NULL for the default configuration.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_LoaderCreate (ConfCxt : * const WasmEdge_ConfigureContext) -> * mut WasmEdge_LoaderContext ; } extern "C" { # [doc = " Load and parse the WASM module from a WASM file into a\n WasmEdge_ASTModuleContext.\n\n Load and parse the WASM module from the file path, and return a\n `WasmEdge_ASTModuleContext` as the result. The caller owns the\n `WasmEdge_ASTModuleContext` object and should call\n `WasmEdge_ASTModuleDelete` to destroy it.\n\n \\param Cxt the WasmEdge_LoaderContext.\n \\param [out] Module the output WasmEdge_ASTModuleContext if succeeded.\n \\param Path the NULL-terminated C string of the WASM file path.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_LoaderParseFromFile (Cxt : * mut WasmEdge_LoaderContext , Module : * mut * mut WasmEdge_ASTModuleContext , Path : * const :: std :: os :: raw :: c_char) -> WasmEdge_Result ; } extern "C" { # [doc = " Load and parse the WASM module from a buffer into WasmEdge_ASTModuleContext.\n\n CAUTION: This function will be deprecated and replaced by\n `WasmEdge_LoaderParseFromBytes()` API in the future.\n\n Load and parse the WASM module from a buffer, and return a\n WasmEdge_ASTModuleContext as the result. The caller owns the\n WasmEdge_ASTModuleContext object and should call `WasmEdge_ASTModuleDelete`\n to destroy it.\n\n \\param Cxt the WasmEdge_LoaderContext.\n \\param [out] Module the output WasmEdge_ASTModuleContext if succeeded.\n \\param Buf the buffer of WASM binary.\n \\param BufLen the length of the buffer.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_LoaderParseFromBuffer (Cxt : * mut WasmEdge_LoaderContext , Module : * mut * mut WasmEdge_ASTModuleContext , Buf : * const u8 , BufLen : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Load and parse the WASM module from a WasmEdge_Bytes into\n WasmEdge_ASTModuleContext.\n\n Load and parse the WASM module from a buffer, and return a\n WasmEdge_ASTModuleContext as the result. The caller owns the\n WasmEdge_ASTModuleContext object and should call `WasmEdge_ASTModuleDelete`\n to destroy it.\n\n \\param Cxt the WasmEdge_LoaderContext.\n \\param [out] Module the output WasmEdge_ASTModuleContext if succeeded.\n \\param Bytes the WasmEdge_Bytes of WASM binary.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_LoaderParseFromBytes (Cxt : * mut WasmEdge_LoaderContext , Module : * mut * mut WasmEdge_ASTModuleContext , Bytes : WasmEdge_Bytes) -> WasmEdge_Result ; } extern "C" { # [doc = " Serialize the WasmEdge_ASTModuleContext into WASM binary.\n\n Serialize the loaded WasmEdge_ASTModuleContext into the WASM binary format.\n If the serialization succeeded, this API will allocate a new\n `WasmEdge_Bytes` object and fill into the `Buf`. The caller owns the\n `WasmEdge_Bytes` object and should call `WasmEdge_BytesDelete` to destroy\n it.\n\n \\param Cxt the WasmEdge_LoaderContext.\n \\param ASTCxt the WasmEdge_ASTModuleContext to serialize.\n \\param [out] Buf the WasmEdge_Bytes to fill the serialized WASM binary.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_LoaderSerializeASTModule (Cxt : * mut WasmEdge_LoaderContext , ASTCxt : * const WasmEdge_ASTModuleContext , Buf : * mut WasmEdge_Bytes) -> WasmEdge_Result ; } extern "C" { # [doc = " Deletion of the WasmEdge_LoaderContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_LoaderContext to destroy."] pub fn WasmEdge_LoaderDelete (Cxt : * mut WasmEdge_LoaderContext) ; } extern "C" { # [doc = " Creation of the WasmEdge_ValidatorContext.\n\n The caller owns the object and should call `WasmEdge_ValidatorDelete` to\n destroy it.\n\n \\param ConfCxt the WasmEdge_ConfigureContext as the configuration of\n Validator. NULL for the default configuration.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_ValidatorCreate (ConfCxt : * const WasmEdge_ConfigureContext) -> * mut WasmEdge_ValidatorContext ; } extern "C" { # [doc = " Validate the WasmEdge AST Module.\n\n \\param Cxt the WasmEdge_ValidatorContext.\n \\param ASTCxt the WasmEdge_ASTModuleContext to validate.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_ValidatorValidate (Cxt : * mut WasmEdge_ValidatorContext , ASTCxt : * const WasmEdge_ASTModuleContext) -> WasmEdge_Result ; } extern "C" { # [doc = " Deletion of the WasmEdge_ValidatorContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_ValidatorContext to destroy."] pub fn WasmEdge_ValidatorDelete (Cxt : * mut WasmEdge_ValidatorContext) ; } extern "C" { # [doc = " Creation of the WasmEdge_ExecutorContext.\n\n The caller owns the object and should call `WasmEdge_ExecutorDelete` to\n delete it.\n\n \\param ConfCxt the WasmEdge_ConfigureContext as the configuration of\n Executor. NULL for the default configuration.\n \\param StatCxt the WasmEdge_StatisticsContext as the statistics object set\n into Executor. The statistics will refer to this context, and the life cycle\n should be guaranteed until the executor context is deleted. NULL for not\n doing the statistics.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_ExecutorCreate (ConfCxt : * const WasmEdge_ConfigureContext , StatCxt : * mut WasmEdge_StatisticsContext) -> * mut WasmEdge_ExecutorContext ; } extern "C" { # [doc = " Instantiate an AST Module into a module instance.\n\n Instantiate an AST Module, and return an instantiated module instance\n context as the result. The caller owns the object and should call\n `WasmEdge_ModuleInstanceDelete` to destroy it. Developers can use the\n `WasmEdge_ModuleInstanceListFunction`,\n `WasmEdge_ModuleInstanceFindFunction`, etc. APIs to retrieve the exported\n instances from the result module instance.\n\n \\param Cxt the WasmEdge_ExecutorContext to instantiate the module.\n \\param [out] ModuleCxt the output WasmEdge_ModuleInstanceContext if\n succeeded.\n \\param StoreCxt the WasmEdge_StoreContext to link the imports.\n \\param ASTCxt the WasmEdge AST Module context generated by loader or\n compiler.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_ExecutorInstantiate (Cxt : * mut WasmEdge_ExecutorContext , ModuleCxt : * mut * mut WasmEdge_ModuleInstanceContext , StoreCxt : * mut WasmEdge_StoreContext , ASTCxt : * const WasmEdge_ASTModuleContext) -> WasmEdge_Result ; } extern "C" { # [doc = " Instantiate an AST Module into a named module instance and link into store.\n\n Instantiate an AST Module with the module name, return the instantiated\n module instance context as the result, and also register the module instance\n to the store. The caller owns the object and should call\n `WasmEdge_ModuleInstanceDelete` to destroy it.\n Developers can use the `WasmEdge_ModuleInstanceListFunction`,\n `WasmEdge_ModuleInstanceFindFunction`, etc. APIs to retrieve the exported\n instances from the result module instance.\n After calling this function, the output module instance will also be\n registered into the store, and the other modules can import the exported\n instances for linking when instantiation. Developers SHOULD guarantee the\n life cycle of this output module instance, or the error will occur when in\n execution after the module instance being destroyed if it has been imported\n by other modules. That is, developers have the responsibility to delete the\n output module instance even though the store being destroyed. When the\n module instance is deleted, it will be unregistered to the store\n automatically.\n\n \\param Cxt the WasmEdge_ExecutorContext to instantiate the module.\n \\param [out] ModuleCxt the output WasmEdge_ModuleInstanceContext if\n succeeded.\n \\param StoreCxt the WasmEdge_StoreContext to link the imports.\n \\param ASTCxt the WasmEdge AST Module context generated by loader or\n compiler.\n \\param ModuleName the module name WasmEdge_String for all exported\n instances.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_ExecutorRegister (Cxt : * mut WasmEdge_ExecutorContext , ModuleCxt : * mut * mut WasmEdge_ModuleInstanceContext , StoreCxt : * mut WasmEdge_StoreContext , ASTCxt : * const WasmEdge_ASTModuleContext , ModuleName : WasmEdge_String) -> WasmEdge_Result ; } extern "C" { # [doc = " Register a module instance into a store with exporting its module name.\n\n Register an existing module into the store with its module name.\n After calling this function, the existing module instance will be registered\n into the store, and the other modules can import the exported instances for\n linking when instantiation. Developers SHOULD guarantee the life cycle of\n this existing module instance, or the error will occur when in execution\n after the module instance being destroyed if it has been imported by other\n modules. When the module instance is deleted, it will be unregistered to the\n store automatically.\n\n \\param Cxt the WasmEdge_ExecutorContext to instantiate the module.\n \\param StoreCxt the WasmEdge_StoreContext to store the instantiated module.\n \\param ImportCxt the WasmEdge_ModuleInstanceContext to register.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_ExecutorRegisterImport (Cxt : * mut WasmEdge_ExecutorContext , StoreCxt : * mut WasmEdge_StoreContext , ImportCxt : * const WasmEdge_ModuleInstanceContext) -> WasmEdge_Result ; } extern "C" { # [doc = " Invoke a WASM function by the function instance.\n\n After instantiating a WASM module, developers can get the function instance\n context from the module instance. Then developers can invoke the function\n through this API.\n\n \\param Cxt the WasmEdge_ExecutorContext.\n \\param FuncCxt the function instance context to invoke.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n \\param [out] Returns the WasmEdge_Value buffer to fill the return values.\n \\param ReturnLen the return buffer length.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_ExecutorInvoke (Cxt : * mut WasmEdge_ExecutorContext , FuncCxt : * const WasmEdge_FunctionInstanceContext , Params : * const WasmEdge_Value , ParamLen : u32 , Returns : * mut WasmEdge_Value , ReturnLen : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Asynchronous invoke a WASM function by the function instance.\n\n After instantiating a WASM module, developers can get the function instance\n context from the module instance. Then developers can invoke the function\n asynchronously through this API.\n\n \\param Cxt the WasmEdge_ExecutorContext.\n \\param FuncCxt the function instance context to invoke.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n\n \\returns WasmEdge_Async. Call `WasmEdge_AsyncGet` for the result, and call\n `WasmEdge_AsyncDelete` to destroy this object."] pub fn WasmEdge_ExecutorAsyncInvoke (Cxt : * mut WasmEdge_ExecutorContext , FuncCxt : * const WasmEdge_FunctionInstanceContext , Params : * const WasmEdge_Value , ParamLen : u32) -> * mut WasmEdge_Async ; } extern "C" { # [doc = " Deletion of the WasmEdge_ExecutorContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_ExecutorContext to destroy."] pub fn WasmEdge_ExecutorDelete (Cxt : * mut WasmEdge_ExecutorContext) ; } extern "C" { # [doc = " Creation of the WasmEdge_StoreContext.\n\n The caller owns the object and should call `WasmEdge_StoreDelete` to destroy\n it.\n The store is the linker for multiple WASM module instances. The store will\n not own any module instance registered into it, and the module instances\n will automatically be unregistered if they are destroyed.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_StoreCreate () -> * mut WasmEdge_StoreContext ; } extern "C" { # [doc = " Get the module instance context by the module name.\n\n After registering a WASM module, developers can call this function to find\n and get the registered module instance context by the module name.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_StoreContext.\n \\param Name the module name WasmEdge_String.\n\n \\returns pointer to the module instance context. NULL if not found."] pub fn WasmEdge_StoreFindModule (Cxt : * const WasmEdge_StoreContext , Name : WasmEdge_String) -> * const WasmEdge_ModuleInstanceContext ; } extern "C" { # [doc = " Get the length of registered module list in store.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_StoreContext.\n\n \\returns length of registered named module list."] pub fn WasmEdge_StoreListModuleLength (Cxt : * const WasmEdge_StoreContext) -> u32 ; } extern "C" { # [doc = " List the registered module names.\n\n This function will list all registered module names.\n The returned module names filled into the `Names` array are linked to the\n registered module names in the store context, and the caller should __NOT__\n call the `WasmEdge_StringDelete`.\n If the `Names` buffer length is smaller than the result of the registered\n named module list size, the overflowed return values will be discarded.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_StoreContext.\n \\param [out] Names the output names WasmEdge_String buffer of named modules.\n \\param Len the buffer length.\n\n \\returns actual registered named module list size."] pub fn WasmEdge_StoreListModule (Cxt : * const WasmEdge_StoreContext , Names : * mut WasmEdge_String , Len : u32) -> u32 ; } extern "C" { # [doc = " Deletion of the WasmEdge_StoreContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n If there are module instances registered into this store context, they will\n be automatically un-link to this store context.\n\n \\param Cxt the WasmEdge_StoreContext to destroy."] pub fn WasmEdge_StoreDelete (Cxt : * mut WasmEdge_StoreContext) ; } extern "C" { # [doc = " Creation of the WasmEdge_ModuleInstanceContext.\n\n Create a module instance context with exported module name for host\n instances. Developer can use this API to create a module instance for\n collecting host functions, tables, memories, tags, and globals.\n The caller owns the object and should call `WasmEdge_ModuleInstanceDelete`\n to destroy it.\n\n \\param ModuleName the module name WasmEdge_String of this host module to\n import.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_ModuleInstanceCreate (ModuleName : WasmEdge_String) -> * mut WasmEdge_ModuleInstanceContext ; } extern "C" { # [doc = " Creation of the WasmEdge_ModuleInstanceContext with host data.\n\n Create a module instance context with exported module name, host data, and\n host data finalizer for host instances. Developer can use this API to create\n a module instance for collecting host functions, tables, memories, and\n globals. When this created module instance being destroyed, the host data\n finalizer will be invoked. The caller owns the object and should call\n `WasmEdge_ModuleInstanceDelete` to destroy it.\n\n \\param ModuleName the module name WasmEdge_String of this host module to\n import.\n \\param HostData the host data to set into the module instance. When calling\n the finalizer, this pointer will become the argument of the finalizer\n function.\n \\param Finalizer the function to finalize the host data.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_ModuleInstanceCreateWithData (ModuleName : WasmEdge_String , HostData : * mut :: std :: os :: raw :: c_void , Finalizer : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) >) -> * mut WasmEdge_ModuleInstanceContext ; } extern "C" { # [doc = " Creation of the WasmEdge_ModuleInstanceContext for the WASI specification.\n\n This function will create a WASI host module that contains the WASI host\n functions and initialize it. The caller owns the object and should call\n `WasmEdge_ModuleInstanceDelete` to destroy it.\n\n \\param Args the command line arguments. The first argument suggests being\n the program name. NULL if the length is 0.\n \\param ArgLen the length of the command line arguments.\n \\param Envs the environment variables in the format `ENV=VALUE`. NULL if the\n length is 0.\n \\param EnvLen the length of the environment variables.\n \\param Preopens the directory paths to preopen. String format in\n `GUEST_PATH:HOST_PATH` means the path mapping, or the same path will be\n mapped. NULL if the length is 0.\n \\param PreopenLen the length of the directory paths to preopen.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_ModuleInstanceCreateWASI (Args : * const * const :: std :: os :: raw :: c_char , ArgLen : u32 , Envs : * const * const :: std :: os :: raw :: c_char , EnvLen : u32 , Preopens : * const * const :: std :: os :: raw :: c_char , PreopenLen : u32) -> * mut WasmEdge_ModuleInstanceContext ; } extern "C" { # [doc = " Initialize the WasmEdge_ModuleInstanceContext for the WASI specification.\n\n This function will initialize the WASI host module with the parameters.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext of WASI import object.\n \\param Args the command line arguments. The first argument suggests being\n the program name. NULL if the length is 0.\n \\param ArgLen the length of the command line arguments.\n \\param Envs the environment variables in the format `ENV=VALUE`. NULL if the\n length is 0.\n \\param EnvLen the length of the environment variables.\n \\param Preopens the directory paths to preopen. String format in\n `GUEST_PATH:HOST_PATH` means the path mapping, or the same path will be\n mapped. NULL if the length is 0.\n \\param PreopenLen the length of the directory paths to preopen."] pub fn WasmEdge_ModuleInstanceInitWASI (Cxt : * mut WasmEdge_ModuleInstanceContext , Args : * const * const :: std :: os :: raw :: c_char , ArgLen : u32 , Envs : * const * const :: std :: os :: raw :: c_char , EnvLen : u32 , Preopens : * const * const :: std :: os :: raw :: c_char , PreopenLen : u32) ; } extern "C" { # [doc = " Get the WASI exit code.\n\n This function will return the exit code after running the \"_start\" function\n of a `wasm32-wasi` program.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext of WASI import object.\n\n \\returns the exit code after executing the \"_start\" function. Return\n `EXIT_FAILURE` if the `Cxt` is NULL or not a WASI host module."] pub fn WasmEdge_ModuleInstanceWASIGetExitCode (Cxt : * const WasmEdge_ModuleInstanceContext) -> u32 ; } extern "C" { # [doc = " Get the native handler from the WASI mapped FD/Handler.\n\n This function will return the raw FD/Handler from a given mapped Fd\n or Handler.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext of WASI import object.\n \\param Fd the WASI mapped Fd.\n \\param [out] NativeHandler the raw Fd/Handler.\n\n \\returns the error code. Return `0` if the Native Handler is found.\n Return `1` if the `Cxt` is `NULL`.\n Return `2` if the given mapped Fd/handler is not found."] pub fn WasmEdge_ModuleInstanceWASIGetNativeHandler (Cxt : * const WasmEdge_ModuleInstanceContext , Fd : i32 , NativeHandler : * mut u64) -> u32 ; } extern "C" { # [doc = " Initialize the WasmEdge_ModuleInstanceContext for the wasmedge_process\n specification.\n\n This function will initialize the wasmedge_process host module with the\n parameters.\n\n \\param AllowedCmds the allowed commands white list. NULL if the\n length is 0.\n \\param CmdsLen the length of the allowed commands white list.\n \\param AllowAll the boolean value to allow all commands. `false` is\n suggested. If this value is `true`, the allowed commands white list will not\n be recorded and all commands can be executed by wasmedge_process."] pub fn WasmEdge_ModuleInstanceInitWasmEdgeProcess (AllowedCmds : * const * const :: std :: os :: raw :: c_char , CmdsLen : u32 , AllowAll : bool) ; } extern "C" { # [doc = " Get the export module name of a module instance.\n\n The returned string object is linked to the module name of the module\n instance, and the caller should __NOT__ call the `WasmEdge_StringDelete`.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n\n \\returns string object. Length will be 0 and Buf will be NULL if failed."] pub fn WasmEdge_ModuleInstanceGetModuleName (Cxt : * const WasmEdge_ModuleInstanceContext) -> WasmEdge_String ; } extern "C" { # [doc = " Get the host data set into the module instance when creating.\n\n The returned data is owned by the module instance, and will be passed into\n the finalizer when deleting this module instance.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n\n \\returns host data. NULL if the module instance context is NULL or no host\n data set into the module instance."] pub fn WasmEdge_ModuleInstanceGetHostData (Cxt : * const WasmEdge_ModuleInstanceContext) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = " Get the exported function instance context of a module instance.\n\n The result function instance context links to the function instance in the\n module instance context and owned by the module instance context, and the\n caller should __NOT__ call the `WasmEdge_FunctionInstanceDelete`.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n \\param Name the function name WasmEdge_String.\n\n \\returns pointer to the function instance context. NULL if not found."] pub fn WasmEdge_ModuleInstanceFindFunction (Cxt : * const WasmEdge_ModuleInstanceContext , Name : WasmEdge_String) -> * mut WasmEdge_FunctionInstanceContext ; } extern "C" { # [doc = " Get the exported table instance context of a module instance.\n\n The result table instance context links to the table instance in the module\n instance context and owned by the module instance context, and the caller\n should __NOT__ call the `WasmEdge_TableInstanceDelete`.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n \\param Name the table name WasmEdge_String.\n\n \\returns pointer to the table instance context. NULL if not found."] pub fn WasmEdge_ModuleInstanceFindTable (Cxt : * const WasmEdge_ModuleInstanceContext , Name : WasmEdge_String) -> * mut WasmEdge_TableInstanceContext ; } extern "C" { # [doc = " Get the exported memory instance context of a module instance.\n\n The result memory instance context links to the memory instance in the\n module instance context and owned by the module instance context, and the\n caller should __NOT__ call the `WasmEdge_MemoryInstanceDelete`.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n \\param Name the memory name WasmEdge_String.\n\n \\returns pointer to the memory instance context. NULL if not found."] pub fn WasmEdge_ModuleInstanceFindMemory (Cxt : * const WasmEdge_ModuleInstanceContext , Name : WasmEdge_String) -> * mut WasmEdge_MemoryInstanceContext ; } extern "C" { # [doc = " Get the exported tag instance context of a module instance.\n\n The result tag instance context links to the tag instance in the\n module instance context and owned by the module instance context.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n \\param Name the tag name WasmEdge_String.\n\n \\returns pointer to the tag instance context. NULL if not found."] pub fn WasmEdge_ModuleInstanceFindTag (Cxt : * const WasmEdge_ModuleInstanceContext , Name : WasmEdge_String) -> * mut WasmEdge_TagInstanceContext ; } extern "C" { # [doc = " Get the exported global instance context of a module instance.\n\n The result global instance context links to the global instance in the\n module instance context and owned by the module instance context, and the\n caller should __NOT__ call the `WasmEdge_GlobalInstanceDelete`.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n \\param Name the global name WasmEdge_String.\n\n \\returns pointer to the global instance context. NULL if not found."] pub fn WasmEdge_ModuleInstanceFindGlobal (Cxt : * const WasmEdge_ModuleInstanceContext , Name : WasmEdge_String) -> * mut WasmEdge_GlobalInstanceContext ; } extern "C" { # [doc = " Get the length of exported function list of a module instance.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n\n \\returns length of the exported function list."] pub fn WasmEdge_ModuleInstanceListFunctionLength (Cxt : * const WasmEdge_ModuleInstanceContext) -> u32 ; } extern "C" { # [doc = " List the exported function names of a module instance.\n\n The returned function names filled into the `Names` array are linked to the\n exported names of functions of the module instance context, and the caller\n should __NOT__ call the `WasmEdge_StringDelete`.\n If the `Names` buffer length is smaller than the result of the exported\n function list size, the overflowed return values will be discarded.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n \\param [out] Names the output WasmEdge_String buffer of the function names.\n \\param Len the buffer length.\n\n \\returns actual exported function list size."] pub fn WasmEdge_ModuleInstanceListFunction (Cxt : * const WasmEdge_ModuleInstanceContext , Names : * mut WasmEdge_String , Len : u32) -> u32 ; } extern "C" { # [doc = " Get the length of exported table list of a module instance.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n\n \\returns length of the exported table list."] pub fn WasmEdge_ModuleInstanceListTableLength (Cxt : * const WasmEdge_ModuleInstanceContext) -> u32 ; } extern "C" { # [doc = " List the exported table names of a module instance.\n\n The returned table names filled into the `Names` array are linked to the\n exported names of tables of the module instance context, and the caller\n should __NOT__ call the `WasmEdge_StringDelete`.\n If the `Names` buffer length is smaller than the result of the exported\n table list size, the overflowed return values will be discarded.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n \\param [out] Names the output WasmEdge_String buffer of the table names.\n \\param Len the buffer length.\n\n \\returns actual exported table list size."] pub fn WasmEdge_ModuleInstanceListTable (Cxt : * const WasmEdge_ModuleInstanceContext , Names : * mut WasmEdge_String , Len : u32) -> u32 ; } extern "C" { # [doc = " Get the length of exported memory list of a module instance.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n\n \\returns length of the exported memory list."] pub fn WasmEdge_ModuleInstanceListMemoryLength (Cxt : * const WasmEdge_ModuleInstanceContext) -> u32 ; } extern "C" { # [doc = " List the exported memory names of a module instance.\n\n The returned memory names filled into the `Names` array are linked to the\n exported names of memories of the module instance context, and the caller\n should __NOT__ call the `WasmEdge_StringDelete`.\n If the `Names` buffer length is smaller than the result of the exported\n memory list size, the overflowed return values will be discarded.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n \\param [out] Names the output WasmEdge_String buffer of the memory names.\n \\param Len the buffer length.\n\n \\returns actual exported memory list size."] pub fn WasmEdge_ModuleInstanceListMemory (Cxt : * const WasmEdge_ModuleInstanceContext , Names : * mut WasmEdge_String , Len : u32) -> u32 ; } extern "C" { # [doc = " Get the length of exported tag list of a module instance.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n\n \\returns length of the exported tag list."] pub fn WasmEdge_ModuleInstanceListTagLength (Cxt : * const WasmEdge_ModuleInstanceContext) -> u32 ; } extern "C" { # [doc = " List the exported tag names of a module instance.\n\n The returned tag names filled into the `Names` array are linked to the\n exported names of tags of the module instance context, and the caller\n should __NOT__ call the `WasmEdge_StringDelete`.\n If the `Names` buffer length is smaller than the result of the exported\n tag list size, the overflowed return values will be discarded.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n \\param [out] Names the output WasmEdge_String buffer of the tag names.\n \\param Len the buffer length.\n\n \\returns actual exported tag list size."] pub fn WasmEdge_ModuleInstanceListTag (Cxt : * const WasmEdge_ModuleInstanceContext , Names : * mut WasmEdge_String , Len : u32) -> u32 ; } extern "C" { # [doc = " Get the length of exported global list of a module instance.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n\n \\returns length of the exported global list."] pub fn WasmEdge_ModuleInstanceListGlobalLength (Cxt : * const WasmEdge_ModuleInstanceContext) -> u32 ; } extern "C" { # [doc = " List the exported global names of a module instance.\n\n The returned global names filled into the `Names` array are linked to the\n exported names of globals of the module instance context, and the caller\n should __NOT__ call the `WasmEdge_StringDelete`.\n If the `Names` buffer length is smaller than the result of the exported\n global list size, the overflowed return values will be discarded.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext.\n \\param [out] Names the output WasmEdge_String buffer of the global names.\n \\param Len the buffer length.\n\n \\returns actual exported global list size."] pub fn WasmEdge_ModuleInstanceListGlobal (Cxt : * const WasmEdge_ModuleInstanceContext , Names : * mut WasmEdge_String , Len : u32) -> u32 ; } extern "C" { # [doc = " Add a function instance context into a WasmEdge_ModuleInstanceContext.\n\n Export and move the ownership of the function instance into the module\n instance. The caller should __NOT__ access or destroy the function instance\n context after calling this function.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext to add the function instance.\n \\param Name the export function name WasmEdge_String.\n \\param FuncCxt the WasmEdge_FunctionInstanceContext to add."] pub fn WasmEdge_ModuleInstanceAddFunction (Cxt : * mut WasmEdge_ModuleInstanceContext , Name : WasmEdge_String , FuncCxt : * mut WasmEdge_FunctionInstanceContext) ; } extern "C" { # [doc = " Add a table instance context into a WasmEdge_ModuleInstanceContext.\n\n Export and move the ownership of the table instance into the module\n instance. The caller should __NOT__ access or destroy the table instance\n context after calling this function.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext to add the table instance.\n \\param Name the export table name WasmEdge_String.\n \\param TableCxt the WasmEdge_TableInstanceContext to add."] pub fn WasmEdge_ModuleInstanceAddTable (Cxt : * mut WasmEdge_ModuleInstanceContext , Name : WasmEdge_String , TableCxt : * mut WasmEdge_TableInstanceContext) ; } extern "C" { # [doc = " Add a memory instance context into a WasmEdge_ModuleInstanceContext.\n\n Export and move the ownership of the memory instance into the module\n instance. The caller should __NOT__ access or destroy the memory instance\n context after calling this function.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext to add the memory instance.\n \\param Name the export memory name WasmEdge_String.\n \\param MemoryCxt the WasmEdge_MemoryInstanceContext to add."] pub fn WasmEdge_ModuleInstanceAddMemory (Cxt : * mut WasmEdge_ModuleInstanceContext , Name : WasmEdge_String , MemoryCxt : * mut WasmEdge_MemoryInstanceContext) ; } extern "C" { # [doc = " Add a global instance context into a WasmEdge_ModuleInstanceContext.\n\n Export and move the ownership of the global instance into the module\n instance. The caller should __NOT__ access or destroy the global instance\n context after calling this function.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext to add the global instance.\n \\param Name the export global name WasmEdge_String.\n \\param GlobalCxt the WasmEdge_GlobalInstanceContext to add."] pub fn WasmEdge_ModuleInstanceAddGlobal (Cxt : * mut WasmEdge_ModuleInstanceContext , Name : WasmEdge_String , GlobalCxt : * mut WasmEdge_GlobalInstanceContext) ; } extern "C" { # [doc = " Deletion of the WasmEdge_ModuleInstanceContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n If the module instance has been registered into one or more store contexts,\n it will be automatically unregistered.\n\n \\param Cxt the WasmEdge_ModuleInstanceContext to destroy."] pub fn WasmEdge_ModuleInstanceDelete (Cxt : * mut WasmEdge_ModuleInstanceContext) ; } pub type WasmEdge_HostFunc_t = :: std :: option :: Option < unsafe extern "C" fn (Data : * mut :: std :: os :: raw :: c_void , CallFrameCxt : * const WasmEdge_CallingFrameContext , Params : * const WasmEdge_Value , Returns : * mut WasmEdge_Value) -> WasmEdge_Result > ; extern "C" { # [doc = " Creation of the WasmEdge_FunctionInstanceContext for host functions.\n\n The caller owns the object and should call `WasmEdge_FunctionInstanceDelete`\n to destroy it if the returned object is not added into a\n `WasmEdge_ModuleInstanceContext`. The following is an example to create a\n host function context.\n ```c\n WasmEdge_Result FuncAdd(void *Data,\n                         const WasmEdge_CallingFrameContext *CallFrameCxt,\n                         const WasmEdge_Value *In, WasmEdge_Value *Out) {\n   // Function to return A + B.\n   int32_t A = WasmEdge_ValueGetI32(In[0]);\n   int32_t B = WasmEdge_ValueGetI32(In[1]);\n   Out[0] = WasmEdge_ValueGenI32(A + B);\n   // Return execution status\n   return WasmEdge_Result_Success;\n }\n\n WasmEdge_ValType Params[2] = {WasmEdge_ValTypeGenI32(),\n                               WasmEdge_ValTypeGenI32()};\n WasmEdge_ValType Returns[1] = {WasmEdge_ValTypeGenI32()};\n WasmEdge_FunctionTypeContext *FuncType =\n     WasmEdge_FunctionTypeCreate(Params, 2, Returns, 1);\n WasmEdge_FunctionInstanceContext *HostFunc =\n     WasmEdge_FunctionInstanceCreate(FuncType, FuncAdd, NULL, 0);\n WasmEdge_FunctionTypeDelete(FuncType);\n ...\n ```\n\n \\param Type the function type context to describe the host function\n signature.\n \\param HostFunc the host function pointer. The host function signature must\n be as following:\n ```c\n typedef WasmEdge_Result (*WasmEdge_HostFunc_t)(\n     void *Data,\n     const WasmEdge_CallingFrameContext *CallFrameCxt,\n     const WasmEdge_Value *Params,\n     WasmEdge_Value *Returns);\n ```\n The `Params` is the input parameters array with length guaranteed to be the\n same as the parameter types in the `Type`. The `Returns` is the output\n results array with length guaranteed to be the same as the result types in\n the `Type`. The return value is `WasmEdge_Result` for the execution status.\n \\param Data the additional object, such as the pointer to a data structure,\n to set to this host function context. The caller should guarantee the life\n cycle of the object. NULL if the additional data object is not needed.\n \\param Cost the function cost in statistics. Pass 0 if the calculation is\n not needed.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_FunctionInstanceCreate (Type : * const WasmEdge_FunctionTypeContext , HostFunc : WasmEdge_HostFunc_t , Data : * mut :: std :: os :: raw :: c_void , Cost : u64) -> * mut WasmEdge_FunctionInstanceContext ; } pub type WasmEdge_WrapFunc_t = :: std :: option :: Option < unsafe extern "C" fn (This : * mut :: std :: os :: raw :: c_void , Data : * mut :: std :: os :: raw :: c_void , CallFrameCxt : * const WasmEdge_CallingFrameContext , Params : * const WasmEdge_Value , ParamLen : u32 , Returns : * mut WasmEdge_Value , ReturnLen : u32) -> WasmEdge_Result > ; extern "C" { # [doc = " Creation of the WasmEdge_FunctionInstanceContext for host functions.\n\n This function is for the languages which cannot pass the function pointer of\n the host function into this shared library directly. The caller owns the\n object and should call `WasmEdge_FunctionInstanceDelete` to destroy it if\n the returned object is not added into a `WasmEdge_ModuleInstanceContext`.\n The following is an example to create a host function context for other\n languages.\n ```c\n // `RealFunc` is the pointer to the function in other languages.\n\n WasmEdge_Result FuncAddWrap(\n     void *This, void *Data,\n     const WasmEdge_CallingFrameContext *CallFrameCxt,\n     const WasmEdge_Value *In, const uint32_t InLen, WasmEdge_Value *Out,\n     const uint32_t OutLen) {\n   // Wrapper function of host function to return A + B.\n\n   // `This` is the same as `RealFunc`.\n   int32_t A = WasmEdge_ValueGetI32(In[0]);\n   int32_t B = WasmEdge_ValueGetI32(In[1]);\n\n   // Call the function of `This` in the host language ...\n   int32_t Result = ...;\n\n   Out[0] = Result;\n   // Return the execution status.\n   return WasmEdge_Result_Success;\n }\n\n WasmEdge_ValType Params[2] = {WasmEdge_ValTypeGenI32(),\n                               WasmEdge_ValTypeGenI32()};\n WasmEdge_ValType Returns[1] = {WasmEdge_ValTypeGenI32()};\n WasmEdge_FunctionTypeContext *FuncType =\n     WasmEdge_FunctionTypeCreate(Params, 2, Returns, 1);\n WasmEdge_FunctionInstanceContext *HostFunc =\n     WasmEdge_FunctionInstanceCreateBinding(\n         FuncType, FuncAddWrap, RealFunc, NULL, 0);\n WasmEdge_FunctionTypeDelete(FuncType);\n ...\n ```\n\n \\param Type the function type context to describe the host function\n signature.\n \\param WrapFunc the wrapper function pointer. The wrapper function signature\n must be as following:\n ```c\n typedef WasmEdge_Result (*WasmEdge_WrapFunc_t)(\n     void *This,\n     void *Data,\n     WasmEdge_CallingFrameContext *FrameCxt,\n     const WasmEdge_Value *Params,\n     const uint32_t ParamLen,\n     WasmEdge_Value *Returns,\n     const uint32_t ReturnLen);\n ```\n The `This` is the pointer the same as the `Binding` parameter of this\n function. The `Params` is the input parameters array with length guaranteed\n to be the same as the parameter types in the `Type`, and the `ParamLen` is\n the length of the array. The `Returns` is the output results array with\n length guaranteed to be the same as the result types in the `Type`, and the\n `ReturnLen` is the length of the array. The return value is\n `WasmEdge_Result` for the execution status.\n \\param Binding the `this` pointer of the host function target or the\n function indexing maintained by the caller which can specify the host\n function. When invoking the host function, this pointer will be the first\n argument of the wrapper function.\n \\param Data the additional object, such as the pointer to a data structure,\n to set to this host function context. The caller should guarantee the life\n cycle of the object. NULL if the additional data object is not needed.\n \\param Cost the function cost in statistics. Pass 0 if the calculation is\n not needed.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_FunctionInstanceCreateBinding (Type : * const WasmEdge_FunctionTypeContext , WrapFunc : WasmEdge_WrapFunc_t , Binding : * mut :: std :: os :: raw :: c_void , Data : * mut :: std :: os :: raw :: c_void , Cost : u64) -> * mut WasmEdge_FunctionInstanceContext ; } extern "C" { # [doc = " Get the function data field of the function instance.\n\n The function data is passed when creating the FunctionInstance.\n\n \\param Cxt the WasmEdge_FunctionInstanceContext.\n\n \\returns pointer to Data, NULL if failed."] pub fn WasmEdge_FunctionInstanceGetData (Cxt : * const WasmEdge_FunctionInstanceContext) -> * const :: std :: os :: raw :: c_void ; } extern "C" { # [doc = " Get the function type context of the function instance.\n\n The function type context links to the function type in the function\n instance context and owned by the context. The caller should __NOT__ call\n the `WasmEdge_FunctionTypeDelete`.\n\n \\param Cxt the WasmEdge_FunctionInstanceContext.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_FunctionInstanceGetFunctionType (Cxt : * const WasmEdge_FunctionInstanceContext) -> * const WasmEdge_FunctionTypeContext ; } extern "C" { # [doc = " Deletion of the WasmEdge_FunctionInstanceContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_FunctionInstanceContext to destroy."] pub fn WasmEdge_FunctionInstanceDelete (Cxt : * mut WasmEdge_FunctionInstanceContext) ; } extern "C" { # [doc = " Creation of the WasmEdge_TableInstanceContext.\n\n The caller owns the object and should call `WasmEdge_TableInstanceDelete` to\n destroy it if the returned object is not added into a\n `WasmEdge_ModuleInstanceContext`.\n The default value of the elements in the output table instance will be null\n references with the same reference type in the table type when table grows.\n If the reference type of the input table type is a non-nullable value type,\n a non-null default init value is required. In this case, please use the\n `WasmEdge_TableInstanceCreateWithInit` API instead.\n\n \\param TabType the table type context to initialize the table instance\n context.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_TableInstanceCreate (TabType : * const WasmEdge_TableTypeContext) -> * mut WasmEdge_TableInstanceContext ; } extern "C" { # [doc = " Creation of the WasmEdge_TableInstanceContext with the default init value.\n\n The caller owns the object and should call `WasmEdge_TableInstanceDelete` to\n destroy it if the returned object is not added into a\n `WasmEdge_ModuleInstanceContext`.\n The value type of the default init value should compatible with the\n reference type of the input table type, otherwise this function will fail.\n If the reference type of the input table type is a non-nullable value type,\n this function will fail if the default init value is a null reference.\n\n \\param TabType the table type context to initialize the table instance\n context.\n \\param Value the default init value for the table element when table\n grows.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_TableInstanceCreateWithInit (TabType : * const WasmEdge_TableTypeContext , Value : WasmEdge_Value) -> * mut WasmEdge_TableInstanceContext ; } extern "C" { # [doc = " Get the table type context from a table instance.\n\n The table type context links to the table type in the table instance context\n and owned by the context. The caller should __NOT__ call the\n `WasmEdge_TableTypeDelete`.\n\n \\param Cxt the WasmEdge_TableInstanceContext.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_TableInstanceGetTableType (Cxt : * const WasmEdge_TableInstanceContext) -> * const WasmEdge_TableTypeContext ; } extern "C" { # [doc = " Get the reference value in a table instance.\n\n \\param Cxt the WasmEdge_TableInstanceContext.\n \\param [out] Data the result reference value.\n \\param Offset the reference value offset (index) in the table instance.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_TableInstanceGetData (Cxt : * const WasmEdge_TableInstanceContext , Data : * mut WasmEdge_Value , Offset : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Set the reference value into a table instance.\n\n \\param Cxt the WasmEdge_TableInstanceContext.\n \\param Data the reference value to set into the table instance.\n \\param Offset the reference value offset (index) in the table instance.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_TableInstanceSetData (Cxt : * mut WasmEdge_TableInstanceContext , Data : WasmEdge_Value , Offset : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Get the size of a table instance.\n\n \\param Cxt the WasmEdge_TableInstanceContext.\n\n \\returns the size of the table instance."] pub fn WasmEdge_TableInstanceGetSize (Cxt : * const WasmEdge_TableInstanceContext) -> u32 ; } extern "C" { # [doc = " Grow a table instance with a size.\n\n \\param Cxt the WasmEdge_TableInstanceContext.\n \\param Size the count of reference values to grow in the table instance.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_TableInstanceGrow (Cxt : * mut WasmEdge_TableInstanceContext , Size : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Deletion of the WasmEdge_TableInstanceContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_TableInstanceContext to destroy."] pub fn WasmEdge_TableInstanceDelete (Cxt : * mut WasmEdge_TableInstanceContext) ; } extern "C" { # [doc = " Creation of the WasmEdge_MemoryInstanceContext.\n\n The caller owns the object and should call `WasmEdge_MemoryInstanceDelete`\n to destroy it if the returned object is not added into a\n `WasmEdge_ModuleInstanceContext`.\n\n \\param MemType the memory type context to initialize the memory instance\n context.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_MemoryInstanceCreate (MemType : * const WasmEdge_MemoryTypeContext) -> * mut WasmEdge_MemoryInstanceContext ; } extern "C" { # [doc = " Get the memory type context from a memory instance.\n\n The memory type context links to the memory type in the memory instance\n context and owned by the context. The caller should __NOT__ call the\n `WasmEdge_MemoryTypeDelete`.\n\n \\param Cxt the WasmEdge_MemoryInstanceContext.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_MemoryInstanceGetMemoryType (Cxt : * const WasmEdge_MemoryInstanceContext) -> * const WasmEdge_MemoryTypeContext ; } extern "C" { # [doc = " Copy the data to the output buffer from a memory instance.\n\n \\param Cxt the WasmEdge_MemoryInstanceContext.\n \\param [out] Data the result data buffer of copying destination.\n \\param Offset the data start offset in the memory instance.\n \\param Length the requested data length. If the `Offset + Length` is larger\n than the data size in the memory instance, this function will failed.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_MemoryInstanceGetData (Cxt : * const WasmEdge_MemoryInstanceContext , Data : * mut u8 , Offset : u32 , Length : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Copy the data into a memory instance from the input buffer.\n\n \\param Cxt the WasmEdge_MemoryInstanceContext.\n \\param Data the data buffer to copy.\n \\param Offset the data start offset in the memory instance.\n \\param Length the data buffer length. If the `Offset + Length` is larger\n than the data size in the memory instance, this function will failed.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_MemoryInstanceSetData (Cxt : * mut WasmEdge_MemoryInstanceContext , Data : * const u8 , Offset : u32 , Length : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Get the data pointer in a memory instance.\n\n \\param Cxt the WasmEdge_MemoryInstanceContext.\n \\param Offset the data start offset in the memory instance.\n \\param Length the requested data length. If the `Offset + Length` is larger\n than the data size in the memory instance, this function will return NULL.\n\n \\returns the pointer to data with the start offset. NULL if failed."] pub fn WasmEdge_MemoryInstanceGetPointer (Cxt : * mut WasmEdge_MemoryInstanceContext , Offset : u32 , Length : u32) -> * mut u8 ; } extern "C" { # [doc = " Get the const data pointer in a const memory instance.\n\n \\param Cxt the WasmEdge_MemoryInstanceContext.\n \\param Offset the data start offset in the memory instance.\n \\param Length the requested data length. If the `Offset + Length` is larger\n than the data size in the memory instance, this function will return NULL.\n\n \\returns the pointer to data with the start offset. NULL if failed."] pub fn WasmEdge_MemoryInstanceGetPointerConst (Cxt : * const WasmEdge_MemoryInstanceContext , Offset : u32 , Length : u32) -> * const u8 ; } extern "C" { # [doc = " Get the current page size (64 KiB of each page) of a memory instance.\n\n \\param Cxt the WasmEdge_MemoryInstanceContext.\n\n \\returns the page size of the memory instance."] pub fn WasmEdge_MemoryInstanceGetPageSize (Cxt : * const WasmEdge_MemoryInstanceContext) -> u32 ; } extern "C" { # [doc = " Grow a memory instance with a page size.\n\n \\param Cxt the WasmEdge_MemoryInstanceContext.\n \\param Page the page count to grow in the memory instance.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_MemoryInstanceGrowPage (Cxt : * mut WasmEdge_MemoryInstanceContext , Page : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Deletion of the WasmEdge_MemoryInstanceContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_MemoryInstanceContext to destroy."] pub fn WasmEdge_MemoryInstanceDelete (Cxt : * mut WasmEdge_MemoryInstanceContext) ; } extern "C" { # [doc = " Get the tag type context from a tag instance.\n\n The tag type context links to the tag type in the tag instance\n context and owned by the context.\n\n \\param Cxt the WasmEdge_TagInstanceContext.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_TagInstanceGetTagType (Cxt : * const WasmEdge_TagInstanceContext) -> * const WasmEdge_TagTypeContext ; } extern "C" { # [doc = " Creation of the WasmEdge_GlobalInstanceContext.\n\n The caller owns the object and should call `WasmEdge_GlobalInstanceDelete`\n to destroy it if the returned object is not added into a\n `WasmEdge_ModuleInstanceContext`.\n\n \\param GlobType the global type context to initialize the global instance\n context.\n \\param Value the initial value with its value type of the global instance.\n This function will fail if the value type of `GlobType` and `Value` are not\n the same.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_GlobalInstanceCreate (GlobType : * const WasmEdge_GlobalTypeContext , Value : WasmEdge_Value) -> * mut WasmEdge_GlobalInstanceContext ; } extern "C" { # [doc = " Get the global type context from a global instance.\n\n The global type context links to the global type in the global instance\n context and owned by the context. The caller should __NOT__ call the\n `WasmEdge_GlobalTypeDelete`.\n\n \\param Cxt the WasmEdge_GlobalInstanceContext.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_GlobalInstanceGetGlobalType (Cxt : * const WasmEdge_GlobalInstanceContext) -> * const WasmEdge_GlobalTypeContext ; } extern "C" { # [doc = " Get the value from a global instance.\n\n \\param Cxt the WasmEdge_GlobalInstanceContext.\n\n \\returns the current value of the global instance."] pub fn WasmEdge_GlobalInstanceGetValue (Cxt : * const WasmEdge_GlobalInstanceContext) -> WasmEdge_Value ; } extern "C" { # [doc = " Set the value into a global instance.\n\n This function will return error if the global context is set as the `Const`\n mutation or the value type not matched.\n\n \\param Cxt the WasmEdge_GlobalInstanceContext.\n \\param Value the value to set into the global context.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_GlobalInstanceSetValue (Cxt : * mut WasmEdge_GlobalInstanceContext , Value : WasmEdge_Value) -> WasmEdge_Result ; } extern "C" { # [doc = " Deletion of the WasmEdge_GlobalInstanceContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_GlobalInstanceContext to destroy."] pub fn WasmEdge_GlobalInstanceDelete (Cxt : * mut WasmEdge_GlobalInstanceContext) ; } extern "C" { # [doc = " Get the executor context from the current calling frame.\n\n \\param Cxt the WasmEdge_CallingFrameContext.\n\n \\returns the executor context, NULL if the Cxt is NULL."] pub fn WasmEdge_CallingFrameGetExecutor (Cxt : * const WasmEdge_CallingFrameContext) -> * mut WasmEdge_ExecutorContext ; } extern "C" { # [doc = " Get the module instance of the current calling frame.\n\n When a WASM function is executing and start to call a host function, a frame\n with the module instance which the WASM function belongs to will be pushed\n onto the stack. And therefore the calling frame context will record that\n module instance.\n So in one case that the module instance will be `NULL`: developers execute\n the function instance which is a host function and not added into a module\n instance.\n\n \\param Cxt the WasmEdge_CallingFrameContext.\n\n \\returns the module instance of the current calling frame."] pub fn WasmEdge_CallingFrameGetModuleInstance (Cxt : * const WasmEdge_CallingFrameContext) -> * const WasmEdge_ModuleInstanceContext ; } extern "C" { # [doc = " Get the memory instance by index from the module instance of the current\n calling frame.\n\n By default, a WASM module only have one memory instance after instantiation.\n Therefore, developers can use:\n   `WasmEdge_CallingFrameGetMemoryInstance(Cxt, 0)`\n to get the memory instance in host function body.\n This extension is for the WASM multiple memories proposal. After enabling\n the proposal, there may be greater than 1 memory instances in a WASM module.\n So developers can use this function to access the memory instances which are\n not in 0 index.\n\n \\param Cxt the WasmEdge_CallingFrameContext.\n \\param Idx the index of memory instance in the module instance.\n\n \\returns the memory instance, NULL if not found."] pub fn WasmEdge_CallingFrameGetMemoryInstance (Cxt : * const WasmEdge_CallingFrameContext , Idx : u32) -> * mut WasmEdge_MemoryInstanceContext ; } extern "C" { # [doc = " Wait a WasmEdge_Async execution.\n\n \\param Cxt the WasmEdge_ASync."] pub fn WasmEdge_AsyncWait (Cxt : * const WasmEdge_Async) ; } extern "C" { # [doc = " Wait a WasmEdge_Async execution with timeout.\n\n \\param Cxt the WasmEdge_ASync.\n \\param Milliseconds times to wait.\n\n \\returns Result of waiting, true for execution ended, false for timeout\n occurred."] pub fn WasmEdge_AsyncWaitFor (Cxt : * const WasmEdge_Async , Milliseconds : u64) -> bool ; } extern "C" { # [doc = " Cancel a WasmEdge_Async execution.\n\n \\param Cxt the WasmEdge_ASync."] pub fn WasmEdge_AsyncCancel (Cxt : * mut WasmEdge_Async) ; } extern "C" { # [doc = " Wait and get the return list length of the WasmEdge_Async execution.\n\n This function will wait until the execution finished and return the return\n value list length of the executed function. This function will return 0 if\n the `Cxt` is NULL, the execution was failed, or the execution was canceled.\n Developers can call the `WasmEdge_AsyncGet` to get the execution status and\n the return values.\n\n \\param Cxt the WasmEdge_ASync.\n\n \\returns the return list length of the executed function."] pub fn WasmEdge_AsyncGetReturnsLength (Cxt : * const WasmEdge_Async) -> u32 ; } extern "C" { # [doc = " Wait and get the result of WasmEdge_Async execution.\n\n This function will wait until the execution finished and return the\n execution status and the return values.\n If the `Returns` buffer length is smaller than the arity of the function,\n the overflowed return values will be discarded.\n\n \\param Cxt the WasmEdge_ASync.\n \\param [out] Returns the WasmEdge_Value buffer to fill the return values.\n \\param ReturnLen the return buffer length.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_AsyncGet (Cxt : * const WasmEdge_Async , Returns : * mut WasmEdge_Value , ReturnLen : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Deletion of the WasmEdge_Async.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_ASync to destroy."] pub fn WasmEdge_AsyncDelete (Cxt : * mut WasmEdge_Async) ; } extern "C" { # [doc = " Creation of the WasmEdge_VMContext.\n\n The caller owns the object and should call `WasmEdge_VMDelete` to destroy\n it.\n\n \\param ConfCxt the WasmEdge_ConfigureContext as the configuration of VM.\n NULL for the default configuration.\n \\param StoreCxt the WasmEdge_StoreContext as the external WASM store of VM.\n The instantiation and execution will refer to this store context, and the\n life cycle should be ensured until the VM context is deleted. NULL for the\n default store owned by `WasmEdge_VMContext`.\n\n \\returns pointer to context, NULL if failed."] pub fn WasmEdge_VMCreate (ConfCxt : * const WasmEdge_ConfigureContext , StoreCxt : * mut WasmEdge_StoreContext) -> * mut WasmEdge_VMContext ; } extern "C" { # [doc = " Register and instantiate WASM into the store in VM from a WASM file.\n\n Load a WASM file from the path, and register all exported instances and\n instantiate them into the store into the VM with their exported name and\n module name.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext which contains the store.\n \\param ModuleName the WasmEdge_String of module name for all exported\n instances.\n \\param Path the NULL-terminated C string of the WASM file path.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMRegisterModuleFromFile (Cxt : * mut WasmEdge_VMContext , ModuleName : WasmEdge_String , Path : * const :: std :: os :: raw :: c_char) -> WasmEdge_Result ; } extern "C" { # [doc = " Register and instantiate WASM into the store in VM from a buffer.\n\n CAUTION: This function will be deprecated and replaced by\n `WasmEdge_VMRegisterModuleFromBytes()` API in the future.\n\n Load a WASM module from a buffer, and register all exported instances and\n instantiate them into the store into the VM with their exported name and\n module name.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext which contains the store.\n \\param ModuleName the WasmEdge_String of module name for all exported\n instances.\n \\param Buf the buffer of WASM binary.\n \\param BufLen the length of the buffer.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMRegisterModuleFromBuffer (Cxt : * mut WasmEdge_VMContext , ModuleName : WasmEdge_String , Buf : * const u8 , BufLen : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Register and instantiate WASM into the store in VM from a WasmEdge_Bytes.\n\n Load a WASM module from a WasmEdge_Bytes, and register all exported\n instances and instantiate them into the store into the VM with their\n exported name and module name.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext which contains the store.\n \\param ModuleName the WasmEdge_String of module name for all exported\n instances.\n \\param Bytes the WasmEdge_Bytes of WASM binary.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMRegisterModuleFromBytes (Cxt : * mut WasmEdge_VMContext , ModuleName : WasmEdge_String , Bytes : WasmEdge_Bytes) -> WasmEdge_Result ; } extern "C" { # [doc = " Instantiate and register an AST Module into a named module instance in VM.\n\n Load from the AST Module, and register all exported instances and\n instantiate them into the store in VM with their exported name and module\n name.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext which contains the store.\n \\param ModuleName the WasmEdge_String of module name for all exported\n instances.\n \\param ASTCxt the WasmEdge AST Module context generated by loader or\n compiler.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMRegisterModuleFromASTModule (Cxt : * mut WasmEdge_VMContext , ModuleName : WasmEdge_String , ASTCxt : * const WasmEdge_ASTModuleContext) -> WasmEdge_Result ; } extern "C" { # [doc = " Register a module instance into the store in VM with exporting its module\n name.\n\n After calling this function, the existing module instance will be registered\n into the store context in this VM, and the other modules can import the\n exported instances for linking when instantiation. Developers SHOULD\n guarantee the life cycle of this existing module instance, or the error will\n occur when in execution after the module instance being destroyed if it has\n been imported by other modules. That is, developers should call the\n `WasmEdge_ModuleInstanceDelete` if this existing module instance will not be\n used anymore or after the deletion of this VM. When the module instance is\n deleted, it will be unregistered to the store context in this VM\n automatically.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext which contains the store.\n \\param ImportCxt the WasmEdge_ModuleInstanceContext to register.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMRegisterModuleFromImport (Cxt : * mut WasmEdge_VMContext , ImportCxt : * const WasmEdge_ModuleInstanceContext) -> WasmEdge_Result ; } extern "C" { # [doc = " Instantiate the WASM module from a WASM file and invoke a function by name.\n\n This is the function to invoke a WASM function rapidly.\n Load and instantiate the WASM module from the file path, and then invoke a\n function by name and parameters. If the `Returns` buffer length is smaller\n than the arity of the function, the overflowed return values will be\n discarded.\n After calling this function, a new anonymous module instance owned by VM is\n instantiated, and the old one will be destroyed.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param Path the NULL-terminated C string of the WASM file path.\n \\param FuncName the function name WasmEdge_String.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n \\param [out] Returns the WasmEdge_Value buffer to fill the return values.\n \\param ReturnLen the return buffer length.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMRunWasmFromFile (Cxt : * mut WasmEdge_VMContext , Path : * const :: std :: os :: raw :: c_char , FuncName : WasmEdge_String , Params : * const WasmEdge_Value , ParamLen : u32 , Returns : * mut WasmEdge_Value , ReturnLen : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Instantiate the WASM module from a buffer and invoke a function by name.\n\n CAUTION: This function will be deprecated and replaced by\n `WasmEdge_VMRunWasmFromBytes()` API in the future.\n\n This is the function to invoke a WASM function rapidly.\n Load and instantiate the WASM module from a buffer, and then invoke a\n function by name and parameters. If the `Returns` buffer length is smaller\n than the arity of the function, the overflowed return values will be\n discarded.\n After calling this function, a new anonymous module instance owned by VM is\n instantiated, and the old one will be destroyed.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param Buf the buffer of WASM binary.\n \\param BufLen the length of the buffer.\n \\param FuncName the function name WasmEdge_String.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n \\param [out] Returns the WasmEdge_Value buffer to fill the return values.\n \\param ReturnLen the return buffer length.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMRunWasmFromBuffer (Cxt : * mut WasmEdge_VMContext , Buf : * const u8 , BufLen : u32 , FuncName : WasmEdge_String , Params : * const WasmEdge_Value , ParamLen : u32 , Returns : * mut WasmEdge_Value , ReturnLen : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Instantiate the WASM module from a WasmEdge_Bytes and invoke a function by\n name.\n\n This is the function to invoke a WASM function rapidly.\n Load and instantiate the WASM module from a WasmEdge_Bytes, and then invoke\n a function by name and parameters. If the `Returns` buffer length is smaller\n than the arity of the function, the overflowed return values will be\n discarded.\n After calling this function, a new anonymous module instance owned by VM is\n instantiated, and the old one will be destroyed.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param Bytes the WasmEdge_Bytes of WASM binary.\n \\param FuncName the function name WasmEdge_String.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n \\param [out] Returns the WasmEdge_Value buffer to fill the return values.\n \\param ReturnLen the return buffer length.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMRunWasmFromBytes (Cxt : * mut WasmEdge_VMContext , Bytes : WasmEdge_Bytes , FuncName : WasmEdge_String , Params : * const WasmEdge_Value , ParamLen : u32 , Returns : * mut WasmEdge_Value , ReturnLen : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Instantiate the WASM module from a WasmEdge AST Module and invoke a function\n by name.\n\n This is the function to invoke a WASM function rapidly.\n Load and instantiate the WASM module from the WasmEdge AST Module, and then\n invoke the function by name and parameters. If the `Returns` buffer length\n is smaller than the arity of the function, the overflowed return values will\n be discarded.\n After calling this function, a new anonymous module instance owned by VM is\n instantiated, and the old one will be destroyed.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param ASTCxt the WasmEdge AST Module context generated by loader or\n compiler.\n \\param FuncName the function name WasmEdge_String.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n \\param [out] Returns the WasmEdge_Value buffer to fill the return values.\n \\param ReturnLen the return buffer length.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMRunWasmFromASTModule (Cxt : * mut WasmEdge_VMContext , ASTCxt : * const WasmEdge_ASTModuleContext , FuncName : WasmEdge_String , Params : * const WasmEdge_Value , ParamLen : u32 , Returns : * mut WasmEdge_Value , ReturnLen : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Instantiate the WASM module from a WASM file and asynchronous invoke a\n function by name.\n\n This is the function to invoke a WASM function rapidly.\n Load and instantiate the WASM module from the file path, and then invoke a\n function by name and parameters. If the `Returns` buffer length is smaller\n than the arity of the function, the overflowed return values will be\n discarded.\n After calling this function, a new anonymous module instance owned by VM is\n instantiated, and the old one will be destroyed.\n\n The caller owns the object and should call `WasmEdge_AsyncDelete` to destroy\n it.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param Path the NULL-terminated C string of the WASM file path.\n \\param FuncName the function name WasmEdge_String.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n\n \\returns WasmEdge_Async. Call `WasmEdge_AsyncGet` for the result, and call\n `WasmEdge_AsyncDelete` to destroy this object."] pub fn WasmEdge_VMAsyncRunWasmFromFile (Cxt : * mut WasmEdge_VMContext , Path : * const :: std :: os :: raw :: c_char , FuncName : WasmEdge_String , Params : * const WasmEdge_Value , ParamLen : u32) -> * mut WasmEdge_Async ; } extern "C" { # [doc = " Instantiate the WASM module from a buffer and asynchronous invoke a function\n by name.\n\n CAUTION: This function will be deprecated and replaced by\n `WasmEdge_VMAsyncRunWasmFromBytes()` API in the future.\n\n This is the function to invoke a WASM function rapidly.\n Load and instantiate the WASM module from a buffer, and then invoke a\n function by name and parameters. If the `Returns` buffer length is smaller\n than the arity of the function, the overflowed return values will be\n discarded.\n After calling this function, a new anonymous module instance owned by VM is\n instantiated, and the old one will be destroyed.\n\n The caller owns the object and should call `WasmEdge_AsyncDelete` to destroy\n it.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param Buf the buffer of WASM binary.\n \\param BufLen the length of the buffer.\n \\param FuncName the function name WasmEdge_String.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n\n \\returns WasmEdge_Async. Call `WasmEdge_AsyncGet` for the result, and call\n `WasmEdge_AsyncDelete` to destroy this object."] pub fn WasmEdge_VMAsyncRunWasmFromBuffer (Cxt : * mut WasmEdge_VMContext , Buf : * const u8 , BufLen : u32 , FuncName : WasmEdge_String , Params : * const WasmEdge_Value , ParamLen : u32) -> * mut WasmEdge_Async ; } extern "C" { # [doc = " Instantiate the WASM module from a WasmEdge_Bytes and asynchronous invoke a\n function by name.\n\n This is the function to invoke a WASM function rapidly.\n Load and instantiate the WASM module from a WasmEdge_Bytes, and then invoke\n a function by name and parameters. If the `Returns` buffer length is smaller\n than the arity of the function, the overflowed return values will be\n discarded.\n After calling this function, a new anonymous module instance owned by VM is\n instantiated, and the old one will be destroyed.\n\n The caller owns the object and should call `WasmEdge_AsyncDelete` to destroy\n it.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param Bytes the WasmEdge_Bytes of WASM binary.\n \\param FuncName the function name WasmEdge_String.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n\n \\returns WasmEdge_Async. Call `WasmEdge_AsyncGet` for the result, and call\n `WasmEdge_AsyncDelete` to destroy this object."] pub fn WasmEdge_VMAsyncRunWasmFromBytes (Cxt : * mut WasmEdge_VMContext , Bytes : WasmEdge_Bytes , FuncName : WasmEdge_String , Params : * const WasmEdge_Value , ParamLen : u32) -> * mut WasmEdge_Async ; } extern "C" { # [doc = " Instantiate the WASM module from a WasmEdge AST Module and asynchronous\n invoke a function by name.\n\n This is the function to invoke a WASM function rapidly.\n Load and instantiate the WASM module from the WasmEdge AST Module, and then\n invoke the function by name and parameters. If the `Returns` buffer length\n is smaller than the arity of the function, the overflowed return values will\n be discarded.\n After calling this function, a new anonymous module instance owned by VM is\n instantiated, and the old one will be destroyed.\n\n The caller owns the object and should call `WasmEdge_AsyncDelete` to destroy\n it.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param ASTCxt the WasmEdge AST Module context generated by loader or\n compiler.\n \\param FuncName the function name WasmEdge_String.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n\n \\returns WasmEdge_Async. Call `WasmEdge_AsyncGet` for the result, and call\n `WasmEdge_AsyncDelete` to destroy this object."] pub fn WasmEdge_VMAsyncRunWasmFromASTModule (Cxt : * mut WasmEdge_VMContext , ASTCxt : * const WasmEdge_ASTModuleContext , FuncName : WasmEdge_String , Params : * const WasmEdge_Value , ParamLen : u32) -> * mut WasmEdge_Async ; } extern "C" { # [doc = " Load the WASM module from a WASM file.\n\n This is the first step to invoke a WASM function step by step.\n Load and parse the WASM module from the file path. You can then call\n `WasmEdge_VMValidate` for the next step.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param Path the NULL-terminated C string of the WASM file path.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMLoadWasmFromFile (Cxt : * mut WasmEdge_VMContext , Path : * const :: std :: os :: raw :: c_char) -> WasmEdge_Result ; } extern "C" { # [doc = " Load the WASM module from a buffer.\n\n CAUTION: This function will be deprecated and replaced by\n `WasmEdge_VMLoadWasmFromBytes()` API in the future.\n\n This is the first step to invoke a WASM function step by step.\n Load and parse the WASM module from a buffer. You can then call\n `WasmEdge_VMValidate` for the next step.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param Buf the buffer of WASM binary.\n \\param BufLen the length of the buffer.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMLoadWasmFromBuffer (Cxt : * mut WasmEdge_VMContext , Buf : * const u8 , BufLen : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Load the WASM module from a WasmEdge_Bytes.\n\n This is the first step to invoke a WASM function step by step.\n Load and parse the WASM module from a WasmEdge_Bytes. You can then call\n `WasmEdge_VMValidate` for the next step.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param Bytes the WasmEdge_Bytes of WASM binary.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMLoadWasmFromBytes (Cxt : * mut WasmEdge_VMContext , Bytes : WasmEdge_Bytes) -> WasmEdge_Result ; } extern "C" { # [doc = " Load the WASM module from loaded WasmEdge AST Module.\n\n This is the first step to invoke a WASM function step by step.\n Copy the loaded WasmEdge AST Module context into VM. The VM context has no\n dependency on the input AST Module context. You can then call\n `WasmEdge_VMValidate` for the next step.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param ASTCxt the WasmEdge AST Module context generated by loader or\n compiler.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMLoadWasmFromASTModule (Cxt : * mut WasmEdge_VMContext , ASTCxt : * const WasmEdge_ASTModuleContext) -> WasmEdge_Result ; } extern "C" { # [doc = " Validate the WASM module loaded into the VM context.\n\n This is the second step to invoke a WASM function step by step.\n After loading a WASM module into VM context, You can call this function to\n validate it. And you can then call `WasmEdge_VMInstantiate` for the next\n step. Note that only validated WASM modules can be instantiated in the VM\n context.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMValidate (Cxt : * mut WasmEdge_VMContext) -> WasmEdge_Result ; } extern "C" { # [doc = " Instantiate the validated WASM module in the VM context.\n\n This is the third step to invoke a WASM function step by step.\n After validating a WASM module in the VM context, You can call this function\n to instantiate it. And you can then call `WasmEdge_VMExecute` for invoking\n the exported function in this WASM module.\n After calling this function, a new anonymous module instance owned by VM is\n instantiated, and the old one will be destroyed.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMInstantiate (Cxt : * mut WasmEdge_VMContext) -> WasmEdge_Result ; } extern "C" { # [doc = " Invoke a WASM function by name.\n\n This is the final step to invoke a WASM function step by step.\n After instantiating a WASM module in the VM context, the WASM module is\n registered into the store in the VM context as an anonymous module. Then you\n can repeatedly call this function to invoke the exported WASM functions by\n their names until the VM context is reset or a new WASM module is registered\n or loaded. For calling the functions in registered WASM modules with module\n names, please use `WasmEdge_VMExecuteRegistered` instead. If the `Returns`\n buffer length is smaller than the arity of the function, the overflowed\n return values will be discarded.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param FuncName the function name WasmEdge_String.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n \\param [out] Returns the WasmEdge_Value buffer to fill the return values.\n \\param ReturnLen the return buffer length.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMExecute (Cxt : * mut WasmEdge_VMContext , FuncName : WasmEdge_String , Params : * const WasmEdge_Value , ParamLen : u32 , Returns : * mut WasmEdge_Value , ReturnLen : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Invoke a WASM function by its module name and function name.\n\n After registering a WASM module in the VM context, you can repeatedly call\n this function to invoke exported WASM functions by their module names and\n function names until the VM context is reset. If the `Returns` buffer length\n is smaller than the arity of the function, the overflowed return values will\n be discarded.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param ModuleName the module name WasmEdge_String.\n \\param FuncName the function name WasmEdge_String.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n \\param [out] Returns the WasmEdge_Value buffer to fill the return values.\n \\param ReturnLen the return buffer length.\n\n \\returns WasmEdge_Result. Call `WasmEdge_ResultGetMessage` for the error\n message."] pub fn WasmEdge_VMExecuteRegistered (Cxt : * mut WasmEdge_VMContext , ModuleName : WasmEdge_String , FuncName : WasmEdge_String , Params : * const WasmEdge_Value , ParamLen : u32 , Returns : * mut WasmEdge_Value , ReturnLen : u32) -> WasmEdge_Result ; } extern "C" { # [doc = " Asynchronous invoke a WASM function by name.\n\n This is the final step to invoke a WASM function step by step.\n After instantiating a WASM module in the VM context, the WASM module is\n registered into the store in the VM context as an anonymous module. Then you\n can repeatedly call this function to invoke the exported WASM functions by\n their names until the VM context is reset or a new WASM module is registered\n or loaded. For calling the functions in registered WASM modules with module\n names, please use `WasmEdge_VMAsyncExecuteRegistered` instead.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param FuncName the function name WasmEdge_String.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n\n \\returns WasmEdge_Async. Call `WasmEdge_AsyncGet` for the result, and call\n `WasmEdge_AsyncDelete` to destroy this object."] pub fn WasmEdge_VMAsyncExecute (Cxt : * mut WasmEdge_VMContext , FuncName : WasmEdge_String , Params : * const WasmEdge_Value , ParamLen : u32) -> * mut WasmEdge_Async ; } extern "C" { # [doc = " Asynchronous invoke a WASM function by its module name and function name.\n\n After registering a WASM module in the VM context, you can repeatedly call\n this function to invoke exported WASM functions by their module names and\n function names until the VM context is reset.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param ModuleName the module name WasmEdge_String.\n \\param FuncName the function name WasmEdge_String.\n \\param Params the WasmEdge_Value buffer with the parameter values.\n \\param ParamLen the parameter buffer length.\n\n \\returns WasmEdge_Async. Call `WasmEdge_AsyncGet` for the result, and call\n `WasmEdge_AsyncDelete` to destroy this object."] pub fn WasmEdge_VMAsyncExecuteRegistered (Cxt : * mut WasmEdge_VMContext , ModuleName : WasmEdge_String , FuncName : WasmEdge_String , Params : * const WasmEdge_Value , ParamLen : u32) -> * mut WasmEdge_Async ; } extern "C" { # [doc = " Get the function type by function name.\n\n After instantiating a WASM module in the VM context, the WASM module is\n registered into the store in the VM context as an anonymous module. Then you\n can call this function to get the function type by the exported function\n name until the VM context is reset or a new WASM module is registered or\n loaded. For getting the function type of functions in registered WASM\n modules with module names, please use `WasmEdge_VMGetFunctionTypeRegistered`\n instead.\n The returned function type context are linked to the context owned by the VM\n context, and the caller should __NOT__ call the\n `WasmEdge_FunctionTypeDelete` to destroy it.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param FuncName the function name WasmEdge_String.\n\n \\returns the function type. NULL if the function not found."] pub fn WasmEdge_VMGetFunctionType (Cxt : * const WasmEdge_VMContext , FuncName : WasmEdge_String) -> * const WasmEdge_FunctionTypeContext ; } extern "C" { # [doc = " Get the function type by function name.\n\n After registering a WASM module in the VM context, you can call this\n function to get the function type by the functions' exported module names\n and function names until the VM context is reset.\n The returned function type context are linked to the context owned by the VM\n context, and the caller should __NOT__ call the\n `WasmEdge_FunctionTypeDelete` to destroy it.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param ModuleName the module name WasmEdge_String.\n \\param FuncName the function name WasmEdge_String.\n\n \\returns the function type. NULL if the function not found."] pub fn WasmEdge_VMGetFunctionTypeRegistered (Cxt : * const WasmEdge_VMContext , ModuleName : WasmEdge_String , FuncName : WasmEdge_String) -> * const WasmEdge_FunctionTypeContext ; } extern "C" { # [doc = " Reset of WasmEdge_VMContext.\n\n After calling this function, the statistics, loaded module, the instantiated\n instances, and the registered instances except the WASI and plug-ins will\n all be cleared.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext to reset."] pub fn WasmEdge_VMCleanup (Cxt : * mut WasmEdge_VMContext) ; } extern "C" { # [doc = " Get the length of exported function list.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n\n \\returns length of exported function list."] pub fn WasmEdge_VMGetFunctionListLength (Cxt : * const WasmEdge_VMContext) -> u32 ; } extern "C" { # [doc = " Get the exported function list.\n\n The returned function names filled into the `Names` array link to the\n exported names of functions owned by the vm context, and the caller should\n __NOT__ call the `WasmEdge_StringDelete` to destroy them.\n The function type contexts filled into the `FuncTypes` array of the\n corresponding function names link to the context owned by the VM context.\n The caller should __NOT__ call the `WasmEdge_FunctionTypeDelete` to destroy\n them.\n If the `Names` and `FuncTypes` buffer lengths are smaller than the result of\n the exported function list size, the overflowed return values will be\n discarded.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param [out] Names the output names WasmEdge_String buffer of exported\n functions. Can be NULL if names are not needed.\n \\param [out] FuncTypes the function type contexts buffer. Can be NULL if\n function types are not needed.\n \\param Len the buffer length.\n\n \\returns actual exported function list size."] pub fn WasmEdge_VMGetFunctionList (Cxt : * const WasmEdge_VMContext , Names : * mut WasmEdge_String , FuncTypes : * mut * const WasmEdge_FunctionTypeContext , Len : u32) -> u32 ; } extern "C" { # [doc = " Get the module instance corresponding to the WasmEdge_HostRegistration\n settings.\n\n When creating the VM context with a configuration, the built-in host module\n will be registered according to the `WasmEdge_HostRegistration` settings\n added into the `WasmEdge_ConfigureContext`. You can call this function to\n get the `WasmEdge_ModuleInstanceContext` corresponding to the settings. The\n module instance context links to the context owned by the VM context. The\n caller should __NOT__ call the `WasmEdge_ModuleInstanceDelete`.\n\n ```c\n WasmEdge_ConfigureContext *Conf = WasmEdge_ConfigureCreate();\n WasmEdge_ConfigureAddHostRegistration(Conf, WasmEdge_HostRegistration_Wasi);\n WasmEdge_VMContext *VM = WasmEdge_VMCreate(Conf, NULL);\n WasmEdge_ModuleInstanceContext *WasiMod =\n     WasmEdge_VMGetImportModuleContext(VM, WasmEdge_HostRegistration_Wasi);\n ```\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param Reg the host registration value to get the import module.\n\n \\returns pointer to the module instance context. NULL if not found."] pub fn WasmEdge_VMGetImportModuleContext (Cxt : * const WasmEdge_VMContext , Reg : WasmEdge_HostRegistration) -> * mut WasmEdge_ModuleInstanceContext ; } extern "C" { # [doc = " Get the current instantiated module in VM.\n\n After instantiating a module instance into the VM, developers can call this\n API to get the active anonymous module instance to retrieve the exported\n instances. The module instance context links to the context owned by the VM\n context. The caller should __NOT__ call the `WasmEdge_ModuleInstanceDelete`.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n\n \\returns pointer to the module instance context. NULL if not found."] pub fn WasmEdge_VMGetActiveModule (Cxt : * const WasmEdge_VMContext) -> * const WasmEdge_ModuleInstanceContext ; } extern "C" { # [doc = " Get the registered module in VM by the module name.\n\n After registering a WASM module into the VM context, developers can call\n this function to get the module instance by the module name. The returned\n module instance context links to the context owned by the VM context, and\n the caller should __NOT__ call the `WasmEdge_ModuleInstanceDelete` to\n destroy it.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param ModuleName the module name WasmEdge_String.\n\n \\returns pointer to the module instance context. NULL if not found."] pub fn WasmEdge_VMGetRegisteredModule (Cxt : * const WasmEdge_VMContext , ModuleName : WasmEdge_String) -> * const WasmEdge_ModuleInstanceContext ; } extern "C" { # [doc = " Get the length of registered module list in the WasmEdge_VMContext.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n\n \\returns length of registered module list."] pub fn WasmEdge_VMListRegisteredModuleLength (Cxt : * const WasmEdge_VMContext) -> u32 ; } extern "C" { # [doc = " List the registered module names in the WasmEdge_VMContext.\n\n This function will list all registered module names.\n The returned module names filled into the `Names` array are linked to the\n registered module names in the VM context, and the caller should __NOT__\n call the `WasmEdge_StringDelete`.\n If the `Names` buffer length is smaller than the result of the registered\n named module list size, the overflowed return values will be discarded.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param [out] Names the output names WasmEdge_String buffer of the registered\n modules.\n \\param Len the buffer length.\n\n \\returns actual registered module list size."] pub fn WasmEdge_VMListRegisteredModule (Cxt : * const WasmEdge_VMContext , Names : * mut WasmEdge_String , Len : u32) -> u32 ; } extern "C" { # [doc = " Get the store context used in the WasmEdge_VMContext.\n\n The returned store context links to the store in the VM context and owned by\n the VM context. This function will return NULL if error occurs. The caller\n should __NOT__ call the `WasmEdge_StoreDelete`.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n\n \\returns pointer to the store context."] pub fn WasmEdge_VMGetStoreContext (Cxt : * mut WasmEdge_VMContext) -> * mut WasmEdge_StoreContext ; } extern "C" { # [doc = " Get the loader context used in the WasmEdge_VMContext.\n\n The returned loader context links to the loader in the VM context and owned\n by the VM context. This function will return NULL if error occurs. The\n caller should __NOT__ call the `WasmEdge_LoaderDelete`.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n\n \\returns pointer to the loader context."] pub fn WasmEdge_VMGetLoaderContext (Cxt : * mut WasmEdge_VMContext) -> * mut WasmEdge_LoaderContext ; } extern "C" { # [doc = " Get the validator context used in the WasmEdge_VMContext.\n\n The returned validator context links to the validator in the VM context and\n owned by the VM context. This function will return NULL if error occurs. The\n caller should __NOT__ call the `WasmEdge_ValidatorDelete`.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n\n \\returns pointer to the validator context."] pub fn WasmEdge_VMGetValidatorContext (Cxt : * mut WasmEdge_VMContext) -> * mut WasmEdge_ValidatorContext ; } extern "C" { # [doc = " Get the executor context used in the WasmEdge_VMContext.\n\n The returned executor context links to the executor in the VM context and\n owned by the VM context. This function will return NULL if error occurs. The\n caller should __NOT__ call the `WasmEdge_ExecutorDelete`.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n\n \\returns pointer to the executor context."] pub fn WasmEdge_VMGetExecutorContext (Cxt : * mut WasmEdge_VMContext) -> * mut WasmEdge_ExecutorContext ; } extern "C" { # [doc = " Get the statistics context used in the WasmEdge_VMContext.\n\n The statistics context links to the statistics in the VM context and owned\n by the VM context. The caller should __NOT__ call the\n `WasmEdge_StatisticsDelete`.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n\n \\returns pointer to the statistics context."] pub fn WasmEdge_VMGetStatisticsContext (Cxt : * mut WasmEdge_VMContext) -> * mut WasmEdge_StatisticsContext ; } extern "C" { # [doc = " Deletion of the WasmEdge_VMContext.\n\n After calling this function, the context will be destroyed and should\n __NOT__ be used.\n\n \\param Cxt the WasmEdge_VMContext to destroy."] pub fn WasmEdge_VMDelete (Cxt : * mut WasmEdge_VMContext) ; } extern "C" { # [doc = " Entrypoint for the compiler tool.\n\n This function provides an entrypoint to the WasmEdge AOT compiler tool with\n the command line arguments.\n\n \\param Argc the argument count.\n \\param Argv the argument vector.\n\n \\returns the execution status."] pub fn WasmEdge_Driver_Compiler (Argc : :: std :: os :: raw :: c_int , Argv : * mut * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Entrypoint for the runtime tool.\n\n This function provides an entrypoint to the WasmEdge runtime tool with the\n command line arguments.\n\n \\param Argc the argument count.\n \\param Argv the argument vector.\n\n \\returns the execution status."] pub fn WasmEdge_Driver_Tool (Argc : :: std :: os :: raw :: c_int , Argv : * mut * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Entrypoint for the unified tool.\n\n This function provides an entrypoint to the WasmEdge unified tool with the\n command line arguments.\n\n \\param Argc the argument count.\n \\param Argv the argument vector.\n\n \\returns the execution status."] pub fn WasmEdge_Driver_UniTool (Argc : :: std :: os :: raw :: c_int , Argv : * mut * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Load plugins with the default search paths.\n\n The default paths are:\n   1. The environment variable \"WASMEDGE_PLUGIN_PATH\".\n   2. The \"../plugin/\" directory related to the WasmEdge installation path.\n   3. The \"wasmedge/\" directory under the library path if the WasmEdge is\n      installed under the \"/usr\"."] pub fn WasmEdge_PluginLoadWithDefaultPaths () ; } extern "C" { # [doc = " Load the plugin with the given file or directory.\n\n For the given file path, this function will load the plug-in.\n For the given directory path, this function will load the plug-ins under the\n directory recursively.\n\n \\param Path the path to plug-in file or directory."] pub fn WasmEdge_PluginLoadFromPath (Path : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = " Get the length of loaded plug-in list.\n\n \\returns length of loaded plug-in list."] pub fn WasmEdge_PluginListPluginsLength () -> u32 ; } extern "C" { # [doc = " List the loaded plug-ins with their names.\n\n The returned plug-in names filled into the `Names` array are owned by the\n internal WasmEdge plug-in storage, and the caller should __NOT__ call the\n `WasmEdge_StringDelete`.\n If the `Names` buffer length is smaller than the result of the loaded\n plug-in list size, the overflowed return values will be discarded.\n\n \\param [out] Names the output WasmEdge_String buffer of the function names.\n \\param Len the buffer length.\n\n \\returns actual loaded plug-in list size."] pub fn WasmEdge_PluginListPlugins (Names : * mut WasmEdge_String , Len : u32) -> u32 ; } extern "C" { # [doc = " Find the loaded plug-in context by name.\n\n After loading the plug-ins from default paths or the given path, developers\n can use this API to retrieve the plug-in context by name. Then developers\n can create the module instance from the plug-in contexts.\n\n \\param Name the plug-in name WasmEdge_String.\n\n \\returns pointer to the plug-in context. NULL if the plug-in not found."] pub fn WasmEdge_PluginFind (Name : WasmEdge_String) -> * const WasmEdge_PluginContext ; } extern "C" { # [doc = " Get the plug-in name of the plug-in context.\n\n The returned string object is linked to the plug-in name of the plug-in\n context, and the caller should __NOT__ call the `WasmEdge_StringDelete`.\n\n \\param Cxt the WasmEdge_PluginContext.\n\n \\returns string object. Length will be 0 and Buf will be NULL if failed."] pub fn WasmEdge_PluginGetPluginName (Cxt : * const WasmEdge_PluginContext) -> WasmEdge_String ; } extern "C" { # [doc = " Get the length of module list in the plug-in context.\n\n There may be several modules in a plug-in. Developers can use this function\n to get the length of the module list in a plug-in.\n\n \\param Cxt the WasmEdge_PluginContext to get the length of the module list.\n\n \\returns length of module list."] pub fn WasmEdge_PluginListModuleLength (Cxt : * const WasmEdge_PluginContext) -> u32 ; } extern "C" { # [doc = " List the modules in the plug-in context with their names.\n\n The returned module names filled into the `Names` array are owned by the\n internal WasmEdge plug-in storage, and the caller should __NOT__ call the\n `WasmEdge_StringDelete`.\n If the `Names` buffer length is smaller than the result of the loaded\n plug-in list size, the overflowed return values will be discarded.\n\n \\param Cxt the WasmEdge_PluginContext to list the modules.\n \\param [out] Names the output WasmEdge_String buffer of the function names.\n \\param Len the buffer length.\n\n \\returns actual module list size of the plug-in."] pub fn WasmEdge_PluginListModule (Cxt : * const WasmEdge_PluginContext , Names : * mut WasmEdge_String , Len : u32) -> u32 ; } extern "C" { # [doc = " Create the module instance in the plug-in by the module name.\n\n By giving the module name, developers can retrieve the module in the plug-in\n and create the module instance.\n The caller owns the object and should call `WasmEdge_ModuleInstanceDelete`\n to destroy it.\n\n \\param Cxt the WasmEdge_PluginContext to retrieve and create module.\n \\param ModuleName the module name to retrieve.\n\n \\returns pointer to the module instance context, NULL if the module name not\n found in the plug-in or the plug-in is not valid."] pub fn WasmEdge_PluginCreateModule (Cxt : * const WasmEdge_PluginContext , ModuleName : WasmEdge_String) -> * mut WasmEdge_ModuleInstanceContext ; } extern "C" { # [doc = " Initialize the wasi_nn plug-in.\n\n This function will initialize the wasi_nn plug-in with the preloads string\n list. Only available after loading the wasi_nn plug-in and before creating\n the module instance from the plug-in.\n\n \\param NNPreloads the preload string list. NULL if the length is 0.\n \\param PreloadsLen the length of the preload list."] pub fn WasmEdge_PluginInitWASINN (NNPreloads : * const * const :: std :: os :: raw :: c_char , PreloadsLen : u32) ; } extern "C" { # [doc = " Implement by plugins for returning the plugin descriptor.\n\n \\returns the plugin descriptor."] pub fn WasmEdge_Plugin_GetDescriptor () -> * const WasmEdge_PluginDescriptor ; } extern "C" { # [doc = " Register a host function that will be invoked before executing any host\n functions.\n\n There is only one pre-host-function. After calling this function, the\n previous registered host function will be replaced. This is a experimental\n feature. Use it at your own risk.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_ExecutorContext.\n \\param Data the host data to set into the given host function. When calling\n the Func, this pointer will be the argument of the Func function.\n \\param Func the function to be invoked before executing any other host\n functions."] pub fn WasmEdge_ExecutorExperimentalRegisterPreHostFunction (Cxt : * mut WasmEdge_ExecutorContext , Data : * mut :: std :: os :: raw :: c_void , Func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) >) ; } extern "C" { # [doc = " Register a host function that will be invoked after executing any host\n functions.\n\n There is only one post-host-function. After calling this function, the\n previous registered host function will be replaced. This is a experimental\n feature. Use it at your own risk.\n\n This function is thread-safe.\n\n \\param Cxt the WasmEdge_VMContext.\n \\param Data the host data to set into the given host function. When calling\n the Func, this pointer will be the argument of the Func function.\n \\param Func the function to be invoked after executing any other host\n functions."] pub fn WasmEdge_ExecutorExperimentalRegisterPostHostFunction (Cxt : * mut WasmEdge_ExecutorContext , Data : * mut :: std :: os :: raw :: c_void , Func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) >) ; }
\ No newline at end of file diff --git a/src/wasmedge_sys/ast_module.rs.html b/src/wasmedge_sys/ast_module.rs.html new file mode 100644 index 000000000..4329a562e --- /dev/null +++ b/src/wasmedge_sys/ast_module.rs.html @@ -0,0 +1,2077 @@ +ast_module.rs - source

wasmedge_sys/
ast_module.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
//! Defines WasmEdge AST Module, Export, and Import structs.
+
+use super::ffi;
+use crate::{types::WasmEdgeLimit, WasmEdgeResult};
+use std::{borrow::Cow, ffi::CStr};
+use wasmedge_types::{
+    error::{ExportError, ImportError, WasmEdgeError},
+    ExternalInstanceType, FuncType, GlobalType, MemoryType, Mutability, RefType, TableType,
+    ValType,
+};
+
+/// Defines compiled in-memory representation of an input WASM binary.
+///
+/// [Module] is also called *AST Module* in WasmEdge terminology. A [Module] is a compiled in-memory
+/// representation of an input WebAssembly binary. In the instantiation process, a [Module] is used to create a
+/// [module stance](crate::instance), from which the exported [functions](crate::Function), [tables](crate::Table),
+/// [memories](crate::Memory), and [globals](crate::Global) can be fetched.
+#[derive(Debug)]
+pub struct Module {
+    pub(crate) inner: InnerModule,
+}
+impl Drop for Module {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_ASTModuleDelete(self.inner.0) };
+    }
+}
+impl Module {
+    /// Returns the number of wasm imports in the [Module].
+    pub fn count_of_imports(&self) -> u32 {
+        unsafe { ffi::WasmEdge_ASTModuleListImportsLength(self.inner.0) }
+    }
+
+    /// Returns the types of wasm imports in the [Module].
+    pub fn imports(&self) -> Vec<ImportType<'_>> {
+        let size = self.count_of_imports();
+        let mut returns = Vec::with_capacity(size as usize);
+        unsafe {
+            ffi::WasmEdge_ASTModuleListImports(self.inner.0, returns.as_mut_ptr(), size);
+            returns.set_len(size as usize);
+        }
+
+        returns
+            .into_iter()
+            .map(|ctx| ImportType {
+                inner: InnerImportType(ctx),
+                module: self,
+            })
+            .collect()
+    }
+
+    /// Returns the count of wasm exports in the [Module].
+    pub fn count_of_exports(&self) -> u32 {
+        unsafe { ffi::WasmEdge_ASTModuleListExportsLength(self.inner.0) }
+    }
+
+    /// Returns the types of wasm exports in the [Module].
+    pub fn export(&self) -> Vec<ExportType<'_>> {
+        let size = self.count_of_exports();
+        let mut returns = Vec::with_capacity(size as usize);
+        unsafe {
+            ffi::WasmEdge_ASTModuleListExports(self.inner.0, returns.as_mut_ptr(), size);
+            returns.set_len(size as usize);
+        }
+
+        returns
+            .into_iter()
+            .map(|ctx| ExportType {
+                inner: InnerExportType(ctx),
+                module: self,
+            })
+            .collect()
+    }
+
+    pub unsafe fn from_raw(ptr: *mut ffi::WasmEdge_ASTModuleContext) -> Self {
+        Self {
+            inner: InnerModule(ptr),
+        }
+    }
+}
+
+#[derive(Debug, Clone, Copy)]
+pub(crate) struct InnerModule(pub(crate) *mut ffi::WasmEdge_ASTModuleContext);
+unsafe impl Send for InnerModule {}
+unsafe impl Sync for InnerModule {}
+
+/// Defines the types of the imported wasm value.
+#[derive(Debug)]
+pub struct ImportType<'module> {
+    pub(crate) inner: InnerImportType,
+    pub(crate) module: &'module Module,
+}
+impl Drop for ImportType<'_> {
+    fn drop(&mut self) {
+        if !self.inner.0.is_null() {
+            self.inner.0 = std::ptr::null();
+        }
+    }
+}
+impl ImportType<'_> {
+    /// Returns the type of this import.
+    pub fn ty(&self) -> WasmEdgeResult<ExternalInstanceType> {
+        let ty = unsafe { ffi::WasmEdge_ImportTypeGetExternalType(self.inner.0) };
+        let ty: ExternalInstanceType = ty.into();
+        match ty {
+            ExternalInstanceType::Func(_) => {
+                let ctx_func_ty = unsafe {
+                    ffi::WasmEdge_ImportTypeGetFunctionType(
+                        self.module.inner.0 as *const _,
+                        self.inner.0 as *const _,
+                    )
+                };
+                match ctx_func_ty.is_null() {
+                    true => Err(Box::new(WasmEdgeError::Import(ImportError::FuncType(
+                        "Fail to get the function type".into(),
+                    )))),
+                    false => {
+                        // get types of the arguments
+                        let args_len = unsafe {
+                            ffi::WasmEdge_FunctionTypeGetParametersLength(ctx_func_ty) as usize
+                        };
+                        let mut args = Vec::with_capacity(args_len);
+                        unsafe {
+                            ffi::WasmEdge_FunctionTypeGetParameters(
+                                ctx_func_ty,
+                                args.as_mut_ptr(),
+                                args_len as u32,
+                            );
+                            args.set_len(args_len);
+                        }
+                        let args: Vec<ValType> = args.into_iter().map(Into::into).collect();
+
+                        // get types of the returns
+                        let returns_len = unsafe {
+                            ffi::WasmEdge_FunctionTypeGetReturnsLength(ctx_func_ty) as usize
+                        };
+                        let mut returns = Vec::with_capacity(returns_len);
+                        unsafe {
+                            ffi::WasmEdge_FunctionTypeGetReturns(
+                                ctx_func_ty,
+                                returns.as_mut_ptr(),
+                                returns_len as u32,
+                            );
+                            returns.set_len(returns_len);
+                        }
+                        let returns: Vec<ValType> = returns.into_iter().map(Into::into).collect();
+
+                        Ok(ExternalInstanceType::Func(FuncType::new(args, returns)))
+                    }
+                }
+            }
+            ExternalInstanceType::Global(_) => {
+                let ctx_global_ty = unsafe {
+                    ffi::WasmEdge_ImportTypeGetGlobalType(self.module.inner.0, self.inner.0)
+                };
+                match ctx_global_ty.is_null() {
+                    true => Err(Box::new(WasmEdgeError::Import(ImportError::MemType(
+                        "Fail to get the global type".into(),
+                    )))),
+                    false => {
+                        // get the value type
+                        let val = unsafe { ffi::WasmEdge_GlobalTypeGetValType(ctx_global_ty) };
+                        let val_ty: ValType = val.into();
+
+                        // get mutability
+                        let val = unsafe { ffi::WasmEdge_GlobalTypeGetMutability(ctx_global_ty) };
+                        let mutability: Mutability = val.into();
+
+                        Ok(ExternalInstanceType::Global(GlobalType::new(
+                            val_ty, mutability,
+                        )))
+                    }
+                }
+            }
+            ExternalInstanceType::Memory(_) => {
+                let ctx_mem_ty = unsafe {
+                    ffi::WasmEdge_ImportTypeGetMemoryType(self.module.inner.0, self.inner.0)
+                };
+                match ctx_mem_ty.is_null() {
+                    true => Err(Box::new(WasmEdgeError::Import(ImportError::MemType(
+                        "Fail to get the memory type".into(),
+                    )))),
+                    false => {
+                        let limit = unsafe { ffi::WasmEdge_MemoryTypeGetLimit(ctx_mem_ty) };
+                        let limit: WasmEdgeLimit = limit.into();
+
+                        Ok(ExternalInstanceType::Memory(MemoryType::new(
+                            limit.min(),
+                            limit.max(),
+                            limit.shared(),
+                        )?))
+                    }
+                }
+            }
+            ExternalInstanceType::Table(_) => {
+                let ctx_tab_ty = unsafe {
+                    ffi::WasmEdge_ImportTypeGetTableType(self.module.inner.0, self.inner.0)
+                };
+                match ctx_tab_ty.is_null() {
+                    true => Err(Box::new(WasmEdgeError::Import(ImportError::TableType(
+                        "Fail to get the table type".into(),
+                    )))),
+                    false => {
+                        // get the element type
+                        let elem_ty = unsafe { ffi::WasmEdge_TableTypeGetRefType(ctx_tab_ty) };
+                        let elem_ty = RefType::from(ValType::from(elem_ty));
+
+                        // get the limit
+                        let limit = unsafe { ffi::WasmEdge_TableTypeGetLimit(ctx_tab_ty) };
+                        let limit: WasmEdgeLimit = limit.into();
+
+                        Ok(ExternalInstanceType::Table(TableType::new(
+                            elem_ty,
+                            limit.min(),
+                            limit.max(),
+                        )))
+                    }
+                }
+            }
+        }
+    }
+
+    /// Returns the field name of the module that this import is expected to come from.
+    pub fn name(&self) -> Cow<'_, str> {
+        let c_name = unsafe {
+            let raw_name = ffi::WasmEdge_ImportTypeGetExternalName(self.inner.0);
+            CStr::from_ptr(raw_name.Buf)
+        };
+        c_name.to_string_lossy()
+    }
+
+    /// Returns the module name that this import is expected to come from.
+    pub fn module_name(&self) -> Cow<'_, str> {
+        let c_name = unsafe {
+            let raw_name = ffi::WasmEdge_ImportTypeGetModuleName(self.inner.0);
+            CStr::from_ptr(raw_name.Buf)
+        };
+        c_name.to_string_lossy()
+    }
+
+    /// Provides a raw pointer to the inner ImportType context.
+    #[cfg(feature = "ffi")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "ffi")))]
+    pub fn as_ptr(&self) -> *const ffi::WasmEdge_ImportTypeContext {
+        self.inner.0 as *const _
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerImportType(pub(crate) *const ffi::WasmEdge_ImportTypeContext);
+unsafe impl Send for InnerImportType {}
+unsafe impl Sync for InnerImportType {}
+
+/// Defines the types of the exported wasm values.
+#[derive(Debug)]
+pub struct ExportType<'module> {
+    pub(crate) inner: InnerExportType,
+    pub(crate) module: &'module Module,
+}
+
+impl ExportType<'_> {
+    /// Returns the type of this export.
+    pub fn ty(&self) -> WasmEdgeResult<ExternalInstanceType> {
+        let ty = unsafe { ffi::WasmEdge_ExportTypeGetExternalType(self.inner.0) };
+        let ty: ExternalInstanceType = ty.into();
+        match ty {
+            ExternalInstanceType::Func(_) => {
+                let ctx_func_ty = unsafe {
+                    ffi::WasmEdge_ExportTypeGetFunctionType(self.module.inner.0, self.inner.0)
+                };
+                match ctx_func_ty.is_null() {
+                    true => Err(Box::new(WasmEdgeError::Export(ExportError::FuncType(
+                        "Fail to get the function type".into(),
+                    )))),
+                    false => {
+                        // get types of the arguments
+                        let args_len = unsafe {
+                            ffi::WasmEdge_FunctionTypeGetParametersLength(ctx_func_ty) as usize
+                        };
+                        let mut args = Vec::with_capacity(args_len);
+                        unsafe {
+                            ffi::WasmEdge_FunctionTypeGetParameters(
+                                ctx_func_ty,
+                                args.as_mut_ptr(),
+                                args_len as u32,
+                            );
+                            args.set_len(args_len);
+                        }
+                        let args: Vec<ValType> = args.into_iter().map(Into::into).collect();
+
+                        // get types of the returns
+                        let returns_len = unsafe {
+                            ffi::WasmEdge_FunctionTypeGetReturnsLength(ctx_func_ty) as usize
+                        };
+                        let mut returns = Vec::with_capacity(returns_len);
+                        unsafe {
+                            ffi::WasmEdge_FunctionTypeGetReturns(
+                                ctx_func_ty,
+                                returns.as_mut_ptr(),
+                                returns_len as u32,
+                            );
+                            returns.set_len(returns_len);
+                        }
+                        let returns: Vec<ValType> = returns.into_iter().map(Into::into).collect();
+
+                        Ok(ExternalInstanceType::Func(FuncType::new(args, returns)))
+                    }
+                }
+            }
+            ExternalInstanceType::Table(_) => {
+                let ctx_tab_ty = unsafe {
+                    ffi::WasmEdge_ExportTypeGetTableType(self.module.inner.0, self.inner.0)
+                };
+                match ctx_tab_ty.is_null() {
+                    true => Err(Box::new(WasmEdgeError::Export(ExportError::TableType(
+                        "Fail to get the function type".into(),
+                    )))),
+                    false => {
+                        // get the element type
+                        let elem_ty = unsafe { ffi::WasmEdge_TableTypeGetRefType(ctx_tab_ty) };
+                        let elem_ty = RefType::from(ValType::from(elem_ty));
+
+                        // get the limit
+                        let limit = unsafe { ffi::WasmEdge_TableTypeGetLimit(ctx_tab_ty) };
+                        let limit: WasmEdgeLimit = limit.into();
+
+                        Ok(ExternalInstanceType::Table(TableType::new(
+                            elem_ty,
+                            limit.min(),
+                            limit.max(),
+                        )))
+                    }
+                }
+            }
+            ExternalInstanceType::Memory(_) => {
+                let ctx_mem_ty = unsafe {
+                    ffi::WasmEdge_ExportTypeGetMemoryType(self.module.inner.0, self.inner.0)
+                };
+                match ctx_mem_ty.is_null() {
+                    true => Err(Box::new(WasmEdgeError::Export(ExportError::MemType(
+                        "Fail to get the function type".into(),
+                    )))),
+                    false => {
+                        let limit = unsafe { ffi::WasmEdge_MemoryTypeGetLimit(ctx_mem_ty) };
+                        let limit: WasmEdgeLimit = limit.into();
+
+                        Ok(ExternalInstanceType::Memory(MemoryType::new(
+                            limit.min(),
+                            limit.max(),
+                            limit.shared(),
+                        )?))
+                    }
+                }
+            }
+            ExternalInstanceType::Global(_) => {
+                let ctx_global_ty = unsafe {
+                    ffi::WasmEdge_ExportTypeGetGlobalType(self.module.inner.0, self.inner.0)
+                };
+                match ctx_global_ty.is_null() {
+                    true => Err(Box::new(WasmEdgeError::Export(ExportError::GlobalType(
+                        "Fail to get the function type".into(),
+                    )))),
+                    false => {
+                        // get the value type
+                        let val = unsafe { ffi::WasmEdge_GlobalTypeGetValType(ctx_global_ty) };
+                        let val_ty: ValType = val.into();
+
+                        // get mutability
+                        let val = unsafe { ffi::WasmEdge_GlobalTypeGetMutability(ctx_global_ty) };
+                        let mutability: Mutability = val.into();
+
+                        Ok(ExternalInstanceType::Global(GlobalType::new(
+                            val_ty, mutability,
+                        )))
+                    }
+                }
+            }
+        }
+    }
+
+    /// Returns the name by which this export is known by.
+    pub fn name(&self) -> Cow<'_, str> {
+        let c_name = unsafe {
+            let raw_name = ffi::WasmEdge_ExportTypeGetExternalName(self.inner.0);
+            CStr::from_ptr(raw_name.Buf)
+        };
+        c_name.to_string_lossy()
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerExportType(pub(crate) *const ffi::WasmEdge_ExportTypeContext);
+unsafe impl Send for InnerExportType {}
+unsafe impl Sync for InnerExportType {}
+
+#[cfg(test)]
+mod tests {
+    use crate::{Config, Loader};
+    use std::{
+        sync::{Arc, Mutex},
+        thread,
+    };
+    use wasmedge_types::{ExternalInstanceType, Mutability, RefType, ValType};
+
+    #[ignore = "need to update `import.wat`"]
+    #[test]
+    fn test_module_import() {
+        let path = std::env::current_dir()
+            .unwrap()
+            .ancestors()
+            .nth(2)
+            .unwrap()
+            .join("examples/wasmedge-sys/data/import.wat");
+
+        let result = Config::create();
+        assert!(result.is_ok());
+        let mut config = result.unwrap();
+        config.bulk_memory_operations(true);
+        assert!(config.bulk_memory_operations_enabled());
+
+        // load module from file
+        let result = Loader::create(Some(&config));
+        assert!(result.is_ok());
+        let loader = result.unwrap();
+        let result = loader.from_file(path);
+        assert!(result.is_ok());
+        let module = result.unwrap();
+        assert!(!module.inner.0.is_null());
+
+        // check imports
+
+        assert_eq!(module.count_of_imports(), 14);
+        let imports = module.imports();
+
+        // check the ty, name, and module_name functions
+        let result = imports[0].ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        matches!(ty, ExternalInstanceType::Func(_));
+        assert_eq!(imports[0].name(), "func-add");
+        assert_eq!(imports[0].module_name(), "extern");
+
+        let result = imports[1].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(imports[1].name(), "func-sub");
+        assert_eq!(imports[1].module_name(), "extern");
+
+        let result = imports[2].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(imports[2].name(), "func-mul");
+        assert_eq!(imports[2].module_name(), "extern");
+
+        let result = imports[3].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(imports[3].name(), "func-div");
+        assert_eq!(imports[3].module_name(), "extern");
+
+        let result = imports[4].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(imports[4].name(), "func-term");
+        assert_eq!(imports[4].module_name(), "extern");
+
+        let result = imports[5].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(imports[5].name(), "func-fail");
+        assert_eq!(imports[5].module_name(), "extern");
+
+        let result = imports[6].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Global(_));
+        assert_eq!(imports[6].name(), "glob-i32");
+        assert_eq!(imports[6].module_name(), "dummy");
+
+        let result = imports[7].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Global(_));
+        assert_eq!(imports[7].name(), "glob-i64");
+        assert_eq!(imports[7].module_name(), "dummy");
+
+        let result = imports[8].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Global(_));
+        assert_eq!(imports[8].name(), "glob-f32");
+        assert_eq!(imports[8].module_name(), "dummy");
+
+        let result = imports[9].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Global(_));
+        assert_eq!(imports[9].name(), "glob-f64");
+        assert_eq!(imports[9].module_name(), "dummy");
+
+        let result = imports[10].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Table(_));
+        assert_eq!(imports[10].name(), "tab-func");
+        assert_eq!(imports[10].module_name(), "dummy");
+
+        let result = imports[11].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Table(_));
+        assert_eq!(imports[11].name(), "tab-ext");
+        assert_eq!(imports[11].module_name(), "dummy");
+
+        let result = imports[12].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Memory(_));
+        assert_eq!(imports[12].name(), "mem1");
+        assert_eq!(imports[12].module_name(), "dummy");
+
+        let result = imports[13].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Memory(_));
+        assert_eq!(imports[13].name(), "mem2");
+        assert_eq!(imports[13].module_name(), "dummy");
+
+        // check the function_type function
+        let result = imports[4].ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        matches!(ty, ExternalInstanceType::Func(_));
+        if let ExternalInstanceType::Func(func_ty) = ty {
+            assert_eq!(func_ty.returns_len(), 1);
+        }
+
+        // check the table_type function
+        let result = imports[11].ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        matches!(ty, ExternalInstanceType::Table(_));
+        if let ExternalInstanceType::Table(table_ty) = ty {
+            assert_eq!(table_ty.elem_ty(), RefType::ExternRef);
+            assert_eq!(table_ty.minimum(), 10);
+            assert_eq!(table_ty.maximum(), Some(30));
+        }
+
+        // check the memory_type function
+        let result = imports[13].ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        matches!(ty, ExternalInstanceType::Memory(_));
+        if let ExternalInstanceType::Memory(mem_ty) = ty {
+            assert_eq!(mem_ty.minimum(), 2);
+            assert_eq!(mem_ty.maximum(), None);
+        }
+
+        // check the global_type function
+        let result = imports[7].ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        matches!(ty, ExternalInstanceType::Global(_));
+        if let ExternalInstanceType::Global(global_ty) = ty {
+            assert_eq!(global_ty.value_ty(), ValType::I64);
+            assert_eq!(global_ty.mutability(), Mutability::Const);
+        }
+    }
+
+    #[ignore = "need to update `import.wat`"]
+    #[test]
+    fn test_module_export() {
+        let path = std::env::current_dir()
+            .unwrap()
+            .ancestors()
+            .nth(2)
+            .unwrap()
+            .join("examples/wasmedge-sys/data/import.wat");
+
+        let result = Config::create();
+        assert!(result.is_ok());
+        let mut config = result.unwrap();
+        config.bulk_memory_operations(true);
+        assert!(config.bulk_memory_operations_enabled());
+
+        // load module from file
+        let result = Loader::create(Some(&config));
+        assert!(result.is_ok());
+        let loader = result.unwrap();
+        let result = loader.from_file(path);
+        assert!(result.is_ok());
+        let module = result.unwrap();
+        assert!(!module.inner.0.is_null());
+
+        // check exports
+
+        assert_eq!(module.count_of_exports(), 16);
+        let exports = module.export();
+
+        // check the ty and name functions
+        let result = exports[0].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(exports[0].name(), "func-1");
+
+        let result = exports[1].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(exports[1].name(), "func-2");
+
+        let result = exports[2].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(exports[2].name(), "func-3");
+
+        let result = exports[3].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(exports[3].name(), "func-4");
+
+        assert_eq!(module.count_of_exports(), 16);
+
+        let result = exports[4].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(exports[4].name(), "func-add");
+
+        let result = exports[5].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(exports[5].name(), "func-mul-2");
+
+        let result = exports[6].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(exports[6].name(), "func-call-indirect");
+
+        let result = exports[7].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(exports[7].name(), "func-host-add");
+
+        let result = exports[8].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(exports[8].name(), "func-host-sub");
+
+        let result = exports[9].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(exports[9].name(), "func-host-mul");
+
+        let result = exports[10].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Func(_));
+        assert_eq!(exports[10].name(), "func-host-div");
+
+        let result = exports[11].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Table(_));
+        assert_eq!(exports[11].name(), "tab-func");
+
+        let result = exports[12].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Table(_));
+        assert_eq!(exports[12].name(), "tab-ext");
+
+        let result = exports[13].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Memory(_));
+        assert_eq!(exports[13].name(), "mem");
+
+        let result = exports[14].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Global(_));
+        assert_eq!(exports[14].name(), "glob-mut-i32");
+
+        let result = exports[15].ty();
+        assert!(result.is_ok());
+        matches!(result.unwrap(), ExternalInstanceType::Global(_));
+        assert_eq!(exports[15].name(), "glob-const-f32");
+
+        // check the function_type function
+        let result = exports[4].ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        matches!(ty, ExternalInstanceType::Func(_));
+        if let ExternalInstanceType::Func(func_ty) = ty {
+            assert_eq!(func_ty.args_len(), 2);
+            assert_eq!(func_ty.returns_len(), 1);
+        }
+
+        // check the table_type function
+        let result = exports[12].ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        matches!(ty, ExternalInstanceType::Table(_));
+        if let ExternalInstanceType::Table(table_ty) = ty {
+            assert_eq!(table_ty.elem_ty(), RefType::ExternRef);
+            assert_eq!(table_ty.minimum(), 10);
+            assert_eq!(table_ty.maximum(), None);
+        }
+
+        // check the memory_type function
+        let result = exports[13].ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        matches!(ty, ExternalInstanceType::Memory(_));
+        if let ExternalInstanceType::Memory(mem_ty) = ty {
+            assert_eq!(mem_ty.minimum(), 1);
+            assert_eq!(mem_ty.maximum(), Some(3));
+        }
+
+        // check the global_type function
+        let result = exports[15].ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        matches!(ty, ExternalInstanceType::Global(_));
+        if let ExternalInstanceType::Global(global_ty) = ty {
+            assert_eq!(global_ty.value_ty(), ValType::F32);
+            assert_eq!(global_ty.mutability(), Mutability::Const);
+        }
+    }
+
+    #[ignore = "need to update `import.wat`"]
+    #[test]
+    fn test_module_send() {
+        let path = std::env::current_dir()
+            .unwrap()
+            .ancestors()
+            .nth(2)
+            .unwrap()
+            .join("examples/wasmedge-sys/data/import.wat");
+
+        let result = Config::create();
+        assert!(result.is_ok());
+        let mut config = result.unwrap();
+        config.bulk_memory_operations(true);
+        assert!(config.bulk_memory_operations_enabled());
+
+        // load module from file
+        let result = Loader::create(Some(&config));
+        assert!(result.is_ok());
+        let loader = result.unwrap();
+        let result = loader.from_file(path);
+        assert!(result.is_ok());
+        let module = result.unwrap();
+        assert!(!module.inner.0.is_null());
+
+        let handle = thread::spawn(move || {
+            // check exports
+
+            assert_eq!(module.count_of_exports(), 16);
+            let exports = module.export();
+
+            // check the ty and name functions
+            let result = exports[0].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[0].name(), "func-1");
+
+            let result = exports[1].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[1].name(), "func-2");
+
+            let result = exports[2].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[2].name(), "func-3");
+
+            let result = exports[3].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[3].name(), "func-4");
+
+            assert_eq!(module.count_of_exports(), 16);
+
+            let result = exports[4].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[4].name(), "func-add");
+
+            let result = exports[5].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[5].name(), "func-mul-2");
+
+            let result = exports[6].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[6].name(), "func-call-indirect");
+
+            let result = exports[7].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[7].name(), "func-host-add");
+
+            let result = exports[8].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[8].name(), "func-host-sub");
+
+            let result = exports[9].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[9].name(), "func-host-mul");
+
+            let result = exports[10].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[10].name(), "func-host-div");
+
+            let result = exports[11].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Table(_));
+            assert_eq!(exports[11].name(), "tab-func");
+
+            let result = exports[12].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Table(_));
+            assert_eq!(exports[12].name(), "tab-ext");
+
+            let result = exports[13].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Memory(_));
+            assert_eq!(exports[13].name(), "mem");
+
+            let result = exports[14].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Global(_));
+            assert_eq!(exports[14].name(), "glob-mut-i32");
+
+            let result = exports[15].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Global(_));
+            assert_eq!(exports[15].name(), "glob-const-f32");
+
+            // check the function_type function
+            let result = exports[4].ty();
+            assert!(result.is_ok());
+            let ty = result.unwrap();
+            matches!(ty, ExternalInstanceType::Func(_));
+            if let ExternalInstanceType::Func(func_ty) = ty {
+                assert_eq!(func_ty.args_len(), 2);
+                assert_eq!(func_ty.returns_len(), 1);
+            }
+
+            // check the table_type function
+            let result = exports[12].ty();
+            assert!(result.is_ok());
+            let ty = result.unwrap();
+            matches!(ty, ExternalInstanceType::Table(_));
+            if let ExternalInstanceType::Table(table_ty) = ty {
+                assert_eq!(table_ty.elem_ty(), RefType::ExternRef);
+                assert_eq!(table_ty.minimum(), 10);
+                assert_eq!(table_ty.maximum(), None);
+            }
+
+            // check the memory_type function
+            let result = exports[13].ty();
+            assert!(result.is_ok());
+            let ty = result.unwrap();
+            matches!(ty, ExternalInstanceType::Memory(_));
+            if let ExternalInstanceType::Memory(mem_ty) = ty {
+                assert_eq!(mem_ty.minimum(), 1);
+                assert_eq!(mem_ty.maximum(), Some(3));
+            }
+
+            // check the global_type function
+            let result = exports[15].ty();
+            assert!(result.is_ok());
+            let ty = result.unwrap();
+            matches!(ty, ExternalInstanceType::Global(_));
+            if let ExternalInstanceType::Global(global_ty) = ty {
+                assert_eq!(global_ty.value_ty(), ValType::F32);
+                assert_eq!(global_ty.mutability(), Mutability::Const);
+            }
+        });
+
+        handle.join().unwrap();
+    }
+
+    #[ignore = "need to update `import.wat`"]
+    #[test]
+    fn test_module_sync() {
+        let path = std::env::current_dir()
+            .unwrap()
+            .ancestors()
+            .nth(2)
+            .unwrap()
+            .join("examples/wasmedge-sys/data/import.wat");
+
+        let result = Config::create();
+        assert!(result.is_ok());
+        let mut config = result.unwrap();
+        config.bulk_memory_operations(true);
+        assert!(config.bulk_memory_operations_enabled());
+
+        // load module from file
+        let result = Loader::create(Some(&config));
+        assert!(result.is_ok());
+        let loader = result.unwrap();
+        let result = loader.from_file(path);
+        assert!(result.is_ok());
+        let module = Arc::new(Mutex::new(result.unwrap()));
+
+        let module_cloned = Arc::clone(&module);
+        let handle = thread::spawn(move || {
+            let result = module_cloned.lock();
+            assert!(result.is_ok());
+            let module = result.unwrap();
+
+            // check exports
+
+            assert_eq!(module.count_of_exports(), 16);
+            let exports = module.export();
+
+            // check the ty and name functions
+            let result = exports[0].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[0].name(), "func-1");
+
+            let result = exports[1].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[1].name(), "func-2");
+
+            let result = exports[2].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[2].name(), "func-3");
+
+            let result = exports[3].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[3].name(), "func-4");
+
+            assert_eq!(module.count_of_exports(), 16);
+
+            let result = exports[4].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[4].name(), "func-add");
+
+            let result = exports[5].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[5].name(), "func-mul-2");
+
+            let result = exports[6].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[6].name(), "func-call-indirect");
+
+            let result = exports[7].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[7].name(), "func-host-add");
+
+            let result = exports[8].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[8].name(), "func-host-sub");
+
+            let result = exports[9].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[9].name(), "func-host-mul");
+
+            let result = exports[10].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Func(_));
+            assert_eq!(exports[10].name(), "func-host-div");
+
+            let result = exports[11].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Table(_));
+            assert_eq!(exports[11].name(), "tab-func");
+
+            let result = exports[12].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Table(_));
+            assert_eq!(exports[12].name(), "tab-ext");
+
+            let result = exports[13].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Memory(_));
+            assert_eq!(exports[13].name(), "mem");
+
+            let result = exports[14].ty();
+            assert!(result.is_ok());
+            matches!(result.unwrap(), ExternalInstanceType::Global(_));
+            assert_eq!(exports[14].name(), "glob-mut-i32");
+
+            let result = exports[15].ty();
+            assert!(result.is_ok());
+            let ty = result.unwrap();
+            matches!(ty, ExternalInstanceType::Global(_));
+            assert_eq!(exports[15].name(), "glob-const-f32");
+
+            // check the function_type function
+            let result = exports[4].ty();
+            assert!(result.is_ok());
+            let ty = result.unwrap();
+            matches!(ty, ExternalInstanceType::Func(_));
+            if let ExternalInstanceType::Func(func_ty) = ty {
+                assert_eq!(func_ty.args_len(), 2);
+                assert_eq!(func_ty.returns_len(), 1);
+            }
+
+            // check the table_type function
+            let result = exports[12].ty();
+            assert!(result.is_ok());
+            let ty = result.unwrap();
+            matches!(ty, ExternalInstanceType::Table(_));
+            if let ExternalInstanceType::Table(table_ty) = ty {
+                assert_eq!(table_ty.elem_ty(), RefType::ExternRef);
+                assert_eq!(table_ty.minimum(), 10);
+                assert_eq!(table_ty.maximum(), None);
+            }
+
+            // check the memory_type function
+            let result = exports[13].ty();
+            assert!(result.is_ok());
+            let ty = result.unwrap();
+            matches!(ty, ExternalInstanceType::Memory(_));
+            if let ExternalInstanceType::Memory(mem_ty) = ty {
+                assert_eq!(mem_ty.minimum(), 1);
+                assert_eq!(mem_ty.maximum(), Some(3));
+            }
+
+            // check the global_type function
+            let result = exports[15].ty();
+            assert!(result.is_ok());
+            let ty = result.unwrap();
+            matches!(ty, ExternalInstanceType::Global(_));
+            if let ExternalInstanceType::Global(global_ty) = ty {
+                assert_eq!(global_ty.value_ty(), ValType::F32);
+                assert_eq!(global_ty.mutability(), Mutability::Const);
+            }
+        });
+
+        handle.join().unwrap();
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/async/fiber.rs.html b/src/wasmedge_sys/async/fiber.rs.html new file mode 100644 index 000000000..1df88819b --- /dev/null +++ b/src/wasmedge_sys/async/fiber.rs.html @@ -0,0 +1,707 @@ +fiber.rs - source

wasmedge_sys/async/
fiber.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
//! Defines data structure for WasmEdge async mechanism.
+
+use fiber_for_wasmedge::{Fiber, FiberStack, Suspend};
+use std::{
+    future::Future,
+    pin::Pin,
+    ptr,
+    task::{Context, Poll},
+};
+
+/// Defines a FiberFuture.
+pub(crate) struct FiberFuture<'a> {
+    fiber: Fiber<'a, Result<(), ()>, (), Result<(), ()>>,
+    current_suspend: *mut *const Suspend<Result<(), ()>, (), Result<(), ()>>,
+    current_poll_cx: *mut *mut Context<'static>,
+}
+impl<'a> FiberFuture<'a> {
+    /// Create a fiber to execute the given function.
+    ///
+    /// # Arguments
+    ///
+    /// * `async_state` - Used to store asynchronous state at run time.
+    ///
+    /// * `func` - The function to execute.
+    ///
+    /// # Error
+    ///
+    /// If fail to create the fiber stack or the fiber fail to resume, then an error is returned.
+    pub(crate) async fn on_fiber<R>(
+        async_state: &AsyncState,
+        func: impl FnOnce() -> R + Send,
+    ) -> Result<R, ()> {
+        let mut slot = None;
+        let future = {
+            let current_poll_cx = async_state.current_poll_cx.get();
+            let current_suspend = async_state.current_suspend.get();
+
+            let stack = FiberStack::new(2 << 20).map_err(|_e| ())?;
+            let slot = &mut slot;
+            let fiber = Fiber::new(stack, move |keep_going, suspend| {
+                keep_going?;
+
+                unsafe {
+                    let _reset = Reset(current_suspend, *current_suspend);
+                    *current_suspend = suspend;
+                    *slot = Some(func());
+                    Ok(())
+                }
+            })
+            .map_err(|_e| ())?;
+
+            FiberFuture {
+                fiber,
+                current_suspend,
+                current_poll_cx,
+            }
+        };
+        future.await?;
+
+        Ok(slot.unwrap())
+    }
+
+    /// This is a helper function to call `resume` on the underlying
+    /// fiber while correctly managing thread-local data.
+    fn resume(&mut self, val: Result<(), ()>) -> Result<Result<(), ()>, ()> {
+        let async_cx = AsyncCx {
+            current_suspend: self.current_suspend,
+            current_poll_cx: self.current_poll_cx,
+        };
+        ASYNC_CX.set(&async_cx, || self.fiber.resume(val))
+    }
+}
+impl Future for FiberFuture<'_> {
+    type Output = Result<(), ()>;
+    fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
+        unsafe {
+            let _reset = Reset(self.current_poll_cx, *self.current_poll_cx);
+            *self.current_poll_cx =
+                std::mem::transmute::<&mut Context<'_>, *mut Context<'static>>(cx);
+
+            match self.resume(Ok(())) {
+                Ok(ret) => Poll::Ready(ret),
+                Err(_) => Poll::Pending,
+            }
+        }
+    }
+}
+unsafe impl Send for FiberFuture<'_> {}
+unsafe impl Sync for FiberFuture<'_> {}
+
+type FiberSuspend = Suspend<Result<(), ()>, (), Result<(), ()>>;
+
+impl Drop for FiberFuture<'_> {
+    fn drop(&mut self) {
+        if !self.fiber.done() {
+            let result = self.resume(Err(()));
+            // This resumption with an error should always complete the
+            // fiber. While it's technically possible for host code to catch
+            // the trap and re-resume, we'd ideally like to signal that to
+            // callers that they shouldn't be doing that.
+            debug_assert!(result.is_ok());
+        }
+    }
+}
+
+/// Defines a TimeoutFiberFuture.
+pub(crate) struct TimeoutFiberFuture<'a> {
+    fiber: Fiber<'a, Result<(), ()>, (), Result<(), ()>>,
+    current_suspend: *mut *const Suspend<Result<(), ()>, (), Result<(), ()>>,
+    current_poll_cx: *mut *mut Context<'static>,
+    deadline: std::time::SystemTime,
+}
+
+impl<'a> TimeoutFiberFuture<'a> {
+    /// Create a fiber to execute the given function.
+    ///
+    /// # Arguments
+    ///
+    /// * `func` - The function to execute.
+    ///
+    /// * `async_state` - Used to store asynchronous state at run time.
+    ///
+    /// * `deadline` - The deadline the function to be run.
+    ///
+    /// # Error
+    ///
+    /// If fail to create the fiber stack or the fiber fail to resume, then an error is returned.
+    pub(crate) async fn on_fiber<R>(
+        async_state: &AsyncState,
+        func: impl FnOnce() -> R + Send,
+        deadline: std::time::SystemTime,
+    ) -> Result<R, ()> {
+        let mut slot = None;
+
+        let future = {
+            let current_poll_cx = async_state.current_poll_cx.get();
+            let current_suspend = async_state.current_suspend.get();
+
+            let stack = FiberStack::new(2 << 20).map_err(|_e| ())?;
+            let slot = &mut slot;
+            let fiber = Fiber::new(stack, move |keep_going, suspend| {
+                keep_going?;
+
+                unsafe {
+                    let _reset = Reset(current_suspend, *current_suspend);
+                    *current_suspend = suspend;
+                    *slot = Some(func());
+                    Ok(())
+                }
+            })
+            .map_err(|_e| ())?;
+
+            TimeoutFiberFuture {
+                fiber,
+                current_suspend,
+                current_poll_cx,
+                deadline,
+            }
+        };
+
+        future.await?;
+
+        Ok(slot.unwrap())
+    }
+}
+
+impl Future for TimeoutFiberFuture<'_> {
+    type Output = Result<(), ()>;
+    fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
+        unsafe {
+            crate::executor::init_signal_listen();
+
+            let _reset = Reset(self.current_poll_cx, *self.current_poll_cx);
+            *self.current_poll_cx =
+                std::mem::transmute::<&mut Context<'_>, *mut Context<'static>>(cx);
+            let async_cx = AsyncCx {
+                current_suspend: self.current_suspend,
+                current_poll_cx: self.current_poll_cx,
+            };
+
+            ASYNC_CX.set(&async_cx, || {
+                let mut self_thread = libc::pthread_self();
+                let mut timerid: libc::timer_t = std::mem::zeroed();
+                let mut sev: libc::sigevent = std::mem::zeroed();
+                sev.sigev_notify = libc::SIGEV_SIGNAL;
+                sev.sigev_signo = crate::executor::timeout_signo();
+                sev.sigev_value.sival_ptr = &mut self_thread as *mut _ as *mut libc::c_void;
+
+                if libc::timer_create(libc::CLOCK_REALTIME, &mut sev, &mut timerid) < 0 {
+                    return Poll::Ready(Err(()));
+                }
+
+                let timeout = match self.deadline.duration_since(std::time::SystemTime::now()) {
+                    Ok(timeout) => timeout.max(std::time::Duration::from_millis(100)),
+                    Err(_) => return Poll::Ready(Err(())),
+                };
+
+                let mut value: libc::itimerspec = std::mem::zeroed();
+                value.it_value.tv_sec = timeout.as_secs() as _;
+                value.it_value.tv_nsec = timeout.subsec_nanos() as _;
+                if libc::timer_settime(timerid, 0, &value, std::ptr::null_mut()) < 0 {
+                    libc::timer_delete(timerid);
+                    return Poll::Ready(Err(()));
+                }
+
+                let mut env: setjmp::sigjmp_buf = std::mem::zeroed();
+                let jmp_state = crate::executor::JmpState {
+                    sigjmp_buf: &mut env,
+                };
+
+                crate::executor::JMP_BUF.set(&jmp_state, || {
+                    if setjmp::sigsetjmp(&mut env, 1) == 0 {
+                        let r = match self.as_ref().fiber.resume(Ok(())) {
+                            Ok(ret) => Poll::Ready(ret),
+                            Err(_) => Poll::Pending,
+                        };
+                        libc::timer_delete(timerid);
+                        r
+                    } else {
+                        libc::timer_delete(timerid);
+                        Poll::Ready(Err(()))
+                    }
+                })
+            })
+        }
+    }
+}
+unsafe impl Send for TimeoutFiberFuture<'_> {}
+unsafe impl Sync for TimeoutFiberFuture<'_> {}
+
+impl Drop for TimeoutFiberFuture<'_> {
+    fn drop(&mut self) {
+        if !self.fiber.done() {
+            let async_cx = AsyncCx {
+                current_suspend: self.current_suspend,
+                current_poll_cx: self.current_poll_cx,
+            };
+            let result = ASYNC_CX.set(&async_cx, || self.fiber.resume(Err(())));
+            // This resumption with an error should always complete the
+            // fiber. While it's technically possible for host code to catch
+            // the trap and re-resume, we'd ideally like to signal that to
+            // callers that they shouldn't be doing that.
+            debug_assert!(result.is_ok());
+        }
+    }
+}
+
+scoped_tls::scoped_thread_local!(static ASYNC_CX: AsyncCx);
+
+/// Defines a async state that contains the pointer to current poll context and current suspend.
+#[derive(Debug)]
+pub struct AsyncState {
+    current_suspend: std::cell::UnsafeCell<*const FiberSuspend>,
+    current_poll_cx: std::cell::UnsafeCell<*mut Context<'static>>,
+}
+impl Default for AsyncState {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+impl AsyncState {
+    /// Creates a new async state.
+    pub fn new() -> Self {
+        AsyncState {
+            current_suspend: std::cell::UnsafeCell::new(std::ptr::null()),
+            current_poll_cx: std::cell::UnsafeCell::new(std::ptr::null_mut()),
+        }
+    }
+
+    /// Returns an async execution context.
+    ///
+    /// If the pointer of poll context is null, then None is returned.
+    pub fn async_cx(&self) -> Option<AsyncCx> {
+        let poll_cx_box_ptr = self.current_poll_cx.get();
+        if poll_cx_box_ptr.is_null() {
+            return None;
+        }
+        let poll_cx_inner_ptr = unsafe { *poll_cx_box_ptr };
+        if poll_cx_inner_ptr.is_null() {
+            return None;
+        }
+
+        Some(AsyncCx {
+            current_suspend: self.current_suspend.get(),
+            current_poll_cx: poll_cx_box_ptr,
+        })
+    }
+}
+unsafe impl Send for AsyncState {}
+unsafe impl Sync for AsyncState {}
+
+/// Defines an async execution context.
+#[derive(Debug, Clone, Copy)]
+pub struct AsyncCx {
+    current_suspend: *mut *const Suspend<Result<(), ()>, (), Result<(), ()>>,
+    current_poll_cx: *mut *mut Context<'static>,
+}
+impl Default for AsyncCx {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+impl AsyncCx {
+    /// Creates a new async execution context.
+    pub fn new() -> Self {
+        ASYNC_CX.with(|async_cx| *async_cx)
+    }
+
+    /// Runs a future to completion.
+    ///
+    /// # Arguments
+    ///
+    /// * `future` - The future to run.
+    ///
+    /// # Error
+    ///
+    /// If fail to run, then an error is returned.
+    pub(crate) unsafe fn block_on<U>(
+        &self,
+        mut future: Pin<&mut (dyn Future<Output = U> + Send)>,
+    ) -> Result<U, ()> {
+        let suspend = *self.current_suspend;
+        let _reset = Reset(self.current_suspend, suspend);
+        *self.current_suspend = ptr::null();
+        assert!(!suspend.is_null());
+
+        loop {
+            let future_result = {
+                let poll_cx = *self.current_poll_cx;
+                let _reset = Reset(self.current_poll_cx, poll_cx);
+                *self.current_poll_cx = ptr::null_mut();
+                assert!(!poll_cx.is_null());
+                future.as_mut().poll(&mut *poll_cx)
+            };
+
+            match future_result {
+                Poll::Ready(t) => break Ok(t),
+                Poll::Pending => {}
+            }
+            let res = (*suspend).suspend(());
+            res?;
+        }
+    }
+}
+
+struct Reset<T: Copy>(*mut T, T);
+impl<T: Copy> Drop for Reset<T> {
+    fn drop(&mut self) {
+        unsafe {
+            *self.0 = self.1;
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/async/function.rs.html b/src/wasmedge_sys/async/function.rs.html new file mode 100644 index 000000000..d44481a2b --- /dev/null +++ b/src/wasmedge_sys/async/function.rs.html @@ -0,0 +1,505 @@ +function.rs - source

wasmedge_sys/async/
function.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
use crate::{
+    ffi, instance::module::InnerInstance, r#async::fiber::AsyncCx, CallingFrame, FuncType,
+    Function, Instance, WasmEdgeResult, WasmValue,
+};
+use std::{future::Future, os::raw::c_void};
+use wasmedge_types::error::CoreError;
+
+use super::module::AsyncInstance;
+
+pub type AsyncFn<'data, 'inst, 'frame, 'fut, Data>
+    // where
+    //     'data: 'fut,
+    //     'inst: 'fut,
+    //     'frame: 'fut,
+    = fn(
+    &'data mut Data,
+    &'inst mut AsyncInstance,
+    &'frame mut CallingFrame,
+    Vec<WasmValue>,
+) -> Box<dyn Future<Output = Result<Vec<WasmValue>, CoreError>> + Send + 'fut>;
+
+unsafe extern "C" fn wrap_async_fn<Data>(
+    key_ptr: *mut c_void,
+    data: *mut std::os::raw::c_void,
+    call_frame_ctx: *const ffi::WasmEdge_CallingFrameContext,
+    params: *const ffi::WasmEdge_Value,
+    param_len: u32,
+    returns: *mut ffi::WasmEdge_Value,
+    return_len: u32,
+) -> ffi::WasmEdge_Result {
+    let mut frame = CallingFrame::create(call_frame_ctx);
+    // let executor_ctx = ffi::WasmEdge_CallingFrameGetExecutor(call_frame_ctx);
+    let inst_ctx = ffi::WasmEdge_CallingFrameGetModuleInstance(call_frame_ctx);
+    let mut inst = std::mem::ManuallyDrop::new(AsyncInstance(Instance {
+        inner: InnerInstance(inst_ctx as _),
+    }));
+    let data = &mut *(data as *mut Data);
+
+    // arguments
+    let input = if params.is_null() || param_len == 0 {
+        vec![]
+    } else {
+        let raw_input = unsafe { std::slice::from_raw_parts(params, param_len as usize) };
+        raw_input.iter().map(|r| (*r).into()).collect::<Vec<_>>()
+    };
+
+    // returns
+    let return_len = return_len as usize;
+    let mut empty_return = [];
+    let raw_returns = if returns.is_null() || return_len == 0 {
+        &mut empty_return
+    } else {
+        unsafe { std::slice::from_raw_parts_mut(returns, return_len) }
+    };
+
+    // get and call host function
+    let real_fn: AsyncFn<'_, '_, '_, '_, Data> = std::mem::transmute(key_ptr);
+
+    let async_cx = AsyncCx::new();
+    let mut future = std::pin::Pin::from(real_fn(data, &mut inst, &mut frame, input));
+    // call host function
+    let result = match unsafe { async_cx.block_on(future.as_mut()) } {
+        Ok(Ok(ret)) => Ok(ret),
+        Ok(Err(err)) => Err(err),
+        Err(_err) => Err(CoreError::Common(
+            wasmedge_types::error::CoreCommonError::Interrupted,
+        )),
+    };
+
+    // parse result
+    match result {
+        Ok(returns) => {
+            assert!(returns.len() == return_len, "[wasmedge-sys] check the number of returns of async host function. Expected: {}, actual: {}", return_len, returns.len());
+            for (idx, wasm_value) in returns.into_iter().enumerate() {
+                raw_returns[idx] = wasm_value.as_raw();
+            }
+            ffi::WasmEdge_Result { Code: 0 }
+        }
+        Err(err) => err.into(),
+    }
+}
+
+pub struct AsyncFunction(pub(crate) Function);
+
+impl AsyncFunction {
+    /// Creates an async [host function](crate::Function) with the given function type.
+    ///
+    /// # Arguments
+    ///
+    /// * `ty` - The types of the arguments and returns of the target function.
+    ///
+    /// * `real_fn` - The pointer to the target function.
+    ///
+    /// * `data` - The host context data used in this function.
+    ///
+    /// * `cost` - The function cost in the [Statistics](crate::Statistics). Pass 0 if the calculation is not needed.
+    ///
+    /// # Error
+    ///
+    /// * If fail to create a [Function], then [WasmEdgeError::Func(FuncError::Create)](wasmedge_types::error::FuncError) is returned.
+    ///
+    pub fn create_async_func<'data, 'inst, 'frame, 'fut, T: Send>(
+        ty: &FuncType,
+        real_fn: AsyncFn<'data, 'inst, 'frame, 'fut, T>,
+        data: *mut T,
+        cost: u64,
+    ) -> WasmEdgeResult<Self>
+    where
+        'data: 'fut,
+        'inst: 'fut,
+        'frame: 'fut,
+    {
+        let f = unsafe {
+            Function::create_with_custom_wrapper(
+                ty,
+                wrap_async_fn::<T>,
+                real_fn as _,
+                data as _,
+                cost,
+            )
+        }?;
+        Ok(Self(f))
+    }
+}
+
+impl AsRef<Function> for AsyncFunction {
+    fn as_ref(&self) -> &Function {
+        &self.0
+    }
+}
+
+impl AsMut<Function> for AsyncFunction {
+    fn as_mut(&mut self) -> &mut Function {
+        &mut self.0
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{
+        instance::function::AsFunc,
+        r#async::{fiber::AsyncState, module::AsyncImportObject},
+        types::WasmValue,
+        AsInstance, Executor,
+    };
+
+    use wasmedge_types::{error::CoreExecutionError, FuncType, ValType};
+
+    #[tokio::test]
+    async fn test_func_basic() {
+        #[derive(Debug)]
+        struct Data<T, S> {
+            _x: i32,
+            _y: String,
+            _v: Vec<T>,
+            _s: Vec<S>,
+        }
+
+        let data: Data<i32, &str> = Data {
+            _x: 12,
+            _y: "hello".to_string(),
+            _v: vec![1, 2, 3],
+            _s: vec!["macos", "linux", "windows"],
+        };
+
+        fn real_add<T: core::fmt::Debug>(
+            _host_data: &mut Data<i32, &str>,
+            _inst: &mut AsyncInstance,
+            _frame: &mut CallingFrame,
+            input: Vec<WasmValue>,
+        ) -> Box<dyn Future<Output = Result<Vec<WasmValue>, CoreError>> + Send> {
+            Box::new(async move {
+                println!("Rust: Entering Rust function real_add");
+
+                if input.len() != 2 {
+                    return Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch));
+                }
+
+                let a = if input[0].ty() == ValType::I32 {
+                    input[0].to_i32()
+                } else {
+                    return Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch));
+                };
+
+                let b = if input[1].ty() == ValType::I32 {
+                    input[1].to_i32()
+                } else {
+                    return Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch));
+                };
+
+                tokio::time::sleep(std::time::Duration::from_millis(300)).await;
+
+                let c = a + b;
+                println!("Rust: calcuating in real_add c: {c:?}");
+
+                println!("Rust: Leaving Rust function real_add");
+                Ok(vec![WasmValue::from_i32(c)])
+            })
+        }
+
+        let mut import_module = AsyncImportObject::create("test_module", Box::new(data)).unwrap();
+
+        // create a FuncType
+        let func_ty = FuncType::new(vec![ValType::I32; 2], vec![ValType::I32]);
+        // create a host function
+        let result = AsyncFunction::create_async_func(
+            &func_ty,
+            real_add::<Data<i32, &str>>,
+            import_module.get_host_data_mut(),
+            0,
+        );
+        assert!(result.is_ok());
+        let host_func = result.unwrap();
+
+        // get func type
+        let result = host_func.ty();
+        assert!(result.is_some());
+        let ty = result.unwrap();
+
+        // check parameters
+        assert_eq!(ty.args_len(), 2);
+        assert_eq!(ty.args(), &[ValType::I32; 2]);
+
+        // check returns
+        assert_eq!(ty.returns_len(), 1);
+        assert_eq!(ty.returns(), &[ValType::I32]);
+
+        import_module.add_async_func("add", host_func);
+
+        // run this function
+        let result = Executor::create(None, None);
+        assert!(result.is_ok());
+        let mut executor = result.unwrap();
+
+        let mut add_func = import_module.get_func_mut("add").unwrap();
+
+        let async_state = AsyncState::new();
+
+        let result = executor
+            .call_func_async(
+                &async_state,
+                &mut add_func,
+                vec![WasmValue::from_i32(1), WasmValue::from_i32(2)],
+            )
+            .await;
+
+        assert!(result.is_ok());
+        let returns = result.unwrap();
+        assert_eq!(returns[0].to_i32(), 3);
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/async/mod.rs.html b/src/wasmedge_sys/async/mod.rs.html new file mode 100644 index 000000000..ea6f2a8e0 --- /dev/null +++ b/src/wasmedge_sys/async/mod.rs.html @@ -0,0 +1,17 @@ +mod.rs - source

wasmedge_sys/async/
mod.rs

+1
+2
+3
+4
+5
+6
+7
+8
//! Defines `async` related types.
+
+pub mod fiber;
+pub mod function;
+pub mod module;
+
+pub use async_wasi;
+pub use module::AsyncWasiModule;
+
\ No newline at end of file diff --git a/src/wasmedge_sys/async/module.rs.html b/src/wasmedge_sys/async/module.rs.html new file mode 100644 index 000000000..65aba0218 --- /dev/null +++ b/src/wasmedge_sys/async/module.rs.html @@ -0,0 +1,4985 @@ +module.rs - source

wasmedge_sys/async/
module.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
use crate::{
+    instance::function::SyncFn, AsInstance, CallingFrame, FuncType, Function, ImportModule,
+    Instance, Memory, WasmEdgeResult, WasmValue,
+};
+use async_wasi::snapshots::{
+    common::{
+        error::Errno,
+        memory::WasmPtr,
+        types::{__wasi_ciovec_t, __wasi_size_t},
+    },
+    preview_1 as p, WasiCtx,
+};
+use std::{
+    future::Future,
+    ops::{Deref, DerefMut},
+};
+use wasmedge_types::{
+    error::{CoreCommonError, CoreError, CoreExecutionError},
+    ValType,
+};
+
+use super::function::{AsyncFn, AsyncFunction};
+
+#[derive(Debug)]
+pub struct AsyncInstance(pub(crate) Instance);
+
+impl AsRef<Instance> for AsyncInstance {
+    fn as_ref(&self) -> &Instance {
+        &self.0
+    }
+}
+
+impl AsMut<Instance> for AsyncInstance {
+    fn as_mut(&mut self) -> &mut Instance {
+        &mut self.0
+    }
+}
+
+#[derive(Debug)]
+pub struct AsyncImportObject<T: Send>(ImportModule<T>);
+impl<T: Send> Deref for AsyncImportObject<T> {
+    type Target = ImportModule<T>;
+    fn deref(&self) -> &Self::Target {
+        &self.0
+    }
+}
+impl<T: Send> DerefMut for AsyncImportObject<T> {
+    fn deref_mut(&mut self) -> &mut Self::Target {
+        &mut self.0
+    }
+}
+
+impl<T: Send> AsyncImportObject<T> {
+    pub fn create(name: impl AsRef<str>, data: Box<T>) -> WasmEdgeResult<Self> {
+        let inner = ImportModule::create(name, data)?;
+        Ok(AsyncImportObject(inner))
+    }
+
+    pub fn add_async_func(&mut self, name: impl AsRef<str>, func: AsyncFunction) {
+        self.0.add_func(name, func.0);
+    }
+}
+impl<T: Send> AsRef<ImportModule<T>> for AsyncImportObject<T> {
+    fn as_ref(&self) -> &ImportModule<T> {
+        &self.0
+    }
+}
+impl<T: Send> AsMut<ImportModule<T>> for AsyncImportObject<T> {
+    fn as_mut(&mut self) -> &mut ImportModule<T> {
+        &mut self.0
+    }
+}
+
+impl<T: Send> AsInstance for AsyncImportObject<T> {
+    unsafe fn as_ptr(&self) -> *const crate::ffi::WasmEdge_ModuleInstanceContext {
+        self.0.as_ptr()
+    }
+}
+
+/// A [AsyncWasiModule] is a module instance for the WASI specification and used in the `async` scenario.
+#[derive(Debug)]
+pub struct AsyncWasiModule(AsyncImportObject<WasiCtx>);
+
+impl AsRef<AsyncImportObject<WasiCtx>> for AsyncWasiModule {
+    fn as_ref(&self) -> &AsyncImportObject<WasiCtx> {
+        &self.0
+    }
+}
+
+impl AsMut<AsyncImportObject<WasiCtx>> for AsyncWasiModule {
+    fn as_mut(&mut self) -> &mut AsyncImportObject<WasiCtx> {
+        &mut self.0
+    }
+}
+
+impl AsyncWasiModule {
+    /// Creates a [AsyncWasiModule] instance.
+    ///
+    /// # Arguments
+    ///
+    /// * `args` - The commandline arguments. The first argument is the program name.
+    ///
+    /// * `envs` - The environment variables.
+    ///
+    /// # Error
+    ///
+    /// If fail to create a [AsyncWasiModule] instance, then an error is returned.
+    pub fn create(
+        args: Option<Vec<impl AsRef<str>>>,
+        envs: Option<Vec<(impl AsRef<str>, impl AsRef<str>)>>,
+    ) -> WasmEdgeResult<Self> {
+        // create wasi context
+        let mut wasi_ctx = WasiCtx::new();
+
+        // push args, envs and preopens
+        if let Some(args) = args {
+            wasi_ctx.push_args(args.iter().map(|x| x.as_ref().to_string()).collect());
+        }
+        if let Some(envs) = envs {
+            wasi_ctx.push_envs(
+                envs.iter()
+                    .map(|(k, v)| format!("{}={}", k.as_ref(), v.as_ref()))
+                    .collect(),
+            );
+        }
+
+        Self::create_from_wasi_context(wasi_ctx)
+    }
+
+    /// Creates a [AsyncWasiModule] instance with the given wasi context.
+    ///
+    /// # Arguments
+    ///
+    /// * `wasi_ctx` - The [WasiCtx](async_wasi::snapshots::WasiCtx) instance.
+    ///
+    /// # Error
+    ///
+    /// If fail to create [AsyncWasiModule] instance, then an error is returned.
+    pub fn create_from_wasi_context(wasi_ctx: WasiCtx) -> WasmEdgeResult<Self> {
+        // create wasi module
+        let name = "wasi_snapshot_preview1";
+
+        let mut async_wasi_module = Self(AsyncImportObject::create(name, Box::new(wasi_ctx))?);
+
+        // add sync/async host functions to the module
+        for wasi_func in wasi_impls() {
+            match wasi_func {
+                WasiFunc::SyncFn(name, (ty_args, ty_rets), real_fn) => {
+                    let func_ty = FuncType::new(ty_args, ty_rets);
+
+                    let func = unsafe {
+                        Function::create_sync_func(
+                            &func_ty,
+                            real_fn,
+                            async_wasi_module.0.get_host_data_mut(),
+                            0,
+                        )
+                    }?;
+
+                    async_wasi_module.0.add_func(&name, func);
+                }
+                WasiFunc::AsyncFn(name, (ty_args, ty_rets), real_async_fn) => {
+                    let func_ty = FuncType::new(ty_args, ty_rets);
+
+                    let func = AsyncFunction::create_async_func(
+                        &func_ty,
+                        real_async_fn,
+                        async_wasi_module.0.get_host_data_mut(),
+                        0,
+                    )?;
+
+                    async_wasi_module.0.add_async_func(&name, func);
+                }
+            }
+        }
+
+        Ok(async_wasi_module)
+    }
+
+    /// Returns the name of the module instance.
+    pub fn name(&self) -> &str {
+        "wasi_snapshot_preview1"
+    }
+
+    /// Returns the WASI exit code.
+    ///
+    /// The WASI exit code can be accessed after running the "_start" function of a `wasm32-wasi` program.
+    pub fn exit_code(&self) -> u32 {
+        self.0.get_host_data().exit_code
+    }
+}
+
+// ============== wasi host functions ==============
+
+fn args_get(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([argv, argv_buf]) = args.get(0..2) {
+        let argv = argv.to_i32() as usize;
+        let argv_buf = argv_buf.to_i32() as usize;
+        Ok(to_wasm_return(p::args_get(
+            data,
+            &mut *mem,
+            WasmPtr::from(argv),
+            WasmPtr::from(argv_buf),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn args_sizes_get(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([argc, argv_buf_size]) = args.get(0..2) {
+        let argc = argc.to_i32() as usize;
+        let argv_buf_size = argv_buf_size.to_i32() as usize;
+        Ok(to_wasm_return(p::args_sizes_get(
+            data,
+            &mut mem as &mut Memory,
+            WasmPtr::from(argc),
+            WasmPtr::from(argv_buf_size),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn environ_get(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2]) = args.get(0..2) {
+        let environ = p1.to_i32() as usize;
+        let environ_buf = p2.to_i32() as usize;
+        Ok(to_wasm_return(p::environ_get(
+            data,
+            &mut mem as &mut Memory,
+            WasmPtr::from(environ),
+            WasmPtr::from(environ_buf),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn environ_sizes_get(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2]) = args.get(0..2) {
+        let environ_count = p1.to_i32() as usize;
+        let environ_buf_size = p2.to_i32() as usize;
+        Ok(to_wasm_return(p::environ_sizes_get(
+            data,
+            &mut mem as &mut Memory,
+            WasmPtr::from(environ_count),
+            WasmPtr::from(environ_buf_size),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn clock_res_get(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2]) = args.get(0..2) {
+        let clock_id = p1.to_i32() as u32;
+        let resolution_ptr = p2.to_i32() as usize;
+        Ok(to_wasm_return(p::clock_res_get(
+            data,
+            &mut mem as &mut Memory,
+            clock_id,
+            WasmPtr::from(resolution_ptr),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn clock_time_get(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3]) = args.get(0..3) {
+        let clock_id = p1.to_i32() as u32;
+        let precision = p2.to_i64() as u64;
+        let time_ptr = p3.to_i32() as usize;
+
+        Ok(to_wasm_return(p::clock_time_get(
+            data,
+            &mut mem as &mut Memory,
+            clock_id,
+            precision,
+            WasmPtr::from(time_ptr),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn random_get(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2]) = args.get(0..2) {
+        let buf = p1.to_i32() as usize;
+        let buf_len = p2.to_i32() as u32;
+
+        Ok(to_wasm_return(p::random_get(
+            data,
+            &mut mem as &mut Memory,
+            WasmPtr::from(buf),
+            buf_len,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_prestat_get(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2]) = args.get(0..2) {
+        let fd = p1.to_i32();
+        let prestat_ptr = p2.to_i32() as usize;
+
+        Ok(to_wasm_return(p::fd_prestat_get(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            WasmPtr::from(prestat_ptr),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_prestat_dir_name(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3]) = args.get(0..3) {
+        let fd = p1.to_i32();
+        let path_buf_ptr = p2.to_i32() as usize;
+        let path_max_len = p3.to_i32() as u32;
+
+        Ok(to_wasm_return(p::fd_prestat_dir_name(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            WasmPtr::from(path_buf_ptr),
+            path_max_len,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_renumber(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2]) = args.get(0..2) {
+        let from = p1.to_i32();
+        let to = p2.to_i32();
+
+        Ok(to_wasm_return(p::fd_renumber(
+            data,
+            &mut mem as &mut Memory,
+            from,
+            to,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_advise(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4]) = args.get(0..4) {
+        let fd = p1.to_i32();
+        let offset = p2.to_i64() as u64;
+        let len = p3.to_i64() as u64;
+        let advice = p4.to_i32() as u8;
+
+        Ok(to_wasm_return(p::fd_advise(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            offset,
+            len,
+            advice,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_allocate(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3]) = args.get(0..3) {
+        let fd = p1.to_i32();
+        let offset = p2.to_i64() as u64;
+        let len = p3.to_i64() as u64;
+
+        Ok(to_wasm_return(p::fd_allocate(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            offset,
+            len,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_close(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1]) = args.get(0..1) {
+        let fd = p1.to_i32();
+
+        Ok(to_wasm_return(p::fd_close(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_seek(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4]) = args.get(0..4) {
+        let fd = p1.to_i32();
+        let offset = p2.to_i64();
+        let whence = p3.to_i32() as u8;
+        let newoffset_ptr = p4.to_i32() as usize;
+
+        Ok(to_wasm_return(p::fd_seek(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            offset,
+            whence,
+            WasmPtr::from(newoffset_ptr),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_sync(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1]) = args.get(0..1) {
+        let fd = p1.to_i32();
+
+        Ok(to_wasm_return(p::fd_sync(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_datasync(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1]) = args.get(0..1) {
+        let fd = p1.to_i32();
+
+        Ok(to_wasm_return(p::fd_datasync(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_tell(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2]) = args.get(0..2) {
+        let fd = p1.to_i32();
+        let offset = p2.to_i32() as usize;
+
+        Ok(to_wasm_return(p::fd_tell(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            WasmPtr::from(offset),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_fdstat_get(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2]) = args.get(0..2) {
+        let fd = p1.to_i32();
+        let buf_ptr = p2.to_i32() as usize;
+
+        Ok(to_wasm_return(p::fd_fdstat_get(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            WasmPtr::from(buf_ptr),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_fdstat_set_flags(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2]) = args.get(0..2) {
+        let fd = p1.to_i32();
+        let flags = p2.to_i32() as u16;
+
+        Ok(to_wasm_return(p::fd_fdstat_set_flags(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            flags,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_fdstat_set_rights(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3]) = args.get(0..3) {
+        let fd = p1.to_i32();
+        let fs_rights_base = p2.to_i64() as u64;
+        let fs_rights_inheriting = p3.to_i64() as u64;
+
+        Ok(to_wasm_return(p::fd_fdstat_set_rights(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            fs_rights_base,
+            fs_rights_inheriting,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_filestat_get(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2]) = args.get(0..2) {
+        let fd = p1.to_i32();
+        let buf = p2.to_i32() as usize;
+
+        Ok(to_wasm_return(p::fd_filestat_get(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            WasmPtr::from(buf),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_filestat_set_size(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2]) = args.get(0..2) {
+        let fd = p1.to_i32();
+        let buf = p2.to_i32() as usize;
+
+        Ok(to_wasm_return(p::fd_filestat_get(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            WasmPtr::from(buf),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_filestat_set_times(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4]) = args.get(0..4) {
+        let fd = p1.to_i32();
+        let st_atim = p2.to_i64() as u64;
+        let st_mtim = p3.to_i64() as u64;
+        let fst_flags = p4.to_i32() as u16;
+
+        Ok(to_wasm_return(p::fd_filestat_set_times(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            st_atim,
+            st_mtim,
+            fst_flags,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_read(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4]) = args.get(0..4) {
+        let fd = p1.to_i32();
+        let iovs = p2.to_i32() as usize;
+        let iovs_len = p3.to_i32() as u32;
+        let nread = p4.to_i32() as usize;
+
+        Ok(to_wasm_return(p::fd_read(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            WasmPtr::from(iovs),
+            iovs_len,
+            WasmPtr::from(nread),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_pread(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5]) = args.get(0..5) {
+        let fd = p1.to_i32();
+        let iovs = p2.to_i32() as usize;
+        let iovs_len = p3.to_i32() as u32;
+        let offset = p4.to_i64() as u64;
+        let nread = p5.to_i32() as usize;
+
+        Ok(to_wasm_return(p::fd_pread(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            WasmPtr::from(iovs),
+            iovs_len,
+            offset,
+            WasmPtr::from(nread),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_write(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4]) = args.get(0..4) {
+        let fd = p1.to_i32();
+        let iovs = p2.to_i32() as usize;
+        let iovs_len = p3.to_i32() as u32;
+        let nwritten = p4.to_i32() as usize;
+
+        Ok(to_wasm_return(p::fd_write(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            WasmPtr::from(iovs),
+            iovs_len,
+            WasmPtr::from(nwritten),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_pwrite(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5]) = args.get(0..5) {
+        let fd = p1.to_i32();
+        let iovs = p2.to_i32() as usize;
+        let iovs_len = p3.to_i32() as u32;
+        let offset = p4.to_i64() as u64;
+        let nwritten = p5.to_i32() as usize;
+
+        Ok(to_wasm_return(p::fd_pwrite(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            WasmPtr::from(iovs),
+            iovs_len,
+            offset,
+            WasmPtr::from(nwritten),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn fd_readdir(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5]) = args.get(0..5) {
+        let fd = p1.to_i32();
+        let buf = p2.to_i32() as usize;
+        let buf_len = p3.to_i32() as u32;
+        let cookie = p4.to_i64() as u64;
+        let bufused_ptr = p5.to_i32() as usize;
+
+        Ok(to_wasm_return(p::fd_readdir(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            WasmPtr::from(buf),
+            buf_len,
+            cookie,
+            WasmPtr::from(bufused_ptr),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn path_create_directory(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3]) = args.get(0..3) {
+        let dirfd = p1.to_i32();
+        let path_ptr = p2.to_i32() as usize;
+        let path_len = p3.to_i32() as u32;
+
+        Ok(to_wasm_return(p::path_create_directory(
+            data,
+            &mem as &Memory,
+            dirfd,
+            WasmPtr::from(path_ptr),
+            path_len,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn path_filestat_get(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5]) = args.get(0..5) {
+        let fd = p1.to_i32();
+        let flags = p2.to_i32() as u32;
+        let path_ptr = p3.to_i32() as usize;
+        let path_len = p4.to_i32() as u32;
+        let file_stat_ptr = p5.to_i32() as usize;
+
+        Ok(to_wasm_return(p::path_filestat_get(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            flags,
+            WasmPtr::from(path_ptr),
+            path_len,
+            WasmPtr::from(file_stat_ptr),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn path_filestat_set_times(
+    _data: &mut WasiCtx,
+    _inst: &mut Instance,
+    _frame: &mut CallingFrame,
+    _args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    Ok(vec![WasmValue::from_i32(
+        Errno::__WASI_ERRNO_NOSYS.0 as i32,
+    )])
+}
+
+fn path_link(
+    _data: &mut WasiCtx,
+    _inst: &mut Instance,
+    _frame: &mut CallingFrame,
+    _args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    Ok(vec![WasmValue::from_i32(
+        Errno::__WASI_ERRNO_NOSYS.0 as i32,
+    )])
+}
+
+fn path_open(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5, p6, p7, p8, p9]) = args.get(0..9) {
+        let dirfd = p1.to_i32();
+        let dirflags = p2.to_i32() as u32;
+        let path = p3.to_i32() as usize;
+        let path_len = p4.to_i32() as u32;
+        let o_flags = p5.to_i32() as u16;
+        let fs_rights_base = p6.to_i64() as u64;
+        let fs_rights_inheriting = p7.to_i64() as u64;
+        let fs_flags = p8.to_i32() as u16;
+        let fd_ptr = p9.to_i32() as usize;
+
+        Ok(to_wasm_return(p::path_open(
+            data,
+            &mut mem as &mut Memory,
+            dirfd,
+            dirflags,
+            WasmPtr::from(path),
+            path_len,
+            o_flags,
+            fs_rights_base,
+            fs_rights_inheriting,
+            fs_flags,
+            WasmPtr::from(fd_ptr),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn path_readlink(
+    _data: &mut WasiCtx,
+    _inst: &mut Instance,
+    _frame: &mut CallingFrame,
+    _args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    Ok(vec![WasmValue::from_i32(
+        Errno::__WASI_ERRNO_NOSYS.0 as i32,
+    )])
+}
+
+fn path_remove_directory(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3]) = args.get(0..3) {
+        let fd = p1.to_i32();
+        let path_ptr = p2.to_i32() as usize;
+        let path_len = p3.to_i32() as u32;
+
+        Ok(to_wasm_return(p::path_remove_directory(
+            data,
+            &mem as &Memory,
+            fd,
+            WasmPtr::from(path_ptr),
+            path_len,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn path_rename(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5, p6]) = args.get(0..6) {
+        let old_fd = p1.to_i32();
+        let old_path = p2.to_i32() as usize;
+        let old_path_len = p3.to_i32() as u32;
+        let new_fd = p4.to_i32();
+        let new_path = p5.to_i32() as usize;
+        let new_path_len = p6.to_i32() as u32;
+
+        Ok(to_wasm_return(p::path_rename(
+            data,
+            &mem as &Memory,
+            old_fd,
+            WasmPtr::from(old_path),
+            old_path_len,
+            new_fd,
+            WasmPtr::from(new_path),
+            new_path_len,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn path_symlink(
+    _data: &mut WasiCtx,
+    _inst: &mut Instance,
+    _frame: &mut CallingFrame,
+    _args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    Ok(vec![WasmValue::from_i32(
+        Errno::__WASI_ERRNO_NOSYS.0 as i32,
+    )])
+}
+
+fn path_unlink_file(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3]) = args.get(0..3) {
+        let fd = p1.to_i32();
+        let path_ptr = p2.to_i32() as usize;
+        let path_len = p3.to_i32() as u32;
+
+        Ok(to_wasm_return(p::path_unlink_file(
+            data,
+            &mem as &Memory,
+            fd,
+            WasmPtr::from(path_ptr),
+            path_len,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn proc_exit(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1]) = args.get(0..1) {
+        let code = p1.to_i32() as u32;
+        p::proc_exit(data, &mut mem as &mut Memory, code);
+        Err(CoreError::Common(CoreCommonError::Terminated))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn proc_raise(
+    _data: &mut WasiCtx,
+    _inst: &mut Instance,
+    _frame: &mut CallingFrame,
+    _args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    Ok(vec![WasmValue::from_i32(
+        Errno::__WASI_ERRNO_NOSYS.0 as i32,
+    )])
+}
+
+// todo: ld asyncify yield
+
+fn sched_yield(
+    _data: &mut WasiCtx,
+    _inst: &mut Instance,
+    _frame: &mut CallingFrame,
+    _args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    Ok(vec![WasmValue::from_i32(
+        Errno::__WASI_ERRNO_NOSYS.0 as i32,
+    )])
+}
+
+//socket
+
+fn sock_open(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3]) = args.get(0..3) {
+        let af = p1.to_i32() as u8;
+        let ty = p2.to_i32() as u8;
+        let ro_fd_ptr = p3.to_i32() as usize;
+
+        Ok(to_wasm_return(p::async_socket::sock_open(
+            data,
+            &mut mem as &mut Memory,
+            af,
+            ty,
+            WasmPtr::from(ro_fd_ptr),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn sock_bind(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3]) = args.get(0..3) {
+        let fd = p1.to_i32();
+        let addr_ptr = p2.to_i32() as usize;
+        let port = p3.to_i32() as u32;
+        Ok(to_wasm_return(p::async_socket::sock_bind(
+            data,
+            &mem as &Memory,
+            fd,
+            WasmPtr::from(addr_ptr),
+            port,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn sock_listen(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2]) = args.get(0..2) {
+        let fd = p1.to_i32();
+        let backlog = p2.to_i32() as u32;
+
+        Ok(to_wasm_return(p::async_socket::sock_listen(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            backlog,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn sock_accept<'data, 'inst, 'frame, 'fut>(
+    data: &'data mut WasiCtx,
+    _inst: &'inst mut AsyncInstance,
+    frame: &'frame mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Box<dyn Future<Output = Result<Vec<WasmValue>, CoreError>> + Send + 'fut>
+where
+    'data: 'fut,
+    'frame: 'fut,
+    'inst: 'fut,
+{
+    Box::new(async move {
+        let mut mem = frame
+            .memory_mut(0)
+            .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+        if let Some([p1, p2]) = args.get(0..2) {
+            let fd = p1.to_i32();
+            let ro_fd_ptr = p2.to_i32() as usize;
+
+            Ok(to_wasm_return(
+                p::async_socket::sock_accept(
+                    data,
+                    &mut mem as &mut Memory,
+                    fd,
+                    WasmPtr::from(ro_fd_ptr),
+                )
+                .await,
+            ))
+        } else {
+            Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+        }
+    })
+}
+
+async fn sock_connect(
+    data: &mut WasiCtx,
+    _inst: &mut AsyncInstance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3]) = args.get(0..3) {
+        let fd = p1.to_i32();
+        let addr_ptr = p2.to_i32() as usize;
+        let port = p3.to_i32() as u32;
+
+        Ok(to_wasm_return(
+            p::async_socket::sock_connect(data, &mem as &Memory, fd, WasmPtr::from(addr_ptr), port)
+                .await,
+        ))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+async fn sock_recv(
+    data: &mut WasiCtx,
+    _inst: &mut AsyncInstance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5, p6]) = args.get(0..6) {
+        let fd = p1.to_i32();
+        let buf_ptr = p2.to_i32() as usize;
+        let buf_len = p3.to_i32() as u32;
+        let flags = p4.to_i32() as u16;
+        let ro_data_len_ptr = p5.to_i32() as usize;
+        let ro_flags_ptr = p6.to_i32() as usize;
+
+        Ok(to_wasm_return(
+            p::async_socket::sock_recv(
+                data,
+                &mut mem as &mut Memory,
+                fd,
+                WasmPtr::from(buf_ptr),
+                buf_len,
+                flags,
+                WasmPtr::from(ro_data_len_ptr),
+                WasmPtr::from(ro_flags_ptr),
+            )
+            .await,
+        ))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+async fn sock_recv_from(
+    data: &mut WasiCtx,
+    _inst: &mut AsyncInstance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5, p6, p7, p8]) = args.get(0..8) {
+        let fd = p1.to_i32();
+        let buf_ptr = p2.to_i32() as usize;
+        let buf_len = p3.to_i32() as u32;
+        let wasi_addr_ptr = p4.to_i32() as usize;
+        let flags = p5.to_i32() as u16;
+        let port_ptr = p6.to_i32() as usize;
+        let ro_data_len_ptr = p7.to_i32() as usize;
+        let ro_flags_ptr = p8.to_i32() as usize;
+
+        Ok(to_wasm_return(
+            p::async_socket::sock_recv_from(
+                data,
+                &mut mem as &mut Memory,
+                fd,
+                WasmPtr::from(buf_ptr),
+                buf_len,
+                WasmPtr::from(wasi_addr_ptr),
+                flags,
+                WasmPtr::from(port_ptr),
+                WasmPtr::from(ro_data_len_ptr),
+                WasmPtr::from(ro_flags_ptr),
+            )
+            .await,
+        ))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+async fn sock_send(
+    data: &mut WasiCtx,
+    _inst: &mut AsyncInstance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5]) = args.get(0..5) {
+        let fd = p1.to_i32();
+        let buf_ptr = p2.to_i32() as usize;
+        let buf_len = p3.to_i32() as u32;
+        let flags = p4.to_i32() as u16;
+        let send_len_ptr = p5.to_i32() as usize;
+
+        Ok(to_wasm_return(
+            p::async_socket::sock_send(
+                data,
+                &mut mem as &mut Memory,
+                fd,
+                WasmPtr::from(buf_ptr),
+                buf_len,
+                flags,
+                WasmPtr::from(send_len_ptr),
+            )
+            .await,
+        ))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+async fn sock_send_to(
+    data: &mut WasiCtx,
+    _inst: &mut AsyncInstance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5, p6, p7]) = args.get(0..7) {
+        let fd = p1.to_i32();
+        let buf_ptr = p2.to_i32() as usize;
+        let buf_len = p3.to_i32() as u32;
+        let wasi_addr_ptr = p4.to_i32() as usize;
+        let port = p5.to_i32() as u32;
+        let flags = p6.to_i32() as u16;
+        let send_len_ptr = p7.to_i32() as usize;
+
+        Ok(to_wasm_return(
+            p::async_socket::sock_send_to(
+                data,
+                &mut mem as &mut Memory,
+                fd,
+                WasmPtr::from(buf_ptr),
+                buf_len,
+                WasmPtr::from(wasi_addr_ptr),
+                port,
+                flags,
+                WasmPtr::from(send_len_ptr),
+            )
+            .await,
+        ))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn sock_shutdown(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2]) = args.get(0..2) {
+        let fd = p1.to_i32();
+        let how = p2.to_i32() as u8;
+        Ok(to_wasm_return(p::async_socket::sock_shutdown(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            how,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn sock_getpeeraddr(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4]) = args.get(0..4) {
+        let fd = p1.to_i32();
+        let wasi_addr_ptr = p2.to_i32() as usize;
+        let addr_type = p3.to_i32() as usize;
+        let port_ptr = p4.to_i32() as usize;
+        Ok(to_wasm_return(p::async_socket::sock_getpeeraddr(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            WasmPtr::from(wasi_addr_ptr),
+            WasmPtr::from(addr_type),
+            WasmPtr::from(port_ptr),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn sock_getlocaladdr(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4]) = args.get(0..4) {
+        let fd = p1.to_i32();
+        let wasi_addr_ptr = p2.to_i32() as usize;
+        let addr_type = p3.to_i32() as usize;
+        let port_ptr = p4.to_i32() as usize;
+        Ok(to_wasm_return(p::async_socket::sock_getlocaladdr(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            WasmPtr::from(wasi_addr_ptr),
+            WasmPtr::from(addr_type),
+            WasmPtr::from(port_ptr),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn sock_getsockopt(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5]) = args.get(0..5) {
+        let fd = p1.to_i32();
+        let level = p2.to_i32() as u32;
+        let name = p3.to_i32() as u32;
+        let flag = p4.to_i32() as usize;
+        let flag_size_ptr = p5.to_i32() as usize;
+        Ok(to_wasm_return(p::async_socket::sock_getsockopt(
+            data,
+            &mut mem as &mut Memory,
+            fd,
+            level,
+            name,
+            WasmPtr::from(flag),
+            WasmPtr::from(flag_size_ptr),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn sock_setsockopt(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5]) = args.get(0..5) {
+        let fd = p1.to_i32();
+        let level = p2.to_i32() as u32;
+        let name = p3.to_i32() as u32;
+        let flag = p4.to_i32() as usize;
+        let flag_size = p5.to_i32() as u32;
+        Ok(to_wasm_return(p::async_socket::sock_setsockopt(
+            data,
+            &mem as &Memory,
+            fd,
+            level,
+            name,
+            WasmPtr::from(flag),
+            flag_size,
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+fn sock_getaddrinfo(
+    data: &mut WasiCtx,
+    _inst: &mut Instance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5, p6, p7, p8]) = args.get(0..8) {
+        let node = p1.to_i32() as usize;
+        let node_len = p2.to_i32() as u32;
+        let server = p3.to_i32() as usize;
+        let server_len = p4.to_i32() as u32;
+        let hint = p5.to_i32() as usize;
+        let res = p6.to_i32() as usize;
+        let max_len = p7.to_i32() as u32;
+        let res_len = p8.to_i32() as usize;
+
+        Ok(to_wasm_return(p::async_socket::addrinfo::sock_getaddrinfo(
+            data,
+            &mut mem as &mut Memory,
+            WasmPtr::from(node),
+            node_len,
+            WasmPtr::from(server),
+            server_len,
+            WasmPtr::from(hint),
+            WasmPtr::from(res),
+            max_len,
+            WasmPtr::from(res_len),
+        )))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+async fn poll_oneoff(
+    data: &mut WasiCtx,
+    _inst: &mut AsyncInstance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4]) = args.get(0..4) {
+        let in_ptr = p1.to_i32() as usize;
+        let out_ptr = p2.to_i32() as usize;
+        let nsubscriptions = p3.to_i32() as u32;
+        let revents_num_ptr = p4.to_i32() as usize;
+
+        Ok(to_wasm_return(
+            p::async_poll::poll_oneoff(
+                data,
+                &mut mem as &mut Memory,
+                WasmPtr::from(in_ptr),
+                WasmPtr::from(out_ptr),
+                nsubscriptions,
+                WasmPtr::from(revents_num_ptr),
+            )
+            .await,
+        ))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+async fn sock_lookup_ip(
+    data: &mut WasiCtx,
+    _inst: &mut AsyncInstance,
+    frame: &mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError> {
+    let mut mem = frame
+        .memory_mut(0)
+        .ok_or(CoreError::Execution(CoreExecutionError::MemoryOutOfBounds))?;
+
+    if let Some([p1, p2, p3, p4, p5, p6]) = args.get(0..6) {
+        let host_name_ptr = p1.to_i32() as usize;
+        let host_name_len = p2.to_i32() as u32;
+        let lookup_type = p3.to_i32() as u8;
+        let addr_buf = p4.to_i32() as usize;
+        let addr_buf_max_len = p5.to_i32() as u32;
+        let raddr_num_ptr = p6.to_i32() as usize;
+        Ok(to_wasm_return(
+            p::async_socket::sock_lookup_ip(
+                data,
+                &mut mem as &mut Memory,
+                WasmPtr::from(host_name_ptr),
+                host_name_len,
+                lookup_type,
+                WasmPtr::from(addr_buf),
+                addr_buf_max_len,
+                WasmPtr::from(raddr_num_ptr),
+            )
+            .await,
+        ))
+    } else {
+        Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch))
+    }
+}
+
+#[inline]
+fn box_future<
+    'data,
+    'inst,
+    'frame,
+    'fut,
+    Data: Send,
+    Fut: Future<Output = Result<Vec<WasmValue>, CoreError>> + Send + 'fut,
+    F: FnOnce(
+        &'data mut Data,
+        &'inst mut AsyncInstance,
+        &'frame mut CallingFrame,
+        Vec<WasmValue>,
+    ) -> Fut,
+>(
+    data: &'data mut Data,
+    inst: &'inst mut AsyncInstance,
+    frame: &'frame mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Box<dyn Future<Output = Result<Vec<WasmValue>, CoreError>> + Send + 'fut>
+where
+    'data: 'fut,
+    'inst: 'fut,
+    'frame: 'fut,
+{
+    let f: F = unsafe { std::mem::zeroed() };
+    Box::new(f(data, inst, frame, args))
+}
+
+#[allow(clippy::complexity)]
+fn wrap_future<
+    'data,
+    'inst,
+    'frame,
+    'fut,
+    Data: Send + 'data,
+    Fut: Future<Output = Result<Vec<WasmValue>, CoreError>> + Send + 'fut,
+    F: FnOnce(
+        &'data mut Data,
+        &'inst mut AsyncInstance,
+        &'frame mut CallingFrame,
+        Vec<WasmValue>,
+    ) -> Fut,
+>(
+    _f: F,
+) -> fn(
+    data: &'data mut Data,
+    inst: &'inst mut AsyncInstance,
+    frame: &'frame mut CallingFrame,
+    args: Vec<WasmValue>,
+) -> Box<dyn Future<Output = Result<Vec<WasmValue>, CoreError>> + Send + 'fut>
+where
+    'data: 'fut,
+    'inst: 'fut,
+    'frame: 'fut,
+{
+    box_future::<Data, Fut, F>
+}
+
+enum WasiFunc<'data, 'inst, 'frame, 'fut, T: Sized>
+where
+    'data: 'fut,
+    'inst: 'fut,
+    'frame: 'fut,
+{
+    SyncFn(String, (Vec<ValType>, Vec<ValType>), SyncFn<T>),
+    AsyncFn(
+        String,
+        (Vec<ValType>, Vec<ValType>),
+        AsyncFn<'data, 'inst, 'frame, 'fut, T>,
+    ),
+}
+
+fn wasi_impls<'data, 'inst, 'frame, 'fut>() -> Vec<WasiFunc<'data, 'inst, 'frame, 'fut, WasiCtx>> {
+    macro_rules! sync_fn {
+        ($name:expr, $ty:expr, $f:ident) => {
+            WasiFunc::SyncFn($name.into(), $ty, $f)
+        };
+    }
+    macro_rules! async_fn {
+        ($name:expr, $ty:expr, $f:expr) => {
+            WasiFunc::AsyncFn($name.into(), $ty, $f)
+        };
+    }
+    vec![
+        sync_fn!(
+            "args_get",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            args_get
+        ),
+        sync_fn!(
+            "args_sizes_get",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            args_sizes_get
+        ),
+        sync_fn!(
+            "environ_get",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            environ_get
+        ),
+        sync_fn!(
+            "environ_sizes_get",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            environ_sizes_get
+        ),
+        sync_fn!(
+            "clock_res_get",
+            (vec![ValType::I32, ValType::I64], vec![ValType::I32]),
+            clock_res_get
+        ),
+        sync_fn!(
+            "clock_time_get",
+            (
+                vec![ValType::I32, ValType::I64, ValType::I32],
+                vec![ValType::I32],
+            ),
+            clock_time_get
+        ),
+        sync_fn!(
+            "random_get",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            random_get
+        ),
+        sync_fn!(
+            "fd_prestat_get",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            fd_prestat_get
+        ),
+        sync_fn!(
+            "fd_prestat_dir_name",
+            (
+                vec![ValType::I32, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            fd_prestat_dir_name
+        ),
+        sync_fn!(
+            "fd_renumber",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            fd_renumber
+        ),
+        sync_fn!(
+            "fd_advise",
+            (
+                vec![ValType::I32, ValType::I64, ValType::I64, ValType::I32],
+                vec![ValType::I32],
+            ),
+            fd_advise
+        ),
+        sync_fn!(
+            "fd_allocate",
+            (
+                vec![ValType::I32, ValType::I64, ValType::I64],
+                vec![ValType::I32],
+            ),
+            fd_allocate
+        ),
+        sync_fn!(
+            "fd_close",
+            (vec![ValType::I32], vec![ValType::I32]),
+            fd_close
+        ),
+        sync_fn!(
+            "fd_seek",
+            (
+                vec![ValType::I32, ValType::I64, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            fd_seek
+        ),
+        sync_fn!("fd_sync", (vec![ValType::I32], vec![ValType::I32]), fd_sync),
+        sync_fn!(
+            "fd_datasync",
+            (vec![ValType::I32], vec![ValType::I32]),
+            fd_datasync
+        ),
+        sync_fn!(
+            "fd_tell",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            fd_tell
+        ),
+        sync_fn!(
+            "fd_fdstat_get",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            fd_fdstat_get
+        ),
+        sync_fn!(
+            "fd_fdstat_set_flags",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            fd_fdstat_set_flags
+        ),
+        sync_fn!(
+            "fd_fdstat_set_rights",
+            (
+                vec![ValType::I32, ValType::I64, ValType::I64],
+                vec![ValType::I32],
+            ),
+            fd_fdstat_set_rights
+        ),
+        sync_fn!(
+            "fd_filestat_get",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            fd_filestat_get
+        ),
+        sync_fn!(
+            "fd_filestat_set_size",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            fd_filestat_set_size
+        ),
+        sync_fn!(
+            "fd_filestat_set_times",
+            (
+                vec![ValType::I32, ValType::I64, ValType::I64, ValType::I32],
+                vec![ValType::I32],
+            ),
+            fd_filestat_set_times
+        ),
+        sync_fn!(
+            "fd_read",
+            (
+                vec![ValType::I32, ValType::I32, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            fd_read
+        ),
+        sync_fn!(
+            "fd_pread",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I64,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            fd_pread
+        ),
+        sync_fn!(
+            "fd_write",
+            (
+                vec![ValType::I32, ValType::I32, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            fd_write
+        ),
+        sync_fn!(
+            "fd_pwrite",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I64,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            fd_pwrite
+        ),
+        sync_fn!(
+            "fd_readdir",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I64,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            fd_readdir
+        ),
+        sync_fn!(
+            "path_create_directory",
+            (
+                vec![ValType::I32, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            path_create_directory
+        ),
+        sync_fn!(
+            "path_filestat_get",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            path_filestat_get
+        ),
+        sync_fn!(
+            "path_filestat_set_times",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I64,
+                    ValType::I64,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            path_filestat_set_times
+        ),
+        sync_fn!(
+            "path_link",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            path_link
+        ),
+        sync_fn!(
+            "path_open",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I64,
+                    ValType::I64,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            path_open
+        ),
+        sync_fn!(
+            "path_readlink",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            path_readlink
+        ),
+        sync_fn!(
+            "path_remove_directory",
+            (
+                vec![ValType::I32, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            path_remove_directory
+        ),
+        sync_fn!(
+            "path_rename",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            path_rename
+        ),
+        sync_fn!(
+            "path_symlink",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            path_symlink
+        ),
+        sync_fn!(
+            "path_unlink_file",
+            (
+                vec![ValType::I32, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            path_unlink_file
+        ),
+        sync_fn!("proc_exit", (vec![ValType::I32], vec![]), proc_exit),
+        sync_fn!(
+            "proc_raise",
+            (vec![ValType::I32], vec![ValType::I32]),
+            proc_raise
+        ),
+        sync_fn!("sched_yield", (vec![], vec![ValType::I32]), sched_yield),
+        sync_fn!(
+            "sock_open",
+            (
+                vec![ValType::I32, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            sock_open
+        ),
+        sync_fn!(
+            "sock_bind",
+            (
+                vec![ValType::I32, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            sock_bind
+        ),
+        sync_fn!(
+            "sock_listen",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            sock_listen
+        ),
+        async_fn!(
+            "sock_accept",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            sock_accept
+        ),
+        async_fn!(
+            "sock_connect",
+            (
+                vec![ValType::I32, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            wrap_future(sock_connect)
+        ),
+        async_fn!(
+            "sock_recv",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            wrap_future(sock_recv)
+        ),
+        async_fn!(
+            "sock_recv_from",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            wrap_future(sock_recv_from)
+        ),
+        async_fn!(
+            "sock_send",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            wrap_future(sock_send)
+        ),
+        async_fn!(
+            "sock_send_to",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            wrap_future(sock_send_to)
+        ),
+        sync_fn!(
+            "sock_shutdown",
+            (vec![ValType::I32, ValType::I32], vec![ValType::I32]),
+            sock_shutdown
+        ),
+        sync_fn!(
+            "sock_getpeeraddr",
+            (
+                vec![ValType::I32, ValType::I32, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            sock_getpeeraddr
+        ),
+        sync_fn!(
+            "sock_getlocaladdr",
+            (
+                vec![ValType::I32, ValType::I32, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            sock_getlocaladdr
+        ),
+        sync_fn!(
+            "sock_getsockopt",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            sock_getsockopt
+        ),
+        sync_fn!(
+            "sock_setsockopt",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            sock_setsockopt
+        ),
+        async_fn!(
+            "poll_oneoff",
+            (
+                vec![ValType::I32, ValType::I32, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            wrap_future(poll_oneoff)
+        ),
+        async_fn!(
+            "epoll_oneoff",
+            (
+                vec![ValType::I32, ValType::I32, ValType::I32, ValType::I32],
+                vec![ValType::I32],
+            ),
+            wrap_future(poll_oneoff)
+        ),
+        async_fn!(
+            "sock_lookup_ip",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            wrap_future(sock_lookup_ip)
+        ),
+        sync_fn!(
+            "sock_getaddrinfo",
+            (
+                vec![
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                    ValType::I32,
+                ],
+                vec![ValType::I32],
+            ),
+            sock_getaddrinfo
+        ),
+    ]
+}
+
+fn to_wasm_return(r: Result<(), Errno>) -> Vec<WasmValue> {
+    let code = if let Err(e) = r { e.0 } else { 0 };
+    log::trace!("wasi return {code}");
+    vec![WasmValue::from_i32(code as i32)]
+}
+
+impl async_wasi::snapshots::common::memory::Memory for Memory {
+    fn get_data<T: Sized>(&self, offset: WasmPtr<T>) -> Result<&T, Errno> {
+        unsafe {
+            let r = std::mem::size_of::<T>();
+            let ptr = self
+                .data_pointer(offset.0 as u32, r as u32)
+                .map_err(|_| Errno::__WASI_ERRNO_FAULT)?;
+            Ok(ptr.cast::<T>().as_ref().unwrap())
+        }
+    }
+
+    fn get_slice<T: Sized>(&self, offset: WasmPtr<T>, len: usize) -> Result<&[T], Errno> {
+        unsafe {
+            let r = std::mem::size_of::<T>() * len;
+            let ptr = self
+                .data_pointer(offset.0 as u32, r as u32)
+                .map_err(|_| Errno::__WASI_ERRNO_FAULT)? as *const T;
+            Ok(std::slice::from_raw_parts(ptr, len))
+        }
+    }
+
+    fn get_iovec<'a>(
+        &self,
+        iovec_ptr: WasmPtr<__wasi_ciovec_t>,
+        iovec_len: __wasi_size_t,
+    ) -> Result<Vec<std::io::IoSlice<'a>>, Errno> {
+        unsafe {
+            let iovec = self.get_slice(iovec_ptr, iovec_len as usize)?.to_vec();
+            let mut result = Vec::with_capacity(iovec.len());
+            for i in iovec {
+                let ptr = self
+                    .data_pointer(i.buf, i.buf_len)
+                    .map_err(|_| Errno::__WASI_ERRNO_FAULT)?;
+                let s = std::io::IoSlice::new(std::slice::from_raw_parts(ptr, i.buf_len as usize));
+                result.push(s);
+            }
+            Ok(result)
+        }
+    }
+
+    fn mut_data<T: Sized>(&mut self, offset: WasmPtr<T>) -> Result<&mut T, Errno> {
+        unsafe {
+            let r = std::mem::size_of::<T>();
+            let ptr = self
+                .data_pointer_mut(offset.0 as u32, r as u32)
+                .map_err(|_| Errno::__WASI_ERRNO_FAULT)?;
+            Ok(ptr.cast::<T>().as_mut().unwrap())
+        }
+    }
+
+    fn mut_slice<T: Sized>(&mut self, offset: WasmPtr<T>, len: usize) -> Result<&mut [T], Errno> {
+        unsafe {
+            let r = std::mem::size_of::<T>() * len;
+            let ptr = self
+                .data_pointer_mut(offset.0 as u32, r as u32)
+                .map_err(|_| Errno::__WASI_ERRNO_FAULT)? as *mut T;
+            Ok(std::slice::from_raw_parts_mut(ptr, len))
+        }
+    }
+
+    fn mut_iovec(
+        &mut self,
+        iovec_ptr: WasmPtr<async_wasi::snapshots::env::wasi_types::__wasi_iovec_t>,
+        iovec_len: async_wasi::snapshots::env::wasi_types::__wasi_size_t,
+    ) -> Result<Vec<std::io::IoSliceMut<'_>>, Errno> {
+        unsafe {
+            let iovec = self.get_slice(iovec_ptr, iovec_len as usize)?.to_vec();
+            let mut result = Vec::with_capacity(iovec.len());
+            for i in iovec {
+                let ptr = self
+                    .data_pointer_mut(i.buf, i.buf_len)
+                    .map_err(|_| Errno::__WASI_ERRNO_FAULT)?;
+                let s = std::io::IoSliceMut::new(std::slice::from_raw_parts_mut(
+                    ptr,
+                    i.buf_len as usize,
+                ));
+                result.push(s);
+            }
+            Ok(result)
+        }
+    }
+
+    fn write_data<T: Sized>(&mut self, offset: WasmPtr<T>, data: T) -> Result<(), Errno> {
+        let p = self.mut_data(offset)?;
+        *p = data;
+        Ok(())
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{r#async::fiber::AsyncState, Executor, Loader, Store, Validator};
+
+    #[tokio::test]
+    async fn test_async_wasi_module() -> Result<(), Box<dyn std::error::Error>> {
+        // create an Executor
+        let result = Executor::create(None, None);
+        assert!(result.is_ok());
+        let mut executor = result.unwrap();
+        assert!(!executor.inner.0.is_null());
+
+        // create a Store
+        let result = Store::create();
+        assert!(result.is_ok());
+        let mut store = result.unwrap();
+
+        // create an AsyncWasiModule
+        let result = AsyncWasiModule::create(Some(vec!["abc"]), Some(vec![("ENV", "1")]));
+        assert!(result.is_ok());
+        let mut async_wasi_module = result.unwrap();
+
+        // register async_wasi module into the store
+        let result = executor.register_import_module(&mut store, async_wasi_module.as_mut());
+        assert!(result.is_ok());
+
+        let wasm_file = std::env::current_dir()
+            .unwrap()
+            .ancestors()
+            .nth(2)
+            .unwrap()
+            .join("examples/wasmedge-sys/async_hello.wasm");
+        let module = Loader::create(None)?.from_file(&wasm_file)?;
+        Validator::create(None)?.validate(&module)?;
+        let mut instance = executor.register_active_module(&mut store, &module)?;
+        let mut fn_start = instance.get_func_mut("_start")?;
+
+        async fn tick() {
+            let mut i = 0;
+            loop {
+                println!("[tick] i={i}");
+                tokio::time::sleep(std::time::Duration::from_millis(500)).await;
+                i += 1;
+            }
+        }
+        tokio::spawn(tick());
+
+        let async_state = AsyncState::new();
+        let _ = executor
+            .call_func_async(&async_state, &mut fn_start, [])
+            .await?;
+
+        Ok(())
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/compiler.rs.html b/src/wasmedge_sys/compiler.rs.html new file mode 100644 index 000000000..29a934ff4 --- /dev/null +++ b/src/wasmedge_sys/compiler.rs.html @@ -0,0 +1,1033 @@ +compiler.rs - source

wasmedge_sys/
compiler.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
//! Defines WasmEdge ahead-of-time compiler.
+
+use crate::{ffi, utils, utils::check, Config, WasmEdgeResult};
+use std::path::Path;
+use wasmedge_types::error::WasmEdgeError;
+
+/// Defines WasmEdge ahead-of-time(AOT) compiler and the relevant APIs.
+#[derive(Debug)]
+pub struct Compiler {
+    pub(crate) inner: InnerCompiler,
+}
+impl Drop for Compiler {
+    fn drop(&mut self) {
+        if !self.inner.0.is_null() {
+            unsafe { ffi::WasmEdge_CompilerDelete(self.inner.0) }
+        }
+    }
+}
+impl Compiler {
+    /// Creates a new AOT [compiler](crate::Compiler).
+    ///
+    /// # Error
+    ///
+    /// If fail to create a AOT [compiler](crate::Compiler), then an error is returned.
+    pub fn create(config: Option<&Config>) -> WasmEdgeResult<Self> {
+        let ctx = match config {
+            Some(config) => unsafe { ffi::WasmEdge_CompilerCreate(config.inner.0) },
+            None => unsafe { ffi::WasmEdge_CompilerCreate(std::ptr::null_mut()) },
+        };
+
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::CompilerCreate)),
+            false => Ok(Self {
+                inner: InnerCompiler(ctx),
+            }),
+        }
+    }
+
+    /// Compiles the input WASM from the given file path for the AOT mode and stores the result to the output file path.
+    ///
+    /// # Arguments
+    ///
+    /// * `wasm_file` - The input wasm file, of which the file extension should be one of `wasm` or`wat`.
+    ///
+    /// * `aot_file` - The generated AOT wasm file, of which the file extension should be `dylib` on macOS, `so` on Linux or `dll` on Windows.
+    ///
+    /// # Error
+    ///
+    /// If fail to compile, then an error is returned.
+    pub fn compile_from_file(
+        &self,
+        wasm_file: impl AsRef<Path>,
+        aot_file: impl AsRef<Path>,
+    ) -> WasmEdgeResult<()> {
+        match wasm_file.as_ref().extension() {
+            Some(extension) => match extension.to_str() {
+                Some("wasm") => self.compile_from_wasm_file(wasm_file, aot_file),
+                Some("wat") => {
+                    let bytes = wat::parse_file(wasm_file.as_ref())
+                        .map_err(|_| WasmEdgeError::Operation("Failed to parse wat file".into()))?;
+                    self.compile_from_bytes(bytes, aot_file)
+                }
+                _ => Err(Box::new(WasmEdgeError::Operation(
+                    "The wasm file's extension should be `wasm` or `wat`".into(),
+                ))),
+            },
+            None => Err(Box::new(WasmEdgeError::Operation(
+                "The wasm file's extension should be `wasm` or `wat`".into(),
+            ))),
+        }
+    }
+
+    fn compile_from_wasm_file(
+        &self,
+        wasm_file: impl AsRef<Path>,
+        aot_file: impl AsRef<Path>,
+    ) -> WasmEdgeResult<()> {
+        let in_path = utils::path_to_cstring(wasm_file.as_ref())?;
+        let out_path = utils::path_to_cstring(aot_file.as_ref())?;
+        unsafe {
+            check(ffi::WasmEdge_CompilerCompile(
+                self.inner.0,
+                in_path.as_ptr(),
+                out_path.as_ptr(),
+            ))
+        }
+    }
+
+    /// Compiles the input WASM from the given bytes for the AOT mode and stores the result to the output file path.
+    ///
+    /// # Argument
+    ///
+    /// * `wasm_bytes` - The in-memory WASM bytes.
+    ///
+    /// * `aot_file` - The generated AOT wasm file, of which the file extension should be `dylib` on macOS, `so` on Linux or `dll` on Windows.
+    ///
+    /// # Error
+    ///
+    /// If fail to compile, then an error is returned.
+    pub fn compile_from_bytes(
+        &self,
+        wasm_bytes: impl AsRef<[u8]>,
+        aot_file: impl AsRef<Path>,
+    ) -> WasmEdgeResult<()> {
+        let out_path = utils::path_to_cstring(aot_file.as_ref())?;
+        unsafe {
+            let ptr = libc::malloc(wasm_bytes.as_ref().len());
+            let dst = ::core::slice::from_raw_parts_mut(
+                ptr.cast::<std::mem::MaybeUninit<u8>>(),
+                wasm_bytes.as_ref().len(),
+            );
+            let src = ::core::slice::from_raw_parts(
+                wasm_bytes
+                    .as_ref()
+                    .as_ptr()
+                    .cast::<std::mem::MaybeUninit<u8>>(),
+                wasm_bytes.as_ref().len(),
+            );
+            dst.copy_from_slice(src);
+
+            check(ffi::WasmEdge_CompilerCompileFromBuffer(
+                self.inner.0,
+                ptr as *const u8,
+                wasm_bytes.as_ref().len() as u64,
+                out_path.as_ptr(),
+            ))?;
+
+            libc::free(ptr);
+        }
+
+        Ok(())
+    }
+
+    /// Provides a raw pointer to the inner Compiler context.
+    #[cfg(feature = "ffi")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "ffi")))]
+    pub fn as_ptr(&self) -> *const ffi::WasmEdge_CompilerContext {
+        self.inner.0 as *const _
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerCompiler(pub(crate) *mut ffi::WasmEdge_CompilerContext);
+unsafe impl Send for InnerCompiler {}
+unsafe impl Sync for InnerCompiler {}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{
+        AsInstance, CallingFrame, Compiler, Config, Executor, FuncType, Function, ImportModule,
+        Loader, Store, Validator, WasmValue,
+    };
+    use std::{
+        io::Read,
+        sync::{Arc, Mutex},
+        thread,
+    };
+    use wasmedge_types::{
+        error::{CoreError, CoreLoadError},
+        wat2wasm, CompilerOptimizationLevel, CompilerOutputFormat,
+    };
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_compiler() {
+        {
+            let result = Config::create();
+            assert!(result.is_ok());
+            let config = result.unwrap();
+
+            // create a AOT Compiler without configuration
+            let result = Compiler::create(None);
+            assert!(result.is_ok());
+
+            // create a AOT Compiler with a given configuration
+            let result = Compiler::create(Some(&config));
+            assert!(result.is_ok());
+            let compiler = result.unwrap();
+
+            // compile a file for universal WASM output format
+            let in_path = std::env::current_dir()
+                .unwrap()
+                .ancestors()
+                .nth(2)
+                .unwrap()
+                .join("examples/wasmedge-sys/data/fibonacci.wat");
+            #[cfg(target_os = "linux")]
+            let out_path = std::path::PathBuf::from("test_aot.so");
+            #[cfg(target_os = "macos")]
+            let out_path = std::path::PathBuf::from("test_aot.dylib");
+            #[cfg(target_os = "windows")]
+            let out_path = std::path::PathBuf::from("test_aot.dll");
+            assert!(!out_path.exists());
+            let result = compiler.compile_from_file(in_path, &out_path);
+            assert!(result.is_ok());
+            assert!(out_path.exists());
+            assert!(std::fs::remove_file(out_path).is_ok());
+
+            // compile a virtual file
+            let result = compiler.compile_from_file("not_exist.wasm", "not_exist_ast.wasm");
+            assert!(result.is_err());
+            assert_eq!(
+                result.unwrap_err(),
+                Box::new(WasmEdgeError::Core(CoreError::Load(
+                    CoreLoadError::IllegalPath
+                )))
+            );
+        }
+
+        {
+            let result = Config::create();
+            assert!(result.is_ok());
+            let mut config = result.unwrap();
+            // compile file for shared library output format
+            config.set_aot_compiler_output_format(CompilerOutputFormat::Native);
+
+            let result = Compiler::create(Some(&config));
+            assert!(result.is_ok());
+            let compiler = result.unwrap();
+            let in_path = std::env::current_dir()
+                .unwrap()
+                .ancestors()
+                .nth(2)
+                .unwrap()
+                .join("examples/wasmedge-sys/data/fibonacci.wat");
+            #[cfg(target_os = "linux")]
+            let out_path = std::path::PathBuf::from("test_aot_from_file.so");
+            #[cfg(target_os = "macos")]
+            let out_path = std::path::PathBuf::from("test_aot_from_file.dylib");
+            #[cfg(target_os = "windows")]
+            let out_path = std::path::PathBuf::from("test_aot_from_file.dll");
+            assert!(!out_path.exists());
+            let result = compiler.compile_from_file(in_path, &out_path);
+            assert!(result.is_ok());
+            assert!(out_path.exists());
+
+            // read buffer
+            let result = std::fs::File::open(&out_path);
+            assert!(result.is_ok());
+            let mut f = result.unwrap();
+            let mut buffer = [0u8; 4];
+            let result = f.read(&mut buffer);
+            assert!(result.is_ok());
+            let wasm_magic: [u8; 4] = [0x00, 0x61, 0x73, 0x6D];
+            assert_ne!(buffer, wasm_magic);
+
+            // cleanup
+            assert!(std::fs::remove_file(out_path).is_ok());
+        }
+
+        {
+            let result = wat2wasm(
+                br#"(module
+                    (export "fib" (func $fib))
+                    (func $fib (param $n i32) (result i32)
+                     (if
+                      (i32.lt_s
+                       (local.get $n)
+                       (i32.const 2)
+                      )
+                      (then
+                        (return (i32.const 1))
+                      )
+                     )
+                     (return
+                      (i32.add
+                       (call $fib
+                        (i32.sub
+                         (local.get $n)
+                         (i32.const 2)
+                        )
+                       )
+                       (call $fib
+                        (i32.sub
+                         (local.get $n)
+                         (i32.const 1)
+                        )
+                       )
+                      )
+                     )
+                    )
+                   )
+              "#,
+            );
+            assert!(result.is_ok());
+            let wasm_bytes = result.unwrap();
+
+            let result = Config::create();
+            assert!(result.is_ok());
+            let mut config = result.unwrap();
+            config.set_aot_optimization_level(CompilerOptimizationLevel::O0);
+            config.set_aot_compiler_output_format(CompilerOutputFormat::Native);
+
+            let result = Compiler::create(Some(&config));
+            assert!(result.is_ok());
+            let compiler = result.unwrap();
+            #[cfg(target_os = "linux")]
+            let out_path = std::path::PathBuf::from("test_aot_from_bytes.so");
+            #[cfg(target_os = "macos")]
+            let out_path = std::path::PathBuf::from("test_aot_from_bytes.dylib");
+            #[cfg(target_os = "windows")]
+            let out_path = std::path::PathBuf::from("test_aot_from_bytes.dll");
+            assert!(!out_path.exists());
+            let result = compiler.compile_from_bytes(wasm_bytes, &out_path);
+            assert!(result.is_ok());
+            assert!(out_path.exists());
+
+            // cleanup
+            assert!(std::fs::remove_file(out_path).is_ok());
+        }
+    }
+
+    #[test]
+    #[ignore]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_compiler_send() {
+        let result = Config::create();
+        assert!(result.is_ok());
+        let config = result.unwrap();
+
+        // create a AOT Compiler without configuration
+        let result = Compiler::create(None);
+        assert!(result.is_ok());
+
+        // create a AOT Compiler with a given configuration
+        let result = Compiler::create(Some(&config));
+        assert!(result.is_ok());
+        let compiler = result.unwrap();
+
+        let handle = thread::spawn(move || {
+            // compile a file for universal WASM output format
+            let in_path = std::env::current_dir()
+                .unwrap()
+                .join("examples/data/fibonacci.wat");
+            #[cfg(target_os = "linux")]
+            let out_path = std::path::PathBuf::from("test_aot_fib_send.so");
+            #[cfg(target_os = "macos")]
+            let out_path = std::path::PathBuf::from("test_aot_fib_send.dylib");
+            #[cfg(target_os = "windows")]
+            let out_path = std::path::PathBuf::from("test_aot_fib_send.dll");
+            assert!(!out_path.exists());
+            let result = compiler.compile_from_file(in_path, &out_path);
+            assert!(result.is_ok());
+            assert!(out_path.exists());
+            assert!(std::fs::remove_file(out_path).is_ok());
+        });
+
+        handle.join().unwrap();
+    }
+
+    #[test]
+    #[ignore]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_compiler_sync() {
+        let result = Config::create();
+        assert!(result.is_ok());
+        let config = result.unwrap();
+
+        // create a AOT Compiler without configuration
+        let result = Compiler::create(None);
+        assert!(result.is_ok());
+
+        // create a AOT Compiler with a given configuration
+        let result = Compiler::create(Some(&config));
+        assert!(result.is_ok());
+        let compiler = Arc::new(Mutex::new(result.unwrap()));
+
+        let compiler_cloned = Arc::clone(&compiler);
+        let handle = thread::spawn(move || {
+            let result = compiler_cloned.lock();
+            assert!(result.is_ok());
+            let compiler = result.unwrap();
+
+            // compile a file for universal WASM output format
+            let in_path = std::env::current_dir()
+                .unwrap()
+                .join("examples/data/fibonacci.wat");
+            let out_path = std::path::PathBuf::from("fibonacci_sync_thread_aot.wasm");
+            assert!(!out_path.exists());
+            let result = compiler.compile_from_file(in_path, &out_path);
+            assert!(result.is_ok());
+            assert!(out_path.exists());
+            assert!(std::fs::remove_file(out_path).is_ok());
+        });
+
+        {
+            let result = compiler.lock();
+            assert!(result.is_ok());
+            let compiler_main = result.unwrap();
+            // compile a file for universal WASM output format
+            let in_path = std::env::current_dir()
+                .unwrap()
+                .join("examples/data/fibonacci.wat");
+            #[cfg(target_os = "linux")]
+            let out_path = std::path::PathBuf::from("test_aot_fib_sync.so");
+            #[cfg(target_os = "macos")]
+            let out_path = std::path::PathBuf::from("test_aot_fib_sync.dylib");
+            #[cfg(target_os = "windows")]
+            let out_path = std::path::PathBuf::from("test_aot_fib_sync.dll");
+            assert!(!out_path.exists());
+            let result = compiler_main.compile_from_file(in_path, &out_path);
+            assert!(result.is_ok());
+            assert!(out_path.exists());
+            assert!(std::fs::remove_file(out_path).is_ok());
+        }
+
+        handle.join().unwrap();
+    }
+
+    #[test]
+    fn test_aot() -> Result<(), Box<dyn std::error::Error>> {
+        // create a Config context
+        let mut config = Config::create()?;
+        // enable options
+        config.tail_call(true);
+        config.annotations(true);
+        config.memory64(true);
+        config.threads(true);
+        config.exception_handling(true);
+        config.function_references(true);
+        config.set_aot_optimization_level(CompilerOptimizationLevel::O0);
+        config.set_aot_compiler_output_format(CompilerOutputFormat::Native);
+        config.interruptible(true);
+
+        // create an executor
+        let mut executor = Executor::create(Some(&config), None)?;
+
+        // create a store
+        let mut store = Store::create()?;
+
+        let import = create_spec_test_module();
+        executor.register_import_module(&mut store, &import)?;
+
+        // set the AOT compiler options
+        let result = Compiler::create(Some(&config));
+        assert!(result.is_ok());
+        let compiler = result.unwrap();
+
+        // compile a file for universal WASM output format
+        let in_path = std::env::current_dir()
+            .unwrap()
+            .ancestors()
+            .nth(2)
+            .unwrap()
+            .join("examples/wasmedge-sys/data/fibonacci.wat");
+        #[cfg(target_os = "macos")]
+        let out_path = std::path::PathBuf::from("fibonacci_aot.dylib");
+        #[cfg(target_os = "linux")]
+        let out_path = std::path::PathBuf::from("fibonacci_aot.so");
+        #[cfg(target_os = "windows")]
+        let out_path = std::path::PathBuf::from("fibonacci_aot.dll");
+        assert!(!out_path.exists());
+        let result = compiler.compile_from_file(in_path, &out_path);
+        assert!(result.is_ok());
+        assert!(out_path.exists());
+
+        {
+            // register the wasm module as named module
+            let extern_module = Loader::create(Some(&config))?.from_file(&out_path)?;
+            Validator::create(Some(&config))?.validate(&extern_module)?;
+            let mut extern_instance =
+                executor.register_named_module(&mut store, &extern_module, "extern")?;
+
+            let mut fib = extern_instance.get_func_mut("fib")?;
+            let returns = executor.call_func(&mut fib, [WasmValue::from_i32(5)])?;
+            assert_eq!(returns[0].to_i32(), 8);
+        }
+
+        {
+            // register the wasm module as active module
+            let active_module = Loader::create(Some(&config))?.from_file(&out_path)?;
+            Validator::create(Some(&config))?.validate(&active_module)?;
+            let mut active_instance =
+                executor.register_active_module(&mut store, &active_module)?;
+
+            let mut fib = active_instance.get_func_mut("fib")?;
+            let returns = executor.call_func(&mut fib, [WasmValue::from_i32(5)])?;
+            assert_eq!(returns[0].to_i32(), 8);
+        }
+
+        // remove the wasm file by the compiler
+        assert!(std::fs::remove_file(&out_path).is_ok());
+
+        Ok(())
+    }
+
+    #[cfg(feature = "aot")]
+    fn create_spec_test_module() -> ImportModule<()> {
+        // create an ImportObj module
+        let result = ImportModule::create("spectest", Box::new(()));
+        assert!(result.is_ok());
+        let mut import = result.unwrap();
+
+        // create a host function
+        let func_ty = FuncType::new(vec![], vec![]);
+        let result = unsafe {
+            Function::create_sync_func(&func_ty, spec_test_print, import.get_host_data_mut(), 0)
+        };
+        assert!(result.is_ok());
+        let host_func = result.unwrap();
+        // add host function "print"
+        import.add_func("print", host_func);
+        import
+    }
+
+    #[cfg(feature = "aot")]
+    fn spec_test_print(
+        _data: &mut (),
+        _inst: &mut crate::Instance,
+        _frame: &mut CallingFrame,
+        _inputs: Vec<WasmValue>,
+    ) -> Result<Vec<WasmValue>, CoreError> {
+        Ok(vec![])
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/config.rs.html b/src/wasmedge_sys/config.rs.html new file mode 100644 index 000000000..701552bbd --- /dev/null +++ b/src/wasmedge_sys/config.rs.html @@ -0,0 +1,2009 @@ +config.rs - source

wasmedge_sys/
config.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
//! Defines WasmEdge Config struct.
+
+use crate::{ffi, WasmEdgeResult};
+use wasmedge_types::error::WasmEdgeError;
+#[cfg(feature = "aot")]
+use wasmedge_types::{CompilerOptimizationLevel, CompilerOutputFormat};
+
+/// Defines Config struct used to check/set the configuration options.
+///
+/// [Config](crate::Config) manages the configuration options, which are used to initiate [Loader](crate::Loader), [Validator](crate::Validator), [Executor](crate::Executor), and [Compiler](crate::Compiler).
+///
+/// The configuration options are categorized into the following four groups:
+///
+/// - **WebAssembly Proposals**
+///
+///     This group of options are used to turn on/off the WebAssembly proposals. They are effective to any WasmEdge
+///     context created with [Config](crate::Config).
+///     
+///     - `MultiMemories` enables to use multiple memories within a single Wasm module.
+///
+///       Also see [Multiple Memories for Wasm](https://github.com/WebAssembly/multi-memory/blob/main/proposals/multi-memory/Overview.md)
+///     
+///     - `ImportExportMutGlobals` supports mutable imported and exported globals.
+///
+///       Also see [Import/Export Mutable Globals Proposal](https://github.com/WebAssembly/mutable-global/blob/master/proposals/mutable-global/Overview.md#importexport-mutable-globals).
+///
+///     - `NonTrapFloatToIntConversions` supports the non-trapping float-to-int conversion.
+///
+///       Also see [Non-trapping Float-to-int Conversions Proposal](https://github.com/WebAssembly/spec/blob/main/proposals/nontrapping-float-to-int-conversion/Overview.md).
+///
+///     - `SignExtensionOperators` supports new integer instructions for sign-extending 8-bit, 16-bit, and 32-bit values.
+///     
+///       Also see [Sign-extension Operators Proposal](https://github.com/WebAssembly/spec/blob/main/proposals/sign-extension-ops/Overview.md).
+///
+///     - `MultiValue` supports functions and instructions with multiple return values, and blocks with inputs.
+///     
+///       Also see [Multi-value Extension](https://github.com/WebAssembly/spec/blob/main/proposals/multi-value/Overview.md).
+///
+///     - `BulkMemoryOperations` supports bulk memory operations.
+///
+///       Also see [Bulk Memory Operations Proposal](https://github.com/WebAssembly/spec/blob/main/proposals/bulk-memory-operations/Overview.md#motivation-for-bulk-memory-operations).
+///
+///     - `ReferenceTypes` supports reference types.
+///
+///       Also see [Reference Types Proposal](https://github.com/WebAssembly/spec/blob/main/proposals/reference-types/Overview.md).
+///
+///     - `SIMD` supports 128-bit packed SIMD extension to WebAssembly.
+///
+///       Also see [SIMD Proposal](https://github.com/WebAssembly/spec/blob/main/proposals/simd/SIMD.md).
+///  
+///     - `TailCall` supports tail call optimization.
+///
+///       Also see [Tail Call Proposal](https://github.com/WebAssembly/tail-call/blob/master/proposals/tail-call/Overview.md).
+///
+///     - `Annotations` supports annotations in WASM text format.
+///
+///       Also see [Annotations Proposal](https://github.com/WebAssembly/annotations/blob/master/proposals/annotations/Overview.md).
+///
+///     - `Memory64` supports 64-bit memory indexes.
+///
+///       Also see [Memory64 Proposal](https://github.com/WebAssembly/memory64/blob/main/proposals/memory64/Overview.md).
+///
+///     - `Threads` supports threading feature.
+///
+///       Also see [Threading Proposal](https://github.com/WebAssembly/threads/blob/main/proposals/threads/Overview.md).
+///
+///     - `ExceptionHandling` supports exception handling.
+///     
+///       Also see [Exception Handling Proposal](https://github.com/WebAssembly/exception-handling/blob/main/proposals/exception-handling/Exceptions.md).
+///
+///     - `FunctionReferences` supports typed function references for WebAssembly.
+///
+///       Also see [Function References Proposal](https://github.com/WebAssembly/function-references/blob/master/proposals/function-references/Overview.md).
+///
+/// - **Host Registrations**
+///     - `Wasi` turns on the `WASI` support.
+///
+///     - `WasmEdgeProcess` turns on the `wasmedge_process` support.
+///     
+/// - **Memory Management**
+///     - `maximum_memory_page` limits the page size of [Memory](crate::Memory).
+///
+/// - **AOT Compilation**
+///
+///     The AOT compiler options configure the behavior about optimization level, output format, dump IR,
+///     and generic binary.
+///
+///     - Compiler Optimization Levels
+///         - `O0` performs as many optimizations as possible.
+///         
+///         - `O1` optimizes quickly without destroying debuggability.
+///
+///         - `02` optimizes for fast execution as much as possible without triggering significant incremental
+///                compile time or code size growth.
+///
+///         - `O3` optimizes for fast execution as much as possible.
+///
+///         - `Os` optimizes for small code size as much as possible without triggering significant incremental
+///                compile time or execution time slowdowns.
+///
+///         - `Oz` optimizes for small code size as much as possible.
+///
+///     - Compiler Output Formats
+///         - `Native` specifies the output format is native dynamic library (`*.wasm.so`).
+///
+///         - `Wasm` specifies the output format is WebAssembly with AOT compiled codes in custom section (`*.wasm`).
+///     
+///     - `dump_ir` determines if AOT compiler generates IR or not.
+///
+///     - `generic_binary` determines if AOT compiler generates the generic binary or not.
+///     
+///     - `interruptible` determines if AOT compiler generates interruptible binary or not.
+///     
+///     The configuration options above are only effective to [Compiler](crate::Compiler).
+///
+/// - **Runtime Statistics**
+///     - `instr_counting` determines if measuring the count of instructions when running a compiled or pure WASM.
+///
+///     - `cost_measuring` determines if measuring the instruction costs when running a compiled or pure WASM.
+///
+///     - `time_measuring` determines if measuring the running time when running a compiled or pure WASM.
+///
+/// API users can first set the options of interest, such as those related to the WebAssembly proposals,
+/// host registrations, AOT compiler options, and etc., then apply the configuration
+/// to create other WasmEdge runtime structs.
+#[derive(Debug)]
+pub struct Config {
+    pub(crate) inner: InnerConfig,
+}
+impl Drop for Config {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_ConfigureDelete(self.inner.0) }
+    }
+}
+impl Config {
+    /// Creates a new [Config](crate::Config).
+    ///
+    /// # Error
+    ///
+    /// If fail to create, then an error is returned.
+    pub fn create() -> WasmEdgeResult<Self> {
+        let ctx = unsafe { ffi::WasmEdge_ConfigureCreate() };
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::ConfigCreate)),
+            false => Ok(Self {
+                inner: InnerConfig(ctx),
+            }),
+        }
+    }
+
+    /// Sets the maximum number of the memory pages available.
+    ///
+    /// # Argument
+    ///
+    /// * `count` - The page count (64KB per page).
+    pub fn set_max_memory_pages(&mut self, count: u32) {
+        unsafe { ffi::WasmEdge_ConfigureSetMaxMemoryPage(self.inner.0, count) }
+    }
+
+    /// Returns the number of the memory pages available.
+    pub fn get_max_memory_pages(&self) -> u32 {
+        unsafe { ffi::WasmEdge_ConfigureGetMaxMemoryPage(self.inner.0) }
+    }
+
+    /// Enables or disables the ImportExportMutGlobals option. By default, the option is enabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn mutable_globals(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_ImportExportMutGlobals,
+                )
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_ImportExportMutGlobals,
+                )
+            }
+        }
+    }
+
+    /// Checks if the ImportExportMutGlobals option turns on or not.
+    pub fn mutable_globals_enabled(&self) -> bool {
+        unsafe {
+            ffi::WasmEdge_ConfigureHasProposal(
+                self.inner.0,
+                ffi::WasmEdge_Proposal_ImportExportMutGlobals,
+            )
+        }
+    }
+
+    /// Enables or disables the NonTrapFloatToIntConversions option. By default, the option is enabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn non_trap_conversions(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_NonTrapFloatToIntConversions,
+                )
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_NonTrapFloatToIntConversions,
+                )
+            }
+        }
+    }
+
+    /// Checks if the NonTrapFloatToIntConversions option turns on or not.
+    pub fn non_trap_conversions_enabled(&self) -> bool {
+        unsafe {
+            ffi::WasmEdge_ConfigureHasProposal(
+                self.inner.0,
+                ffi::WasmEdge_Proposal_NonTrapFloatToIntConversions,
+            )
+        }
+    }
+
+    /// Enables or disables the SignExtensionOperators option. By default, the option is enabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn sign_extension_operators(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_SignExtensionOperators,
+                )
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_SignExtensionOperators,
+                )
+            }
+        }
+    }
+
+    /// Checks if the SignExtensionOperators option turns on or not.
+    pub fn sign_extension_operators_enabled(&self) -> bool {
+        unsafe {
+            ffi::WasmEdge_ConfigureHasProposal(
+                self.inner.0,
+                ffi::WasmEdge_Proposal_SignExtensionOperators,
+            )
+        }
+    }
+
+    /// Enables or disables the MultiValue option. By default, the option is enabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn multi_value(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(self.inner.0, ffi::WasmEdge_Proposal_MultiValue)
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_MultiValue,
+                )
+            }
+        }
+    }
+
+    /// Checks if the MultiValue option turns on or not.
+    pub fn multi_value_enabled(&self) -> bool {
+        unsafe {
+            ffi::WasmEdge_ConfigureHasProposal(self.inner.0, ffi::WasmEdge_Proposal_MultiValue)
+        }
+    }
+
+    /// Enables or disables the BulkMemoryOperations option. By default, the option is enabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn bulk_memory_operations(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_BulkMemoryOperations,
+                )
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_BulkMemoryOperations,
+                )
+            }
+        }
+    }
+
+    /// Checks if the BulkMemoryOperations option turns on or not.
+    pub fn bulk_memory_operations_enabled(&self) -> bool {
+        unsafe {
+            ffi::WasmEdge_ConfigureHasProposal(
+                self.inner.0,
+                ffi::WasmEdge_Proposal_BulkMemoryOperations,
+            )
+        }
+    }
+
+    /// Enables or disables the ReferenceTypes option. By default, the option is enabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn reference_types(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_ReferenceTypes,
+                )
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_ReferenceTypes,
+                )
+            }
+        }
+    }
+
+    /// Checks if the ReferenceTypes option turns on or not.
+    pub fn reference_types_enabled(&self) -> bool {
+        unsafe {
+            ffi::WasmEdge_ConfigureHasProposal(self.inner.0, ffi::WasmEdge_Proposal_ReferenceTypes)
+        }
+    }
+
+    /// Enables or disables the SIMD option. By default, the option is enabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn simd(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(self.inner.0, ffi::WasmEdge_Proposal_SIMD)
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(self.inner.0, ffi::WasmEdge_Proposal_SIMD)
+            }
+        }
+    }
+
+    /// Checks if the SIMD option turns on or not.
+    pub fn simd_enabled(&self) -> bool {
+        unsafe { ffi::WasmEdge_ConfigureHasProposal(self.inner.0, ffi::WasmEdge_Proposal_SIMD) }
+    }
+
+    /// Enables or disables the TailCall option. By default, the option is disabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn tail_call(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(self.inner.0, ffi::WasmEdge_Proposal_TailCall)
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(self.inner.0, ffi::WasmEdge_Proposal_TailCall)
+            }
+        }
+    }
+
+    /// Checks if the TailCall option turns on or not.
+    pub fn tail_call_enabled(&self) -> bool {
+        unsafe { ffi::WasmEdge_ConfigureHasProposal(self.inner.0, ffi::WasmEdge_Proposal_TailCall) }
+    }
+
+    /// Enables or disables the Annotations option. By default, the option is disabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn annotations(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(self.inner.0, ffi::WasmEdge_Proposal_Annotations)
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_Annotations,
+                )
+            }
+        }
+    }
+
+    /// Checks if the Annotations option turns on or not.
+    pub fn annotations_enabled(&self) -> bool {
+        unsafe {
+            ffi::WasmEdge_ConfigureHasProposal(self.inner.0, ffi::WasmEdge_Proposal_Annotations)
+        }
+    }
+
+    /// Enables or disables the Memory64 option. By default, the option is disabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn memory64(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(self.inner.0, ffi::WasmEdge_Proposal_Memory64)
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(self.inner.0, ffi::WasmEdge_Proposal_Memory64)
+            }
+        }
+    }
+
+    /// Checks if the Memory64 option turns on or not.
+    pub fn memory64_enabled(&self) -> bool {
+        unsafe { ffi::WasmEdge_ConfigureHasProposal(self.inner.0, ffi::WasmEdge_Proposal_Memory64) }
+    }
+
+    /// Enables or disables the Threads option. By default, the option is disabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn threads(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(self.inner.0, ffi::WasmEdge_Proposal_Threads)
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(self.inner.0, ffi::WasmEdge_Proposal_Threads)
+            }
+        }
+    }
+
+    /// Checks if the Threads option turns on or not.
+    pub fn threads_enabled(&self) -> bool {
+        unsafe { ffi::WasmEdge_ConfigureHasProposal(self.inner.0, ffi::WasmEdge_Proposal_Threads) }
+    }
+
+    /// Enables or disables the GC option. By default, the option is disabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn gc(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(self.inner.0, ffi::WasmEdge_Proposal_GC)
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(self.inner.0, ffi::WasmEdge_Proposal_GC)
+            }
+        }
+    }
+
+    /// Checks if the GC option turns on or not.
+    pub fn gc_enabled(&self) -> bool {
+        unsafe { ffi::WasmEdge_ConfigureHasProposal(self.inner.0, ffi::WasmEdge_Proposal_GC) }
+    }
+
+    /// Enables or disables the ExceptionHandling option. By default, the option is disabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn exception_handling(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_ExceptionHandling,
+                )
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_ExceptionHandling,
+                )
+            }
+        }
+    }
+
+    /// Checks if the ExceptionHandling option turns on or not.
+    pub fn exception_handling_enabled(&self) -> bool {
+        unsafe {
+            ffi::WasmEdge_ConfigureHasProposal(
+                self.inner.0,
+                ffi::WasmEdge_Proposal_ExceptionHandling,
+            )
+        }
+    }
+
+    /// Enables or disables the FunctionReferences option. By default, the option is disabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn function_references(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_FunctionReferences,
+                )
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_FunctionReferences,
+                )
+            }
+        }
+    }
+
+    /// Checks if the FunctionReferences option turns on or not.
+    pub fn function_references_enabled(&self) -> bool {
+        unsafe {
+            ffi::WasmEdge_ConfigureHasProposal(
+                self.inner.0,
+                ffi::WasmEdge_Proposal_FunctionReferences,
+            )
+        }
+    }
+
+    /// Enables or disables the MultiMemories option. By default, the option is disabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn multi_memories(&mut self, enable: bool) {
+        unsafe {
+            if enable {
+                ffi::WasmEdge_ConfigureAddProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_MultiMemories,
+                )
+            } else {
+                ffi::WasmEdge_ConfigureRemoveProposal(
+                    self.inner.0,
+                    ffi::WasmEdge_Proposal_MultiMemories,
+                )
+            }
+        }
+    }
+
+    /// Checks if the MultiMemories option turns on or not.
+    pub fn multi_memories_enabled(&self) -> bool {
+        unsafe {
+            ffi::WasmEdge_ConfigureHasProposal(self.inner.0, ffi::WasmEdge_Proposal_MultiMemories)
+        }
+    }
+
+    /// Enables or disables the `ForceInterpreter` option. By default, the option is disabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether the option turns on or not.
+    pub fn interpreter_mode(&mut self, enable: bool) {
+        unsafe { ffi::WasmEdge_ConfigureSetForceInterpreter(self.inner.0, enable) }
+    }
+
+    /// Checks if the `ForceInterpreter` option turns on or not.
+    pub fn interpreter_mode_enabled(&self) -> bool {
+        unsafe { ffi::WasmEdge_ConfigureIsForceInterpreter(self.inner.0) }
+    }
+
+    // For AOT compiler
+
+    /// Sets the optimization level of AOT compiler. By default, the optimization level is `O3`.
+    ///
+    /// Notice that this function is only available when the `aot` feature is enabled.
+    ///
+    /// # Argument
+    ///
+    /// * `opt_level` - The optimization level of AOT compiler.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn set_aot_optimization_level(&mut self, opt_level: CompilerOptimizationLevel) {
+        unsafe {
+            ffi::WasmEdge_ConfigureCompilerSetOptimizationLevel(
+                self.inner.0,
+                opt_level as ffi::WasmEdge_CompilerOptimizationLevel,
+            )
+        }
+    }
+
+    /// Returns the optimization level of AOT compiler.
+    ///
+    /// Notice that this function is only available when the `aot` feature is enabled.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn get_aot_optimization_level(&self) -> CompilerOptimizationLevel {
+        let level = unsafe { ffi::WasmEdge_ConfigureCompilerGetOptimizationLevel(self.inner.0) };
+        level.into()
+    }
+
+    /// Sets the output binary format of AOT compiler. By default, the compiler output format is `Wasm`.
+    ///
+    /// Notice that this function is only available when the `aot` feature is enabled.
+    ///
+    /// # Argument
+    ///
+    /// * `format` - The format of the output binary.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn set_aot_compiler_output_format(&mut self, format: CompilerOutputFormat) {
+        unsafe {
+            ffi::WasmEdge_ConfigureCompilerSetOutputFormat(
+                self.inner.0,
+                format as ffi::WasmEdge_CompilerOutputFormat,
+            )
+        }
+    }
+
+    /// Returns the output binary format of AOT compiler.
+    ///
+    /// Notice that this function is only available when the `aot` feature is enabled.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn get_aot_compiler_output_format(&self) -> CompilerOutputFormat {
+        let value = unsafe { ffi::WasmEdge_ConfigureCompilerGetOutputFormat(self.inner.0) };
+        value.into()
+    }
+
+    /// Sets the dump IR option of AOT compiler. By default, the option is disabled.
+    ///
+    /// Notice that this function is only available when the `aot` feature is enabled.
+    ///
+    /// # Argument
+    ///
+    /// * `flag` - Whether dump ir or not.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn dump_ir(&mut self, flag: bool) {
+        unsafe { ffi::WasmEdge_ConfigureCompilerSetDumpIR(self.inner.0, flag) }
+    }
+
+    /// Checks if the dump IR option turns on or not.
+    ///
+    /// Notice that this function is only available when the `aot` feature is enabled.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn dump_ir_enabled(&self) -> bool {
+        unsafe { ffi::WasmEdge_ConfigureCompilerIsDumpIR(self.inner.0) }
+    }
+
+    /// Sets the generic binary option of AOT compiler. By default, the option is disabled.
+    ///
+    /// Notice that this function is only available when the `aot` feature is enabled.
+    ///
+    /// # Argument
+    ///
+    /// * `flag` - Whether generate the generic binary or not when perform AOT compilation.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn generic_binary(&mut self, flag: bool) {
+        unsafe { ffi::WasmEdge_ConfigureCompilerSetGenericBinary(self.inner.0, flag) }
+    }
+
+    /// Checks if the generic binary option of AOT compiler turns on or not.
+    ///
+    /// Notice that this function is only available when the `aot` feature is enabled.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn generic_binary_enabled(&self) -> bool {
+        unsafe { ffi::WasmEdge_ConfigureCompilerIsGenericBinary(self.inner.0) }
+    }
+
+    /// Enables or Disables the `Interruptible` option of AOT compiler. This option determines to generate interruptible binary or not when compilation in AOT compiler. By default, the option is disabled.
+    ///
+    /// Notice that this function is only available when the `aot` feature is enabled.
+    ///
+    /// # Argument
+    ///
+    /// * `enable` - Whether turn on the `Interruptible` option.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn interruptible(&mut self, enable: bool) {
+        unsafe { ffi::WasmEdge_ConfigureCompilerSetInterruptible(self.inner.0, enable) }
+    }
+
+    /// Checks if the `Interruptible` option of AOT Compiler turns on or not.
+    ///
+    /// Notice that this function is only available when the `aot` feature is enabled.
+    #[cfg(feature = "aot")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+    pub fn interruptible_enabled(&self) -> bool {
+        unsafe { ffi::WasmEdge_ConfigureCompilerIsInterruptible(self.inner.0) }
+    }
+
+    // For Statistics
+
+    /// Sets the instruction counting option. By default, the option is disabled.
+    ///
+    /// # Argument
+    ///
+    /// * `flag` - Whether support instruction counting or not when execution after AOT compilation.
+    pub fn count_instructions(&mut self, flag: bool) {
+        unsafe { ffi::WasmEdge_ConfigureStatisticsSetInstructionCounting(self.inner.0, flag) }
+    }
+
+    /// Checks if the instruction counting option turns on or not.
+    pub fn is_instruction_counting(&self) -> bool {
+        unsafe { ffi::WasmEdge_ConfigureStatisticsIsInstructionCounting(self.inner.0) }
+    }
+
+    /// Sets the cost measuring option. By default, the option is disabled.
+    ///
+    /// # Argument
+    ///
+    /// * `flag` - Whether support cost measuring or not when execution after AOT compilation.
+    pub fn measure_cost(&mut self, flag: bool) {
+        unsafe { ffi::WasmEdge_ConfigureStatisticsSetCostMeasuring(self.inner.0, flag) }
+    }
+
+    /// Checks if the cost measuring option turns on or not.
+    pub fn is_cost_measuring(&self) -> bool {
+        unsafe { ffi::WasmEdge_ConfigureStatisticsIsCostMeasuring(self.inner.0) }
+    }
+
+    /// Sets the time measuring option. By default, the option is disabled.
+    ///
+    /// # Argument
+    ///
+    /// * `flag` - Whether support time measuring or not when execution after AOT compilation.
+    pub fn measure_time(&mut self, flag: bool) {
+        unsafe { ffi::WasmEdge_ConfigureStatisticsSetTimeMeasuring(self.inner.0, flag) }
+    }
+
+    /// Checks if the time measuring option turns on or not.
+    pub fn is_time_measuring(&self) -> bool {
+        unsafe { ffi::WasmEdge_ConfigureStatisticsIsTimeMeasuring(self.inner.0) }
+    }
+
+    /// Provides a raw pointer to the inner Configure context.
+    #[cfg(feature = "ffi")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "ffi")))]
+    pub fn as_ptr(&self) -> *const ffi::WasmEdge_ConfigureContext {
+        self.inner.0 as *const _
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerConfig(pub(crate) *mut ffi::WasmEdge_ConfigureContext);
+unsafe impl Send for InnerConfig {}
+unsafe impl Sync for InnerConfig {}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use std::thread;
+
+    #[test]
+    fn test_config_options() {
+        // create a Config instance
+        let result = Config::create();
+        assert!(result.is_ok());
+        let mut config = result.unwrap();
+
+        // check default settings
+        assert!(!config.multi_memories_enabled());
+        assert!(!config.annotations_enabled());
+        assert!(config.bulk_memory_operations_enabled());
+        assert!(!config.exception_handling_enabled());
+        assert!(!config.function_references_enabled());
+        assert!(!config.memory64_enabled());
+        assert!(config.multi_value_enabled());
+        assert!(config.mutable_globals_enabled());
+        assert!(config.non_trap_conversions_enabled());
+        assert!(config.sign_extension_operators_enabled());
+        assert!(config.reference_types_enabled());
+        assert!(config.simd_enabled());
+        assert!(!config.tail_call_enabled());
+        assert!(!config.threads_enabled());
+        assert!(!config.gc_enabled());
+        assert!(!config.is_cost_measuring());
+        #[cfg(feature = "aot")]
+        assert!(!config.dump_ir_enabled());
+        #[cfg(feature = "aot")]
+        #[cfg(feature = "aot")]
+        assert!(!config.generic_binary_enabled());
+        assert!(!config.is_instruction_counting());
+        assert!(!config.is_time_measuring());
+        assert_eq!(config.get_max_memory_pages(), 65536);
+        #[cfg(feature = "aot")]
+        assert_eq!(
+            config.get_aot_optimization_level(),
+            CompilerOptimizationLevel::O3,
+        );
+        #[cfg(feature = "aot")]
+        assert_eq!(
+            config.get_aot_compiler_output_format(),
+            CompilerOutputFormat::Wasm,
+        );
+        assert!(!config.interpreter_mode_enabled());
+        #[cfg(feature = "aot")]
+        assert!(!config.interruptible_enabled());
+
+        // set options
+        config.multi_memories(true);
+        config.annotations(true);
+        config.bulk_memory_operations(false);
+        config.exception_handling(true);
+        config.memory64(true);
+        config.multi_value(false);
+        config.mutable_globals(false);
+        config.non_trap_conversions(false);
+        config.sign_extension_operators(false);
+        config.reference_types(false);
+        config.simd(false);
+        config.tail_call(true);
+        config.threads(true);
+        config.measure_cost(true);
+        config.measure_time(true);
+        #[cfg(feature = "aot")]
+        config.dump_ir(true);
+        #[cfg(feature = "aot")]
+        config.generic_binary(true);
+        config.count_instructions(true);
+        config.interpreter_mode(true);
+
+        // check new settings
+        assert!(config.multi_memories_enabled());
+        assert!(config.annotations_enabled());
+        assert!(!config.bulk_memory_operations_enabled());
+        assert!(config.exception_handling_enabled());
+        assert!(!config.function_references_enabled());
+        assert!(config.memory64_enabled());
+        assert!(!config.multi_value_enabled());
+        assert!(!config.mutable_globals_enabled());
+        assert!(!config.non_trap_conversions_enabled());
+        assert!(!config.sign_extension_operators_enabled());
+        assert!(!config.reference_types_enabled());
+        assert!(!config.simd_enabled());
+        assert!(config.tail_call_enabled());
+        assert!(config.threads_enabled());
+        assert!(config.is_cost_measuring());
+        #[cfg(feature = "aot")]
+        assert!(config.dump_ir_enabled());
+        #[cfg(feature = "aot")]
+        assert!(config.generic_binary_enabled());
+        assert!(config.is_instruction_counting());
+        assert!(config.is_time_measuring());
+        assert!(config.interpreter_mode_enabled());
+
+        // check function_references
+        // Enabling function_references also enables reference_types.
+        config.function_references(true);
+        assert!(config.function_references_enabled());
+        assert!(config.reference_types_enabled());
+
+        config.function_references(false);
+        assert!(!config.function_references_enabled());
+        assert!(config.reference_types_enabled());
+
+        // check gc
+        // Enabling gc also enables reference_types and function_references.
+        config.gc(true);
+        assert!(config.function_references_enabled());
+        assert!(config.reference_types_enabled());
+        assert!(config.gc_enabled());
+
+        config.gc(false);
+        assert!(config.function_references_enabled());
+        assert!(config.reference_types_enabled());
+        assert!(!config.gc_enabled());
+
+        // set maximum memory pages
+        config.set_max_memory_pages(10);
+        assert_eq!(config.get_max_memory_pages(), 10);
+        #[cfg(feature = "aot")]
+        config.set_aot_optimization_level(CompilerOptimizationLevel::Oz);
+        #[cfg(feature = "aot")]
+        assert_eq!(
+            config.get_aot_optimization_level(),
+            CompilerOptimizationLevel::Oz
+        );
+        #[cfg(feature = "aot")]
+        config.set_aot_compiler_output_format(CompilerOutputFormat::Native);
+        #[cfg(feature = "aot")]
+        assert_eq!(
+            config.get_aot_compiler_output_format(),
+            CompilerOutputFormat::Native,
+        );
+    }
+
+    #[test]
+    fn test_config_send() {
+        // create a Config instance
+        let result = Config::create();
+        assert!(result.is_ok());
+        let mut config = result.unwrap();
+
+        let handle = thread::spawn(move || {
+            // check default settings
+            assert!(!config.multi_memories_enabled());
+            assert!(!config.annotations_enabled());
+            assert!(config.bulk_memory_operations_enabled());
+            assert!(!config.exception_handling_enabled());
+            assert!(!config.function_references_enabled());
+            assert!(!config.memory64_enabled());
+            assert!(config.reference_types_enabled());
+            assert!(config.simd_enabled());
+            assert!(!config.tail_call_enabled());
+            assert!(!config.threads_enabled());
+            assert!(!config.gc_enabled());
+            assert!(!config.is_cost_measuring());
+            #[cfg(feature = "aot")]
+            assert!(!config.dump_ir_enabled());
+            #[cfg(feature = "aot")]
+            assert!(!config.generic_binary_enabled());
+            assert!(!config.is_instruction_counting());
+            assert!(!config.is_time_measuring());
+            assert_eq!(config.get_max_memory_pages(), 65536);
+            #[cfg(feature = "aot")]
+            assert_eq!(
+                config.get_aot_optimization_level(),
+                CompilerOptimizationLevel::O3,
+            );
+            #[cfg(feature = "aot")]
+            assert_eq!(
+                config.get_aot_compiler_output_format(),
+                CompilerOutputFormat::Wasm,
+            );
+
+            // set options
+            config.multi_memories(true);
+            config.annotations(true);
+            config.bulk_memory_operations(false);
+            config.exception_handling(true);
+            config.memory64(true);
+            config.reference_types(false);
+            config.simd(false);
+            config.tail_call(true);
+            config.threads(true);
+            config.measure_cost(true);
+            config.measure_time(true);
+            #[cfg(feature = "aot")]
+            config.dump_ir(true);
+            #[cfg(feature = "aot")]
+            config.generic_binary(true);
+            config.count_instructions(true);
+
+            // check new settings
+            assert!(config.multi_memories_enabled());
+            assert!(config.annotations_enabled());
+            assert!(!config.bulk_memory_operations_enabled());
+            assert!(config.exception_handling_enabled());
+            assert!(!config.function_references_enabled());
+            assert!(config.memory64_enabled());
+            assert!(!config.reference_types_enabled());
+            assert!(!config.simd_enabled());
+            assert!(config.tail_call_enabled());
+            assert!(config.threads_enabled());
+            assert!(!config.gc_enabled());
+            assert!(config.is_cost_measuring());
+            #[cfg(feature = "aot")]
+            assert!(config.dump_ir_enabled());
+            #[cfg(feature = "aot")]
+            assert!(config.generic_binary_enabled());
+            assert!(config.is_instruction_counting());
+            assert!(config.is_time_measuring());
+        });
+
+        handle.join().unwrap();
+    }
+
+    #[test]
+    fn test_config_sync() {
+        // create a Config instance
+        let result = Config::create();
+        assert!(result.is_ok());
+        let config = result.unwrap();
+
+        thread::scope(|s| {
+            s.spawn(|| {
+                {
+                    // check default settings
+                    assert!(!config.multi_memories_enabled());
+                    assert!(!config.annotations_enabled());
+                    assert!(config.bulk_memory_operations_enabled());
+                    assert!(!config.exception_handling_enabled());
+                    assert!(!config.function_references_enabled());
+                    assert!(!config.memory64_enabled());
+                    assert!(config.reference_types_enabled());
+                    assert!(config.simd_enabled());
+                    assert!(!config.tail_call_enabled());
+                    assert!(!config.threads_enabled());
+                    assert!(!config.gc_enabled());
+                    assert!(!config.is_cost_measuring());
+                    assert!(!config.is_instruction_counting());
+                    assert!(!config.is_time_measuring());
+                    assert_eq!(config.get_max_memory_pages(), 65536);
+                }
+            })
+            .join()
+            .unwrap();
+        });
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/executor.rs.html b/src/wasmedge_sys/executor.rs.html new file mode 100644 index 000000000..03846d0f6 --- /dev/null +++ b/src/wasmedge_sys/executor.rs.html @@ -0,0 +1,1007 @@ +executor.rs - source

wasmedge_sys/
executor.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
//! Defines WasmEdge Executor.
+
+use super::ffi;
+#[cfg(all(feature = "async", target_os = "linux"))]
+use crate::r#async::fiber::{AsyncState, FiberFuture};
+
+#[cfg(all(feature = "async", target_os = "linux", not(target_env = "musl")))]
+use crate::r#async::fiber::TimeoutFiberFuture;
+
+use crate::{
+    instance::{function::AsFunc, module::InnerInstance},
+    store::Store,
+    types::WasmEdgeString,
+    utils::check,
+    AsInstance, Config, Function, Instance, Module, Statistics, WasmEdgeResult, WasmValue,
+};
+#[cfg(all(target_os = "linux", not(target_env = "musl")))]
+use std::os::raw::c_void;
+use wasmedge_types::error::WasmEdgeError;
+
+#[cfg(all(target_os = "linux", not(target_env = "musl")))]
+pub(crate) struct JmpState {
+    pub(crate) sigjmp_buf: *mut setjmp::sigjmp_buf,
+}
+
+#[cfg(all(target_os = "linux", not(target_env = "musl")))]
+scoped_tls::scoped_thread_local!(pub(crate) static JMP_BUF: JmpState);
+
+#[cfg(all(target_os = "linux", not(target_env = "musl")))]
+unsafe extern "C" fn sync_timeout(sig: i32, info: *mut libc::siginfo_t) {
+    if let Some(info) = info.as_mut() {
+        let si_value = info.si_value();
+        let value: *mut libc::pthread_t = si_value.sival_ptr.cast();
+        let dist_pthread = *value;
+        let self_pthread = libc::pthread_self();
+        if self_pthread == dist_pthread {
+            if JMP_BUF.is_set() {
+                let env = JMP_BUF.with(|s| s.sigjmp_buf);
+                setjmp::siglongjmp(env, 1);
+            }
+        } else {
+            libc::pthread_sigqueue(dist_pthread, sig, si_value);
+        }
+    }
+}
+#[cfg(all(target_os = "linux", not(target_env = "musl")))]
+unsafe extern "C" fn pre_host_func(_: *mut c_void) {
+    use libc::SIG_BLOCK;
+
+    let mut set = std::mem::zeroed();
+    libc::sigemptyset(&mut set);
+    libc::sigaddset(&mut set, timeout_signo());
+    libc::pthread_sigmask(SIG_BLOCK, &set, std::ptr::null_mut());
+}
+#[cfg(all(target_os = "linux", not(target_env = "musl")))]
+unsafe extern "C" fn post_host_func(_: *mut c_void) {
+    use libc::SIG_UNBLOCK;
+
+    let mut set = std::mem::zeroed();
+    libc::sigemptyset(&mut set);
+    libc::sigaddset(&mut set, timeout_signo());
+    libc::pthread_sigmask(SIG_UNBLOCK, &set, std::ptr::null_mut());
+}
+
+#[inline]
+#[cfg(all(target_os = "linux", not(target_env = "musl")))]
+pub(crate) fn timeout_signo() -> i32 {
+    option_env!("SIG_OFFSET")
+        .and_then(|s| s.parse().ok())
+        .unwrap_or(0)
+        + libc::SIGRTMIN()
+}
+
+#[cfg(all(target_os = "linux", not(target_env = "musl")))]
+static INIT_SIGNAL_LISTEN: std::sync::Once = std::sync::Once::new();
+
+#[inline(always)]
+#[cfg(all(target_os = "linux", not(target_env = "musl")))]
+pub(crate) unsafe fn init_signal_listen() {
+    INIT_SIGNAL_LISTEN.call_once(|| {
+        let mut new_act: libc::sigaction = std::mem::zeroed();
+        new_act.sa_sigaction = sync_timeout as usize;
+        new_act.sa_flags = libc::SA_RESTART | libc::SA_SIGINFO;
+        libc::sigaction(timeout_signo(), &new_act, std::ptr::null_mut());
+    });
+}
+
+/// Defines an execution environment for both pure WASM and compiled WASM.
+#[derive(Debug)]
+pub struct Executor {
+    pub(crate) inner: InnerExecutor,
+}
+
+impl Drop for Executor {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_ExecutorDelete(self.inner.0) }
+    }
+}
+
+impl Executor {
+    /// Creates a new [executor](crate::Executor) to be associated with the given [config](crate::Config) and [statistics](crate::Statistics).
+    ///
+    /// # Arguments
+    ///
+    /// * `config` - The configuration of the new [executor](crate::Executor).
+    ///
+    /// * `stat` - The [statistics](crate::Statistics) needed by the new [executor](crate::Executor).
+    ///
+    /// # Error
+    ///
+    /// If fail to create a [executor](crate::Executor), then an error is returned.
+    pub fn create(config: Option<&Config>, stat: Option<Statistics>) -> WasmEdgeResult<Self> {
+        let conf_ctx = config
+            .map(|cfg| cfg.inner.0)
+            .unwrap_or(std::ptr::null_mut());
+        let stat_ctx = stat
+            .map(|stat| stat.inner.0)
+            .unwrap_or(std::ptr::null_mut());
+
+        let ctx = unsafe { ffi::WasmEdge_ExecutorCreate(conf_ctx, stat_ctx) };
+
+        if ctx.is_null() {
+            Err(Box::new(WasmEdgeError::ExecutorCreate))
+        } else {
+            #[cfg(all(target_os = "linux", not(target_env = "musl")))]
+            unsafe {
+                ffi::WasmEdge_ExecutorExperimentalRegisterPreHostFunction(
+                    ctx,
+                    std::ptr::null_mut(),
+                    Some(pre_host_func),
+                );
+                ffi::WasmEdge_ExecutorExperimentalRegisterPostHostFunction(
+                    ctx,
+                    std::ptr::null_mut(),
+                    Some(post_host_func),
+                );
+            }
+
+            Ok(Executor {
+                inner: InnerExecutor(ctx),
+            })
+        }
+    }
+}
+
+impl Executor {
+    /// Runs a host function instance and returns the results.
+    ///
+    /// # Arguments
+    ///
+    /// * `func` - The function instance to run.
+    ///
+    /// * `params` - The arguments to pass to the function.
+    ///
+    /// # Errors
+    ///
+    /// If fail to run the host function, then an error is returned.
+    pub fn call_func(
+        &mut self,
+        func: &mut Function,
+        params: impl IntoIterator<Item = WasmValue>,
+    ) -> WasmEdgeResult<Vec<WasmValue>> {
+        let raw_params = params.into_iter().map(|x| x.as_raw()).collect::<Vec<_>>();
+
+        // get the length of the function's returns
+        let func_ty = func
+            .ty()
+            .ok_or(WasmEdgeError::Func(wasmedge_types::error::FuncError::Type))?;
+        let returns_len = func_ty.returns_len();
+        let mut returns = Vec::with_capacity(returns_len);
+
+        unsafe {
+            check(ffi::WasmEdge_ExecutorInvoke(
+                self.inner.0,
+                func.get_func_raw(),
+                raw_params.as_ptr(),
+                raw_params.len() as u32,
+                returns.as_mut_ptr(),
+                returns_len as u32,
+            ))?;
+
+            returns.set_len(returns_len);
+        }
+
+        Ok(returns.into_iter().map(Into::into).collect::<Vec<_>>())
+    }
+
+    /// Run a host function instance and return the results or timeout.
+    ///
+    /// # Arguments
+    ///
+    /// * `func` - The function instance to run.
+    ///
+    /// * `params` - The arguments to pass to the function.
+    ///
+    /// * `timeout` - The maximum execution time of the function to be run.
+    ///
+    /// # Errors
+    ///
+    /// If fail to run the host function, then an error is returned.
+    #[cfg(all(target_os = "linux", not(target_env = "musl")))]
+    #[cfg_attr(docsrs, doc(cfg(all(target_os = "linux", not(target_env = "musl")))))]
+    pub fn call_func_with_timeout(
+        &self,
+        func: &mut Function,
+        params: impl IntoIterator<Item = WasmValue>,
+        timeout: std::time::Duration,
+    ) -> WasmEdgeResult<Vec<WasmValue>> {
+        use wasmedge_types::error;
+
+        let raw_params = params.into_iter().map(|x| x.as_raw()).collect::<Vec<_>>();
+        // get the length of the function's returns
+        let func_ty = func
+            .ty()
+            .ok_or(WasmEdgeError::Func(wasmedge_types::error::FuncError::Type))?;
+        let returns_len = func_ty.returns_len();
+        let mut returns = Vec::with_capacity(returns_len);
+
+        unsafe {
+            init_signal_listen();
+            let mut self_thread = libc::pthread_self();
+            let mut sigjmp_buf: setjmp::sigjmp_buf = std::mem::zeroed();
+            let env = &mut sigjmp_buf as *mut _;
+
+            let mut timerid: libc::timer_t = std::mem::zeroed();
+            let mut sev: libc::sigevent = std::mem::zeroed();
+            sev.sigev_notify = libc::SIGEV_SIGNAL;
+            sev.sigev_signo = timeout_signo();
+            sev.sigev_value.sival_ptr = &mut self_thread as *mut _ as *mut libc::c_void;
+
+            if libc::timer_create(libc::CLOCK_REALTIME, &mut sev, &mut timerid) < 0 {
+                return Err(Box::new(error::WasmEdgeError::Operation(
+                    "timer_create error".into(),
+                )));
+            }
+            let mut value: libc::itimerspec = std::mem::zeroed();
+            value.it_value.tv_sec = timeout.as_secs() as _;
+            value.it_value.tv_nsec = timeout.subsec_nanos() as _;
+            if libc::timer_settime(timerid, 0, &value, std::ptr::null_mut()) < 0 {
+                libc::timer_delete(timerid);
+                return Err(Box::new(error::WasmEdgeError::Operation(
+                    "timer_settime error".into(),
+                )));
+            }
+            let jmp_state = JmpState { sigjmp_buf: env };
+
+            JMP_BUF.set(&jmp_state, || {
+                if setjmp::sigsetjmp(env, 1) == 0 {
+                    let r = check(ffi::WasmEdge_ExecutorInvoke(
+                        self.inner.0,
+                        func.get_func_raw(),
+                        raw_params.as_ptr(),
+                        raw_params.len() as u32,
+                        returns.as_mut_ptr(),
+                        returns_len as u32,
+                    ));
+                    libc::timer_delete(timerid);
+                    r
+                } else {
+                    libc::timer_delete(timerid);
+                    Err(Box::new(error::WasmEdgeError::ExecuteTimeout))
+                }
+            })?;
+
+            returns.set_len(returns_len);
+            Ok(returns.into_iter().map(Into::into).collect::<Vec<_>>())
+        }
+    }
+
+    /// Asynchronously runs a host function instance and returns the results.
+    ///
+    /// # Arguments
+    ///
+    /// * `async_state` - Used to store asynchronous state at run time.
+    ///
+    /// * `func` - The function instance to run.
+    ///
+    /// * `params` - The arguments to pass to the function.
+    ///
+    /// # Errors
+    ///
+    /// If fail to run the host function, then an error is returned.
+    #[cfg(all(feature = "async", target_os = "linux"))]
+    #[cfg_attr(docsrs, doc(cfg(all(feature = "async", target_os = "linux"))))]
+    pub async fn call_func_async(
+        &mut self,
+        async_state: &AsyncState,
+        func: &mut Function,
+        params: impl IntoIterator<Item = WasmValue> + Send,
+    ) -> WasmEdgeResult<Vec<WasmValue>> {
+        FiberFuture::on_fiber(async_state, || self.call_func(func, params))
+            .await
+            .unwrap()
+    }
+
+    /// Asynchronously runs a host function instance with a timeout setting
+    ///
+    /// # Arguments
+    ///
+    /// * `async_state` - Used to store asynchronous state at run time.
+    ///
+    /// * `func` - The function instance to run.
+    ///
+    /// * `params` - The arguments to pass to the function.
+    ///
+    /// * `timeout` - The maximum execution time of the function to be run.
+    ///
+    /// # Errors
+    ///
+    /// If fail to run the host function, then an error is returned.
+    #[cfg(all(feature = "async", target_os = "linux", not(target_env = "musl")))]
+    #[cfg_attr(
+        docsrs,
+        doc(cfg(all(feature = "async", target_os = "linux", not(target_env = "musl"))))
+    )]
+    pub async fn call_func_async_with_timeout(
+        &mut self,
+        async_state: &AsyncState,
+        func: &mut Function,
+        params: impl IntoIterator<Item = WasmValue> + Send,
+        timeout: std::time::Duration,
+    ) -> WasmEdgeResult<Vec<WasmValue>> {
+        use wasmedge_types::error;
+        let ldd = std::time::SystemTime::now() + timeout;
+        TimeoutFiberFuture::on_fiber(async_state, || self.call_func(func, params), ldd)
+            .await
+            .map_err(|_| Box::new(error::WasmEdgeError::ExecuteTimeout))?
+    }
+
+    /// Runs a host function reference instance and returns the results.
+    ///
+    /// # Arguments
+    ///
+    /// * `func_ref` - The function reference instance to run.
+    ///
+    /// * `params` - The arguments to pass to the function.
+    ///
+    /// # Errors
+    ///
+    /// If fail to run the host function reference instance, then an error is returned.
+    pub fn call_func_ref<FuncRef: AsFunc>(
+        &mut self,
+        func_ref: &mut FuncRef,
+        params: impl IntoIterator<Item = WasmValue>,
+    ) -> WasmEdgeResult<Vec<WasmValue>> {
+        let raw_params = params.into_iter().map(|x| x.as_raw()).collect::<Vec<_>>();
+
+        // get the length of the function's returns
+        let func_ty = func_ref.ty().unwrap();
+        let returns_len = func_ty.returns_len();
+        let mut returns = Vec::with_capacity(returns_len);
+
+        unsafe {
+            check(ffi::WasmEdge_ExecutorInvoke(
+                self.inner.0,
+                func_ref.get_func_raw(),
+                raw_params.as_ptr(),
+                raw_params.len() as u32,
+                returns.as_mut_ptr(),
+                returns_len as u32,
+            ))?;
+            returns.set_len(returns_len);
+        }
+
+        Ok(returns.into_iter().map(Into::into).collect::<Vec<_>>())
+    }
+
+    /// Asynchronously runs a host function reference instance and returns the results.
+    ///
+    /// # Arguments
+    ///
+    /// * `async_state` - Used to store asynchronous state at run time.
+    ///
+    /// * `func_ref` - The function reference instance to run.
+    ///
+    /// * `params` - The arguments to pass to the function.
+    ///
+    /// # Errors
+    ///
+    /// If fail to run the host function reference instance, then an error is returned.
+    #[cfg(all(feature = "async", target_os = "linux"))]
+    #[cfg_attr(docsrs, doc(cfg(all(feature = "async", target_os = "linux"))))]
+    pub async fn call_func_ref_async<FuncRef: AsFunc + Send>(
+        &mut self,
+        async_state: &AsyncState,
+        func_ref: &mut FuncRef,
+        params: impl IntoIterator<Item = WasmValue> + Send,
+    ) -> WasmEdgeResult<Vec<WasmValue>> {
+        FiberFuture::on_fiber(async_state, || self.call_func_ref(func_ref, params))
+            .await
+            .unwrap()
+    }
+}
+
+impl Executor {
+    /// Registers and instantiates a [import module](crate::ImportModule) into a [store](crate::Store).
+    ///
+    /// # Arguments
+    ///
+    /// * `store` - The target [store](crate::Store), into which the given [import module](crate::ImportModule) is registered.
+    ///
+    /// * `import` - The WasmEdge [import module](crate::ImportModule) to be registered.
+    ///
+    /// # Error
+    ///
+    /// If fail to register the given [import module](crate::ImportModule), then an error is returned.
+    pub fn register_import_module<T: AsInstance + ?Sized>(
+        &mut self,
+        store: &mut Store,
+        import: &T,
+    ) -> WasmEdgeResult<()> {
+        unsafe {
+            check(ffi::WasmEdge_ExecutorRegisterImport(
+                self.inner.0,
+                store.inner.0,
+                import.as_ptr(),
+            ))?;
+        }
+
+        Ok(())
+    }
+
+    /// Registers and instantiates a WasmEdge [module](crate::Module) into a store.
+    ///
+    /// Instantiates the given WasmEdge [module](crate::Module), including the [functions](crate::Function), [memories](crate::Memory), [tables](crate::Table), and [globals](crate::Global) it hosts; and then, registers the module [instance](crate::Instance) into the [store](crate::Store) with the given name.
+    ///
+    /// # Arguments
+    ///
+    /// * `store` - The target [store](crate::Store), into which the given [module](crate::Module) is registered.
+    ///
+    /// * `module` - A validated [module](crate::Module) to be registered.
+    ///
+    /// * `name` - The exported name of the registered [module](crate::Module).
+    ///
+    /// # Error
+    ///
+    /// If fail to register the given [module](crate::Module), then an error is returned.
+    pub fn register_named_module(
+        &mut self,
+        store: &mut Store,
+        module: &Module,
+        name: impl AsRef<str>,
+    ) -> WasmEdgeResult<Instance> {
+        let mut instance_ctx = std::ptr::null_mut();
+        let mod_name: WasmEdgeString = name.as_ref().into();
+        unsafe {
+            check(ffi::WasmEdge_ExecutorRegister(
+                self.inner.0,
+                &mut instance_ctx,
+                store.inner.0,
+                module.inner.0 as *const _,
+                mod_name.as_raw(),
+            ))?;
+
+            let inst = Instance {
+                inner: InnerInstance(instance_ctx),
+            };
+
+            Ok(inst)
+        }
+    }
+
+    /// Registers and instantiates a WasmEdge [module](crate::Module) into a [store](crate::Store) as an anonymous module.
+    ///
+    /// Notice that when a new module is instantiated into the [store](crate::Store), the old instantiated module is removed; in addition, ensure that the [imports](crate::ImportModule) the module depends on are already registered into the [store](crate::Store).
+    ///
+    ///
+    /// # Arguments
+    ///
+    /// * `store` - The [store](crate::Store), in which the [module](crate::Module) to be instantiated is stored.
+    ///
+    /// * `ast_mod` - The target [module](crate::Module) to be instantiated.
+    ///
+    /// # Error
+    ///
+    /// If fail to instantiate the given [module](crate::Module), then an error is returned.
+    pub fn register_active_module(
+        &mut self,
+        store: &mut Store,
+        module: &Module,
+    ) -> WasmEdgeResult<Instance> {
+        let mut instance_ctx = std::ptr::null_mut();
+        unsafe {
+            check(ffi::WasmEdge_ExecutorInstantiate(
+                self.inner.0,
+                &mut instance_ctx,
+                store.inner.0,
+                module.inner.0 as *const _,
+            ))?;
+
+            let inst = Instance {
+                inner: InnerInstance(instance_ctx),
+            };
+
+            Ok(inst)
+        }
+    }
+}
+
+#[derive(Debug, Clone)]
+pub(crate) struct InnerExecutor(pub(crate) *mut ffi::WasmEdge_ExecutorContext);
+unsafe impl Send for InnerExecutor {}
+unsafe impl Sync for InnerExecutor {}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/frame.rs.html b/src/wasmedge_sys/frame.rs.html new file mode 100644 index 000000000..4a9e0fa9a --- /dev/null +++ b/src/wasmedge_sys/frame.rs.html @@ -0,0 +1,171 @@ +frame.rs - source

wasmedge_sys/
frame.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
//! Defines WasmEdge CallingFrame.
+
+use crate::{
+    ffi,
+    instance::{memory::InnerMemory, InnerRef},
+    Memory,
+};
+
+/// Represents a calling frame on top of stack.
+#[derive(Debug)]
+pub struct CallingFrame {
+    pub(crate) inner: InnerCallingFrame,
+}
+
+impl CallingFrame {
+    /// Creates a CallingFrame instance.
+    pub(crate) fn create(ctx: *const ffi::WasmEdge_CallingFrameContext) -> Self {
+        Self {
+            inner: InnerCallingFrame(ctx),
+        }
+    }
+
+    /// Returns an immutable smart pointer borrowing the [memory instance](crate::Memory) by the given index from the module instance of the current
+    /// calling frame. If the memory instance is not found, returns `None`.
+    ///
+    /// By default, a WASM module has only one memory instance after instantiation. Therefore, users can pass in `0` as
+    /// the index to get the memory instance in host function body. When the [MultiMemories](crate::Config::multi_memories)
+    /// config option is enabled, there would be more than one memory instances in the wasm module. Users can retrieve
+    /// the target memory instance by specifying the index of the memory instance in the wasm module instance.
+    ///
+    /// # Arguments
+    ///
+    /// * idx - The index of the memory instance.
+    pub fn memory_ref(&self, idx: u32) -> Option<InnerRef<Memory, &Self>> {
+        unsafe {
+            let ctx = ffi::WasmEdge_CallingFrameGetMemoryInstance(self.inner.0, idx);
+
+            if ctx.is_null() {
+                None
+            } else {
+                let mem = Memory {
+                    inner: InnerMemory(ctx),
+                };
+                Some(InnerRef::create_from_ref(
+                    std::mem::ManuallyDrop::new(mem),
+                    self,
+                ))
+            }
+        }
+    }
+
+    /// Returns an mutable smart pointer borrowing the [memory instance](crate::Memory) by the given index from the module instance of the current
+    /// calling frame. If the memory instance is not found, returns `None`.
+    ///
+    /// By default, a WASM module has only one memory instance after instantiation. Therefore, users can pass in `0` as
+    /// the index to get the memory instance in host function body. When the [MultiMemories](crate::Config::multi_memories)
+    /// config option is enabled, there would be more than one memory instances in the wasm module. Users can retrieve
+    /// the target memory instance by specifying the index of the memory instance in the wasm module instance.
+    ///
+    /// # Arguments
+    ///
+    /// * idx - The index of the memory instance.
+    pub fn memory_mut(&mut self, idx: u32) -> Option<InnerRef<Memory, &mut Self>> {
+        unsafe {
+            let ctx = ffi::WasmEdge_CallingFrameGetMemoryInstance(self.inner.0, idx);
+
+            if ctx.is_null() {
+                None
+            } else {
+                let mem = Memory {
+                    inner: InnerMemory(ctx),
+                };
+                Some(InnerRef::create_from_mut(
+                    std::mem::ManuallyDrop::new(mem),
+                    self,
+                ))
+            }
+        }
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerCallingFrame(pub(crate) *const ffi::WasmEdge_CallingFrameContext);
+unsafe impl Send for InnerCallingFrame {}
+unsafe impl Sync for InnerCallingFrame {}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/instance/function.rs.html b/src/wasmedge_sys/instance/function.rs.html new file mode 100644 index 000000000..533284671 --- /dev/null +++ b/src/wasmedge_sys/instance/function.rs.html @@ -0,0 +1,1059 @@ +function.rs - source

wasmedge_sys/instance/
function.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
//! Defines WasmEdge Function and FuncType structs.
+
+use crate::{
+    ffi::{self},
+    CallingFrame, Instance, WasmEdgeResult, WasmValue,
+};
+use core::ffi::c_void;
+
+use wasmedge_types::{
+    error::{CoreError, FuncError, WasmEdgeError},
+    ValType,
+};
+
+use super::{module::InnerInstance, InnerRef};
+
+pub type SyncFn<Data> = for<'a, 'b, 'c> fn(
+    &'a mut Data,
+    &'b mut Instance,
+    &'c mut CallingFrame,
+    Vec<WasmValue>,
+) -> Result<Vec<WasmValue>, CoreError>;
+
+pub type CustomFnWrapper = unsafe extern "C" fn(
+    key_ptr: *mut c_void,
+    data_ptr: *mut c_void,
+    calling_frame_ctx: *const ffi::WasmEdge_CallingFrameContext,
+    params: *const ffi::WasmEdge_Value,
+    param_len: u32,
+    returns: *mut ffi::WasmEdge_Value,
+    return_len: u32,
+) -> ffi::WasmEdge_Result;
+
+// Wrapper function for thread-safe scenarios.
+unsafe extern "C" fn wrap_fn<Data>(
+    key_ptr: *mut c_void,
+    data: *mut std::os::raw::c_void,
+    call_frame_ctx: *const ffi::WasmEdge_CallingFrameContext,
+    params: *const ffi::WasmEdge_Value,
+    param_len: u32,
+    returns: *mut ffi::WasmEdge_Value,
+    return_len: u32,
+) -> ffi::WasmEdge_Result {
+    let mut frame = CallingFrame::create(call_frame_ctx);
+    // let executor_ctx = ffi::WasmEdge_CallingFrameGetExecutor(call_frame_ctx);
+    let inst_ctx = ffi::WasmEdge_CallingFrameGetModuleInstance(call_frame_ctx);
+    let mut inst = std::mem::ManuallyDrop::new(Instance {
+        inner: InnerInstance(inst_ctx as _),
+    });
+    let data = &mut *(data as *mut Data);
+
+    let input = if params.is_null() || param_len == 0 {
+        vec![]
+    } else {
+        let raw_input = unsafe { std::slice::from_raw_parts(params, param_len as usize) };
+        raw_input.iter().map(|r| (*r).into()).collect::<Vec<_>>()
+    };
+
+    let return_len = return_len as usize;
+
+    let mut empty_return = [];
+    let raw_returns = if returns.is_null() || return_len == 0 {
+        &mut empty_return
+    } else {
+        unsafe { std::slice::from_raw_parts_mut(returns, return_len) }
+    };
+
+    let real_fn: SyncFn<Data> = std::mem::transmute(key_ptr);
+
+    match real_fn(data, &mut inst, &mut frame, input) {
+        Ok(returns) => {
+            assert!(returns.len() == return_len, "[wasmedge-sys] check the number of returns of host function. Expected: {}, actual: {}", return_len, returns.len());
+            for (idx, wasm_value) in returns.into_iter().enumerate() {
+                raw_returns[idx] = wasm_value.as_raw();
+            }
+            ffi::WasmEdge_Result { Code: 0 }
+        }
+
+        Err(err) => err.into(),
+    }
+}
+
+/// Defines a host function.
+///
+/// A WasmEdge [Function] defines a WebAssembly host function described by its [type](crate::FuncType). A host function is a closure of the original function defined in either the host or the WebAssembly module.
+#[derive(Debug)]
+pub struct Function {
+    pub(crate) inner: InnerFunc,
+}
+impl Function {
+    /// Creates a [host function](crate::Function) with the given function type.
+    ///
+    /// N.B. that this function is used for thread-safe scenarios.
+    ///
+    /// # Arguments
+    ///
+    /// * `ty` - The types of the arguments and returns of the target function.
+    ///
+    /// * `real_fn` - The pointer to the target function.
+    ///
+    /// * `data` - The host context data used in this function.
+    ///
+    /// * `cost` - The function cost in the [Statistics](crate::Statistics). Pass 0 if the calculation is not needed.
+    ///
+    /// # Error
+    ///
+    /// * If fail to create a [Function], then [WasmEdgeError::Func(FuncError::Create)](wasmedge_types::error::FuncError) is returned.
+    ///
+    /// # Safety
+    ///
+    /// The lifetime of `data` must be greater than that of `Function` itself.
+    pub unsafe fn create_sync_func<T>(
+        ty: &wasmedge_types::FuncType,
+        real_fn: SyncFn<T>,
+        data: *mut T,
+        cost: u64,
+    ) -> WasmEdgeResult<Self> {
+        unsafe { Self::create_with_data(ty, real_fn, data, cost) }
+    }
+
+    /// Creates a [host function](crate::Function) with the given function type.
+    ///
+    /// N.B. that this function is used for thread-safe scenarios.
+    ///
+    /// # Arguments
+    ///
+    /// * `ty` - The types of the arguments and returns of the target function.
+    ///
+    /// * `real_fn` - The pointer to the target function.
+    ///
+    /// * `data` - The pointer to the host context data used in this function.
+    ///
+    /// * `cost` - The function cost in the [Statistics](crate::Statistics). Pass 0 if the calculation is not needed.
+    ///
+    /// # Error
+    ///
+    /// * If fail to create a [Function], then [WasmEdgeError::Func(FuncError::Create)](crate::error::FuncError) is returned.
+    ///
+    unsafe fn create_with_data<T>(
+        ty: &wasmedge_types::FuncType,
+        real_fn: SyncFn<T>,
+        data: *mut T,
+        cost: u64,
+    ) -> WasmEdgeResult<Self> {
+        Self::create_with_custom_wrapper(ty, wrap_fn::<T>, real_fn as _, data as _, cost)
+    }
+
+    /// Creates a [host function](crate::Function) with the given function type and the custom function wrapper.
+    ///
+    /// # Arguments
+    ///
+    /// * `ty` - The types of the arguments and returns of the target function.
+    ///
+    /// * `fn_wrapper` - The custom function wrapper.
+    ///
+    /// * `real_fn` - The pointer to the target function.
+    ///
+    /// * `data` - The pointer to the host context data used in this function.
+    ///
+    /// * `cost` - The function cost in the [Statistics](crate::Statistics). Pass 0 if the calculation is not needed.
+    ///
+    /// # Error
+    ///
+    /// * If fail to create a [Function], then [WasmEdgeError::Func(FuncError::Create)](wasmedge_types::error::FuncError) is returned.
+    ///
+    /// # Safety
+    ///
+    /// Notice that the caller should guarantee the life cycle of both the `real_fn` and the `data` object.
+    ///
+    pub unsafe fn create_with_custom_wrapper(
+        ty: &wasmedge_types::FuncType,
+        fn_wrapper: CustomFnWrapper,
+        real_fn: *mut c_void,
+        data: *mut c_void,
+        cost: u64,
+    ) -> WasmEdgeResult<Self> {
+        let ty: FuncTypeOwn = ty.into();
+        let ctx = ffi::WasmEdge_FunctionInstanceCreateBinding(
+            ty.inner.0,
+            Some(fn_wrapper),
+            real_fn,
+            data,
+            cost,
+        );
+
+        if ctx.is_null() {
+            Err(Box::new(WasmEdgeError::Func(FuncError::Create)))
+        } else {
+            Ok(Self {
+                inner: InnerFunc(ctx),
+            })
+        }
+    }
+
+    /// # Safety
+    ///
+    /// The lifetime of the returned pointer must not exceed that of the object itself.
+    pub unsafe fn as_ptr(&self) -> *mut ffi::WasmEdge_FunctionInstanceContext {
+        self.inner.0
+    }
+
+    /// # Safety
+    ///
+    /// This function will take over the lifetime management of `ctx`, so do not call `ffi::WasmEdge_FunctionInstanceDelete` on `ctx` after this.
+    pub unsafe fn from_raw(ctx: *mut ffi::WasmEdge_FunctionInstanceContext) -> Self {
+        Self {
+            inner: InnerFunc(ctx),
+        }
+    }
+}
+impl Drop for Function {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_FunctionInstanceDelete(self.inner.0) };
+    }
+}
+
+/// Defines a reference to a [host function](crate::Function).
+pub type FuncRef<Ref> = InnerRef<Function, Ref>;
+
+pub trait AsFunc {
+    /// # Safety
+    ///
+    /// The lifetime of the returned pointer must not exceed that of the object itself.
+    unsafe fn get_func_raw(&self) -> *mut ffi::WasmEdge_FunctionInstanceContext;
+
+    fn ty(&self) -> Option<wasmedge_types::FuncType>
+    where
+        Self: Sized,
+    {
+        let ty = unsafe { ffi::WasmEdge_FunctionInstanceGetFunctionType(self.get_func_raw()) };
+        if ty.is_null() {
+            None
+        } else {
+            let value = std::mem::ManuallyDrop::new(FuncTypeOwn {
+                inner: InnerFuncType(ty),
+            });
+            Some((&*value).into())
+        }
+    }
+}
+
+impl AsFunc for Function {
+    unsafe fn get_func_raw(&self) -> *mut ffi::WasmEdge_FunctionInstanceContext {
+        self.inner.0
+    }
+}
+impl<F: AsRef<Function>> AsFunc for F {
+    unsafe fn get_func_raw(&self) -> *mut ffi::WasmEdge_FunctionInstanceContext {
+        self.as_ref().get_func_raw()
+    }
+}
+
+#[derive(Debug, Clone, Copy)]
+pub(crate) struct InnerFunc(pub(crate) *mut ffi::WasmEdge_FunctionInstanceContext);
+unsafe impl Send for InnerFunc {}
+unsafe impl Sync for InnerFunc {}
+
+#[derive(Debug)]
+pub(crate) struct FuncTypeOwn {
+    pub(crate) inner: InnerFuncType,
+}
+impl FuncTypeOwn {
+    /// Create a new [FuncType] to be associated with the given arguments and returns.
+    ///
+    /// # Arguments
+    ///
+    /// * `args` - The argument types of a [Function].
+    ///
+    /// * `returns` - The types of the returns of a [Function].
+    ///
+    /// # Error
+    ///
+    /// If fail to create a [FuncType], then an error is returned.
+    pub(crate) fn create<I: IntoIterator<Item = ValType>, R: IntoIterator<Item = ValType>>(
+        args: I,
+        returns: R,
+    ) -> WasmEdgeResult<Self> {
+        let param_tys = args
+            .into_iter()
+            .map(|x| x.into())
+            .collect::<Vec<ffi::WasmEdge_ValType>>();
+        let ret_tys = returns
+            .into_iter()
+            .map(|x| x.into())
+            .collect::<Vec<ffi::WasmEdge_ValType>>();
+
+        let ctx = unsafe {
+            ffi::WasmEdge_FunctionTypeCreate(
+                param_tys.as_ptr() as *const _,
+                param_tys.len() as u32,
+                ret_tys.as_ptr() as *const _,
+                ret_tys.len() as u32,
+            )
+        };
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::FuncTypeCreate)),
+            false => Ok(Self {
+                inner: InnerFuncType(ctx),
+            }),
+        }
+    }
+}
+impl Drop for FuncTypeOwn {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_FunctionTypeDelete(self.inner.0 as _) }
+    }
+}
+
+impl FuncTypeOwn {
+    /// Returns the number of the arguments of a [Function].
+    pub(crate) fn params_len(&self) -> u32 {
+        unsafe { ffi::WasmEdge_FunctionTypeGetParametersLength(self.inner.0) }
+    }
+
+    /// Returns an Iterator of the arguments of a [Function].
+    pub(crate) fn params_type_iter(&self) -> impl Iterator<Item = ValType> {
+        let len = self.params_len();
+        let mut types = Vec::with_capacity(len as usize);
+        unsafe {
+            ffi::WasmEdge_FunctionTypeGetParameters(self.inner.0, types.as_mut_ptr(), len);
+            types.set_len(len as usize);
+        }
+
+        types.into_iter().map(Into::into)
+    }
+
+    ///Returns the number of the returns of a [Function].
+    pub(crate) fn returns_len(&self) -> u32 {
+        unsafe { ffi::WasmEdge_FunctionTypeGetReturnsLength(self.inner.0) }
+    }
+
+    /// Returns an Iterator of the return types of a [Function].
+    pub(crate) fn returns_type_iter(&self) -> impl Iterator<Item = ValType> {
+        let len = self.returns_len();
+        let mut types = Vec::with_capacity(len as usize);
+        unsafe {
+            ffi::WasmEdge_FunctionTypeGetReturns(self.inner.0, types.as_mut_ptr(), len);
+            types.set_len(len as usize);
+        }
+
+        types.into_iter().map(Into::into)
+    }
+}
+
+impl From<&wasmedge_types::FuncType> for FuncTypeOwn {
+    fn from(ty: &wasmedge_types::FuncType) -> Self {
+        FuncTypeOwn::create(ty.args().to_vec(), ty.returns().to_vec()).expect("[wasmedge-sys] Failed to convert wasmedge_types::FuncType into wasmedge_sys::FuncType.")
+    }
+}
+
+impl From<wasmedge_types::FuncType> for FuncTypeOwn {
+    fn from(ty: wasmedge_types::FuncType) -> Self {
+        (&ty).into()
+    }
+}
+
+impl From<&FuncTypeOwn> for wasmedge_types::FuncType {
+    fn from(ty: &FuncTypeOwn) -> Self {
+        let args = ty.params_type_iter().collect();
+        let returns = ty.returns_type_iter().collect();
+
+        wasmedge_types::FuncType::new(args, returns)
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerFuncType(pub(crate) *const ffi::WasmEdge_FunctionTypeContext);
+unsafe impl Send for InnerFuncType {}
+unsafe impl Sync for InnerFuncType {}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{types::WasmValue, AsInstance, Executor, ImportModule};
+
+    use wasmedge_types::{error::CoreExecutionError, FuncType, ValType};
+
+    #[test]
+    fn test_func_type() {
+        // test FuncType with args and returns
+        {
+            let param_tys = vec![
+                ValType::I32,
+                ValType::I64,
+                ValType::F32,
+                ValType::F64,
+                ValType::V128,
+                ValType::ExternRef,
+            ];
+            let param_len = param_tys.len();
+            let ret_tys = vec![ValType::FuncRef, ValType::ExternRef, ValType::V128];
+            let ret_len = ret_tys.len();
+
+            // create FuncType
+            let result = FuncTypeOwn::create(param_tys, ret_tys);
+            assert!(result.is_ok());
+            let func_ty = result.unwrap();
+
+            // check parameters
+            assert_eq!(func_ty.params_len(), param_len as u32);
+            let param_tys = func_ty.params_type_iter().collect::<Vec<_>>();
+            assert_eq!(
+                param_tys,
+                vec![
+                    ValType::I32,
+                    ValType::I64,
+                    ValType::F32,
+                    ValType::F64,
+                    ValType::V128,
+                    ValType::ExternRef,
+                ]
+            );
+
+            // check returns
+            assert_eq!(func_ty.returns_len(), ret_len as u32);
+            let return_tys = func_ty.returns_type_iter().collect::<Vec<_>>();
+            assert_eq!(
+                return_tys,
+                vec![ValType::FuncRef, ValType::ExternRef, ValType::V128]
+            );
+        }
+
+        // test FuncType without args and returns
+        {
+            // create FuncType
+            let result = FuncTypeOwn::create([], []);
+            assert!(result.is_ok());
+            let func_ty = result.unwrap();
+
+            assert_eq!(func_ty.params_len(), 0);
+            assert_eq!(func_ty.returns_len(), 0);
+        }
+    }
+
+    #[test]
+    fn test_func_basic() {
+        #[derive(Debug)]
+        struct Data<T, S> {
+            _x: i32,
+            _y: String,
+            _v: Vec<T>,
+            _s: Vec<S>,
+        }
+
+        let data: Data<i32, &str> = Data {
+            _x: 12,
+            _y: "hello".to_string(),
+            _v: vec![1, 2, 3],
+            _s: vec!["macos", "linux", "windows"],
+        };
+
+        fn real_add<T: core::fmt::Debug>(
+            _host_data: &mut Data<i32, &str>,
+            _inst: &mut Instance,
+            _frame: &mut CallingFrame,
+            input: Vec<WasmValue>,
+        ) -> Result<Vec<WasmValue>, CoreError> {
+            println!("Rust: Entering Rust function real_add");
+
+            if input.len() != 2 {
+                return Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch));
+            }
+
+            let a = if input[0].ty() == ValType::I32 {
+                input[0].to_i32()
+            } else {
+                return Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch));
+            };
+
+            let b = if input[1].ty() == ValType::I32 {
+                input[1].to_i32()
+            } else {
+                return Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch));
+            };
+
+            let c = a + b;
+            println!("Rust: calcuating in real_add c: {c:?}");
+
+            println!("Rust: Leaving Rust function real_add");
+            Ok(vec![WasmValue::from_i32(c)])
+        }
+
+        let mut import_module = ImportModule::create("test_module", Box::new(data)).unwrap();
+
+        // create a FuncType
+        let func_ty = FuncType::new(vec![ValType::I32; 2], vec![ValType::I32]);
+        // create a host function
+        let result = unsafe {
+            Function::create_sync_func(
+                &func_ty,
+                real_add::<Data<i32, &str>>,
+                import_module.get_host_data_mut(),
+                0,
+            )
+        };
+        assert!(result.is_ok());
+        let host_func = result.unwrap();
+
+        // get func type
+        let result = host_func.ty();
+        assert!(result.is_some());
+        let ty = result.unwrap();
+
+        // check parameters
+        assert_eq!(ty.args_len(), 2);
+        assert_eq!(ty.args(), &[ValType::I32; 2]);
+
+        // check returns
+        assert_eq!(ty.returns_len(), 1);
+        assert_eq!(ty.returns(), &[ValType::I32]);
+
+        import_module.add_func("add", host_func);
+
+        // run this function
+        let result = Executor::create(None, None);
+        assert!(result.is_ok());
+        let mut executor = result.unwrap();
+
+        let mut add_func = import_module.get_func_mut("add").unwrap();
+
+        let result = executor.call_func(
+            &mut add_func,
+            vec![WasmValue::from_i32(1), WasmValue::from_i32(2)],
+        );
+
+        assert!(result.is_ok());
+        let returns = result.unwrap();
+        assert_eq!(returns[0].to_i32(), 3);
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/instance/global.rs.html b/src/wasmedge_sys/instance/global.rs.html new file mode 100644 index 000000000..1b8c26b27 --- /dev/null +++ b/src/wasmedge_sys/instance/global.rs.html @@ -0,0 +1,663 @@ +global.rs - source

wasmedge_sys/instance/
global.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
//! Defines WasmEdge Global and GlobalType structs.
+//!
+//! A WasmEdge `Global` defines a global variable, which stores a single value of the given `GlobalType`.
+//! `GlobalType` specifies whether a global variable is immutable or mutable.
+
+use crate::{ffi, WasmEdgeResult, WasmValue};
+use wasmedge_types::{
+    error::{GlobalError, WasmEdgeError},
+    Mutability, ValType,
+};
+
+/// Defines a WebAssembly global variable, which stores a single value of the given [type](crate::GlobalType) and a flag indicating whether it is mutable or not.
+#[derive(Debug)]
+pub struct Global {
+    pub(crate) inner: InnerGlobal,
+}
+impl Global {
+    /// Creates a new [Global] instance to be associated with the given [GlobalType] and [WasmValue](crate::WasmValue).
+    ///
+    /// The type of the given [WasmValue](crate::WasmValue) must be matched with [GlobalType]; otherwise, it causes a failure. For example, `WasmValue::I32(520)` conflicts with a [GlobalType] with a value type defined as `ValType::F32`.
+    ///
+    /// # Errors
+    ///
+    /// * If fail to create the Global instance, then WasmEdgeError::Global(GlobalError::Create)(crate::error::GlobalError) is returned.
+    ///
+    pub fn create(ty: &wasmedge_types::GlobalType, val: WasmValue) -> WasmEdgeResult<Self> {
+        let ty: GlobalType = ty.into();
+        let ctx = unsafe { ffi::WasmEdge_GlobalInstanceCreate(ty.inner.0, val.as_raw()) };
+
+        if ctx.is_null() {
+            Err(Box::new(WasmEdgeError::Global(GlobalError::Create)))
+        } else {
+            Ok(Self {
+                inner: InnerGlobal(ctx),
+            })
+        }
+    }
+
+    /// Returns the underlying wasm type of a [Global] instance.
+    ///
+    /// # Errors
+    ///
+    /// If fail to get the type, then an error is returned.
+    ///
+    pub fn ty(&self) -> WasmEdgeResult<wasmedge_types::GlobalType> {
+        let ty_ctx = unsafe { ffi::WasmEdge_GlobalInstanceGetGlobalType(self.inner.0) };
+        match ty_ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::Global(GlobalError::Type))),
+            false => {
+                let ty = std::mem::ManuallyDrop::new(GlobalType {
+                    inner: InnerGlobalType(ty_ctx as *mut _),
+                });
+                Ok((&*ty).into())
+            }
+        }
+    }
+
+    /// Returns the value of the [Global] instance.
+    pub fn get_value(&self) -> WasmValue {
+        let val = unsafe { ffi::WasmEdge_GlobalInstanceGetValue(self.inner.0) };
+        val.into()
+    }
+
+    /// Sets the value of the [Global] instance.
+    ///
+    /// Notice that only the [Global] instance of [Mutability::Var](wasmedge_types::Mutability::Var) type can be set a new value. Setting a new value for a [Global] of [Mutability::Const](wasmedge_types::Mutability::Const) causes a failure.
+    ///
+    /// # Argument
+    ///
+    /// * `val` - The new wasm value to be set.
+    ///
+    /// # Errors
+    ///
+    /// If fail to set value, then an error is returned.
+    ///
+    pub fn set_value(&mut self, val: WasmValue) -> WasmEdgeResult<()> {
+        let ty = self.ty()?;
+        if ty.mutability() == Mutability::Const {
+            return Err(Box::new(WasmEdgeError::Global(GlobalError::ModifyConst)));
+        }
+        if ty.value_ty() != val.ty() {
+            return Err(Box::new(WasmEdgeError::Global(
+                GlobalError::UnmatchedValType,
+            )));
+        }
+        unsafe {
+            let result = ffi::WasmEdge_GlobalInstanceSetValue(self.inner.0, val.as_raw());
+            crate::utils::check(result)?;
+        }
+        Ok(())
+    }
+
+    /// # Safety
+    ///
+    /// The lifetime of the returned pointer must not exceed that of the object itself.
+    pub unsafe fn as_ptr(&self) -> *const ffi::WasmEdge_GlobalInstanceContext {
+        self.inner.0 as *const _
+    }
+
+    /// # Safety
+    ///
+    /// This function takes ownership of `ptr`, so do not call `ffi::WasmEdge_GlobalInstanceDelete` on `ptr` after this.
+    pub unsafe fn from_raw(ptr: *mut ffi::WasmEdge_GlobalInstanceContext) -> Self {
+        Self {
+            inner: InnerGlobal(ptr),
+        }
+    }
+}
+impl Drop for Global {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_GlobalInstanceDelete(self.inner.0) };
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerGlobal(pub(crate) *mut ffi::WasmEdge_GlobalInstanceContext);
+unsafe impl Send for InnerGlobal {}
+unsafe impl Sync for InnerGlobal {}
+
+/// Defines the type of a wasm global variable.
+///
+/// A [GlobalType] classifies a global variable that hold a value and can either be mutable or immutable.
+#[derive(Debug)]
+pub(crate) struct GlobalType {
+    pub(crate) inner: InnerGlobalType,
+}
+impl GlobalType {
+    /// Create a new [GlobalType] to be associated with the given [ValType](wasmedge_types::ValType) and [Mutability](wasmedge_types::Mutability).
+    ///
+    /// # Arguments
+    ///
+    /// * `val_type` - The value type of the global variable.
+    ///
+    /// * `mutability` - The mutability of the global variable.
+    ///
+    /// # Errors
+    ///
+    /// If fail to create a new [GlobalType], then an error is returned.
+    pub(crate) fn create(val_ty: ValType, mutable: Mutability) -> WasmEdgeResult<Self> {
+        let ctx = unsafe { ffi::WasmEdge_GlobalTypeCreate(val_ty.into(), mutable.into()) };
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::GlobalTypeCreate)),
+            false => Ok(Self {
+                inner: InnerGlobalType(ctx),
+            }),
+        }
+    }
+
+    /// Returns the value type of the [GlobalType].
+    pub(crate) fn value_type(&self) -> ValType {
+        let val = unsafe { ffi::WasmEdge_GlobalTypeGetValType(self.inner.0 as *const _) };
+        val.into()
+    }
+
+    /// Returns the [Mutability](wasmedge_types::Mutability) value of the [GlobalType].
+    pub(crate) fn mutability(&self) -> Mutability {
+        let val = unsafe { ffi::WasmEdge_GlobalTypeGetMutability(self.inner.0) };
+        val.into()
+    }
+}
+impl Drop for GlobalType {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_GlobalTypeDelete(self.inner.0) };
+    }
+}
+impl From<&wasmedge_types::GlobalType> for GlobalType {
+    fn from(ty: &wasmedge_types::GlobalType) -> Self {
+        GlobalType::create(ty.value_ty(), ty.mutability()).expect(
+            "[wasmedge-sys] Failed to convert wasmedge_types::GlobalType into wasmedge_sys::GlobalType.",
+        )
+    }
+}
+impl From<wasmedge_types::GlobalType> for GlobalType {
+    fn from(ty: wasmedge_types::GlobalType) -> Self {
+        (&ty).into()
+    }
+}
+impl From<&GlobalType> for wasmedge_types::GlobalType {
+    fn from(ty: &GlobalType) -> Self {
+        wasmedge_types::GlobalType::new(ty.value_type(), ty.mutability())
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerGlobalType(pub(crate) *mut ffi::WasmEdge_GlobalTypeContext);
+unsafe impl Send for InnerGlobalType {}
+unsafe impl Sync for InnerGlobalType {}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use std::thread;
+    use wasmedge_types::{Mutability, ValType};
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_global_type() {
+        // create a GlobalType instance
+        let result = GlobalType::create(ValType::I32, Mutability::Const);
+        assert!(result.is_ok());
+        let global_ty = result.unwrap();
+        assert!(!global_ty.inner.0.is_null());
+
+        // value type
+        assert_eq!(global_ty.value_type(), ValType::I32);
+        // Mutability
+        assert_eq!(global_ty.mutability(), Mutability::Const);
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_global_const_i32() {
+        // create a GlobalType instance
+        let ty = wasmedge_types::GlobalType::new(ValType::I32, Mutability::Const);
+
+        // create a const Global instance
+        let result = Global::create(&ty, WasmValue::from_i32(99));
+        assert!(result.is_ok());
+        let mut global_const = result.unwrap();
+
+        // access the value held by global_const
+        assert_eq!(global_const.get_value().to_i32(), 99);
+        let result = global_const.set_value(WasmValue::from_i32(0));
+        assert!(result.is_err());
+
+        // access the global type
+        let result = global_const.ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        assert_eq!(ty.value_ty(), ValType::I32);
+        assert_eq!(ty.mutability(), Mutability::Const);
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_global_var_f32() {
+        // create a GlobalType instance
+        let ty = wasmedge_types::GlobalType::new(ValType::F32, Mutability::Var);
+
+        // create a Var Global instance
+        let result = Global::create(&ty, WasmValue::from_f32(13.14));
+        assert!(result.is_ok());
+        let mut global_var = result.unwrap();
+
+        // access the value held by global_var
+        assert_eq!(global_var.get_value().to_f32(), 13.14);
+        let result = global_var.set_value(WasmValue::from_f32(1.314));
+        assert!(result.is_ok());
+        assert_eq!(global_var.get_value().to_f32(), 1.314);
+
+        // access the global type
+        let result = global_var.ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        assert_eq!(ty.value_ty(), ValType::F32);
+        assert_eq!(ty.mutability(), Mutability::Var);
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_global_conflict() {
+        {
+            // create a GlobalType instance
+            let ty = wasmedge_types::GlobalType::new(ValType::F32, Mutability::Var);
+
+            // create a Var Global instance with a value of mis-matched Value::I32 type
+            let result = Global::create(&ty, WasmValue::from_i32(520));
+            assert!(result.is_err());
+        }
+
+        {
+            // create a GlobalType instance
+            let ty = wasmedge_types::GlobalType::new(ValType::F32, Mutability::Var);
+
+            // create a Var Global instance with a value of Value::F32 type
+            let result = Global::create(&ty, WasmValue::from_f32(13.14));
+            assert!(result.is_ok());
+            let mut global_var = result.unwrap();
+
+            // set a new value of mis-matched Value::I32 type
+            let result = global_var.set_value(WasmValue::from_i32(1314));
+            assert!(result.is_err());
+            assert_eq!(global_var.get_value().to_f32(), 13.14);
+
+            // set a new value of Value::F32 type
+            let result = global_var.set_value(WasmValue::from_f32(1.314));
+            assert!(result.is_ok());
+            assert_eq!(global_var.get_value().to_f32(), 1.314);
+        }
+    }
+
+    #[test]
+    fn test_global_send() {
+        {
+            // create a GlobalType instance
+            let global_ty = wasmedge_types::GlobalType::new(ValType::I32, Mutability::Const);
+
+            // create a Global instance
+            let result = Global::create(&global_ty, WasmValue::from_i32(5));
+            assert!(result.is_ok());
+            let global = result.unwrap();
+
+            let handle = thread::spawn(move || {
+                // access the value held by global
+                assert_eq!(global.get_value().to_i32(), 5);
+            });
+
+            handle.join().unwrap()
+        }
+    }
+
+    #[test]
+    fn test_global_sync() {
+        // create a GlobalType instance
+        let global_ty = wasmedge_types::GlobalType::new(ValType::I32, Mutability::Const);
+
+        // create a Global instance
+        let result = Global::create(&global_ty, WasmValue::from_i32(5));
+        assert!(result.is_ok());
+        let global = result.unwrap();
+        let global = &global;
+
+        std::thread::scope(|s| {
+            let _ = s
+                .spawn(move || {
+                    assert_eq!(global.get_value().to_i32(), 5);
+                })
+                .join();
+        })
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/instance/memory.rs.html b/src/wasmedge_sys/instance/memory.rs.html new file mode 100644 index 000000000..64a0d55a7 --- /dev/null +++ b/src/wasmedge_sys/instance/memory.rs.html @@ -0,0 +1,1017 @@ +memory.rs - source

wasmedge_sys/instance/
memory.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
//! Defines WasmEdge Memory and MemType structs.
+//!
+//! A WasmEdge `Memory` defines a linear memory as described by `MemType`.
+//! `MemType` specifies the limits on the size of a memory by a range. The start of
+//! the limit range specifies min size (initial size) of that memory, while the end
+//! restricts the size to which the memory can grow later.
+
+use crate::{ffi, types::WasmEdgeLimit, utils::check, WasmEdgeResult};
+use wasmedge_types::error::{MemError, WasmEdgeError};
+
+/// Defines a WebAssembly memory instance, which is a linear memory described by its [type](crate::MemType). Each memory instance consists of a vector of bytes and an optional maximum size, and its size is a multiple of the WebAssembly page size (*64KiB* of each page).
+#[derive(Debug)]
+pub struct Memory {
+    pub(crate) inner: InnerMemory,
+}
+impl Memory {
+    /// Create a new [Memory] to be associated with the given capacity limit.
+    ///
+    /// # Arguments
+    ///
+    /// * `ty` - The type of the new [Memory] instance.
+    ///
+    /// # Errors
+    ///
+    /// * If fail to create the memory instance, then [WasmEdgeError::Mem(MemError::Create)](wasmedge_types::error::MemError) is returned.
+    ///
+    pub fn create(ty: &wasmedge_types::MemoryType) -> WasmEdgeResult<Self> {
+        let ty: MemType = ty.into();
+        let ctx = unsafe { ffi::WasmEdge_MemoryInstanceCreate(ty.inner.0 as *const _) };
+
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::Mem(MemError::Create))),
+            false => Ok(Memory {
+                inner: InnerMemory(ctx),
+            }),
+        }
+    }
+
+    /// Returns the type of the [Memory].
+    ///
+    /// # Errors
+    ///
+    /// If fail to get the type from the [Memory], then an error is returned.
+    ///
+    pub fn ty(&self) -> WasmEdgeResult<wasmedge_types::MemoryType> {
+        let ty_ctx = unsafe { ffi::WasmEdge_MemoryInstanceGetMemoryType(self.inner.0) };
+        match ty_ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::Mem(MemError::Type))),
+            false => {
+                let ty = std::mem::ManuallyDrop::new(MemType {
+                    inner: InnerMemType(ty_ctx as *mut _),
+                });
+                Ok((&*ty).into())
+            }
+        }
+    }
+
+    /// Copies the data from the [Memory] to the output buffer.
+    ///
+    /// # Arguments
+    ///
+    /// * `offset` - The data start offset in the [Memory].
+    ///
+    /// * `len` - The requested data length.
+    ///
+    /// # Errors
+    ///
+    /// If the `offset + len` is larger than the data size in the [Memory], then an error is returned.
+    ///
+    pub fn get_data(&self, offset: u32, len: u32) -> WasmEdgeResult<Vec<u8>> {
+        let mut data = Vec::with_capacity(len as usize);
+        unsafe {
+            check(ffi::WasmEdge_MemoryInstanceGetData(
+                self.inner.0,
+                data.as_mut_ptr(),
+                offset,
+                len,
+            ))?;
+            data.set_len(len as usize);
+        }
+
+        Ok(data.into_iter().collect())
+    }
+
+    /// Copies the data from the given input buffer into the [Memory].
+    ///
+    /// # Arguments
+    ///
+    /// * `data` - The data buffer to copy.
+    ///
+    /// * `offset` - The data start offset in the [Memory].
+    ///
+    /// # Errors
+    ///
+    /// If the sum of the `offset` and the data length is larger than the size of the [Memory],
+    /// then an error is returned.
+    ///
+    pub fn set_data(&mut self, data: impl AsRef<[u8]>, offset: u32) -> WasmEdgeResult<()> {
+        unsafe {
+            check(ffi::WasmEdge_MemoryInstanceSetData(
+                self.inner.0,
+                data.as_ref().as_ptr(),
+                offset,
+                data.as_ref().len() as u32,
+            ))
+        }
+    }
+
+    /// Returns the const data pointer to the [Memory].
+    ///
+    /// # Arguments
+    ///
+    /// * `offset` - The data start offset in the [Memory].
+    ///
+    /// * `len` - The requested data length. If the size of `offset` + `len` is larger than the data size in the [Memory]
+    ///
+    ///
+    /// # Errors
+    ///
+    /// If fail to get the data pointer, then an error is returned.
+    ///
+    /// # Safety
+    ///
+    /// The lifetime of the returned pointer must not exceed that of the object itself.
+    ///
+    pub unsafe fn data_pointer(&self, offset: u32, len: u32) -> WasmEdgeResult<*const u8> {
+        let ptr = unsafe { ffi::WasmEdge_MemoryInstanceGetPointerConst(self.inner.0, offset, len) };
+        match ptr.is_null() {
+            true => Err(Box::new(WasmEdgeError::Mem(MemError::ConstPtr))),
+            false => Ok(ptr),
+        }
+    }
+
+    /// Returns the data pointer to the [Memory].
+    ///
+    /// # Arguments
+    ///
+    /// * `offset` - The data start offset in the [Memory].
+    ///
+    /// * `len` - The requested data length. If the size of `offset` + `len` is larger than the data size in the [Memory]
+    ///
+    /// # Errors
+    ///
+    /// If fail to get the data pointer, then an error is returned.
+    ///
+    /// # Safety
+    ///
+    /// The lifetime of the returned pointer must not exceed that of the object itself.
+    ///
+    pub unsafe fn data_pointer_mut(&mut self, offset: u32, len: u32) -> WasmEdgeResult<*mut u8> {
+        let ptr = unsafe { ffi::WasmEdge_MemoryInstanceGetPointer(self.inner.0, offset, len) };
+        match ptr.is_null() {
+            true => Err(Box::new(WasmEdgeError::Mem(MemError::MutPtr))),
+            false => Ok(ptr),
+        }
+    }
+
+    /// Returns the size, in WebAssembly pages (64 KiB of each page), of this wasm memory.
+    pub fn size(&self) -> u32 {
+        unsafe { ffi::WasmEdge_MemoryInstanceGetPageSize(self.inner.0) }
+    }
+
+    /// Grows this WebAssembly memory by `count` pages.
+    ///
+    /// # Arguments
+    ///
+    /// * `count` - The page counts to be extended to the [Memory].
+    ///
+    /// # Errors
+    ///
+    /// If fail to grow the page count, then an error is returned.
+    ///
+    pub fn grow(&mut self, count: u32) -> WasmEdgeResult<()> {
+        unsafe { check(ffi::WasmEdge_MemoryInstanceGrowPage(self.inner.0, count)) }
+    }
+
+    /// # Safety
+    ///
+    /// Provides a raw pointer to the inner memory context.
+    /// The lifetime of the returned pointer must not exceed that of the object itself.
+    pub unsafe fn as_ptr(&self) -> *const ffi::WasmEdge_MemoryInstanceContext {
+        self.inner.0
+    }
+}
+impl Drop for Memory {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_MemoryInstanceDelete(self.inner.0) };
+    }
+}
+
+impl Memory {
+    pub fn get_ref<T: Sized>(&self, offset: usize) -> Option<&T> {
+        unsafe {
+            let r = std::mem::size_of::<T>();
+            let ptr = self.data_pointer(offset as u32, r as u32).ok()?;
+            ptr.cast::<T>().as_ref()
+        }
+    }
+
+    pub fn slice<T: Sized>(&self, offset: usize, len: usize) -> Option<&[T]> {
+        unsafe {
+            let r = std::mem::size_of::<T>() * len;
+            let ptr = self.data_pointer(offset as u32, r as u32).ok()? as *const T;
+            Some(std::slice::from_raw_parts(ptr, len))
+        }
+    }
+
+    pub fn get_ref_mut<T: Sized>(&mut self, offset: usize) -> Option<&mut T> {
+        unsafe {
+            let r = std::mem::size_of::<T>();
+            let ptr = self.data_pointer_mut(offset as u32, r as u32).ok()?;
+            ptr.cast::<T>().as_mut()
+        }
+    }
+
+    pub fn mut_slice<T: Sized>(&self, offset: usize, len: usize) -> Option<&mut [T]> {
+        unsafe {
+            let r = std::mem::size_of::<T>() * len;
+            let ptr = self.data_pointer(offset as u32, r as u32).ok()? as *mut T;
+            Some(std::slice::from_raw_parts_mut(ptr, len))
+        }
+    }
+
+    pub fn write<T: Sized>(&mut self, offset: usize, data: T) -> Option<()> {
+        let p = self.get_ref_mut(offset)?;
+        *p = data;
+        Some(())
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerMemory(pub(crate) *mut ffi::WasmEdge_MemoryInstanceContext);
+unsafe impl Send for InnerMemory {}
+unsafe impl Sync for InnerMemory {}
+
+/// Defines the type of a wasm memory instance
+#[derive(Debug)]
+pub(crate) struct MemType {
+    pub(crate) inner: InnerMemType,
+}
+impl MemType {
+    /// Create a new [MemType] to be associated with the given limit range for the capacity.
+    ///
+    /// # Arguments
+    ///
+    /// * 'min' - The initial size of the linear memory.
+    ///
+    /// * 'max' - The upper bound of the linear memory size allowed to grow. If 'max' is set 'None', then the maximum size will be set `u32::MAX`.
+    ///
+    /// * `shared` - Whether the memory is shared or not. Reference [Threading proposal for WebAssembly](https://github.com/WebAssembly/threads/blob/main/proposals/threads/Overview.md#shared-linear-memory) for details about shared memory. If `shared` is set `true`, then `max` MUST not be `None`.
+    ///
+    /// # Errors
+    ///
+    /// If fail to create a [MemType], then an error is returned.
+    ///
+    /// # Example
+    ///
+    /// ```ignore
+    /// let ty = MemType::create(0, Some(u32::MAX), false);
+    /// ```
+    ///
+    pub(crate) fn create(min: u32, max: Option<u32>, shared: bool) -> WasmEdgeResult<Self> {
+        if shared && max.is_none() {
+            return Err(Box::new(WasmEdgeError::Mem(MemError::CreateSharedType)));
+        }
+        let ctx =
+            unsafe { ffi::WasmEdge_MemoryTypeCreate(WasmEdgeLimit::new(min, max, shared).into()) };
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::MemTypeCreate)),
+            false => Ok(Self {
+                inner: InnerMemType(ctx),
+            }),
+        }
+    }
+
+    /// Returns the initial size of a [Memory].
+    pub(crate) fn min(&self) -> u32 {
+        let limit = unsafe { ffi::WasmEdge_MemoryTypeGetLimit(self.inner.0) };
+        let limit: WasmEdgeLimit = limit.into();
+        limit.min()
+    }
+
+    /// Returns the maximum size of a [Memory] allowed to grow.
+    pub(crate) fn max(&self) -> Option<u32> {
+        let limit = unsafe { ffi::WasmEdge_MemoryTypeGetLimit(self.inner.0) };
+        let limit: WasmEdgeLimit = limit.into();
+        limit.max()
+    }
+
+    /// Returns whether the memory is shared or not.
+    pub(crate) fn shared(&self) -> bool {
+        let limit = unsafe { ffi::WasmEdge_MemoryTypeGetLimit(self.inner.0) };
+        let limit: WasmEdgeLimit = limit.into();
+        limit.shared()
+    }
+}
+impl Drop for MemType {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_MemoryTypeDelete(self.inner.0) }
+    }
+}
+impl From<&wasmedge_types::MemoryType> for MemType {
+    fn from(ty: &wasmedge_types::MemoryType) -> Self {
+        MemType::create(ty.minimum(), ty.maximum(), ty.shared()).expect(
+            "[wasmedge-sys] Failed to convert wasmedge_types::MemoryType into wasmedge_sys::MemType.",
+        )
+    }
+}
+impl From<wasmedge_types::MemoryType> for MemType {
+    fn from(ty: wasmedge_types::MemoryType) -> Self {
+        (&ty).into()
+    }
+}
+impl From<&MemType> for wasmedge_types::MemoryType {
+    fn from(ty: &MemType) -> Self {
+        wasmedge_types::MemoryType::new(ty.min(), ty.max(), ty.shared()).expect(
+            "[wasmedge-sys] Failed to convert wasmedge_sys::MemType into wasmedge_types::MemoryType."
+        )
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerMemType(pub(crate) *mut ffi::WasmEdge_MemoryTypeContext);
+unsafe impl Send for InnerMemType {}
+unsafe impl Sync for InnerMemType {}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use std::thread;
+    use wasmedge_types::error::{CoreError, CoreExecutionError, WasmEdgeError};
+
+    #[test]
+    fn test_memory_type() {
+        // case 1
+        let result = MemType::create(0, Some(u32::MAX), false);
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        assert!(!ty.inner.0.is_null());
+        assert_eq!(ty.min(), 0);
+        assert_eq!(ty.max(), Some(u32::MAX));
+
+        // case 2
+        let result = MemType::create(10, Some(101), false);
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        assert!(!ty.inner.0.is_null());
+        assert_eq!(ty.min(), 10);
+        assert_eq!(ty.max(), Some(101));
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_memory_grow() {
+        // create a Memory with a limit range [10, 20]
+        let result = wasmedge_types::MemoryType::new(10, Some(20), false);
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        let result = Memory::create(&ty);
+        assert!(result.is_ok());
+        let mut mem = result.unwrap();
+        assert!(!mem.inner.0.is_null());
+
+        // get type
+        let result = mem.ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        // check limit
+        assert_eq!(ty.minimum(), 10);
+        assert_eq!(ty.maximum(), Some(20));
+
+        // check page count
+        let count = mem.size();
+        assert_eq!(count, 10);
+
+        // grow 5 pages
+        let result = mem.grow(10);
+        assert!(result.is_ok());
+        assert_eq!(mem.size(), 20);
+
+        // grow additional  pages, which causes a failure
+        let result = mem.grow(1);
+        assert!(result.is_err());
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_memory_data() {
+        // create a Memory: the min size 1 and the max size 2
+        let result = wasmedge_types::MemoryType::new(1, Some(2), false);
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        let result = Memory::create(&ty);
+        assert!(result.is_ok());
+        let mut mem = result.unwrap();
+        assert!(!mem.inner.0.is_null());
+
+        // check page count
+        let count = mem.size();
+        assert_eq!(count, 1);
+
+        // get data before set data
+        let result = mem.get_data(0, 10);
+        assert!(result.is_ok());
+        let data = result.unwrap();
+        assert_eq!(data, vec![0; 10]);
+
+        // set data
+        let result = mem.set_data(vec![1; 10], 10);
+        assert!(result.is_ok());
+        // get data after set data
+        let result = mem.get_data(10, 10);
+        assert!(result.is_ok());
+        let data = result.unwrap();
+        assert_eq!(data, vec![1; 10]);
+
+        // set data and the data length is larger than the data size in the memory
+        let result = mem.set_data(vec![1; 10], u32::pow(2, 16) - 9);
+        assert!(result.is_err());
+        assert_eq!(
+            result.unwrap_err(),
+            Box::new(WasmEdgeError::Core(CoreError::Execution(
+                CoreExecutionError::MemoryOutOfBounds
+            )))
+        );
+
+        // grow the memory size
+        let result = mem.grow(1);
+        assert!(result.is_ok());
+        assert_eq!(mem.size(), 2);
+        let result = mem.set_data(vec![1; 10], u32::pow(2, 16) - 9);
+        assert!(result.is_ok());
+    }
+
+    #[test]
+    fn test_memory_send() {
+        {
+            let result = wasmedge_types::MemoryType::new(10, Some(101), false);
+            assert!(result.is_ok());
+            let ty = result.unwrap();
+
+            let handle = thread::spawn(move || {
+                assert_eq!(ty.minimum(), 10);
+                assert_eq!(ty.maximum(), Some(101));
+            });
+
+            handle.join().unwrap()
+        }
+
+        {
+            // create a Memory with a limit range [10, 20]
+            let result = wasmedge_types::MemoryType::new(10, Some(20), false);
+            assert!(result.is_ok());
+            let ty = result.unwrap();
+            let result = Memory::create(&ty);
+            assert!(result.is_ok());
+            let mem = result.unwrap();
+            assert!(!mem.inner.0.is_null());
+
+            let handle = thread::spawn(move || {
+                // get type
+                let result = mem.ty();
+                assert!(result.is_ok());
+                let ty = result.unwrap();
+                // check limit
+                assert_eq!(ty.minimum(), 10);
+                assert_eq!(ty.maximum(), Some(20));
+
+                // check page count
+                let count = mem.size();
+                assert_eq!(count, 10);
+            });
+
+            handle.join().unwrap()
+        }
+    }
+
+    #[test]
+    fn test_memory_sync() {
+        // create a Memory with a limit range [10, 20]
+        let result = wasmedge_types::MemoryType::new(10, Some(20), false);
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        let result = Memory::create(&ty);
+        assert!(result.is_ok());
+        let mem = result.unwrap();
+        assert!(!mem.inner.0.is_null());
+        let mem = &mem;
+
+        std::thread::scope(|s| {
+            let _ = s
+                .spawn(|| {
+                    // get type
+                    let result = mem.ty();
+                    assert!(result.is_ok());
+                    let ty = result.unwrap();
+                    // check limit
+                    assert_eq!(ty.minimum(), 10);
+                    assert_eq!(ty.maximum(), Some(20));
+
+                    // check page count
+                    let count = mem.size();
+                    assert_eq!(count, 10);
+                })
+                .join();
+        })
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/instance/mod.rs.html b/src/wasmedge_sys/instance/mod.rs.html new file mode 100644 index 000000000..9b67cfdf7 --- /dev/null +++ b/src/wasmedge_sys/instance/mod.rs.html @@ -0,0 +1,201 @@ +mod.rs - source

wasmedge_sys/instance/
mod.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
//! Defines WasmEdge instance structs, including Function, Global, Memory, Table, and etc.
+
+pub mod function;
+pub mod global;
+pub mod memory;
+pub mod module;
+pub mod table;
+
+use std::{
+    fmt::Debug,
+    ops::{Deref, DerefMut},
+};
+
+#[doc(hidden)]
+pub use function::Function;
+#[doc(hidden)]
+pub use global::Global;
+#[doc(hidden)]
+pub use memory::Memory;
+#[doc(hidden)]
+pub use module::Instance;
+#[doc(hidden)]
+pub use table::Table;
+pub use wasmedge_types::{FuncType, GlobalType, MemoryType, TableType};
+
+pub struct InnerRef<D, Ref: ?Sized> {
+    value: std::mem::ManuallyDrop<D>,
+    _ref: std::marker::PhantomData<Ref>,
+}
+
+impl<D, Ref: ?Sized> InnerRef<D, &Ref> {
+    /// # Safety
+    ///
+    /// The return value type of this function should ensure the correctness of lifetimes.
+    pub unsafe fn create_from_ref(value: std::mem::ManuallyDrop<D>, _r: &Ref) -> Self {
+        let r = Default::default();
+        Self { value, _ref: r }
+    }
+
+    /// # Safety
+    ///
+    /// The return value type of this function should ensure the correctness of lifetimes.
+    pub unsafe fn create_ref(value: std::mem::ManuallyDrop<D>) -> Self {
+        let r = Default::default();
+        Self { value, _ref: r }
+    }
+}
+
+impl<D, Ref: ?Sized> InnerRef<D, &mut Ref> {
+    /// # Safety
+    ///
+    /// The return value type of this function should ensure the correctness of lifetimes.
+    pub unsafe fn create_from_mut(value: std::mem::ManuallyDrop<D>, _r: &mut Ref) -> Self {
+        let r = Default::default();
+        Self { value, _ref: r }
+    }
+
+    /// # Safety
+    ///
+    /// The return value type of this function should ensure the correctness of lifetimes.
+    pub unsafe fn create_mut(value: std::mem::ManuallyDrop<D>) -> Self {
+        let r = Default::default();
+        Self { value, _ref: r }
+    }
+}
+
+impl<D: Debug, Ref> Debug for InnerRef<D, Ref> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        self.value.fmt(f)
+    }
+}
+
+impl<D, Ref> Deref for InnerRef<D, &Ref> {
+    type Target = D;
+    fn deref(&self) -> &Self::Target {
+        &self.value
+    }
+}
+
+impl<D: Clone, Ref> Clone for InnerRef<D, &mut Ref> {
+    fn clone(&self) -> Self {
+        Self {
+            value: self.value.clone(),
+            _ref: self._ref,
+        }
+    }
+}
+
+impl<D, Ref> Deref for InnerRef<D, &mut Ref> {
+    type Target = D;
+    fn deref(&self) -> &Self::Target {
+        &self.value
+    }
+}
+
+impl<D, Ref> DerefMut for InnerRef<D, &mut Ref> {
+    fn deref_mut(&mut self) -> &mut Self::Target {
+        &mut self.value
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/instance/module.rs.html b/src/wasmedge_sys/instance/module.rs.html new file mode 100644 index 000000000..a5c1ccd8f --- /dev/null +++ b/src/wasmedge_sys/instance/module.rs.html @@ -0,0 +1,2065 @@ +module.rs - source

wasmedge_sys/instance/
module.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
//! Defines WasmEdge Instance and other relevant types.
+use crate::{
+    ffi::{self},
+    instance::{global::InnerGlobal, memory::InnerMemory, table::InnerTable},
+    types::WasmEdgeString,
+    FuncRef, Function, Global, Memory, Table, WasmEdgeResult,
+};
+
+use wasmedge_types::error::{InstanceError, WasmEdgeError};
+
+use super::{function::AsFunc, InnerRef};
+
+/// An [Instance] represents an instantiated module. In the instantiation process, An [Instance] is created from al[Module](crate::Module). From an [Instance] the exported [functions](crate::Function), [tables](crate::Table), [memories](crate::Memory), and [globals](crate::Global) can be fetched.
+#[derive(Debug)]
+pub struct Instance {
+    pub(crate) inner: InnerInstance,
+}
+impl Drop for Instance {
+    fn drop(&mut self) {
+        unsafe {
+            ffi::WasmEdge_ModuleInstanceDelete(self.inner.0);
+        }
+    }
+}
+impl AsInstance for Instance {
+    unsafe fn as_ptr(&self) -> *const ffi::WasmEdge_ModuleInstanceContext {
+        self.inner.0
+    }
+}
+
+impl<Inst: Sized> AsInstance for Inst
+where
+    Inst: AsMut<Instance> + AsRef<Instance>,
+{
+    unsafe fn as_ptr(&self) -> *const ffi::WasmEdge_ModuleInstanceContext {
+        self.as_ref().as_ptr()
+    }
+}
+
+#[derive(Debug, Clone)]
+pub(crate) struct InnerInstance(pub(crate) *mut ffi::WasmEdge_ModuleInstanceContext);
+unsafe impl Send for InnerInstance {}
+unsafe impl Sync for InnerInstance {}
+
+/// The object as an module instance is required to implement this trait.
+pub trait AsInstance {
+    /// Returns the name of this exported [module instance](crate::Instance).
+    ///
+    /// If this module instance is an active module instance, then None is returned.
+    fn name(&self) -> Option<String> {
+        let name = unsafe { ffi::WasmEdge_ModuleInstanceGetModuleName(self.as_ptr()) };
+
+        let name: String = (&name).into();
+        if name.is_empty() {
+            return None;
+        }
+
+        Some(name)
+    }
+
+    /// Returns the exported [table instance](crate::Table) by name.
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the target exported [table instance](crate::Table).
+    ///
+    /// # Error
+    ///
+    /// If fail to find the target [table instance](crate::Table), then an error is returned.
+    fn get_table(&self, name: impl AsRef<str>) -> WasmEdgeResult<InnerRef<Table, &Self>>
+    where
+        Self: Sized,
+    {
+        let table_name: WasmEdgeString = name.as_ref().into();
+        let ctx =
+            unsafe { ffi::WasmEdge_ModuleInstanceFindTable(self.as_ptr(), table_name.as_raw()) };
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::Instance(
+                InstanceError::NotFoundTable(name.as_ref().to_string()),
+            ))),
+            false => {
+                let table = std::mem::ManuallyDrop::new(Table {
+                    inner: InnerTable(ctx),
+                });
+                Ok(unsafe { InnerRef::create_from_ref(table, self) })
+            }
+        }
+    }
+
+    /// Returns the exported [memory instance](crate::Memory) by name.
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the target exported [memory instance](crate::Memory).
+    ///
+    /// # Error
+    ///
+    /// If fail to find the target [memory instance](crate::Memory), then an error is returned.
+    fn get_memory_ref(&self, name: impl AsRef<str>) -> WasmEdgeResult<InnerRef<Memory, &Self>>
+    where
+        Self: Sized,
+    {
+        unsafe {
+            let mem_name: WasmEdgeString = name.as_ref().into();
+            let ctx = ffi::WasmEdge_ModuleInstanceFindMemory(self.as_ptr(), mem_name.as_raw());
+
+            if ctx.is_null() {
+                Err(Box::new(WasmEdgeError::Instance(
+                    InstanceError::NotFoundMem(name.as_ref().to_string()),
+                )))
+            } else {
+                let mem = Memory {
+                    inner: InnerMemory(ctx),
+                };
+
+                Ok(InnerRef::create_from_ref(
+                    std::mem::ManuallyDrop::new(mem),
+                    self,
+                ))
+            }
+        }
+    }
+
+    fn get_memory_mut(
+        &mut self,
+        name: impl AsRef<str>,
+    ) -> WasmEdgeResult<InnerRef<Memory, &mut Self>>
+    where
+        Self: Sized,
+    {
+        unsafe {
+            let mem_name: WasmEdgeString = name.as_ref().into();
+            let ctx = ffi::WasmEdge_ModuleInstanceFindMemory(self.as_ptr(), mem_name.as_raw());
+
+            if ctx.is_null() {
+                Err(Box::new(WasmEdgeError::Instance(
+                    InstanceError::NotFoundMem(name.as_ref().to_string()),
+                )))
+            } else {
+                let mem = Memory {
+                    inner: InnerMemory(ctx),
+                };
+
+                Ok(InnerRef::create_from_mut(
+                    std::mem::ManuallyDrop::new(mem),
+                    self,
+                ))
+            }
+        }
+    }
+
+    /// Returns the exported [global instance](crate::Global) by name.
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the target exported [global instance](crate::Global).
+    ///
+    /// # Error
+    ///
+    /// If fail to find the target [global instance](crate::Global), then an error is returned.
+    fn get_global(&self, name: impl AsRef<str>) -> WasmEdgeResult<InnerRef<Global, &Self>>
+    where
+        Self: Sized,
+    {
+        let global_name: WasmEdgeString = name.as_ref().into();
+        let ctx =
+            unsafe { ffi::WasmEdge_ModuleInstanceFindGlobal(self.as_ptr(), global_name.as_raw()) };
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::Instance(
+                InstanceError::NotFoundGlobal(name.as_ref().to_string()),
+            ))),
+            false => {
+                let value = std::mem::ManuallyDrop::new(Global {
+                    inner: InnerGlobal(ctx),
+                });
+                Ok(unsafe { InnerRef::create_from_ref(value, self) })
+            }
+        }
+    }
+
+    fn get_global_mut(
+        &mut self,
+        name: impl AsRef<str>,
+    ) -> WasmEdgeResult<InnerRef<Global, &mut Self>>
+    where
+        Self: Sized,
+    {
+        let global_name: WasmEdgeString = name.as_ref().into();
+        let ctx =
+            unsafe { ffi::WasmEdge_ModuleInstanceFindGlobal(self.as_ptr(), global_name.as_raw()) };
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::Instance(
+                InstanceError::NotFoundGlobal(name.as_ref().to_string()),
+            ))),
+            false => {
+                let value = std::mem::ManuallyDrop::new(Global {
+                    inner: InnerGlobal(ctx),
+                });
+                Ok(unsafe { InnerRef::create_from_mut(value, self) })
+            }
+        }
+    }
+
+    /// Returns the length of the exported [function instances](crate::Function) in this module instance.
+    fn func_len(&self) -> u32 {
+        unsafe { ffi::WasmEdge_ModuleInstanceListFunctionLength(self.as_ptr()) }
+    }
+
+    /// Returns the names of the exported [function instances](crate::Function) in this module instance.
+    fn func_names(&self) -> Option<Vec<String>> {
+        let len_func_names = self.func_len();
+        match len_func_names > 0 {
+            true => {
+                let mut func_names = Vec::with_capacity(len_func_names as usize);
+                unsafe {
+                    ffi::WasmEdge_ModuleInstanceListFunction(
+                        self.as_ptr(),
+                        func_names.as_mut_ptr(),
+                        len_func_names,
+                    );
+                    func_names.set_len(len_func_names as usize);
+                }
+
+                let names = func_names
+                    .into_iter()
+                    .map(|x| x.into())
+                    .collect::<Vec<String>>();
+                Some(names)
+            }
+            false => None,
+        }
+    }
+
+    /// Returns the exported [function instance](crate::Function) by name.
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the target exported [function instance](crate::Function).
+    ///
+    /// # Error
+    ///
+    /// If fail to find the target [function](crate::Function), then an error is returned.
+    fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>> {
+        unsafe {
+            let func_name: WasmEdgeString = name.into();
+            let func_ctx =
+                ffi::WasmEdge_ModuleInstanceFindFunction(self.as_ptr(), func_name.as_raw());
+
+            if func_ctx.is_null() {
+                Err(Box::new(WasmEdgeError::Instance(
+                    InstanceError::NotFoundFunc(name.to_string()),
+                )))
+            } else {
+                let value = Function::from_raw(func_ctx);
+                Ok(FuncRef::create_ref(std::mem::ManuallyDrop::new(value)))
+            }
+        }
+    }
+
+    /// Returns the exported [function instance](crate::Function) by name.
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the target exported [function instance](crate::Function).
+    ///
+    /// # Error
+    ///
+    /// If fail to find the target [function](crate::Function), then an error is returned.
+    fn get_func_mut(&mut self, name: &str) -> WasmEdgeResult<FuncRef<&mut Instance>> {
+        unsafe {
+            let func_name: WasmEdgeString = name.into();
+            let func_ctx =
+                ffi::WasmEdge_ModuleInstanceFindFunction(self.as_ptr(), func_name.as_raw());
+
+            if func_ctx.is_null() {
+                Err(Box::new(WasmEdgeError::Instance(
+                    InstanceError::NotFoundFunc(name.to_string()),
+                )))
+            } else {
+                let value = Function::from_raw(func_ctx);
+                Ok(FuncRef::create_mut(std::mem::ManuallyDrop::new(value)))
+            }
+        }
+    }
+
+    /// Returns the length of the exported [table instances](crate::Table) in this module instance.
+    fn table_len(&self) -> u32 {
+        unsafe { ffi::WasmEdge_ModuleInstanceListTableLength(self.as_ptr()) }
+    }
+
+    /// Returns the names of the exported [table instances](crate::Table) in this module instance.
+    fn table_names(&self) -> Option<Vec<String>> {
+        let len_table_names = self.table_len();
+        match len_table_names > 0 {
+            true => {
+                let mut table_names = Vec::with_capacity(len_table_names as usize);
+                unsafe {
+                    ffi::WasmEdge_ModuleInstanceListTable(
+                        self.as_ptr(),
+                        table_names.as_mut_ptr(),
+                        len_table_names,
+                    );
+                    table_names.set_len(len_table_names as usize);
+                }
+
+                let names = table_names
+                    .into_iter()
+                    .map(|x| x.into())
+                    .collect::<Vec<String>>();
+                Some(names)
+            }
+            false => None,
+        }
+    }
+
+    /// Returns the length of the exported [memory instances](crate::Memory) in this module instance.
+    fn mem_len(&self) -> u32 {
+        unsafe { ffi::WasmEdge_ModuleInstanceListMemoryLength(self.as_ptr()) }
+    }
+
+    /// Returns the names of all exported [memory instances](crate::Memory) in this module instance.
+    fn mem_names(&self) -> Option<Vec<String>> {
+        let len_mem_names = self.mem_len();
+        match len_mem_names > 0 {
+            true => {
+                let mut mem_names = Vec::with_capacity(len_mem_names as usize);
+                unsafe {
+                    ffi::WasmEdge_ModuleInstanceListMemory(
+                        self.as_ptr(),
+                        mem_names.as_mut_ptr(),
+                        len_mem_names,
+                    );
+                    mem_names.set_len(len_mem_names as usize);
+                }
+
+                let names = mem_names
+                    .into_iter()
+                    .map(|x| x.into())
+                    .collect::<Vec<String>>();
+                Some(names)
+            }
+            false => None,
+        }
+    }
+
+    /// Returns the length of the exported [global instances](crate::Global) in this module instance.
+    fn global_len(&self) -> u32 {
+        unsafe { ffi::WasmEdge_ModuleInstanceListGlobalLength(self.as_ptr()) }
+    }
+
+    /// Returns the names of the exported [global instances](crate::Global) in this module instance.
+    fn global_names(&self) -> Option<Vec<String>> {
+        let len_global_names = self.global_len();
+        match len_global_names > 0 {
+            true => {
+                let mut global_names = Vec::with_capacity(len_global_names as usize);
+                unsafe {
+                    ffi::WasmEdge_ModuleInstanceListGlobal(
+                        self.as_ptr(),
+                        global_names.as_mut_ptr(),
+                        len_global_names,
+                    );
+                    global_names.set_len(len_global_names as usize);
+                }
+
+                let names = global_names
+                    .into_iter()
+                    .map(|x| x.into())
+                    .collect::<Vec<String>>();
+                Some(names)
+            }
+            false => None,
+        }
+    }
+
+    /// # Safety
+    ///
+    /// Provides a raw pointer to the inner module instance context.
+    /// The lifetime of the returned pointer must not exceed that of the object itself.
+    unsafe fn as_ptr(&self) -> *const ffi::WasmEdge_ModuleInstanceContext;
+}
+
+/// An [ImportModule] represents a host module with a name. A host module consists of one or more host [function](crate::Function), [table](crate::Table), [memory](crate::Memory), and [global](crate::Global) instances,  which are defined outside wasm modules and fed into wasm modules as imports.
+#[derive(Debug)]
+pub struct ImportModule<T: ?Sized> {
+    pub(crate) inner: InnerInstance,
+    name: String,
+    _data: std::marker::PhantomData<T>,
+}
+impl<T: ?Sized> Drop for ImportModule<T> {
+    fn drop(&mut self) {
+        unsafe {
+            ffi::WasmEdge_ModuleInstanceDelete(self.inner.0);
+        }
+    }
+}
+
+unsafe extern "C" fn import_data_finalizer<T>(ptr: *mut std::os::raw::c_void) {
+    let box_data: Box<T> = Box::from_raw(ptr as _);
+    std::mem::drop(box_data)
+}
+
+impl<T: Sized> ImportModule<T> {
+    /// Creates a module instance which is used to import host functions, tables, memories, and globals into a wasm module.
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the import module instance.
+    ///
+    /// * `data` - The host context data used in this function.
+    ///
+    /// # Error
+    ///
+    /// If fail to create the import module instance, then an error is returned.
+    pub fn create(name: impl AsRef<str>, data: Box<T>) -> WasmEdgeResult<Self> {
+        let raw_name = WasmEdgeString::from(name.as_ref());
+
+        // ffi::WasmEdge_ModuleInstanceGetModuleName(Cxt)
+
+        let ctx = unsafe {
+            ffi::WasmEdge_ModuleInstanceCreateWithData(
+                raw_name.as_raw(),
+                Box::leak(data) as *mut _ as *mut std::ffi::c_void,
+                Some(import_data_finalizer::<T>),
+            )
+        };
+
+        let import = Self {
+            inner: InnerInstance(ctx),
+            name: name.as_ref().to_string(),
+            _data: Default::default(),
+        };
+
+        Ok(import)
+    }
+
+    /// # Safety
+    ///
+    /// Provides a raw pointer to the inner module instance context.
+    /// The lifetime of the returned pointer must not exceed that of the object itself.
+    pub unsafe fn as_raw(&self) -> *mut ffi::WasmEdge_ModuleInstanceContext {
+        self.inner.0
+    }
+
+    /// # Safety
+    ///
+    /// This function will take over the lifetime management of `ctx`, so do not call `ffi::WasmEdge_ModuleInstanceDelete` on `ctx` after this.
+    pub unsafe fn from_raw(ctx: *mut ffi::WasmEdge_ModuleInstanceContext) -> Self {
+        let wasmedge_s = WasmEdgeString::from_raw(ffi::WasmEdge_ModuleInstanceGetModuleName(ctx));
+        let name = (&wasmedge_s).into();
+        Self {
+            inner: InnerInstance(ctx),
+            name,
+            _data: Default::default(),
+        }
+    }
+
+    pub fn get_host_data(&self) -> &T {
+        unsafe { &*(ffi::WasmEdge_ModuleInstanceGetHostData(self.as_ptr()) as *mut T) }
+    }
+
+    pub fn get_host_data_mut(&mut self) -> &mut T {
+        unsafe { &mut *(ffi::WasmEdge_ModuleInstanceGetHostData(self.as_ptr()) as *mut T) }
+    }
+}
+impl<T: Sized> AsInstance for ImportModule<T> {
+    unsafe fn as_ptr(&self) -> *const ffi::WasmEdge_ModuleInstanceContext {
+        self.inner.0
+    }
+
+    fn name(&self) -> Option<String> {
+        Some(self.name.clone())
+    }
+}
+impl<T: Sized> ImportModule<T> {
+    pub fn add_func(&mut self, name: impl AsRef<str>, func: Function) {
+        let func_name: WasmEdgeString = name.into();
+        unsafe {
+            ffi::WasmEdge_ModuleInstanceAddFunction(
+                self.inner.0,
+                func_name.as_raw(),
+                func.get_func_raw(),
+            );
+        }
+        std::mem::forget(func);
+    }
+
+    pub fn add_table(&mut self, name: impl AsRef<str>, table: Table) {
+        let table_name: WasmEdgeString = name.as_ref().into();
+        unsafe {
+            ffi::WasmEdge_ModuleInstanceAddTable(self.inner.0, table_name.as_raw(), table.inner.0);
+        }
+        std::mem::forget(table);
+    }
+
+    pub fn add_memory(&mut self, name: impl AsRef<str>, memory: Memory) {
+        let mem_name: WasmEdgeString = name.as_ref().into();
+        unsafe {
+            ffi::WasmEdge_ModuleInstanceAddMemory(self.inner.0, mem_name.as_raw(), memory.inner.0);
+        }
+        std::mem::forget(memory);
+    }
+
+    pub fn add_global(&mut self, name: impl AsRef<str>, global: Global) {
+        let global_name: WasmEdgeString = name.as_ref().into();
+        unsafe {
+            ffi::WasmEdge_ModuleInstanceAddGlobal(
+                self.inner.0,
+                global_name.as_raw(),
+                global.inner.0,
+            );
+        }
+        std::mem::forget(global);
+    }
+}
+
+/// A [WasiModule] is a module instance for the WASI specification.
+#[derive(Debug)]
+pub struct WasiModule(Instance);
+
+impl AsRef<Instance> for WasiModule {
+    fn as_ref(&self) -> &Instance {
+        &self.0
+    }
+}
+impl AsMut<Instance> for WasiModule {
+    fn as_mut(&mut self) -> &mut Instance {
+        &mut self.0
+    }
+}
+
+impl WasiModule {
+    /// Creates a WASI host module which contains the WASI host functions, and initializes it with the given parameters.
+    ///
+    /// # Arguments
+    ///
+    /// * `args` - The commandline arguments. The first argument is the program name.
+    ///
+    /// * `envs` - The environment variables in the format `ENV_VAR_NAME=VALUE`.
+    ///
+    /// * `preopens` - The directories to pre-open. The required format is `GUEST_PATH:HOST_PATH`.
+    ///
+    /// # Error
+    ///
+    /// If fail to create a host module, then an error is returned.
+    pub fn create(
+        args: Option<Vec<&str>>,
+        envs: Option<Vec<&str>>,
+        preopens: Option<Vec<&str>>,
+    ) -> WasmEdgeResult<Self> {
+        // parse args
+        let cstr_args: Vec<_> = match args {
+            Some(args) => args
+                .iter()
+                .map(|&x| std::ffi::CString::new(x).unwrap())
+                .collect(),
+            None => vec![],
+        };
+        let mut p_args: Vec<_> = cstr_args.iter().map(|x| x.as_ptr()).collect();
+        let p_args_len = p_args.len();
+        p_args.push(std::ptr::null());
+
+        // parse envs
+        let cstr_envs: Vec<_> = match envs {
+            Some(envs) => envs
+                .iter()
+                .map(|&x| std::ffi::CString::new(x).unwrap())
+                .collect(),
+            None => vec![],
+        };
+        let mut p_envs: Vec<_> = cstr_envs.iter().map(|x| x.as_ptr()).collect();
+        let p_envs_len = p_envs.len();
+        p_envs.push(std::ptr::null());
+
+        // parse preopens
+        let cstr_preopens: Vec<_> = match preopens {
+            Some(preopens) => preopens
+                .iter()
+                .map(|&x| std::ffi::CString::new(x).unwrap())
+                .collect(),
+            None => vec![],
+        };
+        let mut p_preopens: Vec<_> = cstr_preopens.iter().map(|x| x.as_ptr()).collect();
+        let p_preopens_len = p_preopens.len();
+        p_preopens.push(std::ptr::null());
+
+        let ctx = unsafe {
+            ffi::WasmEdge_ModuleInstanceCreateWASI(
+                p_args.as_ptr(),
+                p_args_len as u32,
+                p_envs.as_ptr(),
+                p_envs_len as u32,
+                p_preopens.as_ptr(),
+                p_preopens_len as u32,
+            )
+        };
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::ImportObjCreate)),
+            false => Ok(Self(Instance {
+                inner: InnerInstance(ctx),
+            })),
+        }
+    }
+
+    /// Returns the name of the module instance.
+    pub fn name(&self) -> &str {
+        "wasi_snapshot_preview1"
+    }
+
+    /// Initializes the WASI host module with the given parameters.
+    ///
+    /// # Arguments
+    ///
+    /// * `args` - The commandline arguments. The first argument is the program name.
+    ///
+    /// * `envs` - The environment variables in the format `ENV_VAR_NAME=VALUE`.
+    ///
+    /// * `preopens` - The directories to pre-open. The required format is `GUEST_PATH:HOST_PATH`.
+    pub fn init_wasi(
+        &mut self,
+        args: Option<Vec<&str>>,
+        envs: Option<Vec<&str>>,
+        preopens: Option<Vec<&str>>,
+    ) {
+        // parse args
+        let cstr_args: Vec<_> = match args {
+            Some(args) => args
+                .iter()
+                .map(|&x| std::ffi::CString::new(x).unwrap())
+                .collect(),
+            None => vec![],
+        };
+        let mut p_args: Vec<_> = cstr_args.iter().map(|x| x.as_ptr()).collect();
+        let p_args_len = p_args.len();
+        p_args.push(std::ptr::null());
+
+        // parse envs
+        let cstr_envs: Vec<_> = match envs {
+            Some(envs) => envs
+                .iter()
+                .map(|&x| std::ffi::CString::new(x).unwrap())
+                .collect(),
+            None => vec![],
+        };
+        let mut p_envs: Vec<_> = cstr_envs.iter().map(|x| x.as_ptr()).collect();
+        let p_envs_len = p_envs.len();
+        p_envs.push(std::ptr::null());
+
+        // parse preopens
+        let cstr_preopens: Vec<_> = match preopens {
+            Some(preopens) => preopens
+                .iter()
+                .map(|&x| std::ffi::CString::new(x).unwrap())
+                .collect(),
+            None => vec![],
+        };
+        let mut p_preopens: Vec<_> = cstr_preopens.iter().map(|x| x.as_ptr()).collect();
+        let p_preopens_len = p_preopens.len();
+        p_preopens.push(std::ptr::null());
+
+        unsafe {
+            ffi::WasmEdge_ModuleInstanceInitWASI(
+                self.0.as_ptr() as *mut _,
+                p_args.as_ptr(),
+                p_args_len as u32,
+                p_envs.as_ptr(),
+                p_envs_len as u32,
+                p_preopens.as_ptr(),
+                p_preopens_len as u32,
+            )
+        };
+    }
+
+    /// Returns the WASI exit code.
+    ///
+    /// The WASI exit code can be accessed after running the "_start" function of a `wasm32-wasi` program.
+    pub fn exit_code(&self) -> u32 {
+        unsafe { ffi::WasmEdge_ModuleInstanceWASIGetExitCode(self.0.as_ptr()) }
+    }
+
+    /// Returns the native handler from the mapped FD/Handler.
+    ///
+    /// # Argument
+    ///
+    /// * `fd` - The WASI mapped Fd.
+    ///
+    /// # Error
+    ///
+    /// If fail to get the native handler, then an error is returned.
+    pub fn get_native_handler(&self, fd: i32) -> WasmEdgeResult<u64> {
+        let mut handler: u64 = 0;
+        let code: u32 = unsafe {
+            ffi::WasmEdge_ModuleInstanceWASIGetNativeHandler(
+                self.0.as_ptr(),
+                fd,
+                &mut handler as *mut u64,
+            )
+        };
+
+        match code {
+            0 => Ok(handler),
+            _ => Err(Box::new(WasmEdgeError::Instance(
+                InstanceError::NotFoundMappedFdHandler,
+            ))),
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{CallingFrame, Executor, GlobalType, ImportModule, Store, TableType, WasmValue};
+
+    use wasmedge_types::{
+        error::{CoreError, CoreExecutionError},
+        FuncType, MemoryType, Mutability, RefType, ValType,
+    };
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_instance_add_instance() {
+        let host_name = "extern";
+
+        // create an import module
+        let result = ImportModule::<()>::create(host_name, Box::new(()));
+        assert!(result.is_ok());
+        let mut import = result.unwrap();
+
+        // create a host function
+        let func_ty = wasmedge_types::FuncType::new(
+            vec![ValType::ExternRef, ValType::I32],
+            vec![ValType::I32],
+        );
+
+        let result = unsafe {
+            Function::create_sync_func(&func_ty, real_add, import.get_host_data_mut(), 0)
+        };
+        assert!(result.is_ok());
+
+        let host_func = result.unwrap();
+        // add the host function
+        import.add_func("func-add", host_func);
+
+        // create a table
+        let table_ty = TableType::new(RefType::FuncRef, 10, Some(20));
+        let result = Table::create(table_ty);
+        assert!(result.is_ok());
+        let host_table = result.unwrap();
+        // add the table
+        import.add_table("table", host_table);
+
+        // create a memory
+        let result = MemoryType::new(1, Some(2), false);
+        assert!(result.is_ok());
+        let mem_ty = result.unwrap();
+        let result = Memory::create(&mem_ty);
+        assert!(result.is_ok());
+        let host_memory = result.unwrap();
+        // add the memory
+        import.add_memory("memory", host_memory);
+
+        // create a global
+        let global_ty = GlobalType::new(ValType::I32, Mutability::Const);
+        let result = Global::create(&global_ty, WasmValue::from_i32(666));
+        assert!(result.is_ok());
+        let host_global = result.unwrap();
+        // add the global
+        import.add_global("global_i32", host_global);
+    }
+
+    #[cfg(target_family = "unix")]
+    #[test]
+    fn test_instance_wasi() {
+        // create a wasi module instance
+        {
+            let result = WasiModule::create(None, None, None);
+            assert!(result.is_ok());
+
+            let result = WasiModule::create(
+                Some(vec!["arg1", "arg2"]),
+                Some(vec!["ENV1=VAL1", "ENV1=VAL2", "ENV3=VAL3"]),
+                Some(vec![
+                    "apiTestData",
+                    "Makefile",
+                    "CMakeFiles",
+                    "ssvmAPICoreTests",
+                    ".:.",
+                ]),
+            );
+            assert!(result.is_ok());
+
+            let result = WasiModule::create(
+                None,
+                Some(vec!["ENV1=VAL1", "ENV1=VAL2", "ENV3=VAL3"]),
+                Some(vec![
+                    "apiTestData",
+                    "Makefile",
+                    "CMakeFiles",
+                    "ssvmAPICoreTests",
+                    ".:.",
+                ]),
+            );
+            assert!(result.is_ok());
+            let wasi_import = result.unwrap();
+            assert_eq!(wasi_import.exit_code(), 0);
+        }
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_instance_find_xxx() -> Result<(), Box<dyn std::error::Error>> {
+        let module_name = "extern_module";
+
+        // create ImportModule instance
+        let result = ImportModule::create(module_name, Box::new(()));
+        assert!(result.is_ok());
+        let mut import = result.unwrap();
+
+        // add host function
+        let func_ty = FuncType::new(vec![ValType::I32; 2], vec![ValType::I32]);
+        let result = unsafe {
+            Function::create_sync_func(&func_ty, real_add, import.get_host_data_mut(), 0)
+        };
+        assert!(result.is_ok());
+        let host_func = result.unwrap();
+        import.add_func("add", host_func);
+
+        // add table
+        let ty = TableType::new(RefType::FuncRef, 0, Some(u32::MAX));
+        let result = Table::create(ty);
+        assert!(result.is_ok());
+        let table = result.unwrap();
+        import.add_table("table", table);
+
+        // add memory
+        let result = MemoryType::new(0, Some(u32::MAX), false);
+        assert!(result.is_ok());
+        let mem_ty = result.unwrap();
+        let result = Memory::create(&mem_ty);
+        assert!(result.is_ok());
+        let memory = result.unwrap();
+        import.add_memory("mem", memory);
+
+        // add global
+        let ty = GlobalType::new(ValType::F32, Mutability::Const);
+        let result = Global::create(&ty, WasmValue::from_f32(3.5));
+        assert!(result.is_ok());
+        let global = result.unwrap();
+        import.add_global("global", global);
+
+        // create an executor
+        let mut executor = Executor::create(None, None)?;
+
+        // create a store
+        let mut store = Store::create()?;
+
+        executor.register_import_module(&mut store, &import)?;
+
+        // get the module named "extern"
+        let result = store.module("extern_module");
+        assert!(result.is_ok());
+        let instance = result.unwrap();
+
+        // check the name of the module
+        assert!(instance.name().is_some());
+        assert_eq!(instance.name().unwrap(), "extern_module");
+
+        // get the exported function named "fib"
+        let result = instance.get_func("add");
+        assert!(result.is_ok());
+        let func = result.unwrap();
+
+        // check the type of the function
+        let result = func.ty();
+        assert!(result.is_some());
+        let ty = result.unwrap();
+
+        // check the parameter types
+        assert_eq!(ty.args(), &[ValType::I32, ValType::I32]);
+
+        // check the return types
+        assert_eq!(ty.returns(), &[ValType::I32]);
+
+        // get the exported table named "table"
+        let result = instance.get_table("table");
+        assert!(result.is_ok());
+        let table = result.unwrap();
+
+        // check the type of the table
+        let result = table.ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        assert_eq!(ty.elem_ty(), RefType::FuncRef);
+        assert_eq!(ty.minimum(), 0);
+        assert_eq!(ty.maximum(), Some(u32::MAX));
+
+        // get the exported memory named "mem"
+        let result = instance.get_memory_ref("mem");
+        assert!(result.is_ok());
+        let memory = result.unwrap();
+
+        // check the type of the memory
+        let result = memory.ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        assert_eq!(ty.minimum(), 0);
+        assert_eq!(ty.maximum(), Some(u32::MAX));
+
+        // get the exported global named "global"
+        let result = instance.get_global("global");
+        assert!(result.is_ok());
+        let global = result.unwrap();
+
+        // check the type of the global
+        let result = global.ty();
+        assert!(result.is_ok());
+        let global = result.unwrap();
+        assert_eq!(global.value_ty(), ValType::F32);
+        assert_eq!(global.mutability(), Mutability::Const);
+
+        Ok(())
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_instance_find_names() -> Result<(), Box<dyn std::error::Error>> {
+        let module_name = "extern_module";
+
+        // create ImportModule instance
+        let result = ImportModule::create(module_name, Box::new(()));
+        assert!(result.is_ok());
+        let mut import = result.unwrap();
+
+        // add host function
+        let func_ty = FuncType::new(vec![ValType::I32; 2], vec![ValType::I32]);
+        let result = unsafe {
+            Function::create_sync_func(&func_ty, real_add, import.get_host_data_mut(), 0)
+        };
+        assert!(result.is_ok());
+        let host_func = result.unwrap();
+        import.add_func("add", host_func);
+
+        // add table
+        let ty = TableType::new(RefType::FuncRef, 0, Some(u32::MAX));
+        let result = Table::create(ty);
+        assert!(result.is_ok());
+        let table = result.unwrap();
+        import.add_table("table", table);
+
+        // add memory
+        let result = MemoryType::new(0, Some(u32::MAX), false);
+        assert!(result.is_ok());
+        let mem_ty = result.unwrap();
+        let result = Memory::create(&mem_ty);
+        assert!(result.is_ok());
+        let memory = result.unwrap();
+        import.add_memory("mem", memory);
+
+        // add global
+        let ty = GlobalType::new(ValType::F32, Mutability::Const);
+        let result = Global::create(&ty, WasmValue::from_f32(3.5));
+        assert!(result.is_ok());
+        let global = result.unwrap();
+        import.add_global("global", global);
+
+        // create an executor
+        let mut executor = Executor::create(None, None)?;
+
+        // create a store
+        let mut store = Store::create()?;
+
+        executor.register_import_module(&mut store, &import)?;
+
+        // get the module named "extern"
+        let result = store.module("extern_module");
+        assert!(result.is_ok());
+        let instance = result.unwrap();
+
+        // check the name of the module
+        assert!(instance.name().is_some());
+        assert_eq!(instance.name().unwrap(), "extern_module");
+
+        assert_eq!(instance.func_len(), 1);
+        let result = instance.func_names();
+        assert!(result.is_some());
+        assert_eq!(result.unwrap(), ["add"]);
+
+        assert_eq!(instance.table_len(), 1);
+        let result = instance.table_names();
+        assert!(result.is_some());
+        assert_eq!(result.unwrap(), ["table"]);
+
+        assert_eq!(instance.mem_len(), 1);
+        let result = instance.mem_names();
+        assert!(result.is_some());
+        assert_eq!(result.unwrap(), ["mem"]);
+
+        assert_eq!(instance.global_len(), 1);
+        let result = instance.global_names();
+        assert!(result.is_some());
+        assert_eq!(result.unwrap(), ["global"]);
+
+        Ok(())
+    }
+
+    fn real_add(
+        _data: &mut (),
+        _inst: &mut Instance,
+        _frame: &mut CallingFrame,
+        inputs: Vec<WasmValue>,
+    ) -> Result<Vec<WasmValue>, CoreError> {
+        if inputs.len() != 2 {
+            return Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch));
+        }
+
+        let a = if inputs[0].ty() == ValType::I32 {
+            inputs[0].to_i32()
+        } else {
+            return Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch));
+        };
+
+        let b = if inputs[1].ty() == ValType::I32 {
+            inputs[1].to_i32()
+        } else {
+            return Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch));
+        };
+
+        let c = a + b;
+
+        Ok(vec![WasmValue::from_i32(c)])
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/instance/table.rs.html b/src/wasmedge_sys/instance/table.rs.html new file mode 100644 index 000000000..7da6cd505 --- /dev/null +++ b/src/wasmedge_sys/instance/table.rs.html @@ -0,0 +1,881 @@ +table.rs - source

wasmedge_sys/instance/
table.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
//! Defines WasmEdge Table and TableType structs.
+//!
+//! A WasmEdge `Table` defines a WebAssembly table instance described by its `TableType`.
+//! `TableType` specifies the limits on the size of a table. The start of
+//! the limit range specifies the lower bound (inclusive) of the size, while
+//! the end resticts the upper bound (inclusive).
+
+use crate::{
+    ffi::{self},
+    types::{WasmEdgeLimit, WasmValue},
+    utils::check,
+    WasmEdgeResult,
+};
+
+use wasmedge_types::{
+    error::{TableError, WasmEdgeError},
+    RefType, ValType,
+};
+
+/// A WasmEdge [Table] defines a WebAssembly table instance described by its [type](crate::TableType). A table is an array-like structure and stores function references.
+///
+/// This [example](https://github.com/WasmEdge/WasmEdge/tree/master/bindings/rust/wasmedge-sys/examples/table_and_funcref.rs) shows how to use [Table] to store and retrieve function references.
+#[derive(Debug)]
+pub struct Table {
+    pub(crate) inner: InnerTable,
+}
+impl Table {
+    /// Creates a new [Table] to be associated with the given element type and the size.
+    ///
+    /// # Arguments
+    ///
+    /// - `ty` specifies the type of the new [Table].
+    ///
+    /// # Error
+    ///
+    /// * If fail to create the table instance, then WasmEdgeError::Table(TableError::Create)(crate::error::TableError) is returned.
+    pub fn create(ty: wasmedge_types::TableType) -> WasmEdgeResult<Self> {
+        let ty: TableType = ty.into();
+        let ctx = unsafe { ffi::WasmEdge_TableInstanceCreate(ty.inner.0) };
+
+        if ctx.is_null() {
+            Err(Box::new(WasmEdgeError::Table(TableError::Create)))
+        } else {
+            Ok(Table {
+                inner: InnerTable(ctx),
+            })
+        }
+    }
+
+    /// Returns the [TableType] of the [Table].
+    ///
+    /// # Error
+    ///
+    /// If fail to get type, then an error is returned.
+    pub fn ty(&self) -> WasmEdgeResult<wasmedge_types::TableType> {
+        let ty_ctx = unsafe { ffi::WasmEdge_TableInstanceGetTableType(self.inner.0) };
+        if ty_ctx.is_null() {
+            Err(Box::new(WasmEdgeError::Table(TableError::Type)))
+        } else {
+            let ty = std::mem::ManuallyDrop::new(TableType {
+                inner: InnerTableType(ty_ctx as *mut _),
+            });
+            Ok((&*ty).into())
+        }
+    }
+
+    /// Returns the element value at a specific position in the [Table].
+    ///
+    /// # Arguments
+    ///
+    /// - `idx` specifies the position in the [Table], at which the [WasmValue](crate::WasmValue) is returned.
+    ///
+    /// # Error
+    ///
+    /// If fail to get the data, then an error is returned.
+    pub fn get_data(&self, idx: u32) -> WasmEdgeResult<WasmValue> {
+        let raw_val = unsafe {
+            let mut data = ffi::WasmEdge_ValueGenI32(0);
+            check(ffi::WasmEdge_TableInstanceGetData(
+                self.inner.0,
+                &mut data as *mut _,
+                idx,
+            ))?;
+            data
+        };
+        Ok(raw_val.into())
+    }
+
+    /// Sets a new element value at a specific position in the [Table].
+    ///
+    /// # Arguments
+    ///
+    /// - `data` specifies the new data.
+    ///
+    /// - `idx` specifies the position of the new data to be stored in the [Table].
+    ///
+    /// # Error
+    ///
+    /// If fail to set data, then an error is returned.
+    pub fn set_data(&mut self, data: WasmValue, idx: u32) -> WasmEdgeResult<()> {
+        unsafe {
+            check(ffi::WasmEdge_TableInstanceSetData(
+                self.inner.0,
+                data.as_raw(),
+                idx,
+            ))
+        }
+    }
+
+    /// Returns the capacity of the [Table].
+    ///
+    pub fn capacity(&self) -> usize {
+        unsafe { ffi::WasmEdge_TableInstanceGetSize(self.inner.0) as usize }
+    }
+
+    /// Increases the capacity of the [Table].
+    ///
+    /// After growing, the new capacity must be in the range defined by `limit` when the table is created.
+    ///
+    /// # Argument
+    ///
+    /// - `size` specifies the size to be added to the [Table].
+    ///
+    /// # Error
+    ///
+    /// If fail to increase the size of the [Table], then an error is returned.
+    pub fn grow(&mut self, size: u32) -> WasmEdgeResult<()> {
+        unsafe { check(ffi::WasmEdge_TableInstanceGrow(self.inner.0, size)) }
+    }
+
+    /// # Safety
+    ///
+    /// The lifetime of the returned pointer must not exceed that of the object itself.
+    pub unsafe fn as_ptr(&self) -> *const ffi::WasmEdge_TableInstanceContext {
+        self.inner.0 as *const _
+    }
+
+    /// # Safety
+    ///
+    /// This function will take over the lifetime management of `ptr`, so do not call `ffi::WasmEdge_TableInstanceDelete` on `ptr` after this.
+    pub unsafe fn from_raw(ptr: *mut ffi::WasmEdge_TableInstanceContext) -> Self {
+        Self {
+            inner: InnerTable(ptr),
+        }
+    }
+}
+impl Drop for Table {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_TableInstanceDelete(self.inner.0) };
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerTable(pub(crate) *mut ffi::WasmEdge_TableInstanceContext);
+unsafe impl Send for InnerTable {}
+unsafe impl Sync for InnerTable {}
+
+/// A WasmEdge [TableType] classifies a [Table] instance over elements of element types within a size range.
+#[derive(Debug)]
+pub(crate) struct TableType {
+    pub(crate) inner: InnerTableType,
+}
+impl Drop for TableType {
+    fn drop(&mut self) {
+        unsafe {
+            ffi::WasmEdge_TableTypeDelete(self.inner.0);
+        }
+    }
+}
+impl TableType {
+    /// Creates a new [TableType] to be associated with the given limit range of the size and the reference type.
+    ///
+    /// # Arguments
+    ///
+    /// * `elem_type` - The element type.
+    ///
+    /// * `min` - The initial size of the table to be created.
+    ///
+    /// * `max` - The maximum size of the table to be created.
+    ///
+    /// # Error
+    ///
+    /// If fail to create a [TableType], then an error is returned.
+    ///
+    /// # Example
+    ///
+    /// ```ignore
+    /// let ty = TableType::create(WasmRefType::FuncRef, 10, Some(20)).expect("fail to create a TableType");
+    /// ```
+    ///
+    pub(crate) fn create(elem_ty: RefType, min: u32, max: Option<u32>) -> WasmEdgeResult<Self> {
+        let ty: ValType = elem_ty.into();
+        let ctx = unsafe {
+            ffi::WasmEdge_TableTypeCreate(ty.into(), WasmEdgeLimit::new(min, max, false).into())
+        };
+        if ctx.is_null() {
+            Err(Box::new(WasmEdgeError::TableTypeCreate))
+        } else {
+            Ok(Self {
+                inner: InnerTableType(ctx),
+            })
+        }
+    }
+
+    /// Returns the element type.
+    pub(crate) fn elem_ty(&self) -> RefType {
+        let ty = unsafe { ffi::WasmEdge_TableTypeGetRefType(self.inner.0) };
+        let ty: ValType = ty.into();
+        ty.into()
+    }
+
+    /// Returns the initial size of the [Table].
+    pub(crate) fn min(&self) -> u32 {
+        let limit = unsafe { ffi::WasmEdge_TableTypeGetLimit(self.inner.0) };
+        let limit: WasmEdgeLimit = limit.into();
+        limit.min()
+    }
+
+    /// Returns the maximum size of the [Table].
+    pub(crate) fn max(&self) -> Option<u32> {
+        let limit = unsafe { ffi::WasmEdge_TableTypeGetLimit(self.inner.0) };
+        let limit: WasmEdgeLimit = limit.into();
+        limit.max()
+    }
+}
+impl From<wasmedge_types::TableType> for TableType {
+    fn from(ty: wasmedge_types::TableType) -> Self {
+        TableType::create(ty.elem_ty(), ty.minimum(), ty.maximum()).expect(
+            "[wasmedge] Failed to convert wasmedge_types::TableType into wasmedge_sys::TableType.",
+        )
+    }
+}
+impl From<&TableType> for wasmedge_types::TableType {
+    fn from(ty: &TableType) -> Self {
+        wasmedge_types::TableType::new(ty.elem_ty(), ty.min(), ty.max())
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerTableType(pub(crate) *mut ffi::WasmEdge_TableTypeContext);
+unsafe impl Send for InnerTableType {}
+unsafe impl Sync for InnerTableType {}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{instance::function::AsFunc, CallingFrame, Function, Instance};
+    use std::thread;
+    use wasmedge_types::{
+        error::{CoreError, CoreExecutionError},
+        RefType, ValType,
+    };
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_table_type() {
+        // create a TableType instance
+        let result = TableType::create(RefType::FuncRef, 10, Some(20));
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+        assert!(!ty.inner.0.is_null());
+
+        // check element type
+        assert_eq!(ty.elem_ty(), RefType::FuncRef);
+        // check limit
+        assert_eq!(ty.min(), 10);
+        assert_eq!(ty.max(), Some(20));
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_table() {
+        // create a TableType instance
+        let ty = wasmedge_types::TableType::new(RefType::FuncRef, 10, Some(20));
+
+        // create a Table instance
+        let result = Table::create(ty);
+        assert!(result.is_ok());
+        let mut table = result.unwrap();
+
+        // check capacity
+        assert_eq!(table.capacity(), 10);
+
+        // get type
+        let result = table.ty();
+        assert!(result.is_ok());
+        let ty = result.unwrap();
+
+        // check limit and element type
+        assert_eq!(ty.minimum(), 10);
+        assert_eq!(ty.maximum(), Some(20));
+        assert_eq!(ty.elem_ty(), RefType::FuncRef);
+
+        // grow the capacity of table
+        let result = table.grow(5);
+        assert!(result.is_ok());
+        // check capacity
+        assert_eq!(table.capacity(), 15);
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_table_data() {
+        // create a FuncType
+        let func_ty = wasmedge_types::FuncType::new(vec![ValType::I32; 2], vec![ValType::I32]);
+        // create a host function
+        let mut host_data = ();
+        let result =
+            unsafe { Function::create_sync_func::<()>(&func_ty, real_add, &mut host_data, 0) };
+        assert!(result.is_ok());
+        let host_func = result.unwrap();
+
+        // create a TableType instance
+        let ty = wasmedge_types::TableType::new(RefType::FuncRef, 10, Some(20));
+
+        // create a Table instance
+        let result = Table::create(ty);
+        assert!(result.is_ok());
+        let mut table = result.unwrap();
+
+        // check capacity
+        assert_eq!(table.capacity(), 10);
+
+        // get data in the scope of the capacity
+        let result = table.get_data(9);
+        assert!(result.is_ok());
+        let value = result.unwrap();
+        assert!(value.is_null_ref());
+        assert_eq!(value.ty(), ValType::FuncRef);
+
+        // call set_data to store a function reference at the given index of the table instance
+        let result = table.set_data(WasmValue::from_func_ref((&host_func).into()), 3);
+        assert!(result.is_ok());
+        // call get_data to recover the function reference from the value at the given index of the table instance
+        let result = table.get_data(3);
+        assert!(result.is_ok());
+        let value = result.unwrap();
+        let result = value.func_ref();
+        assert!(result.is_some());
+        let func_ref = result.unwrap();
+
+        // get the function type by func_ref
+        let result = func_ref.ty();
+        assert!(result.is_some());
+        let func_ty = result.unwrap();
+        assert_eq!(func_ty.args_len(), 2);
+        assert_eq!(func_ty.args(), &[ValType::I32, ValType::I32]);
+        assert_eq!(func_ty.returns_len(), 1);
+        assert_eq!(func_ty.returns(), &[ValType::I32]);
+    }
+
+    #[test]
+    fn test_table_send() {
+        // create a TableType instance
+        let ty = wasmedge_types::TableType::new(RefType::FuncRef, 10, Some(20));
+
+        // create a Table instance
+        let result = Table::create(ty);
+        assert!(result.is_ok());
+        let table = result.unwrap();
+
+        let handle = thread::spawn(move || {
+            assert!(!table.inner.0.is_null());
+
+            // check capacity
+            assert_eq!(table.capacity(), 10);
+
+            // get type
+            let result = table.ty();
+            assert!(result.is_ok());
+            let ty = result.unwrap();
+
+            // check limit and element type
+            assert_eq!(ty.minimum(), 10);
+            assert_eq!(ty.maximum(), Some(20));
+            assert_eq!(ty.elem_ty(), RefType::FuncRef);
+        });
+
+        handle.join().unwrap();
+    }
+
+    #[test]
+    fn test_table_sync() {
+        // create a TableType instance
+        let ty = wasmedge_types::TableType::new(RefType::FuncRef, 10, Some(20));
+
+        // create a Table instance
+        let result = Table::create(ty);
+
+        assert!(result.is_ok());
+        let table = result.unwrap();
+
+        let table = &table;
+
+        std::thread::scope(move |s| {
+            let _ = s
+                .spawn(|| {
+                    let result = table.ty();
+                    assert!(result.is_ok());
+                    let ty = result.unwrap();
+                    // check limit and element type
+                    assert_eq!(ty.minimum(), 10);
+                    assert_eq!(ty.maximum(), Some(20));
+                    assert_eq!(ty.elem_ty(), RefType::FuncRef);
+                })
+                .join();
+        });
+    }
+
+    fn real_add(
+        _data: &mut (),
+        _inst: &mut Instance,
+        _frame: &mut CallingFrame,
+        input: Vec<WasmValue>,
+    ) -> Result<Vec<WasmValue>, CoreError> {
+        println!("Rust: Entering Rust function real_add");
+
+        if input.len() != 2 {
+            return Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch));
+        }
+
+        let a = if input[0].ty() == ValType::I32 {
+            input[0].to_i32()
+        } else {
+            return Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch));
+        };
+
+        let b = if input[1].ty() == ValType::I32 {
+            input[0].to_i32()
+        } else {
+            return Err(CoreError::Execution(CoreExecutionError::FuncSigMismatch));
+        };
+
+        let c = a + b;
+        println!("Rust: calcuating in real_add c: {c:?}");
+
+        println!("Rust: Leaving Rust function real_add");
+        Ok(vec![WasmValue::from_i32(c)])
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/io.rs.html b/src/wasmedge_sys/io.rs.html new file mode 100644 index 000000000..45a9dd947 --- /dev/null +++ b/src/wasmedge_sys/io.rs.html @@ -0,0 +1,341 @@ +io.rs - source

wasmedge_sys/
io.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
use crate::WasmValue;
+use std::marker::PhantomData;
+
+fn match_value(s: &str) -> WasmValue {
+    match s {
+        "i8" => WasmValue::from_i32(0),
+        "u8" => WasmValue::from_i32(0),
+        "i16" => WasmValue::from_i32(0),
+        "u16" => WasmValue::from_i32(0),
+        "i32" => WasmValue::from_i32(0),
+        "u32" => WasmValue::from_i64(0),
+        "i64" => WasmValue::from_i64(0),
+        "f32" => WasmValue::from_f32(0.),
+        "f64" => WasmValue::from_f64(0.),
+        "u128" => WasmValue::from_v128(0),
+        _ => panic!("unsupported type for WasmFnIO"),
+    }
+}
+pub trait WasmFnIO {
+    fn parameters() -> Vec<WasmValue>
+    where
+        Self: Sized,
+    {
+        Vec::new()
+    }
+}
+
+macro_rules! factory_io {
+    ($i:ident, ($($o:ident),+)) => {
+        #[allow(non_snake_case)]
+        pub struct $i<$($o),+> {
+            $($o: PhantomData<$o>),+
+        }
+
+        impl<$($o),+> WasmFnIO for $i<$($o),+> {
+            fn parameters() -> Vec<WasmValue> {
+                vec![$(match_value(std::any::type_name::<$o>())),+]
+            }
+        }
+    }
+}
+
+factory_io!(I1, (O1));
+factory_io!(I2, (O1, O2));
+factory_io!(I3, (O1, O2, O3));
+factory_io!(I4, (O1, O2, O3, O4));
+factory_io!(I5, (O1, O2, O3, O4, O5));
+factory_io!(I6, (O1, O2, O3, O4, O5, O6));
+factory_io!(I7, (O1, O2, O3, O4, O5, O6, O7));
+factory_io!(I8, (O1, O2, O3, O4, O5, O6, O7, O8));
+factory_io!(I9, (O1, O2, O3, O4, O5, O6, O7, O8, O9));
+factory_io!(I10, (O1, O2, O3, O4, O5, O6, O7, O8, O9, O10));
+factory_io!(I11, (O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11));
+factory_io!(I12, (O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12));
+factory_io!(
+    I13,
+    (O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13)
+);
+factory_io!(
+    I14,
+    (O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14)
+);
+factory_io!(
+    I15,
+    (O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15)
+);
+factory_io!(
+    I16,
+    (O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16)
+);
+factory_io!(
+    I17,
+    (O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17)
+);
+factory_io!(
+    I18,
+    (O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18)
+);
+factory_io!(
+    I19,
+    (O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19)
+);
+factory_io!(
+    I20,
+    (O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20)
+);
+factory_io!(
+    I21,
+    (
+        O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20,
+        O21
+    )
+);
+factory_io!(
+    I22,
+    (
+        O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20,
+        O21, O22
+    )
+);
+factory_io!(
+    I23,
+    (
+        O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20,
+        O21, O22, O23
+    )
+);
+factory_io!(
+    I24,
+    (
+        O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20,
+        O21, O22, O23, O24
+    )
+);
+factory_io!(
+    I25,
+    (
+        O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20,
+        O21, O22, O23, O24, O25
+    )
+);
+factory_io!(
+    I26,
+    (
+        O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20,
+        O21, O22, O23, O24, O25, O26
+    )
+);
+factory_io!(
+    I27,
+    (
+        O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20,
+        O21, O22, O23, O24, O25, O26, O27
+    )
+);
+factory_io!(
+    I28,
+    (
+        O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20,
+        O21, O22, O23, O24, O25, O26, O27, O28
+    )
+);
+factory_io!(
+    I29,
+    (
+        O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20,
+        O21, O22, O23, O24, O25, O26, O27, O28, O29
+    )
+);
+factory_io!(
+    I30,
+    (
+        O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20,
+        O21, O22, O23, O24, O25, O26, O27, O28, O29, O30
+    )
+);
+factory_io!(
+    I31,
+    (
+        O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20,
+        O21, O22, O23, O24, O25, O26, O27, O28, O29, O30, O31
+    )
+);
+factory_io!(
+    I32,
+    (
+        O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20,
+        O21, O22, O23, O24, O25, O26, O27, O28, O29, O30, O31, O32
+    )
+);
+
\ No newline at end of file diff --git a/src/wasmedge_sys/lib.rs.html b/src/wasmedge_sys/lib.rs.html new file mode 100644 index 000000000..e175b28e8 --- /dev/null +++ b/src/wasmedge_sys/lib.rs.html @@ -0,0 +1,265 @@ +lib.rs - source

wasmedge_sys/
lib.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
#![doc(
+    html_logo_url = "https://github.com/cncf/artwork/blob/master/projects/wasm-edge-runtime/icon/color/wasm-edge-runtime-icon-color.png?raw=true",
+    html_favicon_url = "https://raw.githubusercontent.com/cncf/artwork/49169bdbc88a7ce3c4a722c641cc2d548bd5c340/projects/wasm-edge-runtime/icon/color/wasm-edge-runtime-icon-color.svg"
+)]
+
+//! # Overview
+//! The [wasmedge-sys](https://crates.io/crates/wasmedge-sys) crate defines a group of low-level Rust APIs for WasmEdge, a light-weight, high-performance, and extensible WebAssembly runtime for cloud-native, edge, and decentralized applications.
+//!
+//! For developers, it is strongly recommended that the APIs in `wasmedge-sys` are used to construct high-level libraries, while `wasmedge-sdk` is for building up business applications.
+//!
+//! * Notice that [wasmedge-sys](https://crates.io/crates/wasmedge-sys) requires **Rust v1.71 or above** in the **stable** channel.
+//!
+
+//! ## Build
+//!
+//! To use or build the `wasmedge-sys` crate, the `WasmEdge` library is required. Please refer to [WasmEdge Installation and Uninstallation](https://wasmedge.org/book/en/quick_start/install.html) to install the `WasmEdge` library.
+//!
+//! * The following table provides the versioning information about each crate of WasmEdge Rust bindings.
+//!
+//!   | wasmedge-sdk  | WasmEdge lib  | wasmedge-sys  | wasmedge-types| wasmedge-macro| async-wasi|
+//!   | :-----------: | :-----------: | :-----------: | :-----------: | :-----------: | :-------: |
+//!   | 0.14.0+       | 0.14.1        | 0.19.3        | 0.6.0         | 0.6.1         | 0.2.1     |
+//!   | 0.14.0+       | 0.14.0        | 0.19.2        | 0.6.0         | 0.6.1         | 0.2.1     |
+//!   | 0.13.2        | 0.13.5        | 0.17.5        | 0.4.4         | 0.6.1         | 0.1.0     |
+//!   | 0.13.1        | 0.13.5        | 0.17.4        | 0.4.4         | 0.6.1         | 0.1.0     |
+//!   | 0.13.0        | 0.13.5        | 0.17.3        | 0.4.4         | 0.6.1         | 0.1.0     |
+//!   | 0.12.2        | 0.13.4        | 0.17.2        | 0.4.4         | 0.6.1         | 0.1.0     |
+//!   | 0.12.1        | 0.13.4        | 0.17.1        | 0.4.4         | 0.6.1         | 0.1.0     |
+//!   | 0.12.0        | 0.13.4        | 0.17.0        | 0.4.4         | 0.6.1         | 0.1.0     |
+//!   | 0.11.2        | 0.13.3        | 0.16.2        | 0.4.3         | 0.6.1         | 0.1.0     |
+//!   | 0.11.0        | 0.13.3        | 0.16.0        | 0.4.3         | 0.6.0         | 0.0.3     |
+//!   | 0.10.1        | 0.13.3        | 0.15.1        | 0.4.2         | 0.5.0         | 0.0.2     |
+//!   | 0.10.0        | 0.13.2        | 0.15.0        | 0.4.2         | 0.5.0         | 0.0.2     |
+//!   | 0.9.0         | 0.13.1        | 0.14.0        | 0.4.2         | 0.4.0         | 0.0.1     |
+//!   | 0.9.0         | 0.13.0        | 0.14.0        | 0.4.2         | 0.4.0         | 0.0.1     |
+//!   | 0.8.1         | 0.12.1        | 0.13.1        | 0.4.1         | 0.3.0         | -         |
+//!   | 0.8.0         | 0.12.0        | 0.13.0        | 0.4.1         | 0.3.0         | -         |
+//!   | 0.7.1         | 0.11.2        | 0.12.2        | 0.3.1         | 0.3.0         | -         |
+//!   | 0.7.0         | 0.11.2        | 0.12          | 0.3.1         | 0.3.0         | -         |
+//!   | 0.6.0         | 0.11.2        | 0.11          | 0.3.0         | 0.2.0         | -         |
+//!   | 0.5.0         | 0.11.1        | 0.10          | 0.3.0         | 0.1.0         | -         |
+//!   | 0.4.0         | 0.11.0        | 0.9           | 0.2.1         | -             | -         |
+//!   | 0.3.0         | 0.10.1        | 0.8           | 0.2           | -             | -         |
+//!   | 0.1.0         | 0.10.0        | 0.7           | 0.1           | -             | -         |
+//!
+//! ## API Reference
+//!
+//! * [wasmedge-sys API Reference](https://wasmedge.github.io/wasmedge-rust-sdk/wasmedge_sys/index.html)
+//! * [wasmedge-sys Async API Reference](https://second-state.github.io/wasmedge-async-rust-sdk/wasmedge_sys/index.html)
+//!
+//! ## See also
+//!
+//! * [WasmEdge Runtime Official Website](https://wasmedge.org/)
+//! * [WasmEdge Docs](https://wasmedge.org/book/en/)
+//! * [WasmEdge C API Documentation](https://github.com/WasmEdge/WasmEdge/blob/master/docs/c_api.md)
+
+#![deny(rust_2018_idioms, unreachable_pub)]
+#![cfg_attr(docsrs, feature(doc_cfg))]
+
+#[allow(warnings)]
+/// Foreign function interfaces generated from WasmEdge C-API.
+pub mod ffi {
+    include!(concat!(env!("OUT_DIR"), "/wasmedge.rs"));
+}
+#[doc(hidden)]
+pub mod ast_module;
+#[cfg(all(feature = "async", target_os = "linux"))]
+#[cfg_attr(docsrs, doc(cfg(all(feature = "async", target_os = "linux"))))]
+pub mod r#async;
+#[doc(hidden)]
+#[cfg(feature = "aot")]
+pub mod compiler;
+#[doc(hidden)]
+pub mod config;
+#[doc(hidden)]
+pub mod executor;
+pub mod frame;
+pub mod instance;
+#[doc(hidden)]
+pub mod io;
+#[doc(hidden)]
+pub mod loader;
+pub mod plugin;
+#[doc(hidden)]
+pub mod statistics;
+#[doc(hidden)]
+pub mod store;
+pub mod types;
+pub mod utils;
+#[doc(hidden)]
+pub mod validator;
+
+#[doc(inline)]
+pub use ast_module::{ExportType, ImportType, Module};
+#[doc(inline)]
+#[cfg(feature = "aot")]
+#[cfg_attr(docsrs, doc(cfg(feature = "aot")))]
+pub use compiler::Compiler;
+#[doc(inline)]
+pub use config::Config;
+#[doc(inline)]
+pub use executor::Executor;
+#[doc(inline)]
+pub use frame::CallingFrame;
+#[doc(inline)]
+pub use instance::module::WasiModule;
+#[doc(inline)]
+pub use instance::{
+    function::{FuncRef, Function, SyncFn},
+    global::Global,
+    memory::Memory,
+    module::{AsInstance, ImportModule, Instance},
+    table::Table,
+    FuncType, GlobalType, MemoryType, TableType,
+};
+#[doc(inline)]
+pub use loader::Loader;
+#[doc(inline)]
+pub use statistics::Statistics;
+#[doc(inline)]
+pub use store::Store;
+#[doc(inline)]
+pub use types::WasmValue;
+#[doc(inline)]
+pub use validator::Validator;
+
+use wasmedge_types::WasmEdgeResult;
+
+/// Type of wasi context that is used to configure the wasi environment.
+#[cfg(all(feature = "async", target_os = "linux"))]
+#[cfg_attr(docsrs, doc(cfg(all(feature = "async", target_os = "linux"))))]
+pub type WasiCtx = ::async_wasi::snapshots::WasiCtx;
+
\ No newline at end of file diff --git a/src/wasmedge_sys/loader.rs.html b/src/wasmedge_sys/loader.rs.html new file mode 100644 index 000000000..9d274abf0 --- /dev/null +++ b/src/wasmedge_sys/loader.rs.html @@ -0,0 +1,615 @@ +loader.rs - source

wasmedge_sys/
loader.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
//! Defines WasmEdge Loader struct.
+
+use crate::{
+    ast_module::{InnerModule, Module},
+    ffi, utils,
+    utils::check,
+    Config, WasmEdgeResult,
+};
+use std::{path::Path, sync::Arc};
+use wasmedge_types::error::WasmEdgeError;
+
+/// [Loader](crate::Loader) is used to load WASM modules from the given WASM files or buffers.
+#[derive(Debug)]
+pub struct Loader {
+    pub(crate) inner: InnerLoader,
+}
+impl Loader {
+    /// Create a new [Loader](crate::Loader) to be associated with the given global configuration.
+    ///
+    /// # Arguments
+    ///
+    /// * `config` - A global configuration.
+    ///
+    /// # Error
+    ///
+    /// If fail to create a [Loader](crate), then an error is returned.
+    pub fn create(config: Option<&Config>) -> WasmEdgeResult<Self> {
+        let ctx = match config {
+            Some(config) => unsafe { ffi::WasmEdge_LoaderCreate(config.inner.0) },
+            None => unsafe { ffi::WasmEdge_LoaderCreate(std::ptr::null_mut()) },
+        };
+
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::LoaderCreate)),
+            false => Ok(Self {
+                inner: InnerLoader(ctx),
+            }),
+        }
+    }
+
+    /// Loads a WASM module from a WASM file.
+    ///
+    /// # Arguments
+    ///
+    /// * `file` - A wasm file or an AOT wasm file.
+    ///
+    /// # Error
+    ///
+    /// If fail to load, then an error is returned.
+    ///
+    /// # Example
+    ///
+    /// ```ignore
+    /// let file = "path/to/foo.wasm"
+    /// let module = loader.from_file(file)?;
+    /// ```
+    pub fn from_file(&self, file: impl AsRef<Path>) -> WasmEdgeResult<Arc<Module>> {
+        match file.as_ref().extension() {
+            Some(extension) => match extension.to_str() {
+                Some("wasm") => self.load_from_wasm_or_aot_file(&file),
+                #[cfg(target_os = "macos")]
+                Some("dylib") => self.load_from_wasm_or_aot_file(&file),
+                #[cfg(target_os = "linux")]
+                Some("so") => self.load_from_wasm_or_aot_file(&file),
+                #[cfg(target_os = "windows")]
+                Some("dll") => self.load_from_wasm_or_aot_file(&file),
+                Some("wat") => {
+                    let bytes = wat::parse_file(file.as_ref())
+                        .map_err(|_| WasmEdgeError::Operation("Failed to parse wat file".into()))?;
+                    self.from_bytes(bytes)
+                }
+                _ => Err(Box::new(WasmEdgeError::Operation(
+                    "The source file's extension should be one of `wasm`, `wat`, `dylib` on macOS, `so` on Linux or `dll` on Windows.".into(),
+                ))),
+            },
+            None => self.load_from_wasm_or_aot_file(&file),
+        }
+    }
+
+    fn load_from_wasm_or_aot_file(&self, file: impl AsRef<Path>) -> WasmEdgeResult<Arc<Module>> {
+        let c_path = utils::path_to_cstring(file.as_ref())?;
+        let mut mod_ctx = std::ptr::null_mut();
+        unsafe {
+            check(ffi::WasmEdge_LoaderParseFromFile(
+                self.inner.0,
+                &mut mod_ctx,
+                c_path.as_ptr(),
+            ))?;
+        }
+
+        match mod_ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::ModuleCreate)),
+            false => Ok(Module {
+                inner: InnerModule(mod_ctx),
+            }
+            .into()),
+        }
+    }
+
+    /// Loads a WASM module from a in-memory bytes.
+    ///
+    /// # Arguments
+    ///
+    /// * `bytes` - A in-memory WASM bytes.
+    ///
+    /// # Error
+    ///
+    /// If fail to load, then an error is returned.
+    ///
+    /// # Example
+    ///
+    /// ```ignore
+    /// let bytes = b"\0asm\x01\0\0\0";
+    /// let module = loader.from_bytes(&bytes)?;
+    /// ```
+    ///
+    /// Note that the text format is not accepted:
+    ///
+    /// ```ignore
+    /// assert!(loader.from_bytes(b"(module)").is_err());
+    /// ```
+    pub fn from_bytes(&self, bytes: impl AsRef<[u8]>) -> WasmEdgeResult<Arc<Module>> {
+        let mut mod_ctx: *mut ffi::WasmEdge_ASTModuleContext = std::ptr::null_mut();
+
+        unsafe {
+            let ptr = libc::malloc(bytes.as_ref().len());
+            let dst = ::core::slice::from_raw_parts_mut(
+                ptr.cast::<std::mem::MaybeUninit<u8>>(),
+                bytes.as_ref().len(),
+            );
+            let src = ::core::slice::from_raw_parts(
+                bytes.as_ref().as_ptr().cast::<std::mem::MaybeUninit<u8>>(),
+                bytes.as_ref().len(),
+            );
+            dst.copy_from_slice(src);
+
+            check(ffi::WasmEdge_LoaderParseFromBuffer(
+                self.inner.0,
+                &mut mod_ctx,
+                ptr as *const u8,
+                bytes.as_ref().len() as u32,
+            ))?;
+
+            libc::free(ptr);
+        }
+
+        match mod_ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::ModuleCreate)),
+            false => Ok(Module {
+                inner: InnerModule(mod_ctx),
+            }
+            .into()),
+        }
+    }
+}
+impl Drop for Loader {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_LoaderDelete(self.inner.0) }
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerLoader(pub(crate) *mut ffi::WasmEdge_LoaderContext);
+unsafe impl Send for InnerLoader {}
+unsafe impl Sync for InnerLoader {}
+
+#[cfg(test)]
+mod tests {
+    use super::Loader;
+    use crate::Config;
+    use std::{
+        sync::{Arc, Mutex},
+        thread,
+    };
+    use wasmedge_types::error::{CoreError, CoreLoadError, WasmEdgeError};
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_loader() {
+        // create a Loader instance without configuration
+        let result = Loader::create(None);
+        assert!(result.is_ok());
+
+        // create a Loader instance with configuration
+        let result = Config::create();
+        assert!(result.is_ok());
+        let mut config = result.unwrap();
+        config.reference_types(true);
+        let result = Loader::create(Some(&config));
+        assert!(result.is_ok());
+        let loader = result.unwrap();
+
+        // load from file
+        {
+            // load .wasm file
+            let path = std::env::current_dir()
+                .unwrap()
+                .ancestors()
+                .nth(2)
+                .unwrap()
+                .join("examples/wasmedge-sys/data/fibonacci.wat");
+            let result = loader.from_file(path);
+            assert!(result.is_ok());
+            let module = result.unwrap();
+            assert!(!module.inner.0.is_null());
+
+            let path = std::env::current_dir()
+                .unwrap()
+                .ancestors()
+                .nth(2)
+                .unwrap()
+                .join("examples/wasmedge-sys/data/fibonacci.wat");
+            let result = loader.from_file(path);
+            assert!(result.is_ok());
+
+            let result = loader.from_file("not_exist_file.wasm");
+            assert!(result.is_err());
+            assert_eq!(
+                result.unwrap_err(),
+                Box::new(WasmEdgeError::Core(CoreError::Load(
+                    CoreLoadError::IllegalPath
+                )))
+            );
+        }
+
+        // load from buffer
+        {
+            let buffer = b"\0asm\x01\0\0\0";
+            let result = loader.from_bytes(buffer);
+            assert!(result.is_ok());
+            let module = result.unwrap();
+            assert!(!module.inner.0.is_null());
+
+            // the text format is not accepted
+            let result = loader.from_bytes(b"(module)");
+            assert!(result.is_err());
+            assert_eq!(
+                result.unwrap_err(),
+                Box::new(WasmEdgeError::Core(CoreError::Load(
+                    CoreLoadError::MalformedMagic
+                )))
+            );
+
+            // empty is not accepted
+            let result = loader.from_bytes([]);
+            assert!(result.is_err());
+            assert_eq!(
+                result.unwrap_err(),
+                Box::new(WasmEdgeError::Core(CoreError::Load(
+                    CoreLoadError::UnexpectedEnd
+                )))
+            );
+        }
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_loader_send() {
+        // create a Loader instance without configuration
+        let result = Loader::create(None);
+        assert!(result.is_ok());
+
+        // create a Loader instance with configuration
+        let result = Config::create();
+        assert!(result.is_ok());
+        let mut config = result.unwrap();
+        config.reference_types(true);
+        let result = Loader::create(Some(&config));
+        assert!(result.is_ok());
+        let loader = result.unwrap();
+
+        let handle = thread::spawn(move || {
+            assert!(!loader.inner.0.is_null());
+            println!("{:?}", loader.inner);
+        });
+
+        handle.join().unwrap();
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_loader_sync() {
+        // create a Loader instance without configuration
+        let result = Loader::create(None);
+        assert!(result.is_ok());
+
+        // create a Loader instance with configuration
+        let result = Config::create();
+        assert!(result.is_ok());
+        let mut config = result.unwrap();
+        config.reference_types(true);
+        let result = Loader::create(Some(&config));
+        assert!(result.is_ok());
+        let loader = Arc::new(Mutex::new(result.unwrap()));
+
+        let loader_cloned = Arc::clone(&loader);
+        let handle = thread::spawn(move || {
+            let result = loader_cloned.lock();
+            assert!(result.is_ok());
+            let loader = result.unwrap();
+
+            assert!(!loader.inner.0.is_null());
+        });
+
+        handle.join().unwrap();
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/plugin.rs.html b/src/wasmedge_sys/plugin.rs.html new file mode 100644 index 000000000..bc41e27dd --- /dev/null +++ b/src/wasmedge_sys/plugin.rs.html @@ -0,0 +1,1471 @@ +plugin.rs - source

wasmedge_sys/
plugin.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
//! Defines PluginManager and Plugin structs.
+
+use super::ffi;
+use crate::{
+    instance::module::InnerInstance, types::WasmEdgeString, utils, Instance, WasmEdgeResult,
+};
+
+use std::ffi::CString;
+use wasmedge_types::error::{PluginError, WasmEdgeError};
+
+/// Defines the APIs for loading plugins and check the basic information of the loaded plugins.
+#[derive(Debug)]
+pub struct PluginManager {}
+impl PluginManager {
+    /// Load plugins from the default path. The default plugin path could be one of the following:
+    ///
+    /// * The environment variable "WASMEDGE_PLUGIN_PATH".
+    ///   
+    /// * The `../plugin/` directory related to the WasmEdge installation path.
+    ///
+    /// * The `wasmedge/` directory under the library path if the WasmEdge is installed under the "/usr".
+    pub fn load_plugins_from_default_paths() {
+        unsafe { ffi::WasmEdge_PluginLoadWithDefaultPaths() }
+    }
+
+    /// Load a single or multiple plugins from a given path.
+    ///
+    /// * If the path is pointing at a file , then it indicates that a single plugin will be loaded from the file.
+    ///
+    /// * If the path is pointing at a directory, then the method will load plugins from the files in the directory.
+    ///
+    /// # Argument
+    ///
+    /// * `param` - A path to a plugin file or a directory holding plugin files.
+    ///
+    /// # Error
+    ///
+    /// * If the path contains invalid characters, then an [WasmEdgeError::FoundNulByte](wasmedge_types::error::WasmEdgeError::FoundNulByte) error is returned.
+    pub fn load_plugins(path: impl AsRef<std::path::Path>) -> WasmEdgeResult<()> {
+        let c_path = utils::path_to_cstring(path.as_ref())?;
+        unsafe { ffi::WasmEdge_PluginLoadFromPath(c_path.as_ptr()) }
+
+        Ok(())
+    }
+
+    #[cfg(feature = "wasi_nn")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "wasi_nn")))]
+    pub fn nn_preload(preloads: Vec<&str>) {
+        let c_args: Vec<CString> = preloads
+            .iter()
+            .map(|&x| std::ffi::CString::new(x).unwrap())
+            .collect();
+        let c_strs: Vec<*const ::std::os::raw::c_char> =
+            c_args.iter().map(|x| x.as_ptr()).collect();
+        let len = c_strs.len() as u32;
+        unsafe { ffi::WasmEdge_PluginInitWASINN(c_strs.as_ptr(), len) }
+    }
+
+    /// Returns the count of loaded plugins.
+    pub fn count() -> u32 {
+        unsafe { ffi::WasmEdge_PluginListPluginsLength() }
+    }
+
+    /// Returns the names of all loaded plugins.
+    pub fn names() -> Vec<String> {
+        let count = Self::count();
+        let mut names = Vec::with_capacity(count as usize);
+
+        unsafe {
+            ffi::WasmEdge_PluginListPlugins(names.as_mut_ptr(), count);
+            names.set_len(count as usize);
+        };
+
+        names.into_iter().map(|x| x.into()).collect::<Vec<String>>()
+    }
+
+    /// Returns the target plugin by its name.
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the target plugin.
+    ///
+    /// # Error
+    ///
+    /// If not found the plugin, then return [PluginError::NotFound](wasmedge_types::error::PluginError::NotFound) error.
+    pub fn find(name: impl AsRef<str>) -> WasmEdgeResult<Plugin> {
+        let plugin_name: WasmEdgeString = name.as_ref().into();
+
+        let ctx = unsafe { ffi::WasmEdge_PluginFind(plugin_name.as_raw()) };
+
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::Plugin(PluginError::NotFound(
+                name.as_ref().into(),
+            )))),
+            false => Ok(Plugin {
+                inner: InnerPlugin(ctx as *mut _),
+            }),
+        }
+    }
+
+    pub fn create_plugin_instance(
+        pname: impl AsRef<str>,
+        mname: impl AsRef<str>,
+    ) -> WasmEdgeResult<Instance> {
+        let plugin = Self::find(pname.as_ref())?;
+        plugin.mod_instance(mname.as_ref())
+    }
+
+    /// Initializes the `wasmedge_process` plugin module instance with the parameters.
+    ///
+    /// # Arguments
+    ///
+    /// * `allowed_cmds` - A white list of commands.
+    ///
+    /// * `allowed` - Determines if wasmedge_process is allowed to execute all commands on the white list.
+    #[cfg(all(
+        target_os = "linux",
+        feature = "wasmedge_process",
+        not(feature = "static")
+    ))]
+    #[cfg_attr(
+        docsrs,
+        doc(cfg(all(
+            target_os = "linux",
+            feature = "wasmedge_process",
+            not(feature = "static")
+        )))
+    )]
+    pub fn init_wasmedge_process(allowed_cmds: Option<Vec<&str>>, allowed: bool) {
+        // parse cmds
+        let cstr_cmds: Vec<_> = match allowed_cmds {
+            Some(cmds) => cmds
+                .iter()
+                .map(|&x| std::ffi::CString::new(x).unwrap())
+                .collect(),
+            None => vec![],
+        };
+        let mut p_cmds: Vec<_> = cstr_cmds.iter().map(|x| x.as_ptr()).collect();
+        let p_cmds_len = p_cmds.len();
+        p_cmds.push(std::ptr::null());
+
+        unsafe {
+            ffi::WasmEdge_ModuleInstanceInitWasmEdgeProcess(
+                p_cmds.as_ptr(),
+                p_cmds_len as u32,
+                allowed,
+            )
+        }
+    }
+}
+
+/// Represents a loaded plugin. It provides the APIs for accessing the plugin.
+#[derive(Debug, Clone, Copy)]
+pub struct Plugin {
+    pub(crate) inner: InnerPlugin,
+}
+impl Plugin {
+    /// Returns the name of this plugin.
+    pub fn name(&self) -> String {
+        let name = unsafe { ffi::WasmEdge_PluginGetPluginName(self.inner.0) };
+        name.into()
+    }
+
+    /// Returns the count of the module instances in this plugin.
+    pub fn mod_count(&self) -> u32 {
+        unsafe { ffi::WasmEdge_PluginListModuleLength(self.inner.0) }
+    }
+
+    /// Returns the names of all module instances in this plugin.
+    pub fn mod_names(&self) -> Vec<String> {
+        let count = self.mod_count();
+        let mut names = Vec::with_capacity(count as usize);
+
+        unsafe {
+            ffi::WasmEdge_PluginListModule(self.inner.0, names.as_mut_ptr(), count);
+            names.set_len(count as usize);
+        }
+
+        names.into_iter().map(|x| x.into()).collect::<Vec<String>>()
+    }
+
+    /// Returns a plugin module instance that is generated from the module with the given name in this plugin.
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the target module.
+    ///
+    /// # Error
+    ///
+    /// If failed to return the plugin module instance, then return [PluginError::Create](wasmedge_types::error::PluginError::Create) error.
+    pub fn mod_instance(&self, name: impl AsRef<str>) -> WasmEdgeResult<Instance> {
+        let mod_name: WasmEdgeString = name.as_ref().into();
+
+        let ctx = unsafe { ffi::WasmEdge_PluginCreateModule(self.inner.0, mod_name.as_raw()) };
+
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::Plugin(PluginError::Create(
+                name.as_ref().into(),
+            )))),
+            false => Ok(Instance {
+                inner: InnerInstance(ctx),
+            }),
+        }
+    }
+
+    /// # Safety
+    ///
+    /// The lifetime of the returned pointer must not exceed that of the object itself.
+    pub unsafe fn as_ptr(&self) -> *const ffi::WasmEdge_PluginContext {
+        self.inner.0 as *const _
+    }
+}
+
+#[derive(Debug, Clone, Copy)]
+pub(crate) struct InnerPlugin(pub(crate) *mut ffi::WasmEdge_PluginContext);
+unsafe impl Send for InnerPlugin {}
+unsafe impl Sync for InnerPlugin {}
+
+/// Defines the type of the program options.
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum ProgramOptionType {
+    None = 0,
+    Toggle = 1,
+    I8 = 2,
+    I16 = 3,
+    I32 = 4,
+    I64 = 5,
+    U8 = 6,
+    U16 = 7,
+    U32 = 8,
+    U64 = 9,
+    F32 = 10,
+    F64 = 11,
+    String = 12,
+}
+impl From<ffi::WasmEdge_ProgramOptionType> for ProgramOptionType {
+    fn from(ty: ffi::WasmEdge_ProgramOptionType) -> Self {
+        match ty {
+            ffi::WasmEdge_ProgramOptionType_None => ProgramOptionType::None,
+            ffi::WasmEdge_ProgramOptionType_Toggle => ProgramOptionType::Toggle,
+            ffi::WasmEdge_ProgramOptionType_Int8 => ProgramOptionType::I8,
+            ffi::WasmEdge_ProgramOptionType_Int16 => ProgramOptionType::I16,
+            ffi::WasmEdge_ProgramOptionType_Int32 => ProgramOptionType::I32,
+            ffi::WasmEdge_ProgramOptionType_Int64 => ProgramOptionType::I64,
+            ffi::WasmEdge_ProgramOptionType_UInt8 => ProgramOptionType::U8,
+            ffi::WasmEdge_ProgramOptionType_UInt16 => ProgramOptionType::U16,
+            ffi::WasmEdge_ProgramOptionType_UInt32 => ProgramOptionType::U32,
+            ffi::WasmEdge_ProgramOptionType_UInt64 => ProgramOptionType::U64,
+            ffi::WasmEdge_ProgramOptionType_Float => ProgramOptionType::F32,
+            ffi::WasmEdge_ProgramOptionType_Double => ProgramOptionType::F64,
+            ffi::WasmEdge_ProgramOptionType_String => ProgramOptionType::String,
+            _ => {
+                panic!("[wasmedge-sys] Unsupported ffi::WasmEdge_ProgramOptionType value: {ty}");
+            }
+        }
+    }
+}
+impl From<ProgramOptionType> for ffi::WasmEdge_ProgramOptionType {
+    fn from(value: ProgramOptionType) -> Self {
+        match value {
+            ProgramOptionType::None => ffi::WasmEdge_ProgramOptionType_None,
+            ProgramOptionType::Toggle => ffi::WasmEdge_ProgramOptionType_Toggle,
+            ProgramOptionType::I8 => ffi::WasmEdge_ProgramOptionType_Int8,
+            ProgramOptionType::I16 => ffi::WasmEdge_ProgramOptionType_Int16,
+            ProgramOptionType::I32 => ffi::WasmEdge_ProgramOptionType_Int32,
+            ProgramOptionType::I64 => ffi::WasmEdge_ProgramOptionType_Int64,
+            ProgramOptionType::U8 => ffi::WasmEdge_ProgramOptionType_UInt8,
+            ProgramOptionType::U16 => ffi::WasmEdge_ProgramOptionType_UInt16,
+            ProgramOptionType::U32 => ffi::WasmEdge_ProgramOptionType_UInt32,
+            ProgramOptionType::U64 => ffi::WasmEdge_ProgramOptionType_UInt64,
+            ProgramOptionType::F32 => ffi::WasmEdge_ProgramOptionType_Float,
+            ProgramOptionType::F64 => ffi::WasmEdge_ProgramOptionType_Double,
+            ProgramOptionType::String => ffi::WasmEdge_ProgramOptionType_String,
+        }
+    }
+}
+
+/// Defines the program option for plugins.
+#[derive(Debug)]
+pub struct ProgramOption {
+    name: CString,
+    desc: CString,
+    pub inner: ffi::WasmEdge_ProgramOption,
+}
+impl ProgramOption {
+    /// Creates a new program option.
+    pub fn create(
+        name: impl AsRef<str>,
+        desc: impl AsRef<str>,
+        ty: ProgramOptionType,
+    ) -> WasmEdgeResult<Self> {
+        let name = std::ffi::CString::new(name.as_ref()).map_err(WasmEdgeError::FoundNulByte)?;
+
+        let desc = std::ffi::CString::new(desc.as_ref()).map_err(WasmEdgeError::FoundNulByte)?;
+
+        let mut po = Self {
+            name,
+            desc,
+            inner: ffi::WasmEdge_ProgramOption {
+                Name: std::ptr::null(),
+                Description: std::ptr::null(),
+                Type: ty.into(),
+                Storage: std::ptr::null_mut(),
+                DefaultValue: std::ptr::null(),
+            },
+        };
+        po.inner.Name = po.name.as_ptr();
+        po.inner.Description = po.desc.as_ptr();
+
+        Ok(po)
+    }
+}
+unsafe impl Send for ProgramOption {}
+unsafe impl Sync for ProgramOption {}
+
+/// Defines the module descriptor for plugins.
+#[derive(Debug)]
+pub struct ModuleDescriptor {
+    name: CString,
+    desc: CString,
+    create: Option<ModuleInstanceCreateFn>,
+    inner: ffi::WasmEdge_ModuleDescriptor,
+}
+impl ModuleDescriptor {
+    /// Creates a new module descriptor.
+    pub fn create(
+        name: impl AsRef<str>,
+        desc: impl AsRef<str>,
+        f: Option<ModuleInstanceCreateFn>,
+    ) -> WasmEdgeResult<Self> {
+        // module name
+        let name = std::ffi::CString::new(name.as_ref()).map_err(WasmEdgeError::FoundNulByte)?;
+
+        // module description
+        let desc = std::ffi::CString::new(desc.as_ref()).map_err(WasmEdgeError::FoundNulByte)?;
+
+        let mut md = Self {
+            name,
+            desc,
+            create: f,
+            inner: ffi::WasmEdge_ModuleDescriptor {
+                Name: std::ptr::null(),
+                Description: std::ptr::null(),
+                Create: None,
+            },
+        };
+        md.inner.Name = md.name.as_ptr();
+        md.inner.Description = md.desc.as_ptr();
+        md.inner.Create = md.create;
+
+        Ok(md)
+    }
+
+    /// Returns the raw pointer to the inner `WasmEdge_ModuleDescriptor`.
+    #[cfg(feature = "ffi")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "ffi")))]
+    pub fn as_raw_ptr(&self) -> *const ffi::WasmEdge_ModuleDescriptor {
+        &self.inner
+    }
+}
+
+/// Defines the type of the function that creates a module instance for a plugin.
+pub type ModuleInstanceCreateFn = unsafe extern "C" fn(
+    arg1: *const ffi::WasmEdge_ModuleDescriptor,
+) -> *mut ffi::WasmEdge_ModuleInstanceContext;
+
+/// Defines the version of a plugin.
+#[derive(Debug)]
+pub struct PluginVersion {
+    pub major: u32,
+    pub minor: u32,
+    pub patch: u32,
+    pub build: u32,
+}
+impl PluginVersion {
+    /// Creates a new plugin version.
+    pub fn create(major: u32, minor: u32, patch: u32, build: u32) -> Self {
+        Self {
+            major,
+            minor,
+            patch,
+            build,
+        }
+    }
+}
+impl From<PluginVersion> for ffi::WasmEdge_PluginVersionData {
+    fn from(value: PluginVersion) -> Self {
+        Self {
+            Major: value.major,
+            Minor: value.minor,
+            Patch: value.patch,
+            Build: value.build,
+        }
+    }
+}
+
+/// Represents Plugin descriptor for plugins.
+#[derive(Debug)]
+pub struct PluginDescriptor {
+    name: CString,
+    desc: CString,
+    module_descriptors_name_desc: Vec<(CString, CString)>,
+    module_descriptors: Vec<ffi::WasmEdge_ModuleDescriptor>,
+    program_options_name_desc: Vec<(CString, CString)>,
+    program_options: Vec<ffi::WasmEdge_ProgramOption>,
+    inner: ffi::WasmEdge_PluginDescriptor,
+}
+impl PluginDescriptor {
+    pub fn create(
+        name: impl AsRef<str>,
+        desc: impl AsRef<str>,
+        version: PluginVersion,
+    ) -> WasmEdgeResult<Self> {
+        // plugin name
+        let name = std::ffi::CString::new(name.as_ref()).map_err(WasmEdgeError::FoundNulByte)?;
+
+        // plugin description
+        let desc = std::ffi::CString::new(desc.as_ref()).map_err(WasmEdgeError::FoundNulByte)?;
+
+        let mut pd = Self {
+            name,
+            desc,
+            module_descriptors_name_desc: Vec::new(),
+            module_descriptors: Vec::new(),
+            program_options_name_desc: Vec::new(),
+            program_options: Vec::new(),
+            inner: ffi::WasmEdge_PluginDescriptor {
+                Name: std::ptr::null(),
+                Description: std::ptr::null(),
+                APIVersion: ffi::WasmEdge_Plugin_CurrentAPIVersion,
+                Version: version.into(),
+                ModuleCount: 0,
+                ModuleDescriptions: std::ptr::null_mut(),
+                ProgramOptionCount: 0,
+                ProgramOptions: std::ptr::null_mut(),
+            },
+        };
+        pd.inner.Name = pd.name.as_ptr();
+        pd.inner.Description = pd.desc.as_ptr();
+
+        Ok(pd)
+    }
+
+    pub fn add_module_descriptor(
+        mut self,
+        name: impl AsRef<str>,
+        desc: impl AsRef<str>,
+        f: Option<ModuleInstanceCreateFn>,
+    ) -> WasmEdgeResult<Self> {
+        // module name
+        let name = std::ffi::CString::new(name.as_ref()).map_err(WasmEdgeError::FoundNulByte)?;
+
+        // module description
+        let desc = std::ffi::CString::new(desc.as_ref()).map_err(WasmEdgeError::FoundNulByte)?;
+
+        self.module_descriptors
+            .push(ffi::WasmEdge_ModuleDescriptor {
+                Name: name.as_ptr(),
+                Description: desc.as_ptr(),
+                Create: f,
+            });
+        self.module_descriptors_name_desc.push((name, desc));
+
+        self.inner.ModuleCount = self.module_descriptors.len() as u32;
+        self.inner.ModuleDescriptions = self.module_descriptors.as_mut_ptr();
+
+        Ok(self)
+    }
+
+    pub fn add_program_option(
+        mut self,
+        name: impl AsRef<str>,
+        desc: impl AsRef<str>,
+        ty: ProgramOptionType,
+    ) -> WasmEdgeResult<Self> {
+        let name = std::ffi::CString::new(name.as_ref()).map_err(WasmEdgeError::FoundNulByte)?;
+
+        let desc = std::ffi::CString::new(desc.as_ref()).map_err(WasmEdgeError::FoundNulByte)?;
+
+        self.program_options.push(ffi::WasmEdge_ProgramOption {
+            Name: name.as_ptr(),
+            Description: desc.as_ptr(),
+            Type: ty.into(),
+            Storage: std::ptr::null_mut(),
+            DefaultValue: std::ptr::null(),
+        });
+        self.program_options_name_desc.push((name, desc));
+
+        self.inner.ProgramOptionCount = self.program_options.len() as u32;
+        self.inner.ProgramOptions = self.program_options.as_mut_ptr();
+
+        Ok(self)
+    }
+
+    /// Returns the raw pointer to the inner `WasmEdge_PluginDescriptor`.
+    #[cfg(feature = "ffi")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "ffi")))]
+    pub fn as_raw_ptr(&self) -> *const ffi::WasmEdge_PluginDescriptor {
+        &self.inner
+    }
+}
+
+/// Represents a Plugin module instance.
+pub type PluginModule = Instance;
+
+#[cfg(test)]
+mod tests {
+
+    #[cfg(all(
+        target_os = "linux",
+        feature = "wasmedge_process",
+        not(feature = "static")
+    ))]
+    #[test]
+    #[ignore]
+    fn test_plugin_wasmedge_process() {
+        use crate::AsInstance;
+
+        use super::*;
+
+        PluginManager::load_plugins_from_default_paths();
+        assert!(PluginManager::count() >= 1);
+        assert!(PluginManager::names()
+            .iter()
+            .any(|x| x == "wasmedge_process"));
+
+        // get `wasmedge_process` plugin
+        let result = PluginManager::find("wasmedge_process");
+        assert!(result.is_ok());
+        let plugin = result.unwrap();
+        assert_eq!(plugin.name(), "wasmedge_process");
+        assert_eq!(plugin.mod_count(), 1);
+        assert!(plugin.mod_names().iter().any(|x| x == "wasmedge_process"));
+
+        // get module instance from plugin
+        let result = plugin.mod_instance("wasmedge_process");
+        assert!(result.is_ok());
+        let instance = result.unwrap();
+
+        assert_eq!(instance.name().unwrap(), "wasmedge_process");
+        assert_eq!(instance.func_len(), 11);
+        assert_eq!(
+            instance.func_names().unwrap(),
+            [
+                "wasmedge_process_add_arg",
+                "wasmedge_process_add_env",
+                "wasmedge_process_add_stdin",
+                "wasmedge_process_get_exit_code",
+                "wasmedge_process_get_stderr",
+                "wasmedge_process_get_stderr_len",
+                "wasmedge_process_get_stdout",
+                "wasmedge_process_get_stdout_len",
+                "wasmedge_process_run",
+                "wasmedge_process_set_prog_name",
+                "wasmedge_process_set_timeout",
+            ]
+        );
+        assert_eq!(instance.mem_len(), 0);
+        assert_eq!(instance.table_len(), 0);
+        assert_eq!(instance.global_len(), 0);
+    }
+
+    #[cfg(all(target_os = "linux", feature = "wasi_crypto", not(feature = "static")))]
+    #[test]
+    fn test_plugin_wasi_crypto() {
+        use crate::AsInstance;
+
+        use super::*;
+
+        PluginManager::load_plugins_from_default_paths();
+        assert!(PluginManager::count() >= 1);
+        assert!(
+            PluginManager::names().iter().any(|x| x == "wasi_crypto"),
+            "Not found the `wasi_crypto` plugin"
+        );
+
+        // get `wasmedge_process` plugin
+        let result = PluginManager::find("wasi_crypto");
+        assert!(result.is_ok());
+        let plugin = result.unwrap();
+        assert_eq!(plugin.name(), "wasi_crypto");
+        assert_eq!(plugin.mod_count(), 5);
+        assert_eq!(
+            plugin.mod_names(),
+            [
+                "wasi_crypto_asymmetric_common",
+                "wasi_crypto_common",
+                "wasi_crypto_kx",
+                "wasi_crypto_signatures",
+                "wasi_crypto_symmetric",
+            ]
+        );
+
+        // get `wasi_crypto_asymmetric_common` module instance from plugin
+        {
+            let result = plugin.mod_instance("wasi_crypto_asymmetric_common");
+            assert!(result.is_ok());
+            let instance = result.unwrap();
+            assert_eq!(
+                instance.name().unwrap(),
+                "wasi_ephemeral_crypto_asymmetric_common"
+            );
+            assert_eq!(instance.func_len(), 20);
+            assert_eq!(
+                instance.func_names().unwrap(),
+                [
+                    "keypair_close",
+                    "keypair_export",
+                    "keypair_from_id",
+                    "keypair_from_pk_and_sk",
+                    "keypair_generate",
+                    "keypair_generate_managed",
+                    "keypair_id",
+                    "keypair_import",
+                    "keypair_publickey",
+                    "keypair_replace_managed",
+                    "keypair_secretkey",
+                    "keypair_store_managed",
+                    "publickey_close",
+                    "publickey_export",
+                    "publickey_from_secretkey",
+                    "publickey_import",
+                    "publickey_verify",
+                    "secretkey_close",
+                    "secretkey_export",
+                    "secretkey_import",
+                ],
+            );
+        }
+
+        // get `wasi_crypto_common` module instance from plugin
+        {
+            let result = plugin.mod_instance("wasi_crypto_common");
+            assert!(result.is_ok());
+            let instance = result.unwrap();
+            assert_eq!(instance.name().unwrap(), "wasi_ephemeral_crypto_common");
+            assert_eq!(instance.func_len(), 10);
+            assert_eq!(
+                instance.func_names().unwrap(),
+                [
+                    "array_output_len",
+                    "array_output_pull",
+                    "options_close",
+                    "options_open",
+                    "options_set",
+                    "options_set_guest_buffer",
+                    "options_set_u64",
+                    "secrets_manager_close",
+                    "secrets_manager_invalidate",
+                    "secrets_manager_open",
+                ],
+            );
+        }
+
+        // get `wasi_crypto_kx` module instance from plugin
+        {
+            let result = plugin.mod_instance("wasi_crypto_kx");
+            assert!(result.is_ok());
+            let instance = result.unwrap();
+            assert_eq!(instance.name().unwrap(), "wasi_ephemeral_crypto_kx");
+            assert_eq!(instance.func_len(), 3);
+            assert_eq!(
+                instance.func_names().unwrap(),
+                ["kx_decapsulate", "kx_dh", "kx_encapsulate",],
+            );
+        }
+
+        // get `wasi_crypto_signatures` module instance from plugin
+        {
+            let result = plugin.mod_instance("wasi_crypto_signatures");
+            assert!(result.is_ok());
+            let instance = result.unwrap();
+            assert_eq!(instance.name().unwrap(), "wasi_ephemeral_crypto_signatures");
+            assert_eq!(instance.func_len(), 11);
+            assert_eq!(
+                instance.func_names().unwrap(),
+                [
+                    "signature_close",
+                    "signature_export",
+                    "signature_import",
+                    "signature_state_close",
+                    "signature_state_open",
+                    "signature_state_sign",
+                    "signature_state_update",
+                    "signature_verification_state_close",
+                    "signature_verification_state_open",
+                    "signature_verification_state_update",
+                    "signature_verification_state_verify",
+                ],
+            );
+        }
+
+        // get `wasi_crypto_symmetric` module instance from plugin
+        {
+            let result = plugin.mod_instance("wasi_crypto_symmetric");
+            assert!(result.is_ok());
+            let instance = result.unwrap();
+            assert_eq!(instance.name().unwrap(), "wasi_ephemeral_crypto_symmetric");
+            assert_eq!(instance.func_len(), 28);
+            assert_eq!(
+                instance.func_names().unwrap(),
+                [
+                    "symmetric_key_close",
+                    "symmetric_key_export",
+                    "symmetric_key_from_id",
+                    "symmetric_key_generate",
+                    "symmetric_key_generate_managed",
+                    "symmetric_key_id",
+                    "symmetric_key_import",
+                    "symmetric_key_replace_managed",
+                    "symmetric_key_store_managed",
+                    "symmetric_state_absorb",
+                    "symmetric_state_clone",
+                    "symmetric_state_close",
+                    "symmetric_state_decrypt",
+                    "symmetric_state_decrypt_detached",
+                    "symmetric_state_encrypt",
+                    "symmetric_state_encrypt_detached",
+                    "symmetric_state_max_tag_len",
+                    "symmetric_state_open",
+                    "symmetric_state_options_get",
+                    "symmetric_state_options_get_u64",
+                    "symmetric_state_ratchet",
+                    "symmetric_state_squeeze",
+                    "symmetric_state_squeeze_key",
+                    "symmetric_state_squeeze_tag",
+                    "symmetric_tag_close",
+                    "symmetric_tag_len",
+                    "symmetric_tag_pull",
+                    "symmetric_tag_verify",
+                ],
+            );
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/statistics.rs.html b/src/wasmedge_sys/statistics.rs.html new file mode 100644 index 000000000..0cc65c482 --- /dev/null +++ b/src/wasmedge_sys/statistics.rs.html @@ -0,0 +1,217 @@ +statistics.rs - source

wasmedge_sys/
statistics.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
//! Defines WasmEdge Statistics struct.
+
+use crate::{ffi, WasmEdgeResult};
+use std::sync::Arc;
+use wasmedge_types::error::WasmEdgeError;
+
+#[derive(Debug, Clone)]
+/// Struct of WasmEdge Statistics.
+pub struct Statistics {
+    pub(crate) inner: Arc<InnerStat>,
+}
+impl Statistics {
+    /// Creates a new [Statistics].
+    ///
+    /// # Error
+    ///
+    /// If fail to create a [Statistics], then an error is returned.
+    pub fn create() -> WasmEdgeResult<Self> {
+        let ctx = unsafe { ffi::WasmEdge_StatisticsCreate() };
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::StatisticsCreate)),
+            false => Ok(Statistics {
+                inner: Arc::new(InnerStat(ctx)),
+            }),
+        }
+    }
+
+    /// Returns the instruction count in execution.
+    pub fn instr_count(&self) -> u64 {
+        unsafe { ffi::WasmEdge_StatisticsGetInstrCount(self.inner.0) }
+    }
+
+    /// Returns the instruction count per second in execution.
+    ///
+    /// # Notice
+    ///
+    /// For the following cases,
+    /// * [Statistics] is not enabled, or
+    /// * the total execution time is 0
+    ///
+    /// The instructions per second could be `NaN`, which represents `divided-by-zero`.
+    /// Use the `is_nan` function of F64 to check the return value before use it,
+    /// for example,
+    ///
+    /// ```
+    /// use wasmedge_sys::Statistics;
+    ///
+    /// // create a Statistics instance
+    /// let stat = Statistics::create().expect("fail to create a Statistics");
+    ///
+    /// // check instruction count per second
+    /// assert!(stat.instr_per_sec().is_nan());
+    /// ```
+    pub fn instr_per_sec(&self) -> f64 {
+        unsafe { ffi::WasmEdge_StatisticsGetInstrPerSecond(self.inner.0) }
+    }
+
+    /// Returns the total cost in execution.
+    pub fn cost_in_total(&self) -> u64 {
+        unsafe { ffi::WasmEdge_StatisticsGetTotalCost(self.inner.0) }
+    }
+
+    /// Sets the cost of instructions.
+    ///
+    /// # Arguments
+    ///
+    /// * `cost_table` - The slice of cost table.
+    pub fn set_cost_table(&mut self, cost_table: impl AsRef<[u64]>) {
+        unsafe {
+            ffi::WasmEdge_StatisticsSetCostTable(
+                self.inner.0,
+                cost_table.as_ref().as_ptr() as *mut _,
+                cost_table.as_ref().len() as u32,
+            )
+        }
+    }
+
+    /// Sets the cost limit in execution.
+    ///
+    /// # Arguments
+    ///
+    /// * `limit` - The cost limit.
+    pub fn set_cost_limit(&mut self, limit: u64) {
+        unsafe { ffi::WasmEdge_StatisticsSetCostLimit(self.inner.0, limit) }
+    }
+
+    /// Clears the data in this statistics.
+    pub fn clear(&mut self) {
+        unsafe { ffi::WasmEdge_StatisticsClear(self.inner.0) }
+    }
+
+    /// Provides a raw pointer to the inner Statistics context.
+    #[cfg(feature = "ffi")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "ffi")))]
+    pub fn as_ptr(&self) -> *const ffi::WasmEdge_StatisticsContext {
+        self.inner.0 as *const _
+    }
+}
+impl Drop for Statistics {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_StatisticsDelete(self.inner.0) }
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerStat(pub(crate) *mut ffi::WasmEdge_StatisticsContext);
+unsafe impl Send for InnerStat {}
+unsafe impl Sync for InnerStat {}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/store.rs.html b/src/wasmedge_sys/store.rs.html new file mode 100644 index 000000000..b8a962c3f --- /dev/null +++ b/src/wasmedge_sys/store.rs.html @@ -0,0 +1,245 @@ +store.rs - source

wasmedge_sys/
store.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
//! Defines WasmEdge Store struct.
+
+use crate::{
+    ffi,
+    instance::{
+        module::{InnerInstance, Instance},
+        InnerRef,
+    },
+    types::WasmEdgeString,
+    WasmEdgeResult,
+};
+
+use wasmedge_types::error::{StoreError, WasmEdgeError};
+
+/// The [Store] is a collection of registered modules and assists wasm modules in finding the import modules they need.
+#[derive(Debug)]
+pub struct Store {
+    pub(crate) inner: InnerStore,
+}
+impl Store {
+    /// Creates a new [Store].
+    ///
+    /// # Error
+    ///
+    /// If fail to create, then an error is returned.
+    pub fn create() -> WasmEdgeResult<Self> {
+        let ctx = unsafe { ffi::WasmEdge_StoreCreate() };
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::Store(StoreError::Create))),
+            false => Ok(Store {
+                inner: InnerStore(ctx),
+            }),
+        }
+    }
+
+    /// Returns the length of the registered [modules](crate::Module).
+    pub fn module_len(&self) -> u32 {
+        unsafe { ffi::WasmEdge_StoreListModuleLength(self.inner.0 as *const _) }
+    }
+
+    /// Returns the names of all registered [modules](crate::Module).
+    pub fn module_names(&self) -> Option<Vec<String>> {
+        let len_mod_names = self.module_len();
+        match len_mod_names > 0 {
+            true => {
+                let mut mod_names = Vec::with_capacity(len_mod_names as usize);
+                unsafe {
+                    ffi::WasmEdge_StoreListModule(
+                        self.inner.0,
+                        mod_names.as_mut_ptr(),
+                        len_mod_names,
+                    );
+                    mod_names.set_len(len_mod_names as usize);
+                };
+
+                let names = mod_names
+                    .into_iter()
+                    .map(|x| x.into())
+                    .collect::<Vec<String>>();
+                Some(names)
+            }
+            false => None,
+        }
+    }
+
+    /// Returns the module instance by the module name.
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the module instance to get.
+    ///
+    /// # Error
+    ///
+    /// If fail to find the target [module instance](crate::Instance), then an error is returned.
+    pub fn module(&self, name: impl AsRef<str>) -> WasmEdgeResult<InnerRef<Instance, &Self>> {
+        let mod_name: WasmEdgeString = name.as_ref().into();
+        let ctx = unsafe { ffi::WasmEdge_StoreFindModule(self.inner.0, mod_name.as_raw()) };
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::Store(StoreError::NotFoundModule(
+                name.as_ref().to_string(),
+            )))),
+            false => {
+                let inst = Instance {
+                    inner: InnerInstance(ctx as _),
+                };
+                unsafe {
+                    Ok(InnerRef::create_from_ref(
+                        std::mem::ManuallyDrop::new(inst),
+                        self,
+                    ))
+                }
+            }
+        }
+    }
+
+    /// Checks if the [Store] contains a module of which the name matches the given name.
+    ///
+    /// # Argument
+    ///
+    /// * `name` - The name of the module to search.
+    ///
+    pub fn contains(&self, name: impl AsRef<str>) -> bool {
+        if self.module_len() == 0 {
+            return false;
+        }
+
+        match self.module_names() {
+            Some(names) => names.iter().any(|x| x == name.as_ref()),
+            None => false,
+        }
+    }
+}
+impl Drop for Store {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_StoreDelete(self.inner.0) }
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerStore(pub(crate) *mut ffi::WasmEdge_StoreContext);
+unsafe impl Send for InnerStore {}
+unsafe impl Sync for InnerStore {}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/types.rs.html b/src/wasmedge_sys/types.rs.html new file mode 100644 index 000000000..84ad6b5f5 --- /dev/null +++ b/src/wasmedge_sys/types.rs.html @@ -0,0 +1,1263 @@ +types.rs - source

wasmedge_sys/
types.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
//! Defines the WebAssembly primitive types.
+
+use crate::{ffi, instance::function::AsFunc, FuncRef, Function};
+use core::ffi::c_void;
+use std::ffi::CString;
+use wasmedge_types::ValType;
+
+#[derive(Debug, Clone)]
+pub(crate) struct WasmEdgeLimit {
+    min: u32,
+    max: Option<u32>,
+    shared: bool,
+}
+impl WasmEdgeLimit {
+    pub(crate) fn new(min: u32, max: Option<u32>, shared: bool) -> Self {
+        Self { min, max, shared }
+    }
+
+    pub(crate) fn min(&self) -> u32 {
+        self.min
+    }
+
+    pub(crate) fn max(&self) -> Option<u32> {
+        self.max
+    }
+
+    pub(crate) fn shared(&self) -> bool {
+        self.shared
+    }
+}
+impl From<WasmEdgeLimit> for ffi::WasmEdge_Limit {
+    fn from(limit: WasmEdgeLimit) -> Self {
+        let max = match limit.max() {
+            Some(max) => max,
+            None => u32::MAX,
+        };
+
+        Self {
+            Min: limit.min(),
+            Max: max,
+            HasMax: limit.max().is_some(),
+            Shared: limit.shared,
+        }
+    }
+}
+impl From<ffi::WasmEdge_Limit> for WasmEdgeLimit {
+    fn from(limit: ffi::WasmEdge_Limit) -> Self {
+        let max = match limit.HasMax {
+            true => Some(limit.Max),
+            false => None,
+        };
+        WasmEdgeLimit::new(limit.Min, max, limit.Shared)
+    }
+}
+
+/// Struct of WasmEdge String.
+#[derive(Debug)]
+pub struct WasmEdgeString {
+    inner: InnerWasmEdgeString,
+}
+impl Drop for WasmEdgeString {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_StringDelete(self.inner.0) }
+    }
+}
+impl WasmEdgeString {
+    pub(crate) fn as_raw(&self) -> ffi::WasmEdge_String {
+        self.inner.0
+    }
+
+    /// # Safety
+    ///
+    /// After calling this function, the caller is responsible for managing the lifetime of `ffi::WasmEdge_String`` and should call `ffi::WasmEdge_StringDelete`` at the appropriate time.
+    pub unsafe fn into_raw(self) -> ffi::WasmEdge_String {
+        let s = self.inner.0;
+        std::mem::forget(self);
+        s
+    }
+
+    /// # Safety
+    ///
+    /// This function takes ownership of `s`, so do not call `ffi::WasmEdge_StringDelete` on `s` after this.
+    pub unsafe fn from_raw(s: ffi::WasmEdge_String) -> Self {
+        Self {
+            inner: InnerWasmEdgeString(s),
+        }
+    }
+}
+impl<T: AsRef<str>> From<T> for WasmEdgeString {
+    fn from(s: T) -> Self {
+        let ctx = if s.as_ref().contains('\0') {
+            let buffer = s.as_ref().as_bytes();
+            unsafe {
+                ffi::WasmEdge_StringCreateByBuffer(buffer.as_ptr() as *const _, buffer.len() as u32)
+            }
+        } else {
+            let cs = CString::new(s.as_ref()).expect(
+                "Failed to create a CString: the supplied bytes contain an internal 0 byte",
+            );
+            unsafe { ffi::WasmEdge_StringCreateByCString(cs.as_ptr()) }
+        };
+
+        Self {
+            inner: InnerWasmEdgeString(ctx),
+        }
+    }
+}
+impl PartialEq for WasmEdgeString {
+    fn eq(&self, other: &Self) -> bool {
+        unsafe { ffi::WasmEdge_StringIsEqual(self.inner.0, other.inner.0) }
+    }
+}
+impl Eq for WasmEdgeString {}
+
+impl AsRef<ffi::WasmEdge_String> for WasmEdgeString {
+    fn as_ref(&self) -> &ffi::WasmEdge_String {
+        &self.inner.0
+    }
+}
+impl AsMut<ffi::WasmEdge_String> for WasmEdgeString {
+    fn as_mut(&mut self) -> &mut ffi::WasmEdge_String {
+        &mut self.inner.0
+    }
+}
+
+impl From<&WasmEdgeString> for String {
+    fn from(s: &WasmEdgeString) -> Self {
+        s.as_ref().into()
+    }
+}
+impl From<&WasmEdgeString> for &std::ffi::CStr {
+    fn from(s: &WasmEdgeString) -> Self {
+        s.as_ref().into()
+    }
+}
+impl From<WasmEdgeString> for String {
+    fn from(s: WasmEdgeString) -> Self {
+        s.as_ref().into()
+    }
+}
+impl From<WasmEdgeString> for &std::ffi::CStr {
+    fn from(s: WasmEdgeString) -> Self {
+        s.as_ref().into()
+    }
+}
+
+impl From<&ffi::WasmEdge_String> for String {
+    fn from(s: &ffi::WasmEdge_String) -> Self {
+        let cstr = unsafe { std::slice::from_raw_parts(s.Buf as *mut u8, s.Length as usize) };
+        String::from_utf8(cstr.to_vec()).unwrap_or_default()
+    }
+}
+impl From<&ffi::WasmEdge_String> for &std::ffi::CStr {
+    fn from(s: &ffi::WasmEdge_String) -> Self {
+        unsafe { std::ffi::CStr::from_ptr(s.Buf as *const _) }
+    }
+}
+impl From<ffi::WasmEdge_String> for String {
+    fn from(s: ffi::WasmEdge_String) -> Self {
+        (&s).into()
+    }
+}
+impl From<ffi::WasmEdge_String> for &std::ffi::CStr {
+    fn from(s: ffi::WasmEdge_String) -> Self {
+        (&s).into()
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerWasmEdgeString(pub(crate) ffi::WasmEdge_String);
+unsafe impl Send for InnerWasmEdgeString {}
+unsafe impl Sync for InnerWasmEdgeString {}
+
+/// Defines a WebAssembly value.
+#[derive(Debug, Clone, Copy)]
+pub struct WasmValue {
+    ctx: ffi::WasmEdge_Value,
+    ty: ValType,
+}
+impl WasmValue {
+    /// Returns the raw `WasmEdge_Value`.
+    pub fn as_raw(&self) -> ffi::WasmEdge_Value {
+        self.ctx
+    }
+
+    /// Returns the type of a [WasmValue].
+    pub fn ty(&self) -> ValType {
+        self.ty
+    }
+
+    /// Creates a [WasmValue] from a `i32` value.
+    ///
+    /// # Argument
+    ///
+    /// * `val` - The source `i32` value.
+    pub fn from_i32(val: i32) -> Self {
+        Self {
+            ctx: unsafe { ffi::WasmEdge_ValueGenI32(val) },
+            ty: ValType::I32,
+        }
+    }
+
+    /// Generates a `i32` value from a [WasmValue].
+    pub fn to_i32(&self) -> i32 {
+        unsafe { ffi::WasmEdge_ValueGetI32(self.ctx) }
+    }
+
+    /// Creates a [WasmValue] from a `i64` value.
+    ///
+    /// # Argument
+    ///
+    /// * `val` - The source `i64` value.
+    pub fn from_i64(val: i64) -> Self {
+        Self {
+            ctx: unsafe { ffi::WasmEdge_ValueGenI64(val) },
+            ty: ValType::I64,
+        }
+    }
+
+    /// Generates a `i64` value from a [WasmValue].
+    pub fn to_i64(&self) -> i64 {
+        unsafe { ffi::WasmEdge_ValueGetI64(self.ctx) }
+    }
+
+    /// Creates a [WasmValue] from a `f32` value.
+    ///
+    /// # Argument
+    ///
+    /// * `val` - The source `f32` value.
+    pub fn from_f32(val: f32) -> Self {
+        Self {
+            ctx: unsafe { ffi::WasmEdge_ValueGenF32(val) },
+            ty: ValType::F32,
+        }
+    }
+
+    /// Generates a `f32` value from a [WasmValue].
+    pub fn to_f32(&self) -> f32 {
+        unsafe { ffi::WasmEdge_ValueGetF32(self.ctx) }
+    }
+
+    /// Creates a [WasmValue] from a `f64` value.
+    ///
+    /// # Argument
+    ///
+    /// * `val` - The source `f64` value.
+    pub fn from_f64(val: f64) -> Self {
+        Self {
+            ctx: unsafe { ffi::WasmEdge_ValueGenF64(val) },
+            ty: ValType::F64,
+        }
+    }
+
+    /// Generates a `f64` value from a [WasmValue].
+    pub fn to_f64(&self) -> f64 {
+        unsafe { ffi::WasmEdge_ValueGetF64(self.ctx) }
+    }
+
+    /// Creates a [WasmValue] from a `i128` value.
+    ///
+    /// # Argument
+    ///
+    /// * `val` - The source `i128` value.
+    pub fn from_v128(val: i128) -> Self {
+        Self {
+            ctx: unsafe { ffi::WasmEdge_ValueGenV128(val) },
+            ty: ValType::V128,
+        }
+    }
+
+    /// Generates a `v128` value from a [WasmValue].
+    pub fn to_v128(&self) -> i128 {
+        unsafe { ffi::WasmEdge_ValueGetV128(self.ctx) }
+    }
+
+    /// Checks if a [WasmValue] is NullRef or not.
+    pub fn is_null_ref(&self) -> bool {
+        unsafe { ffi::WasmEdge_ValueIsNullRef(self.ctx) }
+    }
+
+    /// Creates a [WasmValue] from a [FuncRef](crate::FuncRef).
+    ///
+    /// Notice that the [WasmValue]s generated from [FuncRef](crate::FuncRef)s are only meaningful when the `bulk_memory_operations` or `reference_types` option is enabled in the [Config](crate::Config).
+    ///
+    /// # Argument
+    ///
+    /// * `func_ref` - A [FuncRef] instance.
+    pub fn from_func_ref<Func: AsFunc>(func_ref: &Func) -> Self {
+        Self {
+            ctx: unsafe { ffi::WasmEdge_ValueGenFuncRef(func_ref.get_func_raw()) },
+            ty: ValType::FuncRef,
+        }
+    }
+
+    /// Returns the FuncRef(crate::FuncRef).
+    ///
+    /// If the [WasmValue] is a `NullRef`, then `None` is returned.
+    pub fn func_ref(&self) -> Option<FuncRef<&Self>> {
+        unsafe {
+            match ffi::WasmEdge_ValueIsNullRef(self.ctx) {
+                true => None,
+                false => {
+                    let ctx = ffi::WasmEdge_ValueGetFuncRef(self.ctx);
+                    let f = Function::from_raw(ctx as _);
+                    Some(FuncRef::create_from_ref(
+                        std::mem::ManuallyDrop::new(f),
+                        self,
+                    ))
+                }
+            }
+        }
+    }
+
+    /// Creates a [WasmValue] from a reference to an external object.
+    ///
+    /// The [WasmValue]s generated by this function are only meaningful when the `reference_types` option is enabled in
+    /// the [Config](crate::Config).
+    ///
+    /// # Argument
+    ///
+    /// * `extern_obj` - The reference to an external object.
+    pub fn from_extern_ref<T>(extern_obj: &mut T) -> Self {
+        let ptr = extern_obj as *mut T as *mut c_void;
+        Self {
+            ctx: unsafe { ffi::WasmEdge_ValueGenExternRef(ptr) },
+            ty: ValType::ExternRef,
+        }
+    }
+
+    /// Creates a null [WasmValue] with a [ExternRef](wasmedge_types::RefType::ExternRef).
+    ///
+    /// # Argument
+    ///
+    /// * `val` - The `[`RefType`] value.
+    pub fn null_extern_ref() -> Self {
+        Self {
+            ctx: unsafe { ffi::WasmEdge_ValueGenExternRef(std::ptr::null_mut()) },
+            ty: ValType::ExternRef,
+        }
+    }
+
+    /// Returns the reference to an external object.
+    ///
+    /// If the [WasmValue] is a `NullRef`, then `None` is returned.
+    pub fn extern_ref<T>(&self) -> Option<&T> {
+        unsafe {
+            match ffi::WasmEdge_ValueIsNullRef(self.ctx) {
+                true => None,
+                false => {
+                    let ptr = ffi::WasmEdge_ValueGetExternRef(self.ctx);
+                    let x = ptr as *mut T;
+                    Some(&*x)
+                }
+            }
+        }
+    }
+}
+impl From<ffi::WasmEdge_Value> for WasmValue {
+    fn from(raw_val: ffi::WasmEdge_Value) -> Self {
+        let ty = raw_val.Type.into();
+        Self { ctx: raw_val, ty }
+    }
+}
+
+impl From<ffi::WasmEdge_ValType> for ValType {
+    fn from(value: ffi::WasmEdge_ValType) -> Self {
+        unsafe {
+            if ffi::WasmEdge_ValTypeIsI32(value) {
+                ValType::I32
+            } else if ffi::WasmEdge_ValTypeIsI64(value) {
+                ValType::I64
+            } else if ffi::WasmEdge_ValTypeIsF32(value) {
+                ValType::F32
+            } else if ffi::WasmEdge_ValTypeIsF64(value) {
+                ValType::F64
+            } else if ffi::WasmEdge_ValTypeIsV128(value) {
+                ValType::V128
+            } else if ffi::WasmEdge_ValTypeIsRef(value) {
+                if ffi::WasmEdge_ValTypeIsFuncRef(value) {
+                    ValType::FuncRef
+                } else if ffi::WasmEdge_ValTypeIsExternRef(value) {
+                    ValType::ExternRef
+                } else {
+                    log::warn!(
+                        "capi unsupport WasmEdge_RefType `{:x}`",
+                        u64::from_be_bytes(value.Data)
+                    );
+                    ValType::UnsupportedRef
+                }
+            } else {
+                log::warn!(
+                    "unknown WasmEdge_ValType `{:x}`",
+                    u64::from_be_bytes(value.Data)
+                );
+                ValType::UnsupportedRef
+            }
+        }
+    }
+}
+impl From<ValType> for ffi::WasmEdge_ValType {
+    fn from(value: ValType) -> Self {
+        unsafe {
+            match value {
+                ValType::I32 => ffi::WasmEdge_ValTypeGenI32(),
+                ValType::I64 => ffi::WasmEdge_ValTypeGenI64(),
+                ValType::F32 => ffi::WasmEdge_ValTypeGenF32(),
+                ValType::F64 => ffi::WasmEdge_ValTypeGenF64(),
+                ValType::V128 => ffi::WasmEdge_ValTypeGenV128(),
+                ValType::FuncRef => ffi::WasmEdge_ValTypeGenFuncRef(),
+                ValType::ExternRef => ffi::WasmEdge_ValTypeGenExternRef(),
+                // C API is temporarily unsupported.
+                ValType::UnsupportedRef => ffi::WasmEdge_ValTypeGenExternRef(),
+            }
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    #[cfg(unix)]
+    use crate::{Table, TableType};
+    use std::{
+        sync::{Arc, Mutex},
+        thread,
+    };
+    #[cfg(unix)]
+    use wasmedge_types::RefType;
+
+    #[test]
+    #[cfg(unix)]
+    fn test_types_value() {
+        // I32
+        let val = WasmValue::from_i32(1314);
+        assert_eq!(val.ty(), ValType::I32);
+
+        // I64
+        let val = WasmValue::from_i64(1314);
+        assert_eq!(val.ty(), ValType::I64);
+
+        // F32
+        let val = WasmValue::from_f32(13.14);
+        assert_eq!(val.ty(), ValType::F32);
+
+        // F64
+        let val = WasmValue::from_f64(13.14);
+        assert_eq!(val.ty(), ValType::F64);
+
+        // V128
+        let val = WasmValue::from_v128(1314);
+        assert_eq!(val.ty(), ValType::V128);
+
+        // ExternRef
+        let ty = TableType::new(RefType::FuncRef, 10, Some(20));
+        let result = Table::create(ty);
+        assert!(result.is_ok());
+        let mut table = result.unwrap();
+        let value = WasmValue::from_extern_ref(&mut table);
+        assert_eq!(value.ty(), ValType::ExternRef);
+        assert!(value.extern_ref::<Table>().is_some());
+
+        let val1 = WasmValue::from_i32(1314);
+        let val2 = WasmValue::from_i32(1314);
+        assert_eq!(val1.to_i32(), val2.to_i32());
+    }
+
+    #[test]
+    #[cfg(unix)]
+    fn test_types_value_send() {
+        // I32
+        let val_i32 = WasmValue::from_i32(1314);
+        // I64
+        let val_i64 = WasmValue::from_i64(1314);
+        // F32
+        let val_f32 = WasmValue::from_f32(13.14);
+        // F64
+        let val_f64 = WasmValue::from_f64(13.14);
+        // V128
+        let val_v128 = WasmValue::from_v128(1314);
+
+        // ExternRef
+        let ty = TableType::new(RefType::FuncRef, 10, Some(20));
+        let result = Table::create(ty);
+        assert!(result.is_ok());
+        let mut table = result.unwrap();
+        let val_extern_ref = WasmValue::from_extern_ref(&mut table);
+
+        let handle = thread::spawn(move || {
+            let val_i32_c = val_i32;
+            assert_eq!(val_i32_c.ty(), ValType::I32);
+
+            let val_i64_c = val_i64;
+            assert_eq!(val_i64_c.ty(), ValType::I64);
+
+            let val_f32_c = val_f32;
+            assert_eq!(val_f32_c.ty(), ValType::F32);
+
+            let val_f64_c = val_f64;
+            assert_eq!(val_f64_c.ty(), ValType::F64);
+
+            let val_v128_c = val_v128;
+            assert_eq!(val_v128_c.ty(), ValType::V128);
+
+            let val_extern_ref_c = val_extern_ref;
+            assert_eq!(val_extern_ref_c.ty(), ValType::ExternRef);
+            assert!(val_extern_ref_c.extern_ref::<Table>().is_some());
+        });
+
+        handle.join().unwrap();
+    }
+
+    #[test]
+    #[cfg(unix)]
+    fn test_types_value_sync() {
+        // I32
+        let val_i32 = Arc::new(Mutex::new(WasmValue::from_i32(1314)));
+        let val_i32_cloned = Arc::clone(&val_i32);
+
+        // I64
+        let val_i64 = Arc::new(Mutex::new(WasmValue::from_i64(1314)));
+        let val_i64_cloned = Arc::clone(&val_i64);
+
+        // F32
+        let val_f32 = Arc::new(Mutex::new(WasmValue::from_f32(13.14)));
+        let val_f32_cloned = Arc::clone(&val_f32);
+
+        // F64
+        let val_f64 = Arc::new(Mutex::new(WasmValue::from_f64(13.14)));
+        let val_f64_cloned = Arc::clone(&val_f64);
+
+        // V128
+        let val_v128 = Arc::new(Mutex::new(WasmValue::from_v128(1314)));
+        let val_v128_cloned = Arc::clone(&val_v128);
+
+        // ExternRef
+        let ty = TableType::new(RefType::FuncRef, 10, Some(20));
+        let result = Table::create(ty);
+        assert!(result.is_ok());
+        let mut table = result.unwrap();
+        let val_extern_ref = Arc::new(Mutex::new(WasmValue::from_extern_ref(&mut table)));
+        let val_extern_ref_cloned = Arc::clone(&val_extern_ref);
+
+        let handle = thread::spawn(move || {
+            let result = val_i32_cloned.lock();
+            assert!(result.is_ok());
+            let val_i32_c = result.unwrap();
+            assert_eq!(val_i32_c.ty(), ValType::I32);
+
+            let result = val_i64_cloned.lock();
+            assert!(result.is_ok());
+            let val_i64_c = result.unwrap();
+            assert_eq!(val_i64_c.ty(), ValType::I64);
+
+            let result = val_f32_cloned.lock();
+            assert!(result.is_ok());
+            let val_f32_c = result.unwrap();
+            assert_eq!(val_f32_c.ty(), ValType::F32);
+
+            let result = val_f64_cloned.lock();
+            assert!(result.is_ok());
+            let val_f64_c = result.unwrap();
+            assert_eq!(val_f64_c.ty(), ValType::F64);
+
+            let result = val_v128_cloned.lock();
+            assert!(result.is_ok());
+            let val_v128_c = result.unwrap();
+            assert_eq!(val_v128_c.ty(), ValType::V128);
+
+            let result = val_extern_ref_cloned.lock();
+            assert!(result.is_ok());
+            let val_extern_ref_c = result.unwrap();
+            assert_eq!(val_extern_ref_c.ty(), ValType::ExternRef);
+            assert!(val_extern_ref_c.extern_ref::<Table>().is_some());
+        });
+
+        handle.join().unwrap();
+    }
+
+    #[test]
+    fn test_types_string() {
+        let s: WasmEdgeString = "hello".into();
+        let t: WasmEdgeString = "hello".into();
+        assert_eq!(s, t);
+
+        let s: WasmEdgeString = "hello".into();
+        let t = String::from(s);
+        assert_eq!(t, "hello");
+
+        let s: WasmEdgeString = "hello".into();
+        let t: WasmEdgeString = "hello\0".into();
+        assert_ne!(s, t);
+
+        let s: WasmEdgeString = "hello\0".into();
+        let t = String::from(s);
+        assert_eq!(t, "hello\0");
+
+        let s: WasmEdgeString = "he\0llo\0".into();
+        let t = String::from(s);
+        assert_eq!(t, "he\0llo\0");
+    }
+
+    #[test]
+    fn test_types_string_send() {
+        let s: WasmEdgeString = "hello".into();
+
+        let handle = thread::spawn(move || {
+            let t: WasmEdgeString = "hello".into();
+            assert_eq!(s, t);
+        });
+
+        handle.join().unwrap();
+    }
+
+    #[test]
+    fn test_types_string_sync() {
+        let s: WasmEdgeString = "hello".into();
+        let p = Arc::new(Mutex::new(s));
+
+        let s_cloned = Arc::clone(&p);
+        let handle = thread::spawn(move || {
+            let result = s_cloned.lock();
+            assert!(result.is_ok());
+            let s = result.unwrap();
+
+            let t: WasmEdgeString = "hello".into();
+            assert_eq!(*s, t);
+        });
+
+        handle.join().unwrap();
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/utils.rs.html b/src/wasmedge_sys/utils.rs.html new file mode 100644 index 000000000..342fe4bd8 --- /dev/null +++ b/src/wasmedge_sys/utils.rs.html @@ -0,0 +1,1427 @@ +utils.rs - source

wasmedge_sys/
utils.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
//! Defines the versioning and logging functions.
+
+use crate::{
+    ffi::{self, WasmEdge_Result, WasmEdge_ResultGetCode, WasmEdge_ResultOK},
+    WasmEdgeResult,
+};
+use std::{
+    ffi::{CStr, CString},
+    path::Path,
+};
+use wasmedge_types::error::{
+    CoreCommonError, CoreComponentError, CoreError, CoreExecutionError, CoreInstantiationError,
+    CoreLoadError, CoreValidationError, WasmEdgeError,
+};
+
+#[cfg(unix)]
+pub(crate) fn path_to_cstring(path: &Path) -> WasmEdgeResult<CString> {
+    use std::os::unix::ffi::OsStrExt;
+    CString::new(path.as_os_str().as_bytes())
+        .map_err(|err| Box::new(WasmEdgeError::FoundNulByte(err)))
+}
+
+#[cfg(windows)]
+pub(crate) fn path_to_cstring(path: &Path) -> WasmEdgeResult<CString> {
+    match path.to_str() {
+        Some(s) => CString::new(s).map_err(|err| Box::new(WasmEdgeError::FoundNulByte(err))),
+        None => Err(Box::new(WasmEdgeError::WindowsPathConversion(
+            path.to_string_lossy().to_string(),
+        ))),
+    }
+}
+
+/// Logs the debug information.
+pub fn log_debug_info() {
+    unsafe { ffi::WasmEdge_LogSetDebugLevel() }
+}
+
+/// Logs the error information.
+pub fn log_error_info() {
+    unsafe { ffi::WasmEdge_LogSetErrorLevel() }
+}
+
+/// Sets the logging system off.
+pub fn log_off() {
+    unsafe { ffi::WasmEdge_LogOff() }
+}
+
+// Checks the result of a `FFI` function.
+pub(crate) fn check(result: WasmEdge_Result) -> WasmEdgeResult<()> {
+    let category = unsafe { ffi::WasmEdge_ResultGetCategory(result) };
+    let code = unsafe {
+        if !WasmEdge_ResultOK(result) {
+            WasmEdge_ResultGetCode(result)
+        } else {
+            0u32
+        }
+    } as ffi::WasmEdge_ErrCode;
+
+    match category {
+        ffi::WasmEdge_ErrCategory_UserLevelError => Err(Box::new(WasmEdgeError::User(code as _))),
+        ffi::WasmEdge_ErrCategory_WASM => gen_runtime_error(code),
+        _ => panic!("Invalid category value: {category}"),
+    }
+}
+
+fn gen_runtime_error(code: ffi::WasmEdge_ErrCode) -> WasmEdgeResult<()> {
+    match code {
+        // Success or terminated (exit and return success)
+        ffi::WasmEdge_ErrCode_Success => Ok(()),
+        ffi::WasmEdge_ErrCode_Terminated => Err(Box::new(WasmEdgeError::Core(CoreError::Common(
+            CoreCommonError::Terminated,
+        )))),
+        // Common errors
+        ffi::WasmEdge_ErrCode_RuntimeError => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Common(CoreCommonError::RuntimeError),
+        ))),
+        ffi::WasmEdge_ErrCode_CostLimitExceeded => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Common(CoreCommonError::CostLimitExceeded),
+        ))),
+        ffi::WasmEdge_ErrCode_WrongVMWorkflow => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Common(CoreCommonError::WrongVMWorkflow),
+        ))),
+        ffi::WasmEdge_ErrCode_FuncNotFound => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Common(CoreCommonError::FuncNotFound),
+        ))),
+        ffi::WasmEdge_ErrCode_AOTDisabled => Err(Box::new(WasmEdgeError::Core(CoreError::Common(
+            CoreCommonError::AOTDisabled,
+        )))),
+        ffi::WasmEdge_ErrCode_Interrupted => Err(Box::new(WasmEdgeError::Core(CoreError::Common(
+            CoreCommonError::Interrupted,
+        )))),
+        ffi::WasmEdge_ErrCode_NotValidated => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Common(CoreCommonError::NotValidated),
+        ))),
+        ffi::WasmEdge_ErrCode_NonNullRequired => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Common(CoreCommonError::NonNullRequired),
+        ))),
+        ffi::WasmEdge_ErrCode_SetValueToConst => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Common(CoreCommonError::SetValueToConst),
+        ))),
+        ffi::WasmEdge_ErrCode_SetValueErrorType => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Common(CoreCommonError::SetValueErrorType),
+        ))),
+        ffi::WasmEdge_ErrCode_UserDefError => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Common(CoreCommonError::UserDefError),
+        ))),
+
+        // Load phase
+        ffi::WasmEdge_ErrCode_IllegalPath => Err(Box::new(WasmEdgeError::Core(CoreError::Load(
+            CoreLoadError::IllegalPath,
+        )))),
+        ffi::WasmEdge_ErrCode_ReadError => Err(Box::new(WasmEdgeError::Core(CoreError::Load(
+            CoreLoadError::ReadError,
+        )))),
+        ffi::WasmEdge_ErrCode_UnexpectedEnd => Err(Box::new(WasmEdgeError::Core(CoreError::Load(
+            CoreLoadError::UnexpectedEnd,
+        )))),
+        ffi::WasmEdge_ErrCode_MalformedMagic => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::MalformedMagic),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedVersion => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::MalformedVersion),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedSection => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::MalformedSection),
+        ))),
+        ffi::WasmEdge_ErrCode_SectionSizeMismatch => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::SectionSizeMismatch),
+        ))),
+        ffi::WasmEdge_ErrCode_LengthOutOfBounds => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::LengthOutOfBounds),
+        ))),
+        ffi::WasmEdge_ErrCode_JunkSection => Err(Box::new(WasmEdgeError::Core(CoreError::Load(
+            CoreLoadError::JunkSection,
+        )))),
+        ffi::WasmEdge_ErrCode_IncompatibleFuncCode => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::IncompatibleFuncCode),
+        ))),
+        ffi::WasmEdge_ErrCode_IncompatibleDataCount => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::IncompatibleDataCount),
+        ))),
+        ffi::WasmEdge_ErrCode_DataCountRequired => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::DataCountRequired),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedImportKind => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::MalformedImportKind),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedExportKind => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::MalformedExportKind),
+        ))),
+        ffi::WasmEdge_ErrCode_ExpectedZeroByte => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::ExpectedZeroByte),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidMut => Err(Box::new(WasmEdgeError::Core(CoreError::Load(
+            CoreLoadError::InvalidMut,
+        )))),
+        ffi::WasmEdge_ErrCode_TooManyLocals => Err(Box::new(WasmEdgeError::Core(CoreError::Load(
+            CoreLoadError::TooManyLocals,
+        )))),
+        ffi::WasmEdge_ErrCode_MalformedValType => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::MalformedValType),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedElemType => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::MalformedElemType),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedRefType => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::MalformedRefType),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedUTF8 => Err(Box::new(WasmEdgeError::Core(CoreError::Load(
+            CoreLoadError::MalformedUTF8,
+        )))),
+        ffi::WasmEdge_ErrCode_IntegerTooLarge => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::IntegerTooLarge),
+        ))),
+        ffi::WasmEdge_ErrCode_IntegerTooLong => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::IntegerTooLong),
+        ))),
+        ffi::WasmEdge_ErrCode_IllegalOpCode => Err(Box::new(WasmEdgeError::Core(CoreError::Load(
+            CoreLoadError::IllegalOpCode,
+        )))),
+        ffi::WasmEdge_ErrCode_IllegalGrammar => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::IllegalGrammar),
+        ))),
+        ffi::WasmEdge_ErrCode_SharedMemoryNoMax => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::SharedMemoryNoMax),
+        ))),
+        ffi::WasmEdge_ErrCode_IntrinsicsTableNotFound => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::IntrinsicsTableNotFound),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedTable => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Load(CoreLoadError::MalformedTable),
+        ))),
+
+        // Validation phase
+        ffi::WasmEdge_ErrCode_InvalidAlignment => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidAlignment),
+        ))),
+        ffi::WasmEdge_ErrCode_TypeCheckFailed => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::TypeCheckFailed),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidLabelIdx => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidLabelIdx),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidLocalIdx => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidLocalIdx),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidFieldIdx => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidFieldIdx),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidFuncTypeIdx => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidFuncTypeIdx),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidFuncIdx => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidFuncIdx),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidTableIdx => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidTableIdx),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidMemoryIdx => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidMemoryIdx),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidGlobalIdx => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidGlobalIdx),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidElemIdx => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidElemIdx),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidDataIdx => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidDataIdx),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidRefIdx => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidRefIdx),
+        ))),
+        ffi::WasmEdge_ErrCode_ConstExprRequired => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::ConstExprRequired),
+        ))),
+        ffi::WasmEdge_ErrCode_DupExportName => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::DupExportName),
+        ))),
+        ffi::WasmEdge_ErrCode_ImmutableGlobal => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::ImmutableGlobal),
+        ))),
+        ffi::WasmEdge_ErrCode_ImmutableField => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::ImmutableField),
+        ))),
+        ffi::WasmEdge_ErrCode_ImmutableArray => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::ImmutableArray),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidResultArity => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidResultArity),
+        ))),
+        ffi::WasmEdge_ErrCode_MultiTables => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::MultiTables),
+        ))),
+        ffi::WasmEdge_ErrCode_MultiMemories => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::MultiMemories),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidLimit => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidLimit),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidMemPages => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidMemPages),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidStartFunc => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidStartFunc),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidLaneIdx => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidLaneIdx),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidUninitLocal => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidUninitLocal),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidNotDefaultableField => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidNotDefaultableField),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidNotDefaultableArray => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidNotDefaultableArray),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidPackedField => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidPackedField),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidPackedArray => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidPackedArray),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidUnpackedField => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidUnpackedField),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidUnpackedArray => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidUnpackedArray),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidBrRefType => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidBrRefType),
+        ))),
+        ffi::WasmEdge_ErrCode_ArrayTypesMismatch => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::ArrayTypesMismatch),
+        ))),
+        ffi::WasmEdge_ErrCode_ArrayTypesNumtypeRequired => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::ArrayTypesNumtypeRequired),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidSubType => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Validation(CoreValidationError::InvalidSubType),
+        ))),
+
+        // Instantiation phase
+        ffi::WasmEdge_ErrCode_ModuleNameConflict => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Instantiation(CoreInstantiationError::ModuleNameConflict),
+        ))),
+        ffi::WasmEdge_ErrCode_IncompatibleImportType => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Instantiation(CoreInstantiationError::IncompatibleImportType),
+        ))),
+        ffi::WasmEdge_ErrCode_UnknownImport => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Instantiation(CoreInstantiationError::UnknownImport),
+        ))),
+        ffi::WasmEdge_ErrCode_DataSegDoesNotFit => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Instantiation(CoreInstantiationError::DataSegDoesNotFit),
+        ))),
+        ffi::WasmEdge_ErrCode_ElemSegDoesNotFit => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Instantiation(CoreInstantiationError::ElemSegDoesNotFit),
+        ))),
+
+        // Execution phase
+        ffi::WasmEdge_ErrCode_WrongInstanceAddress => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::WrongInstanceAddress),
+        ))),
+        ffi::WasmEdge_ErrCode_WrongInstanceIndex => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::WrongInstanceIndex),
+        ))),
+        ffi::WasmEdge_ErrCode_InstrTypeMismatch => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::InstrTypeMismatch),
+        ))),
+        ffi::WasmEdge_ErrCode_FuncSigMismatch => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::FuncSigMismatch),
+        ))),
+        ffi::WasmEdge_ErrCode_DivideByZero => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::DivideByZero),
+        ))),
+        ffi::WasmEdge_ErrCode_IntegerOverflow => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::IntegerOverflow),
+        ))),
+        ffi::WasmEdge_ErrCode_InvalidConvToInt => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::InvalidConvToInt),
+        ))),
+        ffi::WasmEdge_ErrCode_TableOutOfBounds => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::TableOutOfBounds),
+        ))),
+        ffi::WasmEdge_ErrCode_MemoryOutOfBounds => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::MemoryOutOfBounds),
+        ))),
+        ffi::WasmEdge_ErrCode_ArrayOutOfBounds => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::ArrayOutOfBounds),
+        ))),
+        ffi::WasmEdge_ErrCode_Unreachable => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::Unreachable),
+        ))),
+        ffi::WasmEdge_ErrCode_UninitializedElement => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::UninitializedElement),
+        ))),
+        ffi::WasmEdge_ErrCode_UndefinedElement => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::UndefinedElement),
+        ))),
+        ffi::WasmEdge_ErrCode_IndirectCallTypeMismatch => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::IndirectCallTypeMismatch),
+        ))),
+        ffi::WasmEdge_ErrCode_HostFuncError => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::HostFuncFailed),
+        ))),
+        ffi::WasmEdge_ErrCode_RefTypeMismatch => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::RefTypeMismatch),
+        ))),
+        ffi::WasmEdge_ErrCode_UnalignedAtomicAccess => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::UnalignedAtomicAccess),
+        ))),
+        ffi::WasmEdge_ErrCode_ExpectSharedMemory => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::ExpectSharedMemory),
+        ))),
+        ffi::WasmEdge_ErrCode_CastNullToNonNull => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::CastNullToNonNull),
+        ))),
+        ffi::WasmEdge_ErrCode_AccessNullFunc => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::AccessNullFunc),
+        ))),
+        ffi::WasmEdge_ErrCode_AccessNullStruct => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::AccessNullStruct),
+        ))),
+        ffi::WasmEdge_ErrCode_AccessNullArray => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::AccessNullArray),
+        ))),
+        ffi::WasmEdge_ErrCode_AccessNullI31 => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::AccessNullI31),
+        ))),
+        ffi::WasmEdge_ErrCode_CastFailed => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Execution(CoreExecutionError::CastFailed),
+        ))),
+
+        // Component model phase
+        ffi::WasmEdge_ErrCode_MalformedSort => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Component(CoreComponentError::MalformedSort),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedAliasTarget => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Component(CoreComponentError::MalformedAliasTarget),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedCoreInstance => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Component(CoreComponentError::MalformedCoreInstance),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedInstance => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Component(CoreComponentError::MalformedInstance),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedDefType => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Component(CoreComponentError::MalformedDefType),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedRecordType => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Component(CoreComponentError::MalformedRecordType),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedVariantType => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Component(CoreComponentError::MalformedVariantType),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedTupleType => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Component(CoreComponentError::MalformedTupleType),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedFlagsType => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Component(CoreComponentError::MalformedFlagsType),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedCanonical => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Component(CoreComponentError::MalformedCanonical),
+        ))),
+        ffi::WasmEdge_ErrCode_UnknownCanonicalOption => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Component(CoreComponentError::UnknownCanonicalOption),
+        ))),
+        ffi::WasmEdge_ErrCode_MalformedName => Err(Box::new(WasmEdgeError::Core(
+            CoreError::Component(CoreComponentError::MalformedName),
+        ))),
+        c => Err(Box::new(WasmEdgeError::Core(CoreError::UnknownError(
+            c as _,
+        )))),
+    }
+}
+
+impl From<CoreError> for WasmEdge_Result {
+    fn from(val: CoreError) -> WasmEdge_Result {
+        let code = match val {
+            // Common errors
+            CoreError::Common(e) => match e {
+                CoreCommonError::Terminated => ffi::WasmEdge_ErrCode_Terminated,
+                CoreCommonError::RuntimeError => ffi::WasmEdge_ErrCode_RuntimeError,
+                CoreCommonError::CostLimitExceeded => ffi::WasmEdge_ErrCode_CostLimitExceeded,
+                CoreCommonError::WrongVMWorkflow => ffi::WasmEdge_ErrCode_WrongVMWorkflow,
+                CoreCommonError::FuncNotFound => ffi::WasmEdge_ErrCode_FuncNotFound,
+                CoreCommonError::AOTDisabled => ffi::WasmEdge_ErrCode_AOTDisabled,
+                CoreCommonError::Interrupted => ffi::WasmEdge_ErrCode_Interrupted,
+                CoreCommonError::UserDefError => ffi::WasmEdge_ErrCode_UserDefError,
+                CoreCommonError::NotValidated => ffi::WasmEdge_ErrCode_NotValidated,
+                CoreCommonError::NonNullRequired => ffi::WasmEdge_ErrCode_NonNullRequired,
+                CoreCommonError::SetValueToConst => ffi::WasmEdge_ErrCode_SetValueToConst,
+                CoreCommonError::SetValueErrorType => ffi::WasmEdge_ErrCode_SetValueErrorType,
+            },
+
+            // Load phase
+            CoreError::Load(e) => match e {
+                CoreLoadError::IllegalPath => ffi::WasmEdge_ErrCode_IllegalPath,
+                CoreLoadError::ReadError => ffi::WasmEdge_ErrCode_ReadError,
+                CoreLoadError::UnexpectedEnd => ffi::WasmEdge_ErrCode_UnexpectedEnd,
+                CoreLoadError::MalformedMagic => ffi::WasmEdge_ErrCode_MalformedMagic,
+                CoreLoadError::MalformedVersion => ffi::WasmEdge_ErrCode_MalformedVersion,
+                CoreLoadError::MalformedSection => ffi::WasmEdge_ErrCode_MalformedSection,
+                CoreLoadError::SectionSizeMismatch => ffi::WasmEdge_ErrCode_SectionSizeMismatch,
+                CoreLoadError::LengthOutOfBounds => ffi::WasmEdge_ErrCode_LengthOutOfBounds,
+                CoreLoadError::JunkSection => ffi::WasmEdge_ErrCode_JunkSection,
+                CoreLoadError::IncompatibleFuncCode => ffi::WasmEdge_ErrCode_IncompatibleFuncCode,
+                CoreLoadError::IncompatibleDataCount => ffi::WasmEdge_ErrCode_IncompatibleDataCount,
+                CoreLoadError::DataCountRequired => ffi::WasmEdge_ErrCode_DataCountRequired,
+                CoreLoadError::MalformedImportKind => ffi::WasmEdge_ErrCode_MalformedImportKind,
+                CoreLoadError::MalformedExportKind => ffi::WasmEdge_ErrCode_MalformedExportKind,
+                CoreLoadError::ExpectedZeroByte => ffi::WasmEdge_ErrCode_ExpectedZeroByte,
+                CoreLoadError::InvalidMut => ffi::WasmEdge_ErrCode_InvalidMut,
+                CoreLoadError::TooManyLocals => ffi::WasmEdge_ErrCode_TooManyLocals,
+                CoreLoadError::MalformedValType => ffi::WasmEdge_ErrCode_MalformedValType,
+                CoreLoadError::MalformedElemType => ffi::WasmEdge_ErrCode_MalformedElemType,
+                CoreLoadError::MalformedRefType => ffi::WasmEdge_ErrCode_MalformedRefType,
+                CoreLoadError::MalformedUTF8 => ffi::WasmEdge_ErrCode_MalformedUTF8,
+                CoreLoadError::IntegerTooLarge => ffi::WasmEdge_ErrCode_IntegerTooLarge,
+                CoreLoadError::IntegerTooLong => ffi::WasmEdge_ErrCode_IntegerTooLong,
+                CoreLoadError::IllegalOpCode => ffi::WasmEdge_ErrCode_IllegalOpCode,
+                CoreLoadError::IllegalGrammar => ffi::WasmEdge_ErrCode_IllegalGrammar,
+                CoreLoadError::SharedMemoryNoMax => ffi::WasmEdge_ErrCode_SharedMemoryNoMax,
+                CoreLoadError::IntrinsicsTableNotFound => {
+                    ffi::WasmEdge_ErrCode_IntrinsicsTableNotFound
+                }
+                CoreLoadError::MalformedTable => ffi::WasmEdge_ErrCode_MalformedTable,
+            },
+
+            // Validation phase
+            CoreError::Validation(e) => match e {
+                CoreValidationError::InvalidAlignment => ffi::WasmEdge_ErrCode_InvalidAlignment,
+                CoreValidationError::TypeCheckFailed => ffi::WasmEdge_ErrCode_TypeCheckFailed,
+                CoreValidationError::InvalidLabelIdx => ffi::WasmEdge_ErrCode_InvalidLabelIdx,
+                CoreValidationError::InvalidLocalIdx => ffi::WasmEdge_ErrCode_InvalidLocalIdx,
+                CoreValidationError::InvalidFieldIdx => ffi::WasmEdge_ErrCode_InvalidFieldIdx,
+                CoreValidationError::InvalidFuncTypeIdx => ffi::WasmEdge_ErrCode_InvalidFuncTypeIdx,
+                CoreValidationError::InvalidFuncIdx => ffi::WasmEdge_ErrCode_InvalidFuncIdx,
+                CoreValidationError::InvalidTableIdx => ffi::WasmEdge_ErrCode_InvalidTableIdx,
+                CoreValidationError::InvalidMemoryIdx => ffi::WasmEdge_ErrCode_InvalidMemoryIdx,
+                CoreValidationError::InvalidGlobalIdx => ffi::WasmEdge_ErrCode_InvalidGlobalIdx,
+                CoreValidationError::InvalidElemIdx => ffi::WasmEdge_ErrCode_InvalidElemIdx,
+                CoreValidationError::InvalidDataIdx => ffi::WasmEdge_ErrCode_InvalidDataIdx,
+                CoreValidationError::InvalidRefIdx => ffi::WasmEdge_ErrCode_InvalidRefIdx,
+                CoreValidationError::ConstExprRequired => ffi::WasmEdge_ErrCode_ConstExprRequired,
+                CoreValidationError::DupExportName => ffi::WasmEdge_ErrCode_DupExportName,
+                CoreValidationError::ImmutableGlobal => ffi::WasmEdge_ErrCode_ImmutableGlobal,
+                CoreValidationError::ImmutableField => ffi::WasmEdge_ErrCode_ImmutableField,
+                CoreValidationError::ImmutableArray => ffi::WasmEdge_ErrCode_ImmutableArray,
+                CoreValidationError::InvalidResultArity => ffi::WasmEdge_ErrCode_InvalidResultArity,
+                CoreValidationError::MultiTables => ffi::WasmEdge_ErrCode_MultiTables,
+                CoreValidationError::MultiMemories => ffi::WasmEdge_ErrCode_MultiMemories,
+                CoreValidationError::InvalidLimit => ffi::WasmEdge_ErrCode_InvalidLimit,
+                CoreValidationError::InvalidMemPages => ffi::WasmEdge_ErrCode_InvalidMemPages,
+                CoreValidationError::InvalidStartFunc => ffi::WasmEdge_ErrCode_InvalidStartFunc,
+                CoreValidationError::InvalidLaneIdx => ffi::WasmEdge_ErrCode_InvalidLaneIdx,
+                CoreValidationError::InvalidUninitLocal => ffi::WasmEdge_ErrCode_InvalidUninitLocal,
+                CoreValidationError::InvalidNotDefaultableField => {
+                    ffi::WasmEdge_ErrCode_InvalidNotDefaultableField
+                }
+                CoreValidationError::InvalidNotDefaultableArray => {
+                    ffi::WasmEdge_ErrCode_InvalidNotDefaultableArray
+                }
+                CoreValidationError::InvalidPackedField => ffi::WasmEdge_ErrCode_InvalidPackedField,
+                CoreValidationError::InvalidPackedArray => ffi::WasmEdge_ErrCode_InvalidPackedArray,
+                CoreValidationError::InvalidUnpackedField => {
+                    ffi::WasmEdge_ErrCode_InvalidUnpackedField
+                }
+                CoreValidationError::InvalidUnpackedArray => {
+                    ffi::WasmEdge_ErrCode_InvalidUnpackedArray
+                }
+                CoreValidationError::InvalidBrRefType => ffi::WasmEdge_ErrCode_InvalidBrRefType,
+                CoreValidationError::ArrayTypesMismatch => ffi::WasmEdge_ErrCode_ArrayTypesMismatch,
+                CoreValidationError::ArrayTypesNumtypeRequired => {
+                    ffi::WasmEdge_ErrCode_ArrayTypesNumtypeRequired
+                }
+                CoreValidationError::InvalidSubType => ffi::WasmEdge_ErrCode_InvalidSubType,
+            },
+
+            // Instantiation phase
+            CoreError::Instantiation(e) => match e {
+                CoreInstantiationError::ModuleNameConflict => {
+                    ffi::WasmEdge_ErrCode_ModuleNameConflict
+                }
+                CoreInstantiationError::IncompatibleImportType => {
+                    ffi::WasmEdge_ErrCode_IncompatibleImportType
+                }
+                CoreInstantiationError::UnknownImport => ffi::WasmEdge_ErrCode_UnknownImport,
+                CoreInstantiationError::DataSegDoesNotFit => {
+                    ffi::WasmEdge_ErrCode_DataSegDoesNotFit
+                }
+                CoreInstantiationError::ElemSegDoesNotFit => {
+                    ffi::WasmEdge_ErrCode_ElemSegDoesNotFit
+                }
+            },
+
+            // Execution phase
+            CoreError::Execution(e) => match e {
+                CoreExecutionError::WrongInstanceAddress => {
+                    ffi::WasmEdge_ErrCode_WrongInstanceAddress
+                }
+                CoreExecutionError::WrongInstanceIndex => ffi::WasmEdge_ErrCode_WrongInstanceIndex,
+                CoreExecutionError::InstrTypeMismatch => ffi::WasmEdge_ErrCode_InstrTypeMismatch,
+                CoreExecutionError::FuncSigMismatch => ffi::WasmEdge_ErrCode_FuncSigMismatch,
+                CoreExecutionError::DivideByZero => ffi::WasmEdge_ErrCode_DivideByZero,
+                CoreExecutionError::IntegerOverflow => ffi::WasmEdge_ErrCode_IntegerOverflow,
+                CoreExecutionError::InvalidConvToInt => ffi::WasmEdge_ErrCode_InvalidConvToInt,
+                CoreExecutionError::TableOutOfBounds => ffi::WasmEdge_ErrCode_TableOutOfBounds,
+                CoreExecutionError::MemoryOutOfBounds => ffi::WasmEdge_ErrCode_MemoryOutOfBounds,
+                CoreExecutionError::ArrayOutOfBounds => ffi::WasmEdge_ErrCode_ArrayOutOfBounds,
+                CoreExecutionError::Unreachable => ffi::WasmEdge_ErrCode_Unreachable,
+                CoreExecutionError::UninitializedElement => {
+                    ffi::WasmEdge_ErrCode_UninitializedElement
+                }
+                CoreExecutionError::UndefinedElement => ffi::WasmEdge_ErrCode_UndefinedElement,
+                CoreExecutionError::IndirectCallTypeMismatch => {
+                    ffi::WasmEdge_ErrCode_IndirectCallTypeMismatch
+                }
+                CoreExecutionError::HostFuncFailed => ffi::WasmEdge_ErrCode_HostFuncError,
+                CoreExecutionError::RefTypeMismatch => ffi::WasmEdge_ErrCode_RefTypeMismatch,
+                CoreExecutionError::UnalignedAtomicAccess => {
+                    ffi::WasmEdge_ErrCode_UnalignedAtomicAccess
+                }
+                CoreExecutionError::ExpectSharedMemory => ffi::WasmEdge_ErrCode_ExpectSharedMemory,
+                CoreExecutionError::CastNullToNonNull => ffi::WasmEdge_ErrCode_CastNullToNonNull,
+                CoreExecutionError::AccessNullFunc => ffi::WasmEdge_ErrCode_AccessNullFunc,
+                CoreExecutionError::AccessNullStruct => ffi::WasmEdge_ErrCode_AccessNullStruct,
+                CoreExecutionError::AccessNullArray => ffi::WasmEdge_ErrCode_AccessNullArray,
+                CoreExecutionError::AccessNullI31 => ffi::WasmEdge_ErrCode_AccessNullI31,
+                CoreExecutionError::CastFailed => ffi::WasmEdge_ErrCode_CastFailed,
+            },
+
+            CoreError::Component(e) => match e {
+                CoreComponentError::MalformedSort => ffi::WasmEdge_ErrCode_MalformedSort,
+                CoreComponentError::MalformedAliasTarget => {
+                    ffi::WasmEdge_ErrCode_MalformedAliasTarget
+                }
+                CoreComponentError::MalformedCoreInstance => {
+                    ffi::WasmEdge_ErrCode_MalformedCoreInstance
+                }
+                CoreComponentError::MalformedInstance => ffi::WasmEdge_ErrCode_MalformedInstance,
+                CoreComponentError::MalformedDefType => ffi::WasmEdge_ErrCode_MalformedDefType,
+                CoreComponentError::MalformedRecordType => {
+                    ffi::WasmEdge_ErrCode_MalformedRecordType
+                }
+                CoreComponentError::MalformedVariantType => {
+                    ffi::WasmEdge_ErrCode_MalformedVariantType
+                }
+                CoreComponentError::MalformedTupleType => ffi::WasmEdge_ErrCode_MalformedTupleType,
+                CoreComponentError::MalformedFlagsType => ffi::WasmEdge_ErrCode_MalformedFlagsType,
+                CoreComponentError::MalformedCanonical => ffi::WasmEdge_ErrCode_MalformedCanonical,
+                CoreComponentError::UnknownCanonicalOption => {
+                    ffi::WasmEdge_ErrCode_UnknownCanonicalOption
+                }
+                CoreComponentError::MalformedName => ffi::WasmEdge_ErrCode_MalformedName,
+            },
+            CoreError::UnknownError(c) => c as ffi::WasmEdge_ErrCode,
+        };
+        unsafe { ffi::WasmEdge_ResultGen(ffi::WasmEdge_ErrCategory_WASM, code as _) }
+    }
+}
+
+/// Returns the major version value.
+pub fn version_major_value() -> u32 {
+    unsafe { ffi::WasmEdge_VersionGetMajor() }
+}
+
+/// Returns the minor version value.
+pub fn version_minor_value() -> u32 {
+    unsafe { ffi::WasmEdge_VersionGetMinor() }
+}
+
+/// Returns the patch version value.
+pub fn version_patch_value() -> u32 {
+    unsafe { ffi::WasmEdge_VersionGetPatch() }
+}
+
+/// Returns the version string.
+pub fn version_string() -> String {
+    unsafe {
+        CStr::from_ptr(ffi::WasmEdge_VersionGet())
+            .to_string_lossy()
+            .into_owned()
+    }
+}
+
+/// Triggers the WasmEdge AOT compiler tool
+pub fn driver_aot_compiler<I, V>(args: I) -> i32
+where
+    I: IntoIterator<Item = V>,
+    V: AsRef<str>,
+{
+    // create a vector of zero terminated strings
+    let args = args
+        .into_iter()
+        .map(|arg| CString::new(arg.as_ref()).unwrap())
+        .collect::<Vec<CString>>();
+
+    // convert the strings to raw pointers
+    let mut c_args = args
+        .iter()
+        .map(|arg| arg.as_ptr())
+        .collect::<Vec<*const std::os::raw::c_char>>();
+
+    unsafe {
+        ffi::WasmEdge_Driver_Compiler(c_args.len() as std::os::raw::c_int, c_args.as_mut_ptr())
+    }
+}
+
+/// Triggers the WasmEdge runtime tool
+pub fn driver_runtime_tool<I, V>(args: I) -> i32
+where
+    I: IntoIterator<Item = V>,
+    V: AsRef<str>,
+{
+    // create a vector of zero terminated strings
+    let args = args
+        .into_iter()
+        .map(|arg| CString::new(arg.as_ref()).unwrap())
+        .collect::<Vec<CString>>();
+
+    // convert the strings to raw pointers
+    let mut c_args = args
+        .iter()
+        .map(|arg| arg.as_ptr())
+        .collect::<Vec<*const std::os::raw::c_char>>();
+
+    unsafe { ffi::WasmEdge_Driver_Tool(c_args.len() as std::os::raw::c_int, c_args.as_mut_ptr()) }
+}
+
+/// Triggers the WasmEdge unified tool
+pub fn driver_unified_tool<I, V>(args: I) -> i32
+where
+    I: IntoIterator<Item = V>,
+    V: AsRef<str>,
+{
+    // create a vector of zero terminated strings
+    let args = args
+        .into_iter()
+        .map(|arg| CString::new(arg.as_ref()).unwrap())
+        .collect::<Vec<CString>>();
+
+    // convert the strings to raw pointers
+    let mut c_args = args
+        .iter()
+        .map(|arg| arg.as_ptr())
+        .collect::<Vec<*const std::os::raw::c_char>>();
+
+    unsafe {
+        ffi::WasmEdge_Driver_UniTool(c_args.len() as std::os::raw::c_int, c_args.as_mut_ptr())
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_sys/validator.rs.html b/src/wasmedge_sys/validator.rs.html new file mode 100644 index 000000000..d5f5b8d08 --- /dev/null +++ b/src/wasmedge_sys/validator.rs.html @@ -0,0 +1,377 @@ +validator.rs - source

wasmedge_sys/
validator.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
//! Defines WasmEdge Validator struct.
+
+use crate::{ffi, utils::check, Config, Module, WasmEdgeResult};
+use wasmedge_types::error::WasmEdgeError;
+
+/// Struct of WasmEdge Validator.
+#[derive(Debug)]
+pub struct Validator {
+    pub(crate) inner: InnerValidator,
+}
+impl Validator {
+    /// Creates a new [Validator] to be associated with the given global configuration.
+    ///
+    /// # Arguments
+    ///
+    /// * `config` - The global environment configuration.
+    ///
+    /// # Error
+    ///
+    /// If fail to create a [Validator], then an error is returned.
+    pub fn create(config: Option<&Config>) -> WasmEdgeResult<Self> {
+        let ctx = match config {
+            Some(config) => unsafe { ffi::WasmEdge_ValidatorCreate(config.inner.0) },
+            None => unsafe { ffi::WasmEdge_ValidatorCreate(std::ptr::null_mut()) },
+        };
+        match ctx.is_null() {
+            true => Err(Box::new(WasmEdgeError::CompilerCreate)),
+            false => Ok(Self {
+                inner: InnerValidator(ctx),
+            }),
+        }
+    }
+
+    /// Validates a given WasmEdge [Module](crate::Module).
+    ///
+    /// [Module](crate::Module)s are valid when all components they contain are valid. Furthermore, most definitions are themselves classified with a suitable type.
+    ///
+    /// # Arguments
+    ///
+    /// * `module` - The [Module](crate::Module) to be validated.
+    ///
+    /// # Error
+    ///
+    /// If the validation fails, then an error is returned.
+    pub fn validate(&self, module: &Module) -> WasmEdgeResult<()> {
+        unsafe {
+            check(ffi::WasmEdge_ValidatorValidate(
+                self.inner.0,
+                module.inner.0,
+            ))
+        }
+    }
+
+    /// Provides a raw pointer to the inner Validator context.
+    #[cfg(feature = "ffi")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "ffi")))]
+    pub fn as_ptr(&self) -> *const ffi::WasmEdge_ValidatorContext {
+        self.inner.0 as *const _
+    }
+}
+impl Drop for Validator {
+    fn drop(&mut self) {
+        unsafe { ffi::WasmEdge_ValidatorDelete(self.inner.0) }
+    }
+}
+
+#[derive(Debug)]
+pub(crate) struct InnerValidator(pub(crate) *mut ffi::WasmEdge_ValidatorContext);
+unsafe impl Send for InnerValidator {}
+unsafe impl Sync for InnerValidator {}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{Config, Loader};
+    use std::{
+        sync::{Arc, Mutex},
+        thread,
+    };
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_validator() {
+        // create a Validator context without configuration
+        let result = Validator::create(None);
+        assert!(result.is_ok());
+
+        // create a Loader context with configuration
+        let result = Config::create();
+        assert!(result.is_ok());
+        let mut config = result.unwrap();
+        config.reference_types(true);
+        let result = Loader::create(Some(&config));
+        assert!(result.is_ok());
+        let loader = result.unwrap();
+
+        // load a WASM module
+        let path = std::env::current_dir()
+            .unwrap()
+            .ancestors()
+            .nth(2)
+            .unwrap()
+            .join("examples/wasmedge-sys/data/test.wasm");
+        let result = loader.from_file(path);
+        assert!(result.is_ok());
+        let module = result.unwrap();
+        assert!(!module.inner.0.is_null());
+
+        // create a Validator context without configuration
+        let result = Validator::create(None);
+        assert!(result.is_ok());
+        let validator = result.unwrap();
+
+        // validate the module loaded.
+        let result = validator.validate(&module);
+        assert!(result.is_ok());
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_validator_send() {
+        // create a Validator
+        let result = Validator::create(None);
+        assert!(result.is_ok());
+        let validator = result.unwrap();
+
+        let handle = thread::spawn(move || {
+            let result = Loader::create(None);
+            assert!(result.is_ok());
+            let loader = result.unwrap();
+
+            // load a WASM module
+            let path = std::env::current_dir()
+                .unwrap()
+                .ancestors()
+                .nth(2)
+                .unwrap()
+                .join("examples/wasmedge-sys/data/test.wasm");
+            let result = loader.from_file(path);
+            assert!(result.is_ok());
+            let module = result.unwrap();
+            assert!(!module.inner.0.is_null());
+
+            // validate the module loaded.
+            let result = validator.validate(&module);
+            assert!(result.is_ok());
+        });
+
+        handle.join().unwrap();
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_result_states)]
+    fn test_validator_sync() {
+        // create a Validator
+        let result = Validator::create(None);
+        assert!(result.is_ok());
+        let validator = Arc::new(Mutex::new(result.unwrap()));
+
+        let validator_cloned = Arc::clone(&validator);
+        let handle = thread::spawn(move || {
+            let result = Loader::create(None);
+            assert!(result.is_ok());
+            let loader = result.unwrap();
+
+            // load a WASM module
+            let path = std::env::current_dir()
+                .unwrap()
+                .ancestors()
+                .nth(2)
+                .unwrap()
+                .join("examples/wasmedge-sys/data/test.wasm");
+            let result = loader.from_file(path);
+            assert!(result.is_ok());
+            let module = result.unwrap();
+            assert!(!module.inner.0.is_null());
+
+            // validate the module loaded.
+            let result = validator_cloned.lock();
+            assert!(result.is_ok());
+            let validator = result.unwrap();
+            let result = validator.validate(&module);
+            assert!(result.is_ok());
+        });
+
+        handle.join().unwrap();
+    }
+}
+
\ No newline at end of file diff --git a/src/wasmedge_types/error.rs.html b/src/wasmedge_types/error.rs.html new file mode 100644 index 000000000..11929345e --- /dev/null +++ b/src/wasmedge_types/error.rs.html @@ -0,0 +1,1159 @@ +error.rs - source

wasmedge_types/
error.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
//! Defines WasmEdge error types.
+
+use crate::ExternalInstanceType;
+use thiserror::Error;
+
+/// The error types used by both wasmedge-sys and wasmedge crates.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum WasmEdgeError {
+    // For general operation error
+    #[error("{0}")]
+    Operation(String),
+
+    // For user-defined error
+    #[error("{0}")]
+    User(u32),
+
+    /// Errors raised by WasmEdge Core.
+    #[error("{0}")]
+    Core(#[from] CoreError),
+
+    #[error("Fail to create ImportObj module")]
+    ImportObjCreate,
+    #[error("Fail to create Executor context")]
+    ExecutorCreate,
+    #[error("{0}")]
+    Store(#[from] StoreError),
+    #[error("Fail to create Statistics context")]
+    StatisticsCreate,
+    #[error("Fail to create Module")]
+    ModuleCreate,
+    #[error("Fail to create Loader")]
+    LoaderCreate,
+    #[error("Fail to create Config")]
+    ConfigCreate,
+    #[error("Fail to create AOT Compiler")]
+    CompilerCreate,
+    #[error("Fail to create Validator")]
+    ValidatorCreate,
+    #[error("{0}")]
+    Vm(#[from] VmError),
+
+    // instances
+    #[error("{0}")]
+    Func(#[from] FuncError),
+    #[error("Fail to create FuncType")]
+    FuncTypeCreate,
+    #[error("Execution Timed Out")]
+    ExecuteTimeout,
+    #[error("{0}")]
+    Mem(#[from] MemError),
+    #[error("Fail to create MemType")]
+    MemTypeCreate,
+    #[error("{0}")]
+    Global(#[from] GlobalError),
+    #[error("Fail to create GlobalType")]
+    GlobalTypeCreate,
+    #[error("{0}")]
+    Table(#[from] TableError),
+    #[error("Fail to create TableType")]
+    TableTypeCreate,
+    #[error("{0}")]
+    Import(#[from] ImportError),
+    #[error("{0}")]
+    Export(#[from] ExportError),
+    #[error("{0}")]
+    Instance(#[from] InstanceError),
+    #[error("{0}")]
+    Plugin(#[from] PluginError),
+
+    // std
+    #[error("Found an internal 0 byte")]
+    FoundNulByte(#[from] std::ffi::NulError),
+    #[error("Fail to find a nul byte in the expected position")]
+    NotFoundNulByte(#[from] std::ffi::FromBytesWithNulError),
+    #[error("Fail to interpret a sequence of u8 as a string")]
+    Utf8(#[from] std::str::Utf8Error),
+    #[error("Fail to convert a vector of bytes to a string")]
+    FromUtf8(#[from] std::string::FromUtf8Error),
+
+    // Windows platform
+    #[error("Fail to convert path on Windows: {0}")]
+    WindowsPathConversion(String),
+}
+
+/// The error types for WasmEdge Function.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum FuncError {
+    #[error("Fail to create Function instance")]
+    Create,
+    #[error("{0}")]
+    CreateBinding(String),
+    #[error("Fail to get the function type")]
+    Type,
+}
+
+/// The error types for WasmEdge Memory.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum MemError {
+    #[error("Fail to create Memory instance")]
+    Create,
+    #[error("Fail to create shared memory type. The 'max' field must not be None.")]
+    CreateSharedType,
+    #[error("Fail to get the memory type")]
+    Type,
+    #[error("Fail to get the const pointer to data")]
+    ConstPtr,
+    #[error("Fail to get the pointer to data")]
+    MutPtr,
+    #[error("Fail to convert a raw pointer to a reference")]
+    Ptr2Ref,
+}
+
+/// The error types for WasmEdge Global.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum GlobalError {
+    #[error("Fail to create Global instance")]
+    Create,
+    #[error("Fail to get the global type")]
+    Type,
+    #[error("Trying to set value to a const global variable")]
+    ModifyConst,
+    #[error("")]
+    UnmatchedValType,
+}
+
+/// The error types for WasmEdge Table.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum TableError {
+    #[error("Fail to create Table instance")]
+    Create,
+    #[error("Fail to get the table type")]
+    Type,
+}
+
+/// The error types for WasmEdge ImportType.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum ImportError {
+    #[error("The expected Import type is {expected:?}, but found {actual:?}")]
+    Type {
+        expected: ExternalInstanceType,
+        actual: ExternalInstanceType,
+    },
+    #[error("{0}")]
+    FuncType(String),
+    #[error("{0}")]
+    TableType(String),
+    #[error("{0}")]
+    MemType(String),
+    #[error("{0}")]
+    GlobalType(String),
+}
+
+/// The error types for WasmEdge ExportType.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum ExportError {
+    #[error("The expected Export type is {expected:?}, but found {actual:?}")]
+    Type {
+        expected: ExternalInstanceType,
+        actual: ExternalInstanceType,
+    },
+    #[error("{0}")]
+    FuncType(String),
+    #[error("{0}")]
+    TableType(String),
+    #[error("{0}")]
+    MemType(String),
+    #[error("{0}")]
+    GlobalType(String),
+}
+
+/// The error types for WasmEdge Instance.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum InstanceError {
+    #[error("Fail to create Instance context")]
+    Create,
+    #[error("Fail to create WasiModule context")]
+    CreateWasi,
+    #[error("Fail to create WasmEdgeProcessModule context")]
+    CreateWasmEdgeProcess,
+    #[error("Fail to create ImportModule context")]
+    CreateImportModule,
+    #[error("Not found the target function ({0})")]
+    NotFoundFunc(String),
+    #[error("Not found the target table ({0})")]
+    NotFoundTable(String),
+    #[error("Not found the target memory ({0})")]
+    NotFoundMem(String),
+    #[error("Not found the target global ({0})")]
+    NotFoundGlobal(String),
+    #[error("Not found the given mapped Fd/handler")]
+    NotFoundMappedFdHandler,
+}
+
+/// The error types for WasmEdge plugin.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum PluginError {
+    #[error("Failed to create a plugin instance named '{0}'. Make sure that the plugin instance name is correct.")]
+    Create(String),
+    #[error("Not found the plugin named '{0}'. Make sure that the plugin name is correct.")]
+    NotFound(String),
+}
+
+/// The error types for WasmEdge Store.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum StoreError {
+    #[error("Fail to create Store context")]
+    Create,
+    #[error("Fail to find the target function ({0})")]
+    NotFoundFunc(String),
+    #[error("Fail to find the target function ({func_name}) in the module ({mod_name})")]
+    NotFoundFuncRegistered { func_name: String, mod_name: String },
+    #[error("Fail to find the target table ({0})")]
+    NotFoundTable(String),
+    #[error("Fail to find the target table ({table_name}) in the module ({mod_name})")]
+    NotFoundTableRegistered {
+        table_name: String,
+        mod_name: String,
+    },
+    #[error("Fail to find the target memory ({0})")]
+    NotFoundMem(String),
+    #[error("Fail to find the target memory ({mem_name}) in the module ({mod_name})")]
+    NotFoundMemRegistered { mem_name: String, mod_name: String },
+    #[error("Fail to find the target global ({0})")]
+    NotFoundGlobal(String),
+    #[error("Fail to find the target global ({global_name}) in the module ({mod_name})")]
+    NotFoundGlobalRegistered {
+        global_name: String,
+        mod_name: String,
+    },
+    #[error("Not found the target module ({0})")]
+    NotFoundModule(String),
+    #[error("Not found the active module")]
+    NotFoundActiveModule,
+}
+
+/// The error types for WasmEdge Vm.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum VmError {
+    #[error("Fail to create Vm context")]
+    Create,
+    #[error("Fail to create Vm context. It is required to provide a `WasiContext` instance for creating a Vm when the `wasi` config option is enabled.")]
+    CreateWithWasiContext,
+    #[error("Fail to get the type of the target function ({0})")]
+    NotFoundFuncType(String),
+    #[error("Fail to get module instance ({0})")]
+    NotFoundModule(String),
+    #[error("Fail to get Wasi module instance")]
+    NotFoundWasiModule,
+    #[error("Fail to get WasmEdge_Process module instance")]
+    NotFoundWasmEdgeProcessModule,
+    #[error("Fail to get WasiNn module instance")]
+    NotFoundWasiNnModule,
+    #[error("Fail to get WasiCryptoCommon module instance")]
+    NotFoundWasiCryptoCommonModule,
+    #[error("Fail to get WasiCryptoAsymmetricCommon module instance")]
+    NotFoundWasiCryptoAsymmetricCommonModule,
+    #[error("Fail to get WasiCryptoSymmetric module instance")]
+    NotFoundWasiCryptoSymmetricModule,
+    #[error("Fail to get WasiCryptoKx module instance")]
+    NotFoundWasiCryptoKxModule,
+    #[error("Fail to get WasiCryptoSignatures module instance")]
+    NotFoundWasiCryptoSignaturesModule,
+    #[error("Fail to get Store context")]
+    NotFoundStore,
+    #[error("Fail to get Statistics context")]
+    NotFoundStatistics,
+    #[error("Fail to get the target ImportModule (name: {0})")]
+    NotFoundImportModule(String),
+    #[error(
+        "Fail to register import module named {0}. Another import module with the same name has already existed."
+    )]
+    DuplicateImportModule(String),
+    #[error(
+        "Fail to register module named {0}. Another module instance with the same name has already existed."
+    )]
+    DuplicateModuleInstance(String),
+    #[error("Fail to get Loader context")]
+    NotFoundLoader,
+    #[error("Fail to get Validator context")]
+    NotFoundValidator,
+    #[error("Fail to get Executor context")]
+    NotFoundExecutor,
+    #[error("Try to register an invalid import module")]
+    InvalidImportModule,
+    #[error("Not found active module instance")]
+    NotFoundActiveModule,
+}
+
+/// The error types raised by WasmEdge Core.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum CoreError {
+    #[error("{0}")]
+    Common(CoreCommonError),
+    #[error("{0}")]
+    Load(CoreLoadError),
+    #[error("{0}")]
+    Validation(CoreValidationError),
+    #[error("{0}")]
+    Instantiation(CoreInstantiationError),
+    #[error("{0}")]
+    Execution(CoreExecutionError),
+    #[error("{0}")]
+    Component(CoreComponentError),
+    #[error("unknown error code {0}")]
+    UnknownError(u32),
+}
+
+/// The error type for the common errors from WasmEdge Core.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum CoreCommonError {
+    #[error("process terminated")]
+    Terminated,
+    #[error("generic runtime error")]
+    RuntimeError,
+    #[error("cost limit exceeded")]
+    CostLimitExceeded,
+    #[error("wrong VM workflow")]
+    WrongVMWorkflow,
+    #[error("wasm function not found")]
+    FuncNotFound,
+    #[error("AOT runtime is disabled in this build")]
+    AOTDisabled,
+    #[error("execution interrupted")]
+    Interrupted,
+    #[error("user defined error code")]
+    UserDefError,
+    #[error("wasm module hasn't passed validation yet")]
+    NotValidated,
+    #[error("set null value into non-nullable value type")]
+    NonNullRequired,
+    #[error("set value into const")]
+    SetValueToConst,
+    #[error("set value type mismatch")]
+    SetValueErrorType,
+}
+
+/// The error type for the load phase from WasmEdge Core.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum CoreLoadError {
+    #[error("Invalid file path")]
+    IllegalPath,
+    #[error("Read error")]
+    ReadError,
+    #[error("unexpected end")]
+    UnexpectedEnd,
+    #[error("magic header not detected")]
+    MalformedMagic,
+    #[error("unknown binary version")]
+    MalformedVersion,
+    #[error("malformed section id")]
+    MalformedSection,
+    #[error("section size mismatch")]
+    SectionSizeMismatch,
+    #[error("length out of bounds")]
+    LengthOutOfBounds,
+    #[error("unexpected content after last section")]
+    JunkSection,
+    #[error("function and code section have inconsistent lengths")]
+    IncompatibleFuncCode,
+    #[error("data count and data section have inconsistent lengths")]
+    IncompatibleDataCount,
+    #[error("data count section required")]
+    DataCountRequired,
+    #[error("malformed import kind")]
+    MalformedImportKind,
+    #[error("malformed export kind")]
+    MalformedExportKind,
+    #[error("zero byte expected")]
+    ExpectedZeroByte,
+    #[error("malformed mutability")]
+    InvalidMut,
+    #[error("too many locals")]
+    TooManyLocals,
+    #[error("malformed value type")]
+    MalformedValType,
+    #[error("malformed element type")]
+    MalformedElemType,
+    #[error("malformed reference type")]
+    MalformedRefType,
+    #[error("malformed UTF-8 encoding")]
+    MalformedUTF8,
+    #[error("integer too large")]
+    IntegerTooLarge,
+    #[error("integer representation too long")]
+    IntegerTooLong,
+    #[error("illegal opcode")]
+    IllegalOpCode,
+    #[error("invalid wasm grammar")]
+    IllegalGrammar,
+    #[error("shared memory must have maximum")]
+    SharedMemoryNoMax,
+    #[error("intrinsics table not found")]
+    IntrinsicsTableNotFound,
+    #[error("malformed table")]
+    MalformedTable,
+}
+
+/// The error type for the validation phase from WasmEdge Core.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum CoreValidationError {
+    #[error("alignment must not be larger than natural")]
+    InvalidAlignment,
+    #[error("type mismatch")]
+    TypeCheckFailed,
+    #[error("unknown label")]
+    InvalidLabelIdx,
+    #[error("unknown local")]
+    InvalidLocalIdx,
+    #[error("unknown field")]
+    InvalidFieldIdx,
+    #[error("unknown type")]
+    InvalidFuncTypeIdx,
+    #[error("unknown function")]
+    InvalidFuncIdx,
+    #[error("unknown table")]
+    InvalidTableIdx,
+    #[error("unknown memory")]
+    InvalidMemoryIdx,
+    #[error("unknown global")]
+    InvalidGlobalIdx,
+    #[error("unknown elem segment")]
+    InvalidElemIdx,
+    #[error("unknown data segment")]
+    InvalidDataIdx,
+    #[error("undeclared function reference")]
+    InvalidRefIdx,
+    #[error("constant expression required")]
+    ConstExprRequired,
+    #[error("duplicate export name")]
+    DupExportName,
+    #[error("global is immutable")]
+    ImmutableGlobal,
+    #[error("field is immutable")]
+    ImmutableField,
+    #[error("array is immutable")]
+    ImmutableArray,
+    #[error("invalid result arity")]
+    InvalidResultArity,
+    #[error("multiple tables")]
+    MultiTables,
+    #[error("multiple memories")]
+    MultiMemories,
+    #[error("size minimum must not be greater than maximum")]
+    InvalidLimit,
+    #[error("memory size must be at most 65536 pages (4GiB)")]
+    InvalidMemPages,
+    #[error("start function")]
+    InvalidStartFunc,
+    #[error("invalid lane index")]
+    InvalidLaneIdx,
+    #[error("uninitialized local")]
+    InvalidUninitLocal,
+    #[error("field type is not defaultable")]
+    InvalidNotDefaultableField,
+    #[error("array type is not defaultable")]
+    InvalidNotDefaultableArray,
+    #[error("field is packed")]
+    InvalidPackedField,
+    #[error("array is packed")]
+    InvalidPackedArray,
+    #[error("field is unpacked")]
+    InvalidUnpackedField,
+    #[error("array is unpacked")]
+    InvalidUnpackedArray,
+    #[error("invalid br ref type")]
+    InvalidBrRefType,
+    #[error("array types do not match")]
+    ArrayTypesMismatch,
+    #[error("array type is not numeric or vector")]
+    ArrayTypesNumtypeRequired,
+    #[error("sub type")]
+    InvalidSubType,
+}
+
+/// The error type for the instantiation phase from WasmEdge Core.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum CoreInstantiationError {
+    #[error("module name conflict")]
+    ModuleNameConflict,
+    #[error("incompatible import type")]
+    IncompatibleImportType,
+    #[error("unknown import")]
+    UnknownImport,
+    #[error("data segment does not fit")]
+    DataSegDoesNotFit,
+    #[error("elements segment does not fit")]
+    ElemSegDoesNotFit,
+}
+
+/// The error type for the execution phase from WasmEdge Core.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum CoreExecutionError {
+    #[error("wrong instance address")]
+    WrongInstanceAddress,
+    #[error("wrong instance index")]
+    WrongInstanceIndex,
+    #[error("instruction type mismatch")]
+    InstrTypeMismatch,
+    #[error("function signature mismatch")]
+    FuncSigMismatch,
+    #[error("integer divide by zero")]
+    DivideByZero,
+    #[error("integer overflow")]
+    IntegerOverflow,
+    #[error("invalid conversion to integer")]
+    InvalidConvToInt,
+    #[error("out of bounds table access")]
+    TableOutOfBounds,
+    #[error("out of bounds memory access")]
+    MemoryOutOfBounds,
+    #[error("out of bounds array access")]
+    ArrayOutOfBounds,
+    #[error("unreachable")]
+    Unreachable,
+    #[error("uninitialized element")]
+    UninitializedElement,
+    #[error("undefined element")]
+    UndefinedElement,
+    #[error("indirect call type mismatch")]
+    IndirectCallTypeMismatch,
+    #[error("host function failed")]
+    HostFuncFailed,
+    #[error("reference type mismatch")]
+    RefTypeMismatch,
+    #[error("unaligned atomic")]
+    UnalignedAtomicAccess,
+    #[error("expected shared memory")]
+    ExpectSharedMemory,
+    #[error("null reference")]
+    CastNullToNonNull,
+    #[error("null function reference")]
+    AccessNullFunc,
+    #[error("null structure reference")]
+    AccessNullStruct,
+    #[error("null array reference")]
+    AccessNullArray,
+    #[error("null i31 reference")]
+    AccessNullI31,
+    #[error("cast failure")]
+    CastFailed,
+}
+
+/// The error type for the component model phase from WasmEdge Core.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum CoreComponentError {
+    #[error("malformed sort")]
+    MalformedSort,
+    #[error("malformed alias target")]
+    MalformedAliasTarget,
+    #[error("malformed core instance")]
+    MalformedCoreInstance,
+    #[error("malformed instance")]
+    MalformedInstance,
+    #[error("malformed defined type")]
+    MalformedDefType,
+    #[error("malformed record type")]
+    MalformedRecordType,
+    #[error("malformed variant type")]
+    MalformedVariantType,
+    #[error("malformed tuple type")]
+    MalformedTupleType,
+    #[error("malformed flags type")]
+    MalformedFlagsType,
+    #[error("malformed canonical")]
+    MalformedCanonical,
+    #[error("unknown canonical option")]
+    UnknownCanonicalOption,
+    #[error("malformed name")]
+    MalformedName,
+}
+
+/// The error type for the host function definition.
+#[derive(Error, Clone, Debug, PartialEq, Eq)]
+pub enum HostFuncError {
+    #[error("User error: {0}")]
+    User(u32),
+    #[error("Runtime error: {0}")]
+    Runtime(u32),
+}
+
\ No newline at end of file diff --git a/src/wasmedge_types/lib.rs.html b/src/wasmedge_types/lib.rs.html new file mode 100644 index 000000000..996b4ba6a --- /dev/null +++ b/src/wasmedge_types/lib.rs.html @@ -0,0 +1,1007 @@ +lib.rs - source

wasmedge_types/
lib.rs

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
#![doc(
+    html_logo_url = "https://github.com/cncf/artwork/blob/master/projects/wasm-edge-runtime/icon/color/wasm-edge-runtime-icon-color.png?raw=true",
+    html_favicon_url = "https://raw.githubusercontent.com/cncf/artwork/49169bdbc88a7ce3c4a722c641cc2d548bd5c340/projects/wasm-edge-runtime/icon/color/wasm-edge-runtime-icon-color.svg"
+)]
+
+//! The [wasmedge-types](https://crates.io/crates/wasmedge-types) crate defines a group of common data structures used by both [wasmedge-sdk](https://crates.io/crates/wasmedge-sdk) and [wasmedge-sys](https://crates.io/crates/wasmedge-sys) crates.
+//!
+//! See also
+//!
+//! * [WasmEdge Runtime](https://wasmedge.org/)
+
+pub mod error;
+
+/// Defines WasmEdge reference types.
+#[derive(Debug, Copy, Clone, Eq, PartialEq)]
+pub enum RefType {
+    /// Refers to the infinite union of all references to host functions, regardless of their function types.
+    FuncRef,
+
+    /// Refers to the infinite union of all references to objects and that can be passed into WebAssembly under this type.
+    ExternRef,
+}
+
+impl From<ValType> for RefType {
+    fn from(value: ValType) -> Self {
+        match value {
+            ValType::FuncRef => RefType::FuncRef,
+            ValType::ExternRef => RefType::ExternRef,
+            _ => panic!("[wasmedge-types] Invalid WasmEdge_RefType: {value:#X?}"),
+        }
+    }
+}
+
+impl From<RefType> for ValType {
+    fn from(value: RefType) -> Self {
+        match value {
+            RefType::FuncRef => ValType::FuncRef,
+            RefType::ExternRef => ValType::ExternRef,
+        }
+    }
+}
+
+/// Defines WasmEdge value types.
+#[derive(Debug, Copy, Clone, Eq, PartialEq)]
+pub enum ValType {
+    /// 32-bit integer.
+    ///
+    /// Integers are not inherently signed or unsigned, their interpretation is determined by individual operations.
+    I32,
+    /// 64-bit integer.
+    ///
+    /// Integers are not inherently signed or unsigned, their interpretation is determined by individual operations.
+    I64,
+    /// 32-bit floating-point data as defined by the [IEEE 754-2019](https://ieeexplore.ieee.org/document/8766229).
+    F32,
+    /// 64-bit floating-point data as defined by the [IEEE 754-2019](https://ieeexplore.ieee.org/document/8766229).
+    F64,
+    /// 128-bit vector of packed integer or floating-point data.
+    ///
+    /// The packed data can be interpreted as signed or unsigned integers, single or double precision floating-point
+    /// values, or a single 128 bit type. The interpretation is determined by individual operations.
+    V128,
+    /// A reference to a host function.
+    FuncRef,
+    /// A reference to object.
+    ExternRef,
+    /// A reference that unsupported by c-api.
+    UnsupportedRef,
+}
+
+/// Defines the mutability property of WasmEdge Global variables.
+///
+/// `Mutability` determines the mutability property of a WasmEdge Global variable is either mutable or immutable.
+#[derive(Debug, Copy, Clone, Eq, PartialEq)]
+pub enum Mutability {
+    /// Identifies an immutable global variable.
+    Const,
+    /// Identifies a mutable global variable.
+    Var,
+}
+impl From<u32> for Mutability {
+    fn from(value: u32) -> Self {
+        match value {
+            0 => Mutability::Const,
+            1 => Mutability::Var,
+            _ => panic!("[wasmedge-types] Invalid WasmEdge_Mutability: {value:#X}"),
+        }
+    }
+}
+impl From<Mutability> for u32 {
+    fn from(value: Mutability) -> Self {
+        match value {
+            Mutability::Const => 0,
+            Mutability::Var => 1,
+        }
+    }
+}
+impl From<i32> for Mutability {
+    fn from(value: i32) -> Self {
+        match value {
+            0 => Mutability::Const,
+            1 => Mutability::Var,
+            _ => panic!("[wasmedge-types] Invalid WasmEdge_Mutability: {value:#X}"),
+        }
+    }
+}
+impl From<Mutability> for i32 {
+    fn from(value: Mutability) -> Self {
+        match value {
+            Mutability::Const => 0,
+            Mutability::Var => 1,
+        }
+    }
+}
+
+/// Defines WasmEdge AOT compiler optimization level.
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub enum CompilerOptimizationLevel {
+    /// Disable as many optimizations as possible.
+    O0,
+
+    /// Optimize quickly without destroying debuggability.
+    O1,
+
+    /// Optimize for fast execution as much as possible without triggering significant incremental compile time or code size growth.
+    O2,
+
+    ///  Optimize for fast execution as much as possible.
+    O3,
+
+    ///  Optimize for small code size as much as possible without triggering
+    ///  significant incremental compile time or execution time slowdowns.
+    Os,
+
+    /// Optimize for small code size as much as possible.
+    Oz,
+}
+impl From<u32> for CompilerOptimizationLevel {
+    fn from(val: u32) -> CompilerOptimizationLevel {
+        match val {
+            0 => CompilerOptimizationLevel::O0,
+            1 => CompilerOptimizationLevel::O1,
+            2 => CompilerOptimizationLevel::O2,
+            3 => CompilerOptimizationLevel::O3,
+            4 => CompilerOptimizationLevel::Os,
+            5 => CompilerOptimizationLevel::Oz,
+            _ => panic!("Unknown CompilerOptimizationLevel value: {val}"),
+        }
+    }
+}
+impl From<CompilerOptimizationLevel> for u32 {
+    fn from(val: CompilerOptimizationLevel) -> u32 {
+        match val {
+            CompilerOptimizationLevel::O0 => 0,
+            CompilerOptimizationLevel::O1 => 1,
+            CompilerOptimizationLevel::O2 => 2,
+            CompilerOptimizationLevel::O3 => 3,
+            CompilerOptimizationLevel::Os => 4,
+            CompilerOptimizationLevel::Oz => 5,
+        }
+    }
+}
+impl From<i32> for CompilerOptimizationLevel {
+    fn from(val: i32) -> CompilerOptimizationLevel {
+        match val {
+            0 => CompilerOptimizationLevel::O0,
+            1 => CompilerOptimizationLevel::O1,
+            2 => CompilerOptimizationLevel::O2,
+            3 => CompilerOptimizationLevel::O3,
+            4 => CompilerOptimizationLevel::Os,
+            5 => CompilerOptimizationLevel::Oz,
+            _ => panic!("Unknown CompilerOptimizationLevel value: {val}"),
+        }
+    }
+}
+impl From<CompilerOptimizationLevel> for i32 {
+    fn from(val: CompilerOptimizationLevel) -> i32 {
+        match val {
+            CompilerOptimizationLevel::O0 => 0,
+            CompilerOptimizationLevel::O1 => 1,
+            CompilerOptimizationLevel::O2 => 2,
+            CompilerOptimizationLevel::O3 => 3,
+            CompilerOptimizationLevel::Os => 4,
+            CompilerOptimizationLevel::Oz => 5,
+        }
+    }
+}
+
+/// Defines WasmEdge AOT compiler output binary format.
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub enum CompilerOutputFormat {
+    /// Native dynamic library format.
+    Native,
+
+    /// WebAssembly with AOT compiled codes in custom sections.
+    Wasm,
+}
+impl From<u32> for CompilerOutputFormat {
+    fn from(val: u32) -> CompilerOutputFormat {
+        match val {
+            0 => CompilerOutputFormat::Native,
+            1 => CompilerOutputFormat::Wasm,
+            _ => panic!("Unknown CompilerOutputFormat value: {val}"),
+        }
+    }
+}
+impl From<CompilerOutputFormat> for u32 {
+    fn from(val: CompilerOutputFormat) -> u32 {
+        match val {
+            CompilerOutputFormat::Native => 0,
+            CompilerOutputFormat::Wasm => 1,
+        }
+    }
+}
+impl From<i32> for CompilerOutputFormat {
+    fn from(val: i32) -> CompilerOutputFormat {
+        match val {
+            0 => CompilerOutputFormat::Native,
+            1 => CompilerOutputFormat::Wasm,
+            _ => panic!("Unknown CompilerOutputFormat value: {val}"),
+        }
+    }
+}
+impl From<CompilerOutputFormat> for i32 {
+    fn from(val: CompilerOutputFormat) -> i32 {
+        match val {
+            CompilerOutputFormat::Native => 0,
+            CompilerOutputFormat::Wasm => 1,
+        }
+    }
+}
+
+/// Defines WasmEdge host module registration enum.
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
+pub enum HostRegistration {
+    Wasi,
+    WasmEdgeProcess,
+    WasiNn,
+    WasiCryptoCommon,
+    WasiCryptoAsymmetricCommon,
+    WasiCryptoKx,
+    WasiCryptoSignatures,
+    WasiCryptoSymmetric,
+}
+impl From<u32> for HostRegistration {
+    fn from(val: u32) -> Self {
+        match val {
+            0 => HostRegistration::Wasi,
+            1 => HostRegistration::WasmEdgeProcess,
+            2 => HostRegistration::WasiNn,
+            3 => HostRegistration::WasiCryptoCommon,
+            4 => HostRegistration::WasiCryptoAsymmetricCommon,
+            5 => HostRegistration::WasiCryptoKx,
+            6 => HostRegistration::WasiCryptoSignatures,
+            7 => HostRegistration::WasiCryptoSymmetric,
+            _ => panic!("Unknown WasmEdge_HostRegistration value: {val}"),
+        }
+    }
+}
+impl From<HostRegistration> for u32 {
+    fn from(val: HostRegistration) -> u32 {
+        match val {
+            HostRegistration::Wasi => 0,
+            HostRegistration::WasmEdgeProcess => 1,
+            HostRegistration::WasiNn => 2,
+            HostRegistration::WasiCryptoCommon => 3,
+            HostRegistration::WasiCryptoAsymmetricCommon => 4,
+            HostRegistration::WasiCryptoKx => 5,
+            HostRegistration::WasiCryptoSignatures => 6,
+            HostRegistration::WasiCryptoSymmetric => 7,
+        }
+    }
+}
+
+/// Defines the type of external WasmEdge instances.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub enum ExternalInstanceType {
+    /// A WasmEdge instance that is a WasmEdge Func.
+    Func(FuncType),
+    /// A WasmEdge instance that is a WasmEdge Table.
+    Table(TableType),
+    /// A WasmEdge instance that is a WasmEdge Memory.
+    Memory(MemoryType),
+    /// A WasmEdge instance that is a WasmEdge Global.
+    Global(GlobalType),
+}
+impl From<u32> for ExternalInstanceType {
+    fn from(value: u32) -> Self {
+        match value {
+            0 => ExternalInstanceType::Func(FuncType::default()),
+            1 => ExternalInstanceType::Table(TableType::default()),
+            2 => ExternalInstanceType::Memory(MemoryType::default()),
+            3 => ExternalInstanceType::Global(GlobalType::default()),
+            _ => panic!("[wasmedge-types] Invalid WasmEdge_ExternalType: {value:#X}",),
+        }
+    }
+}
+impl From<i32> for ExternalInstanceType {
+    fn from(value: i32) -> Self {
+        match value {
+            0 => ExternalInstanceType::Func(FuncType::default()),
+            1 => ExternalInstanceType::Table(TableType::default()),
+            2 => ExternalInstanceType::Memory(MemoryType::default()),
+            3 => ExternalInstanceType::Global(GlobalType::default()),
+            _ => panic!("[wasmedge-types] Invalid WasmEdge_ExternalType: {value:#X}",),
+        }
+    }
+}
+impl std::fmt::Display for ExternalInstanceType {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        let message = match self {
+            ExternalInstanceType::Func(_) => "function",
+            ExternalInstanceType::Table(_) => "table",
+            ExternalInstanceType::Memory(_) => "memory",
+            ExternalInstanceType::Global(_) => "global",
+        };
+        write!(f, "{message}")
+    }
+}
+
+/// Struct of WasmEdge FuncType.
+///
+/// A [FuncType] is used to declare the types of the parameters and return values of a WasmEdge Func to be created.
+#[derive(Debug, Clone, PartialEq, Eq, Default)]
+pub struct FuncType {
+    args: Vec<ValType>,
+    returns: Vec<ValType>,
+}
+impl FuncType {
+    /// Creates a new [FuncType] with the given types of arguments and returns.
+    ///
+    /// # Arguments
+    ///
+    /// * `args` - A vector of [ValType]s that represent the types of the arguments.
+    ///
+    /// * `returns` - A vector of [ValType]s that represent the types of the returns.
+    pub fn new(args: Vec<ValType>, returns: Vec<ValType>) -> Self {
+        Self { args, returns }
+    }
+
+    /// Returns the types of the arguments of a host function.
+    pub fn args(&self) -> &[ValType] {
+        &self.args
+    }
+
+    /// Returns the number of the arguments of a host function.
+    pub fn args_len(&self) -> usize {
+        self.args.len()
+    }
+
+    /// Returns the types of the returns of a host function.
+    pub fn returns(&self) -> &[ValType] {
+        &self.returns
+    }
+
+    /// Returns the number of the returns of a host function.
+    pub fn returns_len(&self) -> usize {
+        self.returns.len()
+    }
+}
+
+/// Struct of WasmEdge TableType.
+///
+/// A [TableType] is used to declare the element type and the size range of a WasmEdge Table to be created.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct TableType {
+    elem_ty: RefType,
+    min: u32,
+    max: Option<u32>,
+}
+impl TableType {
+    /// Creates a new [TableType] with the given element type and the size range.
+    ///
+    /// # Arguments
+    ///
+    /// * `elem_ty` - The element type of the table to be created.
+    ///
+    /// * `min` - The minimum size of the table to be created.
+    ///
+    /// * `max` - The maximum size of the table to be created.    
+    pub fn new(elem_ty: RefType, min: u32, max: Option<u32>) -> Self {
+        Self { elem_ty, min, max }
+    }
+
+    /// Returns the element type defined in the [TableType].
+    pub fn elem_ty(&self) -> RefType {
+        self.elem_ty
+    }
+
+    /// Returns the minimum size defined in the [TableType].
+    pub fn minimum(&self) -> u32 {
+        self.min
+    }
+
+    /// Returns the maximum size defined in the [TableType].
+    pub fn maximum(&self) -> Option<u32> {
+        self.max
+    }
+}
+impl Default for TableType {
+    fn default() -> Self {
+        Self {
+            elem_ty: RefType::FuncRef,
+            min: 0,
+            max: None,
+        }
+    }
+}
+
+/// Struct of WasmEdge MemoryType.
+///
+/// A [MemoryType] is used to declare the size range of a WasmEdge Memory to be created.
+#[derive(Debug, Clone, PartialEq, Eq, Default)]
+pub struct MemoryType {
+    min: u32,
+    max: Option<u32>,
+    shared: bool,
+}
+impl MemoryType {
+    /// Creates a new [MemoryType] with the given size range.
+    ///
+    /// # Arguments
+    ///
+    /// * `min` - The minimum size of the memory to be created.
+    ///
+    /// * `max` - The maximum size of the memory to be created. If `shared` is set to true, `max` must be set.
+    ///
+    /// * `shared` - Enables shared memory if true.
+    pub fn new(min: u32, max: Option<u32>, shared: bool) -> WasmEdgeResult<Self> {
+        if shared && max.is_none() {
+            return Err(Box::new(error::WasmEdgeError::Mem(
+                error::MemError::CreateSharedType,
+            )));
+        }
+        Ok(Self { min, max, shared })
+    }
+
+    /// Returns the minimum size defined in the [MemoryType].
+    pub fn minimum(&self) -> u32 {
+        self.min
+    }
+
+    /// Returns the maximum size defined in the [MemoryType].
+    pub fn maximum(&self) -> Option<u32> {
+        self.max
+    }
+
+    /// Returns whether the memory is shared.
+    pub fn shared(&self) -> bool {
+        self.shared
+    }
+}
+
+/// Struct of WasmEdge GlobalType.
+///
+/// A [GlobalType] is used to declare the type of a WasmEdge Global to be created.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct GlobalType {
+    ty: ValType,
+    mutability: Mutability,
+}
+impl GlobalType {
+    /// Creates a new [GlobalType] with the given value type and mutability.
+    ///
+    /// # Arguments
+    ///
+    /// * `ty` - The value type of the global to be created.
+    ///
+    /// * `mutability` - The value mutability property of the global to be created.
+    pub fn new(ty: ValType, mutability: Mutability) -> Self {
+        Self { ty, mutability }
+    }
+
+    /// Returns the value type defined in the [GlobalType].
+    pub fn value_ty(&self) -> ValType {
+        self.ty
+    }
+
+    /// Returns the value mutability property defined in the [GlobalType].
+    pub fn mutability(&self) -> Mutability {
+        self.mutability
+    }
+}
+impl Default for GlobalType {
+    fn default() -> Self {
+        Self {
+            ty: ValType::I32,
+            mutability: Mutability::Var,
+        }
+    }
+}
+
+/// Parses in-memory bytes as either the [WebAssembly Text format](http://webassembly.github.io/spec/core/text/index.html), or a binary WebAssembly module.
+pub use wat::parse_bytes as wat2wasm;
+
+/// The WasmEdge result type.
+pub type WasmEdgeResult<T> = Result<T, Box<error::WasmEdgeError>>;
+
+/// This is a workaround solution to the [`never`](https://doc.rust-lang.org/std/primitive.never.html) type in Rust. It will be replaced by `!` once it is stable.
+#[derive(Debug, Clone)]
+pub enum NeverType {}
+unsafe impl Send for NeverType {}
+unsafe impl Sync for NeverType {}
+
\ No newline at end of file diff --git a/static.files/COPYRIGHT-eb44e4cf.txt b/static.files/COPYRIGHT-eb44e4cf.txt new file mode 100644 index 000000000..1447df792 --- /dev/null +++ b/static.files/COPYRIGHT-eb44e4cf.txt @@ -0,0 +1,50 @@ +# REUSE-IgnoreStart + +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.ttf.woff2, + SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, + SourceSerif4-It.ttf.woff2): + + Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name + 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United + States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerif4-LICENSE.md. + +This copyright file is intended to be distributed with rustdoc output. + +# REUSE-IgnoreEnd diff --git a/static.files/FiraSans-LICENSE-05ab6dbd.txt b/static.files/FiraSans-LICENSE-05ab6dbd.txt new file mode 100644 index 000000000..d7e9c149b --- /dev/null +++ b/static.files/FiraSans-LICENSE-05ab6dbd.txt @@ -0,0 +1,98 @@ +// REUSE-IgnoreStart + +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/FiraSans-Medium-e1aa3f0a.woff2 b/static.files/FiraSans-Medium-e1aa3f0a.woff2 new file mode 100644 index 000000000..7a1e5fc54 Binary files /dev/null and b/static.files/FiraSans-Medium-e1aa3f0a.woff2 differ diff --git a/static.files/FiraSans-Regular-0fe48ade.woff2 b/static.files/FiraSans-Regular-0fe48ade.woff2 new file mode 100644 index 000000000..e766e06cc Binary files /dev/null and b/static.files/FiraSans-Regular-0fe48ade.woff2 differ diff --git a/static.files/LICENSE-APACHE-a60eea81.txt b/static.files/LICENSE-APACHE-a60eea81.txt new file mode 100644 index 000000000..16fe87b06 --- /dev/null +++ b/static.files/LICENSE-APACHE-a60eea81.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/static.files/LICENSE-MIT-23f18e03.txt b/static.files/LICENSE-MIT-23f18e03.txt new file mode 100644 index 000000000..31aa79387 --- /dev/null +++ b/static.files/LICENSE-MIT-23f18e03.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/static.files/NanumBarunGothic-13b3dcba.ttf.woff2 b/static.files/NanumBarunGothic-13b3dcba.ttf.woff2 new file mode 100644 index 000000000..1866ad4bc Binary files /dev/null and b/static.files/NanumBarunGothic-13b3dcba.ttf.woff2 differ diff --git a/static.files/NanumBarunGothic-LICENSE-a37d393b.txt b/static.files/NanumBarunGothic-LICENSE-a37d393b.txt new file mode 100644 index 000000000..4b3edc29e --- /dev/null +++ b/static.files/NanumBarunGothic-LICENSE-a37d393b.txt @@ -0,0 +1,103 @@ +// REUSE-IgnoreStart + +Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), + +with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, +NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, +Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, +NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, +Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceCodePro-It-fc8b9304.ttf.woff2 b/static.files/SourceCodePro-It-fc8b9304.ttf.woff2 new file mode 100644 index 000000000..462c34efc Binary files /dev/null and b/static.files/SourceCodePro-It-fc8b9304.ttf.woff2 differ diff --git a/static.files/SourceCodePro-LICENSE-67f54ca7.txt b/static.files/SourceCodePro-LICENSE-67f54ca7.txt new file mode 100644 index 000000000..0d2941e14 --- /dev/null +++ b/static.files/SourceCodePro-LICENSE-67f54ca7.txt @@ -0,0 +1,97 @@ +// REUSE-IgnoreStart + +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceCodePro-Regular-8badfe75.ttf.woff2 b/static.files/SourceCodePro-Regular-8badfe75.ttf.woff2 new file mode 100644 index 000000000..10b558e0b Binary files /dev/null and b/static.files/SourceCodePro-Regular-8badfe75.ttf.woff2 differ diff --git a/static.files/SourceCodePro-Semibold-aa29a496.ttf.woff2 b/static.files/SourceCodePro-Semibold-aa29a496.ttf.woff2 new file mode 100644 index 000000000..5ec64eef0 Binary files /dev/null and b/static.files/SourceCodePro-Semibold-aa29a496.ttf.woff2 differ diff --git a/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2 b/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2 new file mode 100644 index 000000000..181a07f63 Binary files /dev/null and b/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2 differ diff --git a/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2 b/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2 new file mode 100644 index 000000000..2ae08a7be Binary files /dev/null and b/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2 differ diff --git a/static.files/SourceSerif4-LICENSE-a2cfd9d5.md b/static.files/SourceSerif4-LICENSE-a2cfd9d5.md new file mode 100644 index 000000000..175fa4f47 --- /dev/null +++ b/static.files/SourceSerif4-LICENSE-a2cfd9d5.md @@ -0,0 +1,98 @@ + + +Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. +Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + + diff --git a/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2 b/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2 new file mode 100644 index 000000000..0263fc304 Binary files /dev/null and b/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2 differ diff --git a/static.files/favicon-044be391.svg b/static.files/favicon-044be391.svg new file mode 100644 index 000000000..8b34b5119 --- /dev/null +++ b/static.files/favicon-044be391.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/static.files/favicon-32x32-6580c154.png b/static.files/favicon-32x32-6580c154.png new file mode 100644 index 000000000..69b8613ce Binary files /dev/null and b/static.files/favicon-32x32-6580c154.png differ diff --git a/static.files/main-5f194d8c.js b/static.files/main-5f194d8c.js new file mode 100644 index 000000000..3d672cb6e --- /dev/null +++ b/static.files/main-5f194d8c.js @@ -0,0 +1,11 @@ +"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden");const toggle=document.getElementById("toggle-all-docs");if(toggle){toggle.setAttribute("disabled","disabled")}}function showMain(){const main=document.getElementById(MAIN_ID);removeClass(main,"hidden");const mainHeading=main.querySelector(".main-heading");if(mainHeading&&searchState.rustdocToolbar){if(searchState.rustdocToolbar.parentElement){searchState.rustdocToolbar.parentElement.removeChild(searchState.rustdocToolbar)}mainHeading.appendChild(searchState.rustdocToolbar)}const toggle=document.getElementById("toggle-all-docs");if(toggle){toggle.removeAttribute("disabled")}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerHTML=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden");const mainHeading=elemToDisplay.querySelector(".main-heading");if(mainHeading&&searchState.rustdocToolbar){if(searchState.rustdocToolbar.parentElement){searchState.rustdocToolbar.parentElement.removeChild(searchState.rustdocToolbar)}mainHeading.appendChild(searchState.rustdocToolbar)}}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url,errorCallback){const script=document.createElement("script");script.src=url;if(errorCallback!==undefined){script.onerror=errorCallback}document.head.append(script)}if(getSettingsButton()){getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)}}window.searchState={rustdocToolbar:document.querySelector("rustdoc-toolbar"),loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit()}function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm);loadScript(resourcePath("search-index",".js"),sendSearchForm)}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},descShards:new Map(),loadDesc:async function({descShard,descIndex}){if(descShard.promise===null){descShard.promise=new Promise((resolve,reject)=>{descShard.resolve=resolve;const ds=descShard;const fname=`${ds.crate}-desc-${ds.shard}-`;const url=resourcePath(`search.desc/${descShard.crate}/${fname}`,".js",);loadScript(url,reject)})}const list=await descShard.promise;return list[descIndex]},loadedDescShard:function(crate,shard,data){this.descShards.get(crate)[shard].resolve(data.split("\n"))},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElems=document.querySelectorAll(`details > summary > section[id^="${implId}"]`,);onEachLazy(implElems,implElem=>{const numbered=/^(.+?)-([0-9]+)$/.exec(implElem.id);if(implElem.id!==implId&&(!numbered||numbered[1]!==implId)){return false}return onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/^(.+?)-([0-9]+)$/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0);return true}},)})}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":case"/":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementById("rustdoc-modnav");function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;link.textContent=name;const li=document.createElement("li");if(link.href===current_page){li.classList.add("current")}li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","),);for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementById("rustdoc-modnav");if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.children[0].innerText="Summary"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.children[0].innerText="Show all"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{if(document.querySelector(".rustdoc.src")){return}onEachLazy(document.querySelectorAll(":not(.scraped-example) > .example-wrap > pre:not(.example-line-numbers)",),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.querySelectorAll(".example-wrap > .example-line-numbers"),x=>{x.parentNode.removeChild(x)})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";document.body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px",)}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}document.body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){if(!getHelpButton().contains(document.activeElement)&&!getHelpButton().contains(event.relatedTarget)&&!getSettingsButton().contains(document.activeElement)&&!getSettingsButton().contains(event.relatedTarget)){window.hidePopoverMenus()}}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S / /","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll("rustdoc-toolbar .popover"),elem=>{elem.style.display="none"});const button=getHelpButton();if(button){removeClass(button,"help-open")}};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){const button=getHelpButton();addClass(button,"help-open");button.querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}const helpLink=document.querySelector(`#${HELP_BUTTON_ID} > a`);if(isHelpPage){buildHelpMenu()}else if(helpLink){helpLink.addEventListener("click",event=>{if(!helpLink.contains(helpLink)||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){window.rustdocToggleSrcSidebar()}e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px",)},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){function copyContentToClipboard(content){const el=document.createElement("textarea");el.value=content;el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el)}function copyButtonAnimation(button){button.classList.add("clicked");if(button.reset_button_timeout!==undefined){window.clearTimeout(button.reset_button_timeout)}button.reset_button_timeout=window.setTimeout(()=>{button.reset_button_timeout=undefined;button.classList.remove("clicked")},1000)}const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const title=document.querySelector("title").textContent.replace(" - Rust","");const[item,module]=title.split(" in ");const path=[item];if(module!==undefined){path.unshift(module)}copyContentToClipboard(path.join("::"));copyButtonAnimation(but)};function copyCode(codeElem){if(!codeElem){return}copyContentToClipboard(codeElem.textContent)}function getExampleWrap(event){let elem=event.target;while(!hasClass(elem,"example-wrap")){if(elem===document.body||elem.tagName==="A"||elem.tagName==="BUTTON"||hasClass(elem,"docblock")){return null}elem=elem.parentElement}return elem}function addCopyButton(event){const elem=getExampleWrap(event);if(elem===null){return}elem.removeEventListener("mouseover",addCopyButton);const parent=document.createElement("div");parent.className="button-holder";const runButton=elem.querySelector(".test-arrow");if(runButton!==null){parent.appendChild(runButton)}elem.appendChild(parent);const copyButton=document.createElement("button");copyButton.className="copy-button";copyButton.title="Copy code to clipboard";copyButton.addEventListener("click",()=>{copyCode(elem.querySelector("pre > code"));copyButtonAnimation(copyButton)});parent.appendChild(copyButton);if(!elem.parentElement.classList.contains("scraped-example")){return}const scrapedWrapped=elem.parentElement;window.updateScrapedExample(scrapedWrapped,parent)}function showHideCodeExampleButtons(event){const elem=getExampleWrap(event);if(elem===null){return}let buttons=elem.querySelector(".button-holder");if(buttons===null){addCopyButton(event);buttons=elem.querySelector(".button-holder");if(buttons===null){return}}buttons.classList.toggle("keep-visible")}onEachLazy(document.querySelectorAll(".docblock .example-wrap"),elem=>{elem.addEventListener("mouseover",addCopyButton);elem.addEventListener("click",showHideCodeExampleButtons)})}()) \ No newline at end of file diff --git a/static.files/normalize-9960930a.css b/static.files/normalize-9960930a.css new file mode 100644 index 000000000..469959f13 --- /dev/null +++ b/static.files/normalize-9960930a.css @@ -0,0 +1,2 @@ + /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ +html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/static.files/noscript-893ab5e7.css b/static.files/noscript-893ab5e7.css new file mode 100644 index 000000000..a6c18ecaf --- /dev/null +++ b/static.files/noscript-893ab5e7.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#595959;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#a5a5a5;--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(65%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}} \ No newline at end of file diff --git a/static.files/rust-logo-9a9549ea.svg b/static.files/rust-logo-9a9549ea.svg new file mode 100644 index 000000000..62424d8ff --- /dev/null +++ b/static.files/rust-logo-9a9549ea.svg @@ -0,0 +1,61 @@ + + + diff --git a/static.files/rustdoc-46132b98.css b/static.files/rustdoc-46132b98.css new file mode 100644 index 000000000..2efac0bd7 --- /dev/null +++ b/static.files/rustdoc-46132b98.css @@ -0,0 +1,53 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;--sidebar-elems-left-padding:24px;--clipboard-image:url('data:image/svg+xml,\ +\ +\ +');--copy-path-height:34px;--copy-path-width:33px;--checkmark-image:url('data:image/svg+xml,\ +\ +');--button-left-margin:4px;--button-border-radius:2px;--toolbar-button-border-radius:6px;--code-block-border-radius:6px;--impl-items-indent:0.3em;--docblock-indent:24px;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-0fe48ade.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-e1aa3f0a.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-6b053e98.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-ca3b17ed.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-6d4fd4c0.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-8badfe75.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-fc8b9304.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-aa29a496.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-13b3dcba.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;grid-area:main-heading-h1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{position:relative;display:grid;grid-template-areas:"main-heading-breadcrumbs main-heading-breadcrumbs" "main-heading-h1 main-heading-toolbar" "main-heading-sub-heading main-heading-toolbar";grid-template-columns:minmax(105px,1fr) minmax(0,max-content);grid-template-rows:minmax(25px,min-content) min-content min-content;padding-bottom:6px;margin-bottom:15px;}.rustdoc-breadcrumbs{grid-area:main-heading-breadcrumbs;line-height:1.25;display:flex;flex-wrap:wrap;align-items:end;padding-top:5px;}.rustdoc-breadcrumbs a{padding:4px 0;margin:-4px 0;z-index:1;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}.structfield,.sub-variant-field{margin:0.6em 0;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,.sub-heading,span.since,a.src,rustdoc-toolbar,summary.hideme,.scraped-example-list,.rustdoc-breadcrumbs,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.search-results li,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,.code-header,.type-signature{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap .src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li,.block ul{padding:0;margin:0;list-style:none;}.block ul a{padding-left:1rem;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-right:0.25rem;border-left:solid var(--sidebar-elems-left-padding) transparent;margin-left:calc(-0.25rem - var(--sidebar-elems-left-padding));background-clip:border-box;}.hide-toc #rustdoc-toc,.hide-toc .in-crate{display:none;}.hide-modnav #rustdoc-modnav{display:none;}.sidebar h2{text-wrap:balance;overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{text-wrap:balance;overflow-wrap:anywhere;font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:var(--sidebar-elems-left-padding);}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 calc(-16px - var(--sidebar-elems-left-padding));padding:0 var(--sidebar-elems-left-padding);text-align:center;}.sidebar-crate .logo-container img{margin-top:-16px;border-top:solid 16px transparent;box-sizing:content-box;position:relative;background-clip:border-box;z-index:1;}.sidebar-crate h2 a{display:block;border-left:solid var(--sidebar-elems-left-padding) transparent;background-clip:border-box;margin:0 calc(-24px + 0.25rem) 0 calc(-0.2rem - var(--sidebar-elems-left-padding));padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap>pre,.rustdoc .scraped-example .src-line-numbers,.rustdoc .scraped-example .src-line-numbers>pre{border-radius:6px;}.rustdoc .example-wrap>.example-line-numbers,.rustdoc .scraped-example .src-line-numbers,.rustdoc .scraped-example .src-line-numbers>pre{border-top-right-radius:0;border-bottom-right-radius:0;}.rustdoc .example-wrap>.example-line-numbers+pre,.rustdoc .scraped-example .rust{border-top-left-radius:0;border-bottom-left-radius:0;}.rustdoc .scraped-example{position:relative;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.scraped-example:not(.expanded) .example-wrap{max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .example-wrap{max-height:calc(1.5em * 10 + 10px);}.rustdoc:not(.src) .scraped-example:not(.expanded) .src-line-numbers,.rustdoc:not(.src) .scraped-example:not(.expanded) .src-line-numbers>pre,.rustdoc:not(.src) .scraped-example:not(.expanded) pre.rust{padding-bottom:0;overflow:auto hidden;}.rustdoc:not(.src) .scraped-example .src-line-numbers{padding-top:0;}.rustdoc:not(.src) .scraped-example.expanded .src-line-numbers{padding-bottom:0;}.rustdoc:not(.src) .example-wrap pre{overflow:auto;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap .src-line-numbers{min-width:fit-content;flex-grow:0;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;padding-right:2px;color:var(--src-line-numbers-span-color);}.rustdoc .scraped-example .example-wrap .src-line-numbers{padding:0;}.rustdoc .src-line-numbers pre{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:var(--docblock-indent);position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.sub-heading{font-size:1rem;flex-grow:0;grid-area:main-heading-sub-heading;line-height:1.25;padding-bottom:4px;}.main-heading rustdoc-toolbar,.main-heading .out-of-band{grid-area:main-heading-toolbar;}rustdoc-toolbar{display:flex;flex-direction:row;flex-wrap:nowrap;min-height:60px;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap,.example-wrap .src-line-numbers{background-color:var(--code-block-background-color);border-radius:var(--code-block-border-radius);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}.docblock .stab,.docblock-short .stab,.docblock p code{display:inline-block;}.docblock li{margin-bottom:.4em;}.docblock li p:not(:last-child){margin-bottom:.3em;}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:var(--docblock-indent);}.impl-items>.item-info{margin-left:calc(var(--docblock-indent) + var(--impl-items-indent));}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 0 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;margin-bottom:4px;}.src nav.sub{margin:0 0 -10px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:10px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.docblock-short a:not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;width:100%;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}.search-results-title+.sub-heading{color:var(--main-color);display:flex;align-items:baseline;white-space:nowrap;}#crate-search-div{position:relative;min-width:0;}#crate-search{padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;margin:0;padding:0;}.search-results>a{display:grid;grid-template-areas:"search-result-name search-result-desc" "search-result-type-signature search-result-type-signature";grid-template-columns:.6fr .4fr;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);column-gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;grid-area:search-result-desc;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;grid-area:search-result-name;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.search-results .type-signature{grid-area:search-result-type-signature;white-space:pre-wrap;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#settings.popover{--popover-arrow-offset:202px;top:calc(100% - 16px);}#help.popover{max-width:600px;--popover-arrow-offset:118px;top:calc(100% - 16px);}#help dt{float:left;clear:left;margin-right:0.5rem;}#help dd{margin-bottom:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;padding:0 0.5rem;text-wrap-style:balance;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side{display:flex;margin-bottom:20px;}.side-by-side>div{width:50%;padding:0 20px 0 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band,.sub-heading,rustdoc-toolbar{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}.example-wrap>a.test-arrow,.example-wrap .button-holder{visibility:hidden;position:absolute;top:4px;right:4px;z-index:1;}a.test-arrow{height:var(--copy-path-height);padding:6px 4px 0 11px;}a.test-arrow::before{content:url('data:image/svg+xml,');}.example-wrap .button-holder{display:flex;}@media not (pointer:coarse){.example-wrap:hover>a.test-arrow,.example-wrap:hover>.button-holder{visibility:visible;}}.example-wrap .button-holder.keep-visible{visibility:visible;}.example-wrap .button-holder>*{background:var(--main-background-color);cursor:pointer;border-radius:var(--button-border-radius);height:var(--copy-path-height);width:var(--copy-path-width);border:0;color:var(--code-example-button-color);}.example-wrap .button-holder>*:hover{color:var(--code-example-button-hover-color);}.example-wrap .button-holder>*:not(:first-child){margin-left:var(--button-left-margin);}.example-wrap .button-holder .copy-button{padding:2px 0 0 4px;}.example-wrap .button-holder .copy-button::before,.example-wrap .test-arrow::before{filter:var(--copy-path-img-filter);}.example-wrap .button-holder .copy-button::before{content:var(--clipboard-image);}.example-wrap .button-holder .copy-button:hover::before,.example-wrap .test-arrow:hover::before{filter:var(--copy-path-img-hover-filter);}.example-wrap .button-holder .copy-button.clicked::before{content:var(--checkmark-image);padding-right:5px;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.main-heading span.since::before{content:"Since ";}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}@keyframes targetfadein{from{background-color:var(--main-background-color);}10%{background-color:var(--target-border-color);}to{background-color:var(--target-background-color);}}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}@media not (prefers-reduced-motion){:target{animation:0.65s cubic-bezier(0,0,0.1,1.0) 0.1s targetfadein;}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{margin-top:0.25rem;display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#settings-menu,#help-button,button#toggle-all-docs{margin-left:var(--button-left-margin);display:flex;line-height:1.25;min-width:14px;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-button>a,button#toggle-all-docs{display:flex;align-items:center;justify-content:center;flex-direction:column;border:1px solid transparent;border-radius:var(--button-border-radius);color:var(--main-color);}#settings-menu>a,#help-button>a,button#toggle-all-docs{width:80px;border-radius:var(--toolbar-button-border-radius);}#settings-menu>a,#help-button>a{min-width:0;}#sidebar-button>a{background-color:var(--button-background-color);border-color:var(--border-color);width:33px;}#settings-menu>a:hover,#settings-menu>a:focus-visible,#help-button>a:hover,#help-button>a:focus-visible,#sidebar-button>a:hover,#sidebar-button>a:focus-visible,button#toggle-all-docs:hover,button#toggle-all-docs:focus-visible{border-color:var(--settings-button-border-focus);text-decoration:none;}#settings-menu>a:before{content:url('data:image/svg+xml,\ + ');width:18px;height:18px;filter:var(--settings-menu-filter);}button#toggle-all-docs:before{content:url('data:image/svg+xml,\ + ');width:18px;height:18px;filter:var(--settings-menu-filter);}#help-button>a:before{content:url('data:image/svg+xml,\ + \ + ?');width:18px;height:18px;filter:var(--settings-menu-filter);}button#toggle-all-docs:before,#help-button>a:before,#settings-menu>a:before{filter:var(--settings-menu-filter);margin:8px;}@media not (pointer:coarse){button#toggle-all-docs:hover:before,#help-button>a:hover:before,#settings-menu>a:hover:before{filter:var(--settings-menu-hover-filter);}}button[disabled]#toggle-all-docs{opacity:0.25;border:solid 1px var(--main-background-color);background-size:cover;}button[disabled]#toggle-all-docs:hover{border:solid 1px var(--main-background-color);cursor:not-allowed;}rustdoc-toolbar span.label{font-size:1rem;flex-grow:1;padding-bottom:4px;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:var(--copy-path-height);width:var(--copy-path-width);margin-left:10px;padding:0;padding-left:2px;border:0;font-size:0;}#copy-path::before{filter:var(--copy-path-img-filter);content:var(--clipboard-image);}#copy-path:hover::before{filter:var(--copy-path-img-hover-filter);}#copy-path.clicked::before{content:var(--checkmark-image);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.big-toggle{contain:inline-size;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,\ + ');content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}.impl-items>*:not(.item-info),.implementors-toggle>.docblock{margin-left:var(--impl-items-indent);}details.big-toggle>summary:not(.hideme)::before{left:-34px;top:9px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,\ + ');}details.toggle[open] >summary::after{content:"Collapse";}details.toggle:not([open])>summary .docblock{max-height:calc(1.5em + 0.75em);overflow-y:hidden;}details.toggle:not([open])>summary .docblock>:first-child{max-width:100%;overflow:hidden;width:fit-content;white-space:nowrap;position:relative;padding-right:1em;}details.toggle:not([open])>summary .docblock>:first-child::after{content:"…";position:absolute;right:0;top:0;bottom:0;z-index:1;background-color:var(--main-background-color);font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;padding-left:0.2em;}details.toggle:not([open])>summary .docblock>div:first-child::after{padding-top:calc(1.5em + 0.75em - 1.2rem);}details.toggle>summary .docblock{margin-top:0.75em;}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a:before,.sidebar-menu-toggle:before{content:url('data:image/svg+xml,\ + ');opacity:0.75;}.sidebar-menu-toggle:hover:before,.sidebar-menu-toggle:active:before,.sidebar-menu-toggle:focus:before{opacity:1;}.src #sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');opacity:0.75;}@media (max-width:850px){#search-tabs .count{display:block;}.side-by-side{flex-direction:column-reverse;}.side-by-side>div{width:auto;}}@media (max-width:700px){:root{--impl-items-indent:0.7em;}*[id]{scroll-margin-top:45px;}#copy-path{width:0;visibility:hidden;}rustdoc-toolbar span.label{display:none;}#settings-menu>a,#help-button>a,button#toggle-all-docs{width:33px;}#settings.popover{--popover-arrow-offset:86px;}#help.popover{--popover-arrow-offset:48px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.src .search-form{margin-left:40px;}.src .main-heading{margin-left:8px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.sidebar-menu-toggle:before{filter:var(--mobile-sidebar-menu-filter);}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.implementors-toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before{left:-20px;}summary>.item-info{margin-left:10px;}.impl-items>.item-info{margin-left:calc(var(--impl-items-indent) + 10px);}.src nav.sub{margin:0 0 -25px 0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}.item-table>li>.item-name{width:33%;}.item-table>li>div{overflow-wrap:anywhere;}}@media print{:root{--docblock-indent:0;}nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}main{padding:10px;}}@media (max-width:464px){:root{--docblock-indent:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example:not(.expanded) .example-wrap::before,.scraped-example:not(.expanded) .example-wrap::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .example-wrap::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .example-wrap::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded){width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded){overflow-x:hidden;}.scraped-example .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"],:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#595959;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#a5a5a5;--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(65%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--code-example-button-color:#b2b2b2;--code-example-button-hover-color:#fff;--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--settings-menu-filter:invert(70%);--settings-menu-hover-filter:invert(100%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/static.files/scrape-examples-d508a8a9.js b/static.files/scrape-examples-d508a8a9.js new file mode 100644 index 000000000..87b6065d8 --- /dev/null +++ b/static.files/scrape-examples-d508a8a9.js @@ -0,0 +1 @@ +"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelector(".src-line-numbers > pre");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines.children[line].offsetTop}else{const halfHeight=elt.offsetHeight/2;const offsetTop=lines.children[loc[0]].offsetTop;const lastLine=lines.children[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines.parentElement.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function createScrapeButton(parent,className,content){const button=document.createElement("button");button.className=className;button.innerText=content;parent.insertBefore(button,parent.firstChild);return button}window.updateScrapedExample=(example,buttonHolder)=>{let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");let expandButton=null;if(!example.classList.contains("expanded")){expandButton=createScrapeButton(buttonHolder,"expand","↕")}const isHidden=example.parentElement.classList.contains("more-scraped-examples");const locs=example.locs;if(locs.length>1){const next=createScrapeButton(buttonHolder,"next","≻");const prev=createScrapeButton(buttonHolder,"prev","≺");const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};prev.addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});next.addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded")}})}};function setupLoc(example,isHidden){example.locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);scrollToLoc(example,example.locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>setupLoc(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>setupLoc(el,true))})},{once:true})})})() \ No newline at end of file diff --git a/static.files/search-036cda7a.js b/static.files/search-036cda7a.js new file mode 100644 index 000000000..cf59d7797 --- /dev/null +++ b/static.files/search-036cda7a.js @@ -0,0 +1,6 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}function onEachBtwn(arr,func,funcBtwn){let skipped=true;for(const value of arr){if(!skipped){funcBtwn(value)}skipped=func(value)}}const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_GENERIC=itemTypes.indexOf("generic");const TY_IMPORT=itemTypes.indexOf("import");const TY_TRAIT=itemTypes.indexOf("trait");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;const REGEX_IDENT=/\p{ID_Start}\p{ID_Continue}*|_\p{ID_Continue}+/uy;const REGEX_INVALID_TYPE_FILTER=/[^a-z]/ui;const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost,);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1,)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1}function isSeparatorCharacter(c){return c===","||c==="="}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function skipWhitespace(parserState){while(parserState.pos0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function getFilteredNextElem(query,parserState,elems,isInGenerics){const start=parserState.pos;if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){throw["Expected type filter before ",":"]}getNextElem(query,parserState,elems,isInGenerics);if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}if(elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.normalizedPathLast;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;getNextElem(query,parserState,elems,isInGenerics)}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let hofParameters=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===")"){extra="("}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"," after ","="]}hofParameters=[...elems];elems.length=0;parserState.pos+=2;foundStopChar=true;foundSeparator=false;continue}else if(c===" "){parserState.pos+=1;continue}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"]}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra]}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;getFilteredNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;if(hofParameters){foundSeparator=false;if([...elems,...hofParameters].some(x=>x.bindingName)||parserState.isInBinding){throw["Unexpected ","="," within ","->"]}const hofElem=makePrimitiveElement("->",{generics:hofParameters,bindings:new Map([["output",[...elems]]]),typeFilter:null,});elems.length=0;elems[0]=hofElem}parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator}}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const bindingName=parserState.isInBinding;parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else if(name==="()"&&generics.length===1&&generics[0].name==="->"){generics[0].typeFilter=typeFilter;elems.push(generics[0])}else{if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",]}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}elems.push(makePrimitiveElement(name,{bindingName,generics}))}}else if(parserState.userQuery[parserState.pos]==="&"){if(parserState.typeFilter!==null&&parserState.typeFilter!=="primitive"){throw["Invalid search type: primitive ","&"," and ",parserState.typeFilter," both specified",]}parserState.typeFilter=null;parserState.pos+=1;let c=parserState.userQuery[parserState.pos];while(c===" "&&parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}else if(parserState.pos=end){throw["Found generics without a path"]}if(parserState.isInBinding){throw["Unexpected ","("," after ","="]}parserState.pos+=1;const typeFilter=parserState.typeFilter;parserState.typeFilter=null;getItemsBefore(query,parserState,generics,")");skipWhitespace(parserState);if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getFilteredNextElem(query,parserState,generics,isInGenerics);generics[generics.length-1].bindingName=makePrimitiveElement("output")}else{generics.push(makePrimitiveElement(null,{bindingName:makePrimitiveElement("output"),typeFilter:null,}))}parserState.typeFilter=typeFilter}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics,),)}}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();const match=query.match(REGEX_INVALID_TYPE_FILTER);if(match){throw["Unexpected ",match[0]," in type filter (before ",":",")",]}}function createQueryElement(query,parserState,name,generics,isInGenerics){const path=name.trim();if(path.length===0&&generics.length===0){throw["Unexpected ",parserState.userQuery[parserState.pos]]}if(query.literalSearch&&parserState.totalElems-parserState.genericsElems>0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name.trim()==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return makePrimitiveElement("never",{bindingName})}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/).map(x=>x.toLowerCase());if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){if(gen.name!==null){gen.bindingName.generics.unshift(gen)}bindings.set(gen.bindingName.name.toLowerCase().replace(/_/g,""),gen.bindingName.generics,);return false}return true}),bindings,typeFilter,bindingName,}}function makePrimitiveElement(name,extra){return Object.assign({name,id:null,fullPath:[name],pathWithoutLast:[],pathLast:name,normalizedPathLast:name,generics:[],bindings:new Map(),typeFilter:"primitive",bindingName:null,},extra)}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function getIdentEndPosition(parserState){let afterIdent=consumeIdent(parserState);let end=parserState.pos;let macroExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]," (not a valid identifier)"]}else{throw["Unexpected ",c," (not a valid identifier)"]}parserState.pos+=1;afterIdent=consumeIdent(parserState);end=parserState.pos}if(macroExclamation!==-1){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=macroExclamation}return end}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function consumeIdent(parserState){REGEX_IDENT.lastIndex=parserState.pos;const match=parserState.userQuery.match(REGEX_IDENT);if(match){parserState.pos+=match[0].length;return true}return false}function isPathSeparator(c){return c===":"||c===" "}class VlqHexDecoder{constructor(string,cons){this.string=string;this.cons=cons;this.offset=0;this.backrefQueue=[]}decodeList(){let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==125){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){let n=0;let c=this.string.charCodeAt(this.offset);if(c===123){this.offset+=1;return this.decodeList()}while(c<96){n=(n<<4)|(c&0xF);this.offset+=1;c=this.string.charCodeAt(this.offset)}n=(n<<4)|(c&0xF);const[sign,value]=[n&1,n>>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);if(c>=48&&c<64){this.offset+=1;return this.backrefQueue[c-48]}if(c===96){this.offset+=1;return this.cons(0)}const result=this.cons(this.decode());this.backrefQueue.unshift(result);if(this.backrefQueue.length>16){this.backrefQueue.pop()}return result}}class RoaringBitmap{constructor(str){const strdecoded=atob(str);const u8array=new Uint8Array(strdecoded.length);for(let j=0;j=4){offsets=[];for(let j=0;j>3]&(1<<(j&0x7))){const runcount=(u8array[i]|(u8array[i+1]<<8));i+=2;this.containers.push(new RoaringBitmapRun(runcount,u8array.slice(i,i+(runcount*4)),));i+=runcount*4}else if(this.cardinalities[j]>=4096){this.containers.push(new RoaringBitmapBits(u8array.slice(i,i+8192)));i+=8192}else{const end=this.cardinalities[j]*2;this.containers.push(new RoaringBitmapArray(this.cardinalities[j],u8array.slice(i,i+end),));i+=end}}}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;let left=0;let right=this.keys.length-1;while(left<=right){const mid=Math.floor((left+right)/2);const x=this.keys[mid];if(xkey){right=mid-1}else{return this.containers[mid].contains(value)}}return false}}class RoaringBitmapRun{constructor(runcount,array){this.runcount=runcount;this.array=array}contains(value){let left=0;let right=this.runcount-1;while(left<=right){const mid=Math.floor((left+right)/2);const i=mid*4;const start=this.array[i]|(this.array[i+1]<<8);const lenm1=this.array[i+2]|(this.array[i+3]<<8);if((start+lenm1)value){right=mid-1}else{return true}}return false}}class RoaringBitmapArray{constructor(cardinality,array){this.cardinality=cardinality;this.array=array}contains(value){let left=0;let right=this.cardinality-1;while(left<=right){const mid=Math.floor((left+right)/2);const i=mid*2;const x=this.array[i]|(this.array[i+1]<<8);if(xvalue){right=mid-1}else{return true}}return false}}class RoaringBitmapBits{constructor(array){this.array=array}contains(value){return!!(this.array[value>>3]&(1<<(value&7)))}}class NameTrie{constructor(){this.children=[];this.matches=[]}insert(name,id,tailTable){this.insertSubstring(name,0,id,tailTable)}insertSubstring(name,substart,id,tailTable){const l=name.length;if(substart===l){this.matches.push(id)}else{const sb=name.charCodeAt(substart);let child;if(this.children[sb]!==undefined){child=this.children[sb]}else{child=new NameTrie();this.children[sb]=child;let sste;if(substart>=2){const tail=name.substring(substart-2,substart+1);if(tailTable.has(tail)){sste=tailTable.get(tail)}else{sste=[];tailTable.set(tail,sste)}sste.push(child)}}child.insertSubstring(name,substart+1,id,tailTable)}}search(name,tailTable){const results=new Set();this.searchSubstringPrefix(name,0,results);if(results.size=3){const levParams=name.length>=6?new Lev2TParametricDescription(name.length):new Lev1TParametricDescription(name.length);this.searchLev(name,0,levParams,results);const tail=name.substring(0,3);if(tailTable.has(tail)){for(const entry of tailTable.get(tail)){entry.searchSubstringPrefix(name,3,results)}}}return[...results]}searchSubstringPrefix(name,substart,results){const l=name.length;if(substart===l){for(const match of this.matches){results.add(match)}let unprocessedChildren=[];for(const child of this.children){if(child){unprocessedChildren.push(child)}}let nextSet=[];while(unprocessedChildren.length!==0){const next=unprocessedChildren.pop();for(const child of next.children){if(child){nextSet.push(child)}}for(const match of next.matches){results.add(match)}if(unprocessedChildren.length===0){const tmp=unprocessedChildren;unprocessedChildren=nextSet;nextSet=tmp}}}else{const sb=name.charCodeAt(substart);if(this.children[sb]!==undefined){this.children[sb].searchSubstringPrefix(name,substart+1,results)}}}searchLev(name,substart,levParams,results){const stack=[[this,0]];const n=levParams.n;while(stack.length!==0){const[trie,levState]=stack.pop();for(const[charCode,child]of trie.children.entries()){if(!child){continue}const levPos=levParams.getPosition(levState);const vector=levParams.getVector(name,charCode,levPos,Math.min(name.length,levPos+(2*n)+1),);const newLevState=levParams.transition(levState,levPos,vector,);if(newLevState>=0){stack.push([child,newLevState]);if(levParams.isAccept(newLevState)){for(const match of child.matches){results.add(match)}}}}}}}class DocSearch{constructor(rawSearchIndex,rootPath,searchState){this.searchIndexDeprecated=new Map();this.searchIndexEmptyDesc=new Map();this.functionTypeFingerprint=null;this.typeNameIdMap=new Map();this.assocTypeIdNameMap=new Map();this.ALIASES=new Map();this.rootPath=rootPath;this.searchState=searchState;this.typeNameIdOfArray=this.buildTypeMapIndex("array");this.typeNameIdOfSlice=this.buildTypeMapIndex("slice");this.typeNameIdOfArrayOrSlice=this.buildTypeMapIndex("[]");this.typeNameIdOfTuple=this.buildTypeMapIndex("tuple");this.typeNameIdOfUnit=this.buildTypeMapIndex("unit");this.typeNameIdOfTupleOrUnit=this.buildTypeMapIndex("()");this.typeNameIdOfFn=this.buildTypeMapIndex("fn");this.typeNameIdOfFnMut=this.buildTypeMapIndex("fnmut");this.typeNameIdOfFnOnce=this.buildTypeMapIndex("fnonce");this.typeNameIdOfHof=this.buildTypeMapIndex("->");this.typeNameIdOfOutput=this.buildTypeMapIndex("output",true);this.typeNameIdOfReference=this.buildTypeMapIndex("reference");this.EMPTY_BINDINGS_MAP=new Map();this.EMPTY_GENERICS_ARRAY=[];this.TYPES_POOL=new Map();this.nameTrie=new NameTrie();this.tailTable=new Map();this.searchIndex=this.buildIndex(rawSearchIndex)}buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(this.typeNameIdMap.has(name)){const obj=this.typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=this.typeNameIdMap.size;this.typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}buildItemSearchTypeAll(types,paths,lowercasePaths){return types.length>0?types.map(type=>this.buildItemSearchType(type,paths,lowercasePaths)):this.EMPTY_GENERICS_ARRAY}buildItemSearchType(type,paths,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=this.EMPTY_GENERICS_ARRAY;bindings=this.EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=this.buildItemSearchTypeAll(type[GENERICS_DATA],paths,lowercasePaths,);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[this.buildItemSearchType(assocType,paths,lowercasePaths,true).id,this.buildItemSearchTypeAll(constraints,paths,lowercasePaths),]}))}else{bindings=this.EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,name:"",ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,unboxFlag:true,}}else if(pathIndex===0){result={id:null,name:"",ty:null,path:null,exactPath:null,generics,bindings,unboxFlag:true,}}else{const item=lowercasePaths[pathIndex-1];const id=this.buildTypeMapIndex(item.name,isAssocType);if(isAssocType){this.assocTypeIdNameMap.set(id,paths[pathIndex-1].name)}result={id,name:paths[pathIndex-1].name,ty:item.ty,path:item.path,exactPath:item.exactPath,generics,bindings,unboxFlag:item.unboxFlag,}}const cr=this.TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(v);if(!v2){ok=false;break}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v)}else if(v!==v2){ok=false;break}}if(ok){result.bindings=cr.bindings}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty&&cr.name===result.name&&cr.unboxFlag===result.unboxFlag){return cr}}this.TYPES_POOL.set(result.id,result);return result}buildFunctionTypeFingerprint(type,output){let input=type.id;if(input===this.typeNameIdOfArray||input===this.typeNameIdOfSlice){input=this.typeNameIdOfArrayOrSlice}if(input===this.typeNameIdOfTuple||input===this.typeNameIdOfUnit){input=this.typeNameIdOfTupleOrUnit}if(input===this.typeNameIdOfFn||input===this.typeNameIdOfFnMut||input===this.typeNameIdOfFnOnce){input=this.typeNameIdOfHof}const hashint1=k=>{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));output[3]+=1}for(const g of type.generics){this.buildFunctionTypeFingerprint(g,output)}const fb={id:null,ty:0,generics:this.EMPTY_GENERICS_ARRAY,bindings:this.EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;this.buildFunctionTypeFingerprint(fb,output)}}buildIndex(rawSearchIndex){const buildFunctionSearchTypeCallback=(paths,lowercasePaths)=>{return functionSearchType=>{if(functionSearchType===0){return null}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[this.buildItemSearchType(functionSearchType[INPUTS_DATA],paths,lowercasePaths,),]}else{inputs=this.buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],paths,lowercasePaths,)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[this.buildItemSearchType(functionSearchType[OUTPUT_DATA],paths,lowercasePaths,),]}else{output=this.buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],paths,lowercasePaths,)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;inoop);let descShard={crate,shard:0,start:0,len:itemDescShardDecoder.next(),promise:null,resolve:null,};const descShardList=[descShard];this.searchIndexDeprecated.set(crate,new RoaringBitmap(crateCorpus.c));this.searchIndexEmptyDesc.set(crate,new RoaringBitmap(crateCorpus.e));let descIndex=0;let lastParamNames=[];let normalizedName=crate.indexOf("_")===-1?crate:crate.replace(/_/g,"");const crateRow={crate,ty:3,name:crate,path:"",descShard,descIndex,exactPath:"",desc:crateCorpus.doc,parent:undefined,type:null,paramNames:lastParamNames,id,word:crate,normalizedName,bitIndex:0,implDisambiguator:null,};this.nameTrie.insert(normalizedName,id,this.tailTable);id+=1;searchIndex.push(crateRow);currentIndex+=1;if(!this.searchIndexEmptyDesc.get(crate).contains(0)){descIndex+=1}const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemReexports=new Map(crateCorpus.r);const itemParentIdxDecoder=new VlqHexDecoder(crateCorpus.i,noop=>noop);const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const itemParamNames=new Map(crateCorpus.P);const lowercasePaths=[];const itemFunctionDecoder=new VlqHexDecoder(crateCorpus.f,buildFunctionSearchTypeCallback(paths,lowercasePaths),);let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2&&elem[2]!==null){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}const exactPath=elem.length>3&&elem[3]!==null?itemPaths.get(elem[3]):path;const unboxFlag=elem.length>4&&!!elem[4];lowercasePaths.push({ty,name:name.toLowerCase(),path,exactPath,unboxFlag});paths[i]={ty,name,path,exactPath,unboxFlag}}lastPath="";len=itemTypes.length;let lastName="";let lastWord="";for(let i=0;i=descShard.len&&!this.searchIndexEmptyDesc.get(crate).contains(bitIndex)){descShard={crate,shard:descShard.shard+1,start:descShard.start+descShard.len,len:itemDescShardDecoder.next(),promise:null,resolve:null,};descIndex=0;descShardList.push(descShard)}const name=itemNames[i]===""?lastName:itemNames[i];const word=itemNames[i]===""?lastWord:itemNames[i].toLowerCase();const path=itemPaths.has(i)?itemPaths.get(i):lastPath;const paramNames=itemParamNames.has(i)?itemParamNames.get(i).split(","):lastParamNames;const type=itemFunctionDecoder.next();if(type!==null){if(type){const fp=this.functionTypeFingerprint.subarray(id*4,(id+1)*4);for(const t of type.inputs){this.buildFunctionTypeFingerprint(t,fp)}for(const t of type.output){this.buildFunctionTypeFingerprint(t,fp)}for(const w of type.where_clause){for(const t of w){this.buildFunctionTypeFingerprint(t,fp)}}}}const itemParentIdx=itemParentIdxDecoder.next();normalizedName=word.indexOf("_")===-1?word:word.replace(/_/g,"");const row={crate,ty:itemTypes.charCodeAt(i)-65,name,path,descShard,descIndex,exactPath:itemReexports.has(i)?itemPaths.get(itemReexports.get(i)):path,parent:itemParentIdx>0?paths[itemParentIdx-1]:undefined,type,paramNames,id,word,normalizedName,bitIndex,implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};this.nameTrie.insert(normalizedName,id,this.tailTable);id+=1;searchIndex.push(row);lastPath=row.path;lastParamNames=row.paramNames;if(!this.searchIndexEmptyDesc.get(crate).contains(bitIndex)){descIndex+=1}lastName=name;lastWord=word}if(aliases){const currentCrateAliases=new Map();this.ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length;this.searchState.descShards.set(crate,descShardList)}this.TYPES_POOL=new Map();return searchIndex}static parseQuery(userQuery){function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}function newParsedQuery(userQuery){return{userQuery,elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,hasReturnArrow:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function parseInput(query,parserState){let foundStopChar=true;while(parserState.pos"){if(isReturnArrow(parserState)){query.hasReturnArrow=true;break}throw["Unexpected ",c," (did you mean ","->","?)"]}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}throw["Unexpected ",c]}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;getFilteredNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}async execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}const buildHrefAndPath=item=>{let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;let exactPath=item.exactPath;if(type==="mod"){displayPath=path+"::";href=this.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=this.rootPath+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";exactPath="";href=this.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=this.rootPath+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.exactPath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::";exactPath=myparent.name}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=this.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=this.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href,`${exactPath}::${name}`]};function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}const transformResults=(results,typeInfo)=>{const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const res=buildHrefAndPath(this.searchIndex[result.id]);const obj=Object.assign({dist:result.dist,displayPath:pathSplitter(res[0]),},this.searchIndex[result.id]);obj.fullPath=res[2]+"|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}if(obj.ty===TY_IMPORT&&duplicates.has(res[2])){continue}if(duplicates.has(res[2]+"|"+TY_IMPORT)){continue}duplicates.add(obj.fullPath);duplicates.add(res[2]);if(typeInfo!==null){obj.displayTypeSignature=this.formatDisplayTypeSignature(obj,typeInfo)}obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out};this.formatDisplayTypeSignature=async(obj,typeInfo)=>{let fnInputs=null;let fnOutput=null;let mgens=null;if(typeInfo!=="elems"&&typeInfo!=="returned"){fnInputs=unifyFunctionTypes(obj.type.inputs,parsedQuery.elems,obj.type.where_clause,null,mgensScratch=>{fnOutput=unifyFunctionTypes(obj.type.output,parsedQuery.returned,obj.type.where_clause,mgensScratch,mgensOut=>{mgens=mgensOut;return true},0,);return!!fnOutput},0,)}else{const arr=typeInfo==="elems"?obj.type.inputs:obj.type.output;const highlighted=unifyFunctionTypes(arr,parsedQuery.elems,obj.type.where_clause,null,mgensOut=>{mgens=mgensOut;return true},0,);if(typeInfo==="elems"){fnInputs=highlighted}else{fnOutput=highlighted}}if(!fnInputs){fnInputs=obj.type.inputs}if(!fnOutput){fnOutput=obj.type.output}const mappedNames=new Map();const whereClause=new Map();const fnParamNames=obj.paramNames;const queryParamNames=[];const remapQuery=queryElem=>{if(queryElem.id<0){queryParamNames[-1-queryElem.id]=queryElem.name}if(queryElem.generics.length>0){queryElem.generics.forEach(remapQuery)}if(queryElem.bindings.size>0){[...queryElem.bindings.values()].flat().forEach(remapQuery)}};parsedQuery.elems.forEach(remapQuery);parsedQuery.returned.forEach(remapQuery);const pushText=(fnType,result)=>{if(!!(result.length%2)===!!fnType.highlighted){result.push("")}else if(result.length===0&&!!fnType.highlighted){result.push("");result.push("")}result[result.length-1]+=fnType.name};const writeHof=(fnType,result)=>{const hofOutput=fnType.bindings.get(this.typeNameIdOfOutput)||[];const hofInputs=fnType.generics;pushText(fnType,result);pushText({name:" (",highlighted:false},result);let needsComma=false;for(const fnType of hofInputs){if(needsComma){pushText({name:", ",highlighted:false},result)}needsComma=true;writeFn(fnType,result)}pushText({name:hofOutput.length===0?")":") -> ",highlighted:false,},result);if(hofOutput.length>1){pushText({name:"(",highlighted:false},result)}needsComma=false;for(const fnType of hofOutput){if(needsComma){pushText({name:", ",highlighted:false},result)}needsComma=true;writeFn(fnType,result)}if(hofOutput.length>1){pushText({name:")",highlighted:false},result)}};const writeSpecialPrimitive=(fnType,result)=>{if(fnType.id===this.typeNameIdOfArray||fnType.id===this.typeNameIdOfSlice||fnType.id===this.typeNameIdOfTuple||fnType.id===this.typeNameIdOfUnit){const[ob,sb]=fnType.id===this.typeNameIdOfArray||fnType.id===this.typeNameIdOfSlice?["[","]"]:["(",")"];pushText({name:ob,highlighted:fnType.highlighted},result);onEachBtwn(fnType.generics,nested=>writeFn(nested,result),()=>pushText({name:", ",highlighted:false},result),);pushText({name:sb,highlighted:fnType.highlighted},result);return true}else if(fnType.id===this.typeNameIdOfReference){pushText({name:"&",highlighted:fnType.highlighted},result);let prevHighlighted=false;onEachBtwn(fnType.generics,value=>{prevHighlighted=value.highlighted;writeFn(value,result)},value=>pushText({name:" ",highlighted:prevHighlighted&&value.highlighted,},result),);return true}else if(fnType.id===this.typeNameIdOfFn){writeHof(fnType,result);return true}return false};const writeFn=(fnType,result)=>{if(fnType.id<0){if(fnParamNames[-1-fnType.id]===""){const generics=fnType.generics.length>0?fnType.generics:obj.type.where_clause[-1-fnType.id];for(const nested of generics){writeFn(nested,result)}return}else if(mgens){for(const[queryId,fnId]of mgens){if(fnId===fnType.id){mappedNames.set(queryParamNames[-1-queryId],fnParamNames[-1-fnType.id],)}}}pushText({name:fnParamNames[-1-fnType.id],highlighted:!!fnType.highlighted,},result);const where=[];onEachBtwn(fnType.generics,nested=>writeFn(nested,where),()=>pushText({name:" + ",highlighted:false},where),);if(where.length>0){whereClause.set(fnParamNames[-1-fnType.id],where)}}else{if(fnType.ty===TY_PRIMITIVE){if(writeSpecialPrimitive(fnType,result)){return}}else if(fnType.ty===TY_TRAIT&&(fnType.id===this.typeNameIdOfFn||fnType.id===this.typeNameIdOfFnMut||fnType.id===this.typeNameIdOfFnOnce)){writeHof(fnType,result);return}pushText(fnType,result);let hasBindings=false;if(fnType.bindings.size>0){onEachBtwn(fnType.bindings,([key,values])=>{const name=this.assocTypeIdNameMap.get(key);if(values.length===1&&values[0].id<0&&`${fnType.name}::${name}`===fnParamNames[-1-values[0].id]){for(const value of values){writeFn(value,[])}return true}if(!hasBindings){hasBindings=true;pushText({name:"<",highlighted:false},result)}pushText({name,highlighted:false},result);pushText({name:values.length!==1?"=(":"=",highlighted:false,},result);onEachBtwn(values||[],value=>writeFn(value,result),()=>pushText({name:" + ",highlighted:false},result),);if(values.length!==1){pushText({name:")",highlighted:false},result)}},()=>pushText({name:", ",highlighted:false},result),)}if(fnType.generics.length>0){pushText({name:hasBindings?", ":"<",highlighted:false},result)}onEachBtwn(fnType.generics,value=>writeFn(value,result),()=>pushText({name:", ",highlighted:false},result),);if(hasBindings||fnType.generics.length>0){pushText({name:">",highlighted:false},result)}}};const type=[];onEachBtwn(fnInputs,fnType=>writeFn(fnType,type),()=>pushText({name:", ",highlighted:false},type),);pushText({name:" -> ",highlighted:false},type);onEachBtwn(fnOutput,fnType=>writeFn(fnType,type),()=>pushText({name:", ",highlighted:false},type),);return{type,mappedNames,whereClause}};const sortResults=async(results,typeInfo,preferredCrate)=>{const userQuery=parsedQuery.userQuery;const normalizedUserQuery=parsedQuery.userQuery.toLowerCase();const isMixedCase=normalizedUserQuery!==userQuery;const result_list=[];for(const result of results.values()){result.item=this.searchIndex[result.id];result.word=this.searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;if(isMixedCase){a=(aaa.item.name!==userQuery);b=(bbb.item.name!==userQuery);if(a!==b){return a-b}}a=(aaa.word!==normalizedUserQuery);b=(bbb.word!==normalizedUserQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=this.searchIndexDeprecated.get(aaa.item.crate).contains(aaa.item.bitIndex);b=this.searchIndexDeprecated.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=this.searchIndexEmptyDesc.get(aaa.item.crate).contains(aaa.item.bitIndex);b=this.searchIndexEmptyDesc.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list,typeInfo)};function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return null}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return solutionCb(mgens)?fnTypesIn:null}if(!fnTypesIn||fnTypesIn.length===0){return null}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const[i,fnType]of fnTypesIn.entries()){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(queryElem.id)&&mgens.get(queryElem.id)!==fnType.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(queryElem.id,fnType.id);if(!solutionCb||solutionCb(mgensScratch)){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({highlighted:true,},fnType,{generics:whereClause[-1-fnType.id],});return highlighted}}else if(solutionCb(mgens?new Map(mgens):null)){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({highlighted:true,},fnType,{generics:unifyGenericTypes(fnType.generics,queryElem.generics,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth,)||fnType.generics,});return highlighted}}for(const[i,fnType]of fnTypesIn.entries()){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}if(fnType.id<0){const highlightedGenerics=unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgens,solutionCb,unboxingDepth+1,);if(highlightedGenerics){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({highlighted:true,},fnType,{generics:highlightedGenerics,});return highlighted}}else{const highlightedGenerics=unifyFunctionTypes([...Array.from(fnType.bindings.values()).flat(),...fnType.generics],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth+1,);if(highlightedGenerics){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({},fnType,{generics:highlightedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,highlightedGenerics.splice(0,v.length)]})),});return highlighted}}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(queryElem.id)&&mgensScratch.get(queryElem.id)!==fnType.id){continue}mgensScratch.set(queryElem.id,fnType.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}let unifiedGenerics=[];let unifiedGenericsMgens=null;const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){unifiedGenerics=unifyGenericTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(unifiedGenerics!==null){unifiedGenericsMgens=simplifiedMgens;return true}}return false},unboxingDepth,);if(passesUnification){passesUnification.length=fl;passesUnification[flast]=passesUnification[i];passesUnification[i]=Object.assign({},fnType,{highlighted:true,generics:unifiedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,queryElem.bindings.has(k)?unifyFunctionTypes(v,queryElem.bindings.get(k),whereClause,unifiedGenericsMgens,solutionCb,unboxingDepth,):unifiedGenerics.splice(0,v.length)]})),});return passesUnification}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...bindings,...generics),queryElems,whereClause,mgens,solutionCb,unboxingDepth+1,);if(passesUnification){const highlightedGenerics=passesUnification.slice(i,i+generics.length+bindings.length,);const highlightedFnType=Object.assign({},fnType,{generics:highlightedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,highlightedGenerics.splice(0,v.length)]})),});return passesUnification.toSpliced(i,generics.length+bindings.length,highlightedFnType,)}}return null}function unifyGenericTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return null}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return solutionCb(mgens)?fnTypesIn:null}if(!fnTypesIn||fnTypesIn.length===0){return null}const fnType=fnTypesIn[0];const queryElem=queryElems[0];if(unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){if(fnType.id<0&&queryElem.id<0){if(!mgens||!mgens.has(queryElem.id)||mgens.get(queryElem.id)===fnType.id){const mgensScratch=new Map(mgens);mgensScratch.set(queryElem.id,fnType.id);const fnTypesRemaining=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgensScratch,solutionCb,unboxingDepth,);if(fnTypesRemaining){const highlighted=[fnType,...fnTypesRemaining];highlighted[0]=Object.assign({highlighted:true,},fnType,{generics:whereClause[-1-fnType.id],});return highlighted}}}else{let unifiedGenerics;const fnTypesRemaining=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgens,mgensScratch=>{const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){unifiedGenerics=unifyGenericTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(unifiedGenerics!==null){return true}}},unboxingDepth,);if(fnTypesRemaining){const highlighted=[fnType,...fnTypesRemaining];highlighted[0]=Object.assign({highlighted:true,},fnType,{generics:unifiedGenerics||fnType.generics,});return highlighted}}}if(unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){let highlightedRemaining;if(fnType.id<0){const highlightedGenerics=unifyFunctionTypes(whereClause[(-fnType.id)-1],[queryElem],whereClause,mgens,mgensScratch=>{const hl=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgensScratch,solutionCb,unboxingDepth,);if(hl){highlightedRemaining=hl}return hl},unboxingDepth+1,);if(highlightedGenerics){return[Object.assign({highlighted:true,},fnType,{generics:highlightedGenerics,}),...highlightedRemaining]}}else{const highlightedGenerics=unifyGenericTypes([...Array.from(fnType.bindings.values()).flat(),...fnType.generics,],[queryElem],whereClause,mgens,mgensScratch=>{const hl=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgensScratch,solutionCb,unboxingDepth,);if(hl){highlightedRemaining=hl}return hl},unboxingDepth+1,);if(highlightedGenerics){return[Object.assign({},fnType,{generics:highlightedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,highlightedGenerics.splice(0,v.length)]})),}),...highlightedRemaining]}}}return null}const unifyFunctionTypeIsMatchCandidate=(fnType,queryElem,mgensIn)=>{if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn&&mgensIn.has(queryElem.id)&&mgensIn.get(queryElem.id)!==fnType.id){return false}return true}else{if(queryElem.id===this.typeNameIdOfArrayOrSlice&&(fnType.id===this.typeNameIdOfSlice||fnType.id===this.typeNameIdOfArray)){}else if(queryElem.id===this.typeNameIdOfTupleOrUnit&&(fnType.id===this.typeNameIdOfTuple||fnType.id===this.typeNameIdOfUnit)){}else if(queryElem.id===this.typeNameIdOfHof&&(fnType.id===this.typeNameIdOfFn||fnType.id===this.typeNameIdOfFnMut||fnType.id===this.typeNameIdOfFnOnce)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false},unboxingDepth,);return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...binds,...simplifiedGenerics]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(fnType.id<0){if(!whereClause){return false}return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgens,unboxingDepth,)}else if(fnType.unboxFlag&&(fnType.generics.length>0||fnType.bindings.size>0)){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens,unboxingDepth,)}return false}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth)){return true}}return false}const checkType=(row,elem,whereClause,mgens,unboxingDepth)=>{if(unboxingDepth>=UNBOXING_LIMIT){return false}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&row.generics.length===0&&elem.generics.length===0&&row.bindings.size===0&&elem.bindings.size===0&&elem.id!==this.typeNameIdOfArrayOrSlice&&elem.id!==this.typeNameIdOfHof&&elem.id!==this.typeNameIdOfTupleOrUnit){return row.id===elem.id&&typePassesFilter(elem.typeFilter,row.ty)}else{return unifyFunctionTypes([row],[elem],whereClause,mgens,()=>true,unboxingDepth,)}};const checkTypeMgensForConflict=mgens=>{if(!mgens){return true}const fnTypes=new Set();for(const[_qid,fid]of mgens){if(fnTypes.has(fid)){return false}fnTypes.add(fid)}return true};function checkPath(contains,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter}dist_total+=dist}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist>maxPathEditDistance?null:ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,descShard:item.descShard,descIndex:item.descIndex,exactPath:item.exactPath,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,bitIndex:item.bitIndex,implDisambiguator:item.implDisambiguator,}}const handleAliases=async(ret,query,filterCrates,currentCrate)=>{const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(this.ALIASES.has(filterCrates)&&this.ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=this.ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(this.searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of this.ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(this.searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{return this.searchIndexEmptyDesc.get(alias.crate).contains(alias.bitIndex)?"":this.searchState.loadDesc(alias)};const[crateDescs,descs]=await Promise.all([Promise.all(crateAliases.map(fetchDesc)),Promise.all(aliases.map(fetchDesc)),]);const pushFunc=alias=>{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach((alias,i)=>{alias.desc=descs[i]});aliases.forEach(pushFunc);crateAliases.forEach((alias,i)=>{alias.desc=crateDescs[i]});crateAliases.forEach(pushFunc)};function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint,);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens,checkTypeMgensForConflict,0,)},0,)){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}const compareTypeFingerprints=(fullId,queryFingerprint)=>{const fh0=this.functionTypeFingerprint[fullId*4];const fh1=this.functionTypeFingerprint[(fullId*4)+1];const fh2=this.functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return this.functionTypeFingerprint[(fullId*4)+3]};const innerRunQuery=()=>{const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();const convertNameToId=(elem,isAssocType)=>{const loweredName=elem.pathLast.toLowerCase();if(this.typeNameIdMap.has(loweredName)&&(isAssocType||!this.typeNameIdMap.get(loweredName).assocOnly)){elem.id=this.typeNameIdMap.get(loweredName).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of this.typeNameIdMap){const dist=Math.min(editDistance(name,loweredName,maxEditDistance),editDistance(name,elem.normalizedPathLast,maxEditDistance),);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.normalizedPathLast)){elem.id=genericSymbols.get(elem.normalizedPathLast)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.normalizedPathLast,elem.id)}if(elem.typeFilter===-1&&elem.normalizedPathLast.length>=3){const maxPartDistance=Math.floor(elem.normalizedPathLast.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of this.typeNameIdMap.keys()){const dist=editDistance(name,elem.normalizedPathLast,maxPartDistance,);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!this.typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[this.typeNameIdMap.get(name).id,constraints]}),)};for(const elem of parsedQuery.elems){convertNameToId(elem);this.buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint)}for(const elem of parsedQuery.returned){convertNameToId(elem);this.buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint)}if(parsedQuery.foundElems===1&&!parsedQuery.hasReturnArrow){const elem=parsedQuery.elems[0];const handleNameSearch=id=>{const row=this.searchIndex[id];if(!typePassesFilter(elem.typeFilter,row.ty)||(filterCrates!==null&&row.crate!==filterCrates)){return}let pathDist=0;if(elem.fullPath.length>1){pathDist=checkPath(elem.pathWithoutLast,row);if(pathDist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,row.id,id,0,0,pathDist)}}else{addIntoResults(results_others,row.id,id,row.normalizedName.indexOf(elem.normalizedPathLast),editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance,),pathDist,maxEditDistance,)}};if(elem.normalizedPathLast!==""){const last=elem.normalizedPathLast;for(const id of this.nameTrie.search(last,this.tailTable)){handleNameSearch(id)}}const length=this.searchIndex.length;for(let i=0,nSearchIndex=length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=this.searchIndex.length;i{const descs=await Promise.all(list.map(result=>{return this.searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex)?"":this.searchState.loadDesc(result)}));for(const[i,result]of list.entries()){result.desc=descs[i]}}));if(parsedQuery.error!==null&&ret.others.length!==0){ret.query.error=null}return ret}}let rawSearchIndex;let docSearch;const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];let currentResults;function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&window.searchIndex.has(elem.value)){return elem.value}return null}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}async function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement(array.length===0&&query.error===null?"div":"ul",);if(array.length>0){output.className="search-results "+extraClass;const lis=Promise.all(array.map(async item=>{const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("span");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);if(item.displayTypeSignature){const{type,mappedNames,whereClause}=await item.displayTypeSignature;const displayType=document.createElement("div");type.forEach((value,index)=>{if(index%2!==0){const highlight=document.createElement("strong");highlight.appendChild(document.createTextNode(value));displayType.appendChild(highlight)}else{displayType.appendChild(document.createTextNode(value))}});if(mappedNames.size>0||whereClause.size>0){let addWhereLineFn=()=>{const line=document.createElement("div");line.className="where";line.appendChild(document.createTextNode("where"));displayType.appendChild(line);addWhereLineFn=()=>{}};for(const[qname,name]of mappedNames){if(name===qname){continue}addWhereLineFn();const line=document.createElement("div");line.className="where";line.appendChild(document.createTextNode(` ${qname} matches `));const lineStrong=document.createElement("strong");lineStrong.appendChild(document.createTextNode(name));line.appendChild(lineStrong);displayType.appendChild(line)}for(const[name,innerType]of whereClause){if(innerType.length<=1){continue}addWhereLineFn();const line=document.createElement("div");line.className="where";line.appendChild(document.createTextNode(` ${name}: `));innerType.forEach((value,index)=>{if(index%2!==0){const highlight=document.createElement("strong");highlight.appendChild(document.createTextNode(value));line.appendChild(highlight)}else{line.appendChild(document.createTextNode(value))}});displayType.appendChild(line)}}displayType.className="type-signature";link.appendChild(displayType)}link.appendChild(description);return link}));lis.then(lis=>{for(const li of lis){output.appendChild(li)}})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return output}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}async function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=DocSearch.parseQuery(searchState.input.value)}currentResults=results.query.userQuery;let currentTab=searchState.currentTab;if((currentTab===0&&results.others.length===0)||(currentTab===1&&results.in_args.length===0)||(currentTab===2&&results.returned.length===0)){if(results.others.length!==0){currentTab=0}else if(results.in_args.length){currentTab=1}else if(results.returned.length){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates="
in 
"+"
"}let output=`
\ +

Results

${crates}
`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",results.others.length)+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",results.others.length)+makeTabHeader(1,"In Parameters",results.in_args.length)+makeTabHeader(2,"In Return Types",results.returned.length)+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,results.others.length)+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const[ret_others,ret_in_args,ret_returned]=await Promise.all([addTab(results.others,results.query,currentTab===0),addTab(results.in_args,results.query,currentTab===1),addTab(results.returned,results.query,currentTab===2),]);const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others);resultsElem.appendChild(ret_in_args);resultsElem.appendChild(ret_returned);search.innerHTML=output;if(searchState.rustdocToolbar){search.querySelector(".main-heading").appendChild(searchState.rustdocToolbar)}const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}async function search(forced){const query=DocSearch.parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="\""+query.userQuery+"\" Search - Rust";updateSearchHistory(buildUrl(query.userQuery,filterCrates));await showResults(await docSearch.execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}function initSearch(searchIndx){rawSearchIndex=searchIndx;if(typeof window!=="undefined"){docSearch=new DocSearch(rawSearchIndex,ROOT_PATH,searchState);registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}else if(typeof exports!=="undefined"){docSearch=new DocSearch(rawSearchIndex,ROOT_PATH,searchState);exports.docSearch=docSearch;exports.parseQuery=DocSearch.parseQuery}}if(typeof exports!=="undefined"){exports.initSearch=initSearch}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}class ParametricDescription{constructor(w,n,minErrors){this.w=w;this.n=n;this.minErrors=minErrors}isAccept(absState){const state=Math.floor(absState/(this.w+1));const offset=absState%(this.w+1);return this.w-offset+this.minErrors[state]<=this.n}getPosition(absState){return absState%(this.w+1)}getVector(name,charCode,pos,end){let vector=0;for(let i=pos;i>5;const bitStart=bitLoc&31;if(bitStart+bitsPerValue<=32){return((data[dataLoc]>>bitStart)&this.MASKS[bitsPerValue-1])}else{const part=32-bitStart;return ~~(((data[dataLoc]>>bitStart)&this.MASKS[part-1])+((data[1+dataLoc]&this.MASKS[bitsPerValue-part-1])<{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){if(setting==="hr"){output+="
";continue}const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
+
${setting_name}
+
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `});output+=`\ +
+
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
\ + \ +
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Hide table of contents","js_name":"hide-toc","default":false,},{"name":"Hide module navigation","js_name":"hide-modnav","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){if(!getHelpButton().contains(document.activeElement)&&!getHelpButton().contains(event.relatedTarget)&&!getSettingsButton().contains(document.activeElement)&&!getSettingsButton().contains(event.relatedTarget)){window.hidePopoverMenus()}}if(!isSettingsPage){const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static.files/src-script-56102188.js b/static.files/src-script-56102188.js new file mode 100644 index 000000000..d0aebb851 --- /dev/null +++ b/static.files/src-script-56102188.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true")};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar()}else{window.rustdocShowSourceSidebar()}};function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static.files/storage-59e33391.js b/static.files/storage-59e33391.js new file mode 100644 index 000000000..5aac776b4 --- /dev/null +++ b/static.files/storage-59e33391.js @@ -0,0 +1,23 @@ +"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){const themeNames=getVar("themes").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(themeNames.indexOf(newThemeName)===-1){return}if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}if(getSettingValue("hide-toc")==="true"){addClass(document.documentElement,"hide-toc")}if(getSettingValue("hide-modnav")==="true"){addClass(document.documentElement,"hide-modnav")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",)}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",)}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}});class RustdocSearchElement extends HTMLElement{constructor(){super()}connectedCallback(){const rootPath=getVar("root-path");const currentCrate=getVar("current-crate");this.innerHTML=``}}window.customElements.define("rustdoc-search",RustdocSearchElement);class RustdocToolbarElement extends HTMLElement{constructor(){super()}connectedCallback(){if(this.firstElementChild){return}const rootPath=getVar("root-path");this.innerHTML=` +
+ Settings +
+
+ Help +
+ `}}window.customElements.define("rustdoc-toolbar",RustdocToolbarElement) \ No newline at end of file diff --git a/trait.impl/async_wasi/snapshots/common/memory/trait.Memory.js b/trait.impl/async_wasi/snapshots/common/memory/trait.Memory.js new file mode 100644 index 000000000..030a1af66 --- /dev/null +++ b/trait.impl/async_wasi/snapshots/common/memory/trait.Memory.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sys",[["impl Memory for Memory"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[295]} \ No newline at end of file diff --git a/trait.impl/async_wasi/snapshots/common/vfs/trait.WasiDir.js b/trait.impl/async_wasi/snapshots/common/vfs/trait.WasiDir.js new file mode 100644 index 000000000..a2a7ff8e6 --- /dev/null +++ b/trait.impl/async_wasi/snapshots/common/vfs/trait.WasiDir.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[17]} \ No newline at end of file diff --git a/trait.impl/async_wasi/snapshots/common/vfs/trait.WasiFile.js b/trait.impl/async_wasi/snapshots/common/vfs/trait.WasiFile.js new file mode 100644 index 000000000..a2a7ff8e6 --- /dev/null +++ b/trait.impl/async_wasi/snapshots/common/vfs/trait.WasiFile.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[17]} \ No newline at end of file diff --git a/trait.impl/async_wasi/snapshots/common/vfs/trait.WasiFileSys.js b/trait.impl/async_wasi/snapshots/common/vfs/trait.WasiFileSys.js new file mode 100644 index 000000000..a2a7ff8e6 --- /dev/null +++ b/trait.impl/async_wasi/snapshots/common/vfs/trait.WasiFileSys.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[17]} \ No newline at end of file diff --git a/trait.impl/async_wasi/snapshots/common/vfs/trait.WasiNode.js b/trait.impl/async_wasi/snapshots/common/vfs/trait.WasiNode.js new file mode 100644 index 000000000..a2a7ff8e6 --- /dev/null +++ b/trait.impl/async_wasi/snapshots/common/vfs/trait.WasiNode.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[17]} \ No newline at end of file diff --git a/trait.impl/async_wasi/snapshots/common/vfs/virtual_sys/trait.WasiVirtualDir.js b/trait.impl/async_wasi/snapshots/common/vfs/virtual_sys/trait.WasiVirtualDir.js new file mode 100644 index 000000000..a2a7ff8e6 --- /dev/null +++ b/trait.impl/async_wasi/snapshots/common/vfs/virtual_sys/trait.WasiVirtualDir.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[17]} \ No newline at end of file diff --git a/trait.impl/async_wasi/snapshots/common/vfs/virtual_sys/trait.WasiVirtualFile.js b/trait.impl/async_wasi/snapshots/common/vfs/virtual_sys/trait.WasiVirtualFile.js new file mode 100644 index 000000000..a2a7ff8e6 --- /dev/null +++ b/trait.impl/async_wasi/snapshots/common/vfs/virtual_sys/trait.WasiVirtualFile.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[17]} \ No newline at end of file diff --git a/trait.impl/bitflags/traits/trait.Flags.js b/trait.impl/bitflags/traits/trait.Flags.js new file mode 100644 index 000000000..3a5786b98 --- /dev/null +++ b/trait.impl/bitflags/traits/trait.Flags.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Flags for FdFlags"],["impl Flags for Lookupflags"],["impl Flags for OFlags"],["impl Flags for RiFlags"],["impl Flags for RoFlags"],["impl Flags for SdFlags"],["impl Flags for SiFlags"],["impl Flags for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1418]} \ No newline at end of file diff --git a/trait.impl/bitflags/traits/trait.PublicFlags.js b/trait.impl/bitflags/traits/trait.PublicFlags.js new file mode 100644 index 000000000..5fbec4e20 --- /dev/null +++ b/trait.impl/bitflags/traits/trait.PublicFlags.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl PublicFlags for FdFlags"],["impl PublicFlags for Lookupflags"],["impl PublicFlags for OFlags"],["impl PublicFlags for RiFlags"],["impl PublicFlags for RoFlags"],["impl PublicFlags for SdFlags"],["impl PublicFlags for SiFlags"],["impl PublicFlags for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1466]} \ No newline at end of file diff --git a/trait.impl/core/clone/trait.Clone.js b/trait.impl/core/clone/trait.Clone.js new file mode 100644 index 000000000..81ee47d28 --- /dev/null +++ b/trait.impl/core/clone/trait.Clone.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Clone for AddressFamily"],["impl Clone for ConnectState"],["impl Clone for SocketType"],["impl Clone for Subscription"],["impl Clone for SubscriptionFdType"],["impl Clone for Advice"],["impl Clone for AddressFamily"],["impl Clone for Errno"],["impl Clone for SubscriptionClock"],["impl Clone for SubscriptionFd"],["impl Clone for WasiSocketState"],["impl Clone for __wasi_address_t"],["impl Clone for __wasi_addrinfo_t"],["impl Clone for __wasi_ciovec_t"],["impl Clone for __wasi_dirent_t"],["impl Clone for __wasi_event_fd_readwrite_t"],["impl Clone for __wasi_event_t"],["impl Clone for __wasi_fdstat_t"],["impl Clone for __wasi_filestat_t"],["impl Clone for __wasi_iovec_t"],["impl Clone for __wasi_prestat_dir_t"],["impl Clone for __wasi_prestat_t"],["impl Clone for __wasi_sockaddr_in_t"],["impl Clone for __wasi_sockaddr_t"],["impl Clone for __wasi_subscription_clock_t"],["impl Clone for __wasi_subscription_fd_readwrite_t"],["impl Clone for __wasi_subscription_t"],["impl Clone for __wasi_subscription_u_t"],["impl Clone for __wasi_timeval"],["impl Clone for FdFlags"],["impl Clone for FdStat"],["impl Clone for FileType"],["impl Clone for Filestat"],["impl Clone for OFlags"],["impl Clone for WASIRights"],["impl Clone for WasiAddrinfo"],["impl Clone for WasiSockaddr"],["impl Clone for __wasi_prestat_u_t"],["impl Clone for __wasi_subscription_u_u_t"],["impl<T: Clone + Sized> Clone for WasmPtr<T>"]]],["wasmedge_sdk",[["impl Clone for ExecutionTarget"],["impl Clone for GraphEncoding"],["impl Clone for Val"],["impl Clone for CommonConfigOptions"],["impl Clone for CompilerConfigOptions"],["impl Clone for Config"],["impl Clone for RuntimeConfigOptions"],["impl Clone for StatisticsConfigOptions"],["impl Clone for Module"],["impl Clone for Statistics"],["impl Clone for ExternRef"]]],["wasmedge_sys",[["impl Clone for ProgramOptionType"],["impl Clone for AsyncCx"],["impl Clone for WasmEdge_ASTModuleContext"],["impl Clone for WasmEdge_Async"],["impl Clone for WasmEdge_Bytes"],["impl Clone for WasmEdge_CallingFrameContext"],["impl Clone for WasmEdge_CompilerContext"],["impl Clone for WasmEdge_ConfigureContext"],["impl Clone for WasmEdge_ExecutorContext"],["impl Clone for WasmEdge_ExportTypeContext"],["impl Clone for WasmEdge_FunctionInstanceContext"],["impl Clone for WasmEdge_FunctionTypeContext"],["impl Clone for WasmEdge_GlobalInstanceContext"],["impl Clone for WasmEdge_GlobalTypeContext"],["impl Clone for WasmEdge_ImportTypeContext"],["impl Clone for WasmEdge_Limit"],["impl Clone for WasmEdge_LoaderContext"],["impl Clone for WasmEdge_MemoryInstanceContext"],["impl Clone for WasmEdge_MemoryTypeContext"],["impl Clone for WasmEdge_ModuleDescriptor"],["impl Clone for WasmEdge_ModuleInstanceContext"],["impl Clone for WasmEdge_PluginContext"],["impl Clone for WasmEdge_PluginDescriptor"],["impl Clone for WasmEdge_PluginVersionData"],["impl Clone for WasmEdge_ProgramOption"],["impl Clone for WasmEdge_Result"],["impl Clone for WasmEdge_StatisticsContext"],["impl Clone for WasmEdge_StoreContext"],["impl Clone for WasmEdge_String"],["impl Clone for WasmEdge_TableInstanceContext"],["impl Clone for WasmEdge_TableTypeContext"],["impl Clone for WasmEdge_TagInstanceContext"],["impl Clone for WasmEdge_TagTypeContext"],["impl Clone for WasmEdge_VMContext"],["impl Clone for WasmEdge_ValType"],["impl Clone for WasmEdge_ValidatorContext"],["impl Clone for WasmEdge_Value"],["impl Clone for Plugin"],["impl Clone for Statistics"],["impl Clone for WasmValue"],["impl<D: Clone, Ref> Clone for InnerRef<D, &mut Ref>"]]],["wasmedge_types",[["impl Clone for CompilerOptimizationLevel"],["impl Clone for CompilerOutputFormat"],["impl Clone for ExternalInstanceType"],["impl Clone for HostRegistration"],["impl Clone for Mutability"],["impl Clone for NeverType"],["impl Clone for RefType"],["impl Clone for ValType"],["impl Clone for CoreCommonError"],["impl Clone for CoreComponentError"],["impl Clone for CoreError"],["impl Clone for CoreExecutionError"],["impl Clone for CoreInstantiationError"],["impl Clone for CoreLoadError"],["impl Clone for CoreValidationError"],["impl Clone for ExportError"],["impl Clone for FuncError"],["impl Clone for GlobalError"],["impl Clone for HostFuncError"],["impl Clone for ImportError"],["impl Clone for InstanceError"],["impl Clone for MemError"],["impl Clone for PluginError"],["impl Clone for StoreError"],["impl Clone for TableError"],["impl Clone for VmError"],["impl Clone for WasmEdgeError"],["impl Clone for FuncType"],["impl Clone for GlobalType"],["impl Clone for MemoryType"],["impl Clone for TableType"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[13508,3207,13140,8846]} \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.Eq.js b/trait.impl/core/cmp/trait.Eq.js new file mode 100644 index 000000000..ad51e750a --- /dev/null +++ b/trait.impl/core/cmp/trait.Eq.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Eq for ConnectState"],["impl Eq for Errno"],["impl Eq for FileType"],["impl Eq for Filestat"]]],["wasmedge_sdk",[["impl Eq for ExecutionTarget"],["impl Eq for GraphEncoding"]]],["wasmedge_sys",[["impl Eq for ProgramOptionType"],["impl Eq for WasmEdgeString"]]],["wasmedge_types",[["impl Eq for CompilerOptimizationLevel"],["impl Eq for CompilerOutputFormat"],["impl Eq for ExternalInstanceType"],["impl Eq for HostRegistration"],["impl Eq for Mutability"],["impl Eq for RefType"],["impl Eq for ValType"],["impl Eq for CoreCommonError"],["impl Eq for CoreComponentError"],["impl Eq for CoreError"],["impl Eq for CoreExecutionError"],["impl Eq for CoreInstantiationError"],["impl Eq for CoreLoadError"],["impl Eq for CoreValidationError"],["impl Eq for ExportError"],["impl Eq for FuncError"],["impl Eq for GlobalError"],["impl Eq for HostFuncError"],["impl Eq for ImportError"],["impl Eq for InstanceError"],["impl Eq for MemError"],["impl Eq for PluginError"],["impl Eq for StoreError"],["impl Eq for TableError"],["impl Eq for VmError"],["impl Eq for WasmEdgeError"],["impl Eq for FuncType"],["impl Eq for GlobalType"],["impl Eq for MemoryType"],["impl Eq for TableType"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1185,575,588,8191]} \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.Ord.js b/trait.impl/core/cmp/trait.Ord.js new file mode 100644 index 000000000..e9b41bad6 --- /dev/null +++ b/trait.impl/core/cmp/trait.Ord.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sdk",[["impl Ord for ExecutionTarget"],["impl Ord for GraphEncoding"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[580]} \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.PartialEq.js b/trait.impl/core/cmp/trait.PartialEq.js new file mode 100644 index 000000000..c7c47231b --- /dev/null +++ b/trait.impl/core/cmp/trait.PartialEq.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl PartialEq for ConnectState"],["impl PartialEq for Errno"],["impl PartialEq for FileType"],["impl PartialEq for Filestat"],["impl PartialEq for SdFlags"]]],["wasmedge_sdk",[["impl PartialEq for ExecutionTarget"],["impl PartialEq for GraphEncoding"]]],["wasmedge_sys",[["impl PartialEq for ProgramOptionType"],["impl PartialEq for WasmEdgeString"]]],["wasmedge_types",[["impl PartialEq for CompilerOptimizationLevel"],["impl PartialEq for CompilerOutputFormat"],["impl PartialEq for ExternalInstanceType"],["impl PartialEq for HostRegistration"],["impl PartialEq for Mutability"],["impl PartialEq for RefType"],["impl PartialEq for ValType"],["impl PartialEq for CoreCommonError"],["impl PartialEq for CoreComponentError"],["impl PartialEq for CoreError"],["impl PartialEq for CoreExecutionError"],["impl PartialEq for CoreInstantiationError"],["impl PartialEq for CoreLoadError"],["impl PartialEq for CoreValidationError"],["impl PartialEq for ExportError"],["impl PartialEq for FuncError"],["impl PartialEq for GlobalError"],["impl PartialEq for HostFuncError"],["impl PartialEq for ImportError"],["impl PartialEq for InstanceError"],["impl PartialEq for MemError"],["impl PartialEq for PluginError"],["impl PartialEq for StoreError"],["impl PartialEq for TableError"],["impl PartialEq for VmError"],["impl PartialEq for WasmEdgeError"],["impl PartialEq for FuncType"],["impl PartialEq for GlobalType"],["impl PartialEq for MemoryType"],["impl PartialEq for TableType"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1579,617,630,8821]} \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.PartialOrd.js b/trait.impl/core/cmp/trait.PartialOrd.js new file mode 100644 index 000000000..f525d2b1c --- /dev/null +++ b/trait.impl/core/cmp/trait.PartialOrd.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sdk",[["impl PartialOrd for ExecutionTarget"],["impl PartialOrd for GraphEncoding"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[622]} \ No newline at end of file diff --git a/trait.impl/core/convert/trait.AsMut.js b/trait.impl/core/convert/trait.AsMut.js new file mode 100644 index 000000000..a1b0db428 --- /dev/null +++ b/trait.impl/core/convert/trait.AsMut.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sys",[["impl AsMut<AsyncImportObject<WasiCtx>> for AsyncWasiModule"],["impl AsMut<WasmEdge_String> for WasmEdgeString"],["impl AsMut<Function> for AsyncFunction"],["impl AsMut<Instance> for AsyncInstance"],["impl AsMut<Instance> for WasiModule"],["impl<T: Send> AsMut<ImportModule<T>> for AsyncImportObject<T>"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2991]} \ No newline at end of file diff --git a/trait.impl/core/convert/trait.AsRef.js b/trait.impl/core/convert/trait.AsRef.js new file mode 100644 index 000000000..ebda9d63d --- /dev/null +++ b/trait.impl/core/convert/trait.AsRef.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sys",[["impl AsRef<AsyncImportObject<WasiCtx>> for AsyncWasiModule"],["impl AsRef<WasmEdge_String> for WasmEdgeString"],["impl AsRef<Function> for AsyncFunction"],["impl AsRef<Instance> for AsyncInstance"],["impl AsRef<Instance> for WasiModule"],["impl<T: Send> AsRef<ImportModule<T>> for AsyncImportObject<T>"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2991]} \ No newline at end of file diff --git a/trait.impl/core/convert/trait.From.js b/trait.impl/core/convert/trait.From.js new file mode 100644 index 000000000..ac7c139f1 --- /dev/null +++ b/trait.impl/core/convert/trait.From.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl From<&FdStat> for __wasi_fdstat_t"],["impl From<&ReaddirEntity> for __wasi_dirent_t"],["impl From<&Error> for Errno"],["impl From<(u64, Filestat)> for __wasi_filestat_t"],["impl From<ErrorKind> for Errno"],["impl From<u16> for Errno"],["impl From<FdStat> for __wasi_fdstat_t"],["impl From<Filestat> for __wasi_filestat_t"],["impl From<SdFlags> for Shutdown"],["impl From<Vec<u8>> for MemoryFile"],["impl From<Error> for Errno"],["impl<R: Read> From<R> for InPipline<R>"],["impl<T: Sized> From<usize> for WasmPtr<T>"],["impl<T: Sized> From<WasmPtr<T>> for usize"],["impl<W: Write> From<W> for OutPipeline<W>"]]],["wasmedge_sdk",[["impl From<Val> for WasmValue"],["impl From<WasmValue> for Val"]]],["wasmedge_sys",[["impl From<&WasmEdge_String> for &CStr"],["impl From<&WasmEdge_String> for String"],["impl From<&WasmEdgeString> for &CStr"],["impl From<&WasmEdgeString> for String"],["impl From<ProgramOptionType> for WasmEdge_ProgramOptionType"],["impl From<ValType> for WasmEdge_ValType"],["impl From<CoreError> for WasmEdge_Result"],["impl From<u32> for ProgramOptionType"],["impl From<WasmEdge_String> for &CStr"],["impl From<WasmEdge_String> for String"],["impl From<WasmEdge_ValType> for ValType"],["impl From<WasmEdge_Value> for WasmValue"],["impl From<PluginVersion> for WasmEdge_PluginVersionData"],["impl From<WasmEdgeString> for &CStr"],["impl From<WasmEdgeString> for String"],["impl<T: AsRef<str>> From<T> for WasmEdgeString"]]],["wasmedge_types",[["impl From<CompilerOptimizationLevel> for i32"],["impl From<CompilerOptimizationLevel> for u32"],["impl From<CompilerOutputFormat> for i32"],["impl From<CompilerOutputFormat> for u32"],["impl From<HostRegistration> for u32"],["impl From<Mutability> for i32"],["impl From<Mutability> for u32"],["impl From<RefType> for ValType"],["impl From<ValType> for RefType"],["impl From<CoreError> for WasmEdgeError"],["impl From<ExportError> for WasmEdgeError"],["impl From<FuncError> for WasmEdgeError"],["impl From<GlobalError> for WasmEdgeError"],["impl From<ImportError> for WasmEdgeError"],["impl From<InstanceError> for WasmEdgeError"],["impl From<MemError> for WasmEdgeError"],["impl From<PluginError> for WasmEdgeError"],["impl From<StoreError> for WasmEdgeError"],["impl From<TableError> for WasmEdgeError"],["impl From<VmError> for WasmEdgeError"],["impl From<i32> for CompilerOptimizationLevel"],["impl From<i32> for CompilerOutputFormat"],["impl From<i32> for ExternalInstanceType"],["impl From<i32> for Mutability"],["impl From<u32> for CompilerOptimizationLevel"],["impl From<u32> for CompilerOutputFormat"],["impl From<u32> for ExternalInstanceType"],["impl From<u32> for HostRegistration"],["impl From<u32> for Mutability"],["impl From<NulError> for WasmEdgeError"],["impl From<FromUtf8Error> for WasmEdgeError"],["impl From<FromBytesWithNulError> for WasmEdgeError"],["impl From<Utf8Error> for WasmEdgeError"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[7521,811,7242,13752]} \ No newline at end of file diff --git a/trait.impl/core/default/trait.Default.js b/trait.impl/core/default/trait.Default.js new file mode 100644 index 000000000..fe288616d --- /dev/null +++ b/trait.impl/core/default/trait.Default.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Default for AddressFamily"],["impl Default for ConnectState"],["impl Default for SocketType"],["impl Default for Errno"],["impl Default for WasiSocketState"],["impl Default for WASIRights"],["impl Default for WasiCtx"],["impl<D: WasiVirtualDir, F: WasiVirtualFile> Default for WasiVirtualSys<D, F>"]]],["wasmedge_sdk",[["impl Default for CommonConfigOptions"],["impl Default for CompilerConfigOptions"],["impl Default for ConfigBuilder"],["impl Default for RuntimeConfigOptions"],["impl Default for StatisticsConfigOptions"]]],["wasmedge_sys",[["impl Default for AsyncCx"],["impl Default for AsyncState"]]],["wasmedge_types",[["impl Default for FuncType"],["impl Default for GlobalType"],["impl Default for MemoryType"],["impl Default for TableType"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[3012,1632,622,1148]} \ No newline at end of file diff --git a/trait.impl/core/error/trait.Error.js b/trait.impl/core/error/trait.Error.js new file mode 100644 index 000000000..689b07b2f --- /dev/null +++ b/trait.impl/core/error/trait.Error.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_types",[["impl Error for CoreCommonError"],["impl Error for CoreComponentError"],["impl Error for CoreError"],["impl Error for CoreExecutionError"],["impl Error for CoreInstantiationError"],["impl Error for CoreLoadError"],["impl Error for CoreValidationError"],["impl Error for ExportError"],["impl Error for FuncError"],["impl Error for GlobalError"],["impl Error for HostFuncError"],["impl Error for ImportError"],["impl Error for InstanceError"],["impl Error for MemError"],["impl Error for PluginError"],["impl Error for StoreError"],["impl Error for TableError"],["impl Error for VmError"],["impl Error for WasmEdgeError"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[5512]} \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Binary.js b/trait.impl/core/fmt/trait.Binary.js new file mode 100644 index 000000000..8e5ce5af8 --- /dev/null +++ b/trait.impl/core/fmt/trait.Binary.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Binary for FdFlags"],["impl Binary for Lookupflags"],["impl Binary for OFlags"],["impl Binary for RiFlags"],["impl Binary for RoFlags"],["impl Binary for SdFlags"],["impl Binary for SiFlags"],["impl Binary for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2442]} \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Debug.js b/trait.impl/core/fmt/trait.Debug.js new file mode 100644 index 000000000..899b03998 --- /dev/null +++ b/trait.impl/core/fmt/trait.Debug.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Debug for AddressFamily"],["impl Debug for ConnectState"],["impl Debug for PrePoll"],["impl Debug for SocketType"],["impl Debug for Subscription"],["impl Debug for SubscriptionFdType"],["impl Debug for Advice"],["impl Debug for VFD"],["impl Debug for AddressFamily"],["impl Debug for Errno"],["impl Debug for AsyncWasiSocket"],["impl Debug for SubscriptionClock"],["impl Debug for SubscriptionFd"],["impl Debug for WasiSocketState"],["impl Debug for __wasi_address_t"],["impl Debug for __wasi_addrinfo_t"],["impl Debug for __wasi_ciovec_t"],["impl Debug for __wasi_dirent_t"],["impl Debug for __wasi_event_fd_readwrite_t"],["impl Debug for __wasi_event_t"],["impl Debug for __wasi_fdstat_t"],["impl Debug for __wasi_filestat_t"],["impl Debug for __wasi_iovec_t"],["impl Debug for __wasi_prestat_dir_t"],["impl Debug for __wasi_prestat_t"],["impl Debug for __wasi_sockaddr_in_t"],["impl Debug for __wasi_sockaddr_t"],["impl Debug for __wasi_subscription_clock_t"],["impl Debug for __wasi_subscription_fd_readwrite_t"],["impl Debug for __wasi_subscription_t"],["impl Debug for __wasi_subscription_u_t"],["impl Debug for MemoryDir"],["impl Debug for MemoryFile"],["impl Debug for FdFlags"],["impl Debug for FdStat"],["impl Debug for FileType"],["impl Debug for Filestat"],["impl Debug for OFlags"],["impl Debug for WASIRights"],["impl Debug for DiskDir"],["impl Debug for DiskFile"],["impl Debug for VFS"],["impl Debug for WasiAddrinfo"],["impl Debug for WasiSockaddr"],["impl Debug for WasiCtx"],["impl Debug for __wasi_prestat_u_t"],["impl Debug for __wasi_subscription_u_u_t"],["impl<T: Debug + Sized> Debug for WasmPtr<T>"]]],["wasmedge_sdk",[["impl Debug for ExecutionTarget"],["impl Debug for GraphEncoding"],["impl Debug for Val"],["impl Debug for CommonConfigOptions"],["impl Debug for CompilerConfigOptions"],["impl Debug for Config"],["impl Debug for ConfigBuilder"],["impl Debug for RuntimeConfigOptions"],["impl Debug for StatisticsConfigOptions"],["impl Debug for NNPreload"],["impl Debug for Plugin"],["impl Debug for PluginManager"],["impl Debug for Compiler"],["impl Debug for LogManager"],["impl Debug for Module"],["impl Debug for Statistics"],["impl Debug for ExternRef"],["impl Debug for Driver"],["impl<'inst, T: Debug + ?Sized + Send + AsyncInst> Debug for Vm<'inst, T>"],["impl<'inst, T: Debug + ?Sized + SyncInst> Debug for Vm<'inst, T>"],["impl<'module> Debug for ExportType<'module>"],["impl<'module> Debug for ImportType<'module>"],["impl<Data: Debug + Send> Debug for ImportObjectBuilder<Data>"],["impl<Data: Debug> Debug for ImportObjectBuilder<Data>"],["impl<T: ?Sized> Debug for Store<'_, T>"]]],["wasmedge_sys",[["impl Debug for ProgramOptionType"],["impl Debug for AsyncCx"],["impl Debug for AsyncState"],["impl Debug for AsyncInstance"],["impl Debug for AsyncWasiModule"],["impl Debug for WasmEdge_ASTModuleContext"],["impl Debug for WasmEdge_Async"],["impl Debug for WasmEdge_Bytes"],["impl Debug for WasmEdge_CallingFrameContext"],["impl Debug for WasmEdge_CompilerContext"],["impl Debug for WasmEdge_ConfigureContext"],["impl Debug for WasmEdge_ExecutorContext"],["impl Debug for WasmEdge_ExportTypeContext"],["impl Debug for WasmEdge_FunctionInstanceContext"],["impl Debug for WasmEdge_FunctionTypeContext"],["impl Debug for WasmEdge_GlobalInstanceContext"],["impl Debug for WasmEdge_GlobalTypeContext"],["impl Debug for WasmEdge_ImportTypeContext"],["impl Debug for WasmEdge_Limit"],["impl Debug for WasmEdge_LoaderContext"],["impl Debug for WasmEdge_MemoryInstanceContext"],["impl Debug for WasmEdge_MemoryTypeContext"],["impl Debug for WasmEdge_ModuleDescriptor"],["impl Debug for WasmEdge_ModuleInstanceContext"],["impl Debug for WasmEdge_PluginContext"],["impl Debug for WasmEdge_PluginDescriptor"],["impl Debug for WasmEdge_PluginVersionData"],["impl Debug for WasmEdge_ProgramOption"],["impl Debug for WasmEdge_Result"],["impl Debug for WasmEdge_StatisticsContext"],["impl Debug for WasmEdge_StoreContext"],["impl Debug for WasmEdge_String"],["impl Debug for WasmEdge_TableInstanceContext"],["impl Debug for WasmEdge_TableTypeContext"],["impl Debug for WasmEdge_TagInstanceContext"],["impl Debug for WasmEdge_TagTypeContext"],["impl Debug for WasmEdge_VMContext"],["impl Debug for WasmEdge_ValType"],["impl Debug for WasmEdge_ValidatorContext"],["impl Debug for WasmEdge_Value"],["impl Debug for ModuleDescriptor"],["impl Debug for Plugin"],["impl Debug for PluginDescriptor"],["impl Debug for PluginManager"],["impl Debug for PluginVersion"],["impl Debug for ProgramOption"],["impl Debug for CallingFrame"],["impl Debug for Compiler"],["impl Debug for Config"],["impl Debug for Executor"],["impl Debug for Function"],["impl Debug for Global"],["impl Debug for Instance"],["impl Debug for Loader"],["impl Debug for Memory"],["impl Debug for Module"],["impl Debug for Statistics"],["impl Debug for Store"],["impl Debug for Table"],["impl Debug for Validator"],["impl Debug for WasiModule"],["impl Debug for WasmValue"],["impl Debug for WasmEdgeString"],["impl<'module> Debug for ExportType<'module>"],["impl<'module> Debug for ImportType<'module>"],["impl<D: Debug, Ref> Debug for InnerRef<D, Ref>"],["impl<T: Debug + Send> Debug for AsyncImportObject<T>"],["impl<T: Debug + ?Sized> Debug for ImportModule<T>"]]],["wasmedge_types",[["impl Debug for CompilerOptimizationLevel"],["impl Debug for CompilerOutputFormat"],["impl Debug for ExternalInstanceType"],["impl Debug for HostRegistration"],["impl Debug for Mutability"],["impl Debug for NeverType"],["impl Debug for RefType"],["impl Debug for ValType"],["impl Debug for CoreCommonError"],["impl Debug for CoreComponentError"],["impl Debug for CoreError"],["impl Debug for CoreExecutionError"],["impl Debug for CoreInstantiationError"],["impl Debug for CoreLoadError"],["impl Debug for CoreValidationError"],["impl Debug for ExportError"],["impl Debug for FuncError"],["impl Debug for GlobalError"],["impl Debug for HostFuncError"],["impl Debug for ImportError"],["impl Debug for InstanceError"],["impl Debug for MemError"],["impl Debug for PluginError"],["impl Debug for StoreError"],["impl Debug for TableError"],["impl Debug for VmError"],["impl Debug for WasmEdgeError"],["impl Debug for FuncType"],["impl Debug for GlobalType"],["impl Debug for MemoryType"],["impl Debug for TableType"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[15756,8546,20895,8722]} \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Display.js b/trait.impl/core/fmt/trait.Display.js new file mode 100644 index 000000000..92c2bd8aa --- /dev/null +++ b/trait.impl/core/fmt/trait.Display.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sdk",[["impl Display for ExecutionTarget"],["impl Display for GraphEncoding"],["impl Display for NNPreload"]]],["wasmedge_types",[["impl Display for ExternalInstanceType"],["impl Display for CoreCommonError"],["impl Display for CoreComponentError"],["impl Display for CoreError"],["impl Display for CoreExecutionError"],["impl Display for CoreInstantiationError"],["impl Display for CoreLoadError"],["impl Display for CoreValidationError"],["impl Display for ExportError"],["impl Display for FuncError"],["impl Display for GlobalError"],["impl Display for HostFuncError"],["impl Display for ImportError"],["impl Display for InstanceError"],["impl Display for MemError"],["impl Display for PluginError"],["impl Display for StoreError"],["impl Display for TableError"],["impl Display for VmError"],["impl Display for WasmEdgeError"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[888,5851]} \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.LowerHex.js b/trait.impl/core/fmt/trait.LowerHex.js new file mode 100644 index 000000000..8239d5286 --- /dev/null +++ b/trait.impl/core/fmt/trait.LowerHex.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl LowerHex for FdFlags"],["impl LowerHex for Lookupflags"],["impl LowerHex for OFlags"],["impl LowerHex for RiFlags"],["impl LowerHex for RoFlags"],["impl LowerHex for SdFlags"],["impl LowerHex for SiFlags"],["impl LowerHex for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2490]} \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Octal.js b/trait.impl/core/fmt/trait.Octal.js new file mode 100644 index 000000000..862191715 --- /dev/null +++ b/trait.impl/core/fmt/trait.Octal.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Octal for FdFlags"],["impl Octal for Lookupflags"],["impl Octal for OFlags"],["impl Octal for RiFlags"],["impl Octal for RoFlags"],["impl Octal for SdFlags"],["impl Octal for SiFlags"],["impl Octal for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2418]} \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.UpperHex.js b/trait.impl/core/fmt/trait.UpperHex.js new file mode 100644 index 000000000..25ced5139 --- /dev/null +++ b/trait.impl/core/fmt/trait.UpperHex.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl UpperHex for FdFlags"],["impl UpperHex for Lookupflags"],["impl UpperHex for OFlags"],["impl UpperHex for RiFlags"],["impl UpperHex for RoFlags"],["impl UpperHex for SdFlags"],["impl UpperHex for SiFlags"],["impl UpperHex for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2490]} \ No newline at end of file diff --git a/trait.impl/core/hash/trait.Hash.js b/trait.impl/core/hash/trait.Hash.js new file mode 100644 index 000000000..212c070d1 --- /dev/null +++ b/trait.impl/core/hash/trait.Hash.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_types",[["impl Hash for HostRegistration"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[301]} \ No newline at end of file diff --git a/trait.impl/core/iter/traits/collect/trait.Extend.js b/trait.impl/core/iter/traits/collect/trait.Extend.js new file mode 100644 index 000000000..68329fc76 --- /dev/null +++ b/trait.impl/core/iter/traits/collect/trait.Extend.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Extend<FdFlags> for FdFlags"],["impl Extend<Lookupflags> for Lookupflags"],["impl Extend<OFlags> for OFlags"],["impl Extend<RiFlags> for RiFlags"],["impl Extend<RoFlags> for RoFlags"],["impl Extend<SdFlags> for SdFlags"],["impl Extend<SiFlags> for SiFlags"],["impl Extend<WASIRights> for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[4020]} \ No newline at end of file diff --git a/trait.impl/core/iter/traits/collect/trait.FromIterator.js b/trait.impl/core/iter/traits/collect/trait.FromIterator.js new file mode 100644 index 000000000..1f0eb03cc --- /dev/null +++ b/trait.impl/core/iter/traits/collect/trait.FromIterator.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl FromIterator<FdFlags> for FdFlags"],["impl FromIterator<Lookupflags> for Lookupflags"],["impl FromIterator<OFlags> for OFlags"],["impl FromIterator<RiFlags> for RiFlags"],["impl FromIterator<RoFlags> for RoFlags"],["impl FromIterator<SdFlags> for SdFlags"],["impl FromIterator<SiFlags> for SiFlags"],["impl FromIterator<WASIRights> for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[4164]} \ No newline at end of file diff --git a/trait.impl/core/iter/traits/collect/trait.IntoIterator.js b/trait.impl/core/iter/traits/collect/trait.IntoIterator.js new file mode 100644 index 000000000..082ad3339 --- /dev/null +++ b/trait.impl/core/iter/traits/collect/trait.IntoIterator.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl IntoIterator for FdFlags"],["impl IntoIterator for Lookupflags"],["impl IntoIterator for OFlags"],["impl IntoIterator for RiFlags"],["impl IntoIterator for RoFlags"],["impl IntoIterator for SdFlags"],["impl IntoIterator for SiFlags"],["impl IntoIterator for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2858]} \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Copy.js b/trait.impl/core/marker/trait.Copy.js new file mode 100644 index 000000000..9e4c86941 --- /dev/null +++ b/trait.impl/core/marker/trait.Copy.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Copy for AddressFamily"],["impl Copy for ConnectState"],["impl Copy for SocketType"],["impl Copy for Subscription"],["impl Copy for SubscriptionFdType"],["impl Copy for AddressFamily"],["impl Copy for Errno"],["impl Copy for SubscriptionClock"],["impl Copy for SubscriptionFd"],["impl Copy for __wasi_address_t"],["impl Copy for __wasi_addrinfo_t"],["impl Copy for __wasi_ciovec_t"],["impl Copy for __wasi_dirent_t"],["impl Copy for __wasi_event_fd_readwrite_t"],["impl Copy for __wasi_event_t"],["impl Copy for __wasi_fdstat_t"],["impl Copy for __wasi_filestat_t"],["impl Copy for __wasi_iovec_t"],["impl Copy for __wasi_prestat_dir_t"],["impl Copy for __wasi_prestat_t"],["impl Copy for __wasi_sockaddr_in_t"],["impl Copy for __wasi_sockaddr_t"],["impl Copy for __wasi_subscription_clock_t"],["impl Copy for __wasi_subscription_fd_readwrite_t"],["impl Copy for __wasi_subscription_t"],["impl Copy for __wasi_subscription_u_t"],["impl Copy for __wasi_timeval"],["impl Copy for FileType"],["impl Copy for __wasi_prestat_u_t"],["impl Copy for __wasi_subscription_u_u_t"],["impl<T: Copy + Sized> Copy for WasmPtr<T>"]]],["wasmedge_sdk",[["impl Copy for CommonConfigOptions"],["impl Copy for CompilerConfigOptions"],["impl Copy for RuntimeConfigOptions"],["impl Copy for StatisticsConfigOptions"],["impl Copy for ExternRef"]]],["wasmedge_sys",[["impl Copy for ProgramOptionType"],["impl Copy for AsyncCx"],["impl Copy for WasmEdge_ASTModuleContext"],["impl Copy for WasmEdge_Async"],["impl Copy for WasmEdge_Bytes"],["impl Copy for WasmEdge_CallingFrameContext"],["impl Copy for WasmEdge_CompilerContext"],["impl Copy for WasmEdge_ConfigureContext"],["impl Copy for WasmEdge_ExecutorContext"],["impl Copy for WasmEdge_ExportTypeContext"],["impl Copy for WasmEdge_FunctionInstanceContext"],["impl Copy for WasmEdge_FunctionTypeContext"],["impl Copy for WasmEdge_GlobalInstanceContext"],["impl Copy for WasmEdge_GlobalTypeContext"],["impl Copy for WasmEdge_ImportTypeContext"],["impl Copy for WasmEdge_Limit"],["impl Copy for WasmEdge_LoaderContext"],["impl Copy for WasmEdge_MemoryInstanceContext"],["impl Copy for WasmEdge_MemoryTypeContext"],["impl Copy for WasmEdge_ModuleDescriptor"],["impl Copy for WasmEdge_ModuleInstanceContext"],["impl Copy for WasmEdge_PluginContext"],["impl Copy for WasmEdge_PluginDescriptor"],["impl Copy for WasmEdge_PluginVersionData"],["impl Copy for WasmEdge_ProgramOption"],["impl Copy for WasmEdge_Result"],["impl Copy for WasmEdge_StatisticsContext"],["impl Copy for WasmEdge_StoreContext"],["impl Copy for WasmEdge_String"],["impl Copy for WasmEdge_TableInstanceContext"],["impl Copy for WasmEdge_TableTypeContext"],["impl Copy for WasmEdge_TagInstanceContext"],["impl Copy for WasmEdge_TagTypeContext"],["impl Copy for WasmEdge_VMContext"],["impl Copy for WasmEdge_ValType"],["impl Copy for WasmEdge_ValidatorContext"],["impl Copy for WasmEdge_Value"],["impl Copy for Plugin"],["impl Copy for WasmValue"]]],["wasmedge_types",[["impl Copy for CompilerOptimizationLevel"],["impl Copy for CompilerOutputFormat"],["impl Copy for HostRegistration"],["impl Copy for Mutability"],["impl Copy for RefType"],["impl Copy for ValType"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[10621,1563,12276,1698]} \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Freeze.js b/trait.impl/core/marker/trait.Freeze.js new file mode 100644 index 000000000..9cba3dda5 --- /dev/null +++ b/trait.impl/core/marker/trait.Freeze.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl !Freeze for VFD",1,["async_wasi::snapshots::env::VFD"]],["impl !Freeze for AsyncWasiSocket",1,["async_wasi::snapshots::common::net::async_tokio::AsyncWasiSocket"]],["impl Freeze for AddressFamily",1,["async_wasi::snapshots::common::net::AddressFamily"]],["impl Freeze for ConnectState",1,["async_wasi::snapshots::common::net::ConnectState"]],["impl Freeze for PrePoll",1,["async_wasi::snapshots::common::net::PrePoll"]],["impl Freeze for SocketType",1,["async_wasi::snapshots::common::net::SocketType"]],["impl Freeze for Subscription",1,["async_wasi::snapshots::common::net::Subscription"]],["impl Freeze for SubscriptionFdType",1,["async_wasi::snapshots::common::net::SubscriptionFdType"]],["impl Freeze for Advice",1,["async_wasi::snapshots::common::vfs::Advice"]],["impl Freeze for SystemTimeSpec",1,["async_wasi::snapshots::common::vfs::SystemTimeSpec"]],["impl Freeze for DiskInode",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskInode"]],["impl Freeze for AddressFamily",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::AddressFamily"]],["impl Freeze for Errno",1,["async_wasi::snapshots::common::error::Errno"]],["impl Freeze for SubscriptionClock",1,["async_wasi::snapshots::common::net::SubscriptionClock"]],["impl Freeze for SubscriptionFd",1,["async_wasi::snapshots::common::net::SubscriptionFd"]],["impl Freeze for WasiSocketState",1,["async_wasi::snapshots::common::net::WasiSocketState"]],["impl Freeze for __wasi_address_t",1,["async_wasi::snapshots::common::types::__wasi_address_t"]],["impl Freeze for __wasi_addrinfo_t",1,["async_wasi::snapshots::common::types::__wasi_addrinfo_t"]],["impl Freeze for __wasi_ciovec_t",1,["async_wasi::snapshots::common::types::__wasi_ciovec_t"]],["impl Freeze for __wasi_dirent_t",1,["async_wasi::snapshots::common::types::__wasi_dirent_t"]],["impl Freeze for __wasi_event_fd_readwrite_t",1,["async_wasi::snapshots::common::types::__wasi_event_fd_readwrite_t"]],["impl Freeze for __wasi_event_t",1,["async_wasi::snapshots::common::types::__wasi_event_t"]],["impl Freeze for __wasi_fdstat_t",1,["async_wasi::snapshots::common::types::__wasi_fdstat_t"]],["impl Freeze for __wasi_filestat_t",1,["async_wasi::snapshots::common::types::__wasi_filestat_t"]],["impl Freeze for __wasi_iovec_t",1,["async_wasi::snapshots::common::types::__wasi_iovec_t"]],["impl Freeze for __wasi_prestat_dir_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_dir_t"]],["impl Freeze for __wasi_prestat_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_t"]],["impl Freeze for __wasi_sockaddr_in_t",1,["async_wasi::snapshots::common::types::__wasi_sockaddr_in_t"]],["impl Freeze for __wasi_sockaddr_t",1,["async_wasi::snapshots::common::types::__wasi_sockaddr_t"]],["impl Freeze for __wasi_subscription_clock_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_clock_t"]],["impl Freeze for __wasi_subscription_fd_readwrite_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_fd_readwrite_t"]],["impl Freeze for __wasi_subscription_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_t"]],["impl Freeze for __wasi_subscription_u_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_u_t"]],["impl Freeze for __wasi_timeval",1,["async_wasi::snapshots::common::types::__wasi_timeval"]],["impl Freeze for MemoryDir",1,["async_wasi::snapshots::common::vfs::impls::MemoryDir"]],["impl Freeze for MemoryFile",1,["async_wasi::snapshots::common::vfs::impls::MemoryFile"]],["impl Freeze for FdFlags",1,["async_wasi::snapshots::common::vfs::FdFlags"]],["impl Freeze for FdStat",1,["async_wasi::snapshots::common::vfs::FdStat"]],["impl Freeze for FileType",1,["async_wasi::snapshots::common::vfs::FileType"]],["impl Freeze for Filestat",1,["async_wasi::snapshots::common::vfs::Filestat"]],["impl Freeze for Lookupflags",1,["async_wasi::snapshots::common::vfs::Lookupflags"]],["impl Freeze for OFlags",1,["async_wasi::snapshots::common::vfs::OFlags"]],["impl Freeze for ReaddirEntity",1,["async_wasi::snapshots::common::vfs::ReaddirEntity"]],["impl Freeze for RiFlags",1,["async_wasi::snapshots::common::vfs::RiFlags"]],["impl Freeze for RoFlags",1,["async_wasi::snapshots::common::vfs::RoFlags"]],["impl Freeze for SdFlags",1,["async_wasi::snapshots::common::vfs::SdFlags"]],["impl Freeze for SiFlags",1,["async_wasi::snapshots::common::vfs::SiFlags"]],["impl Freeze for WASIRights",1,["async_wasi::snapshots::common::vfs::WASIRights"]],["impl Freeze for DiskDir",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskDir"]],["impl Freeze for DiskFile",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskFile"]],["impl Freeze for DiskFileSys",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskFileSys"]],["impl Freeze for VFS",1,["async_wasi::snapshots::env::VFS"]],["impl Freeze for WasiAddrinfo",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::WasiAddrinfo"]],["impl Freeze for WasiSockaddr",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::WasiSockaddr"]],["impl Freeze for WasiCtx",1,["async_wasi::snapshots::WasiCtx"]],["impl Freeze for __wasi_prestat_u_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_u_t"]],["impl Freeze for __wasi_subscription_u_u_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_u_u_t"]],["impl<D, F> Freeze for Inode<D, F>
where\n D: Freeze,\n F: Freeze,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::Inode"]],["impl<D, F> Freeze for WasiVirtualSys<D, F>",1,["async_wasi::snapshots::common::vfs::virtual_sys::WasiVirtualSys"]],["impl<IN, OUT, ERR> Freeze for StdioSys<IN, OUT, ERR>
where\n IN: Freeze,\n OUT: Freeze,\n ERR: Freeze,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::StdioSys"]],["impl<R> Freeze for InPipline<R>
where\n R: Freeze,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::InPipline"]],["impl<T> Freeze for WasmPtr<T>",1,["async_wasi::snapshots::common::memory::WasmPtr"]],["impl<W> Freeze for OutPipeline<W>
where\n W: Freeze,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::OutPipeline"]]]],["wasmedge_sdk",[["impl Freeze for ExecutionTarget",1,["wasmedge_sdk::plugin::ExecutionTarget"]],["impl Freeze for GraphEncoding",1,["wasmedge_sdk::plugin::GraphEncoding"]],["impl Freeze for Val",1,["wasmedge_sdk::types::Val"]],["impl Freeze for CommonConfigOptions",1,["wasmedge_sdk::config::CommonConfigOptions"]],["impl Freeze for CompilerConfigOptions",1,["wasmedge_sdk::config::CompilerConfigOptions"]],["impl Freeze for Config",1,["wasmedge_sdk::config::Config"]],["impl Freeze for ConfigBuilder",1,["wasmedge_sdk::config::ConfigBuilder"]],["impl Freeze for RuntimeConfigOptions",1,["wasmedge_sdk::config::RuntimeConfigOptions"]],["impl Freeze for StatisticsConfigOptions",1,["wasmedge_sdk::config::StatisticsConfigOptions"]],["impl Freeze for NNPreload",1,["wasmedge_sdk::plugin::NNPreload"]],["impl Freeze for Plugin",1,["wasmedge_sdk::plugin::Plugin"]],["impl Freeze for PluginManager",1,["wasmedge_sdk::plugin::PluginManager"]],["impl Freeze for Compiler",1,["wasmedge_sdk::compiler::Compiler"]],["impl Freeze for LogManager",1,["wasmedge_sdk::log::LogManager"]],["impl Freeze for Module",1,["wasmedge_sdk::module::Module"]],["impl Freeze for Statistics",1,["wasmedge_sdk::statistics::Statistics"]],["impl Freeze for ExternRef",1,["wasmedge_sdk::types::ExternRef"]],["impl Freeze for CoreVersion",1,["wasmedge_sdk::utils::CoreVersion"]],["impl Freeze for Driver",1,["wasmedge_sdk::utils::Driver"]],["impl<'inst, T> !Freeze for Vm<'inst, T>",1,["wasmedge_sdk::async::vm::Vm"]],["impl<'inst, T> Freeze for Store<'inst, T>
where\n T: ?Sized,
",1,["wasmedge_sdk::store::Store"]],["impl<'inst, T> Freeze for Vm<'inst, T>
where\n T: ?Sized,
",1,["wasmedge_sdk::vm::Vm"]],["impl<'module> Freeze for ExportType<'module>",1,["wasmedge_sdk::module::ExportType"]],["impl<'module> Freeze for ImportType<'module>",1,["wasmedge_sdk::module::ImportType"]],["impl<Data> Freeze for ImportObjectBuilder<Data>",1,["wasmedge_sdk::async::import::ImportObjectBuilder"]],["impl<Data> Freeze for ImportObjectBuilder<Data>",1,["wasmedge_sdk::import::ImportObjectBuilder"]]]],["wasmedge_sys",[["impl !Freeze for AsyncState",1,["wasmedge_sys::async::fiber::AsyncState"]],["impl Freeze for ProgramOptionType",1,["wasmedge_sys::plugin::ProgramOptionType"]],["impl Freeze for AsyncCx",1,["wasmedge_sys::async::fiber::AsyncCx"]],["impl Freeze for AsyncFunction",1,["wasmedge_sys::async::function::AsyncFunction"]],["impl Freeze for AsyncInstance",1,["wasmedge_sys::async::module::AsyncInstance"]],["impl Freeze for AsyncWasiModule",1,["wasmedge_sys::async::module::AsyncWasiModule"]],["impl Freeze for WasmEdge_ASTModuleContext",1,["wasmedge_sys::ffi::WasmEdge_ASTModuleContext"]],["impl Freeze for WasmEdge_Async",1,["wasmedge_sys::ffi::WasmEdge_Async"]],["impl Freeze for WasmEdge_Bytes",1,["wasmedge_sys::ffi::WasmEdge_Bytes"]],["impl Freeze for WasmEdge_CallingFrameContext",1,["wasmedge_sys::ffi::WasmEdge_CallingFrameContext"]],["impl Freeze for WasmEdge_CompilerContext",1,["wasmedge_sys::ffi::WasmEdge_CompilerContext"]],["impl Freeze for WasmEdge_ConfigureContext",1,["wasmedge_sys::ffi::WasmEdge_ConfigureContext"]],["impl Freeze for WasmEdge_ExecutorContext",1,["wasmedge_sys::ffi::WasmEdge_ExecutorContext"]],["impl Freeze for WasmEdge_ExportTypeContext",1,["wasmedge_sys::ffi::WasmEdge_ExportTypeContext"]],["impl Freeze for WasmEdge_FunctionInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_FunctionInstanceContext"]],["impl Freeze for WasmEdge_FunctionTypeContext",1,["wasmedge_sys::ffi::WasmEdge_FunctionTypeContext"]],["impl Freeze for WasmEdge_GlobalInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_GlobalInstanceContext"]],["impl Freeze for WasmEdge_GlobalTypeContext",1,["wasmedge_sys::ffi::WasmEdge_GlobalTypeContext"]],["impl Freeze for WasmEdge_ImportTypeContext",1,["wasmedge_sys::ffi::WasmEdge_ImportTypeContext"]],["impl Freeze for WasmEdge_Limit",1,["wasmedge_sys::ffi::WasmEdge_Limit"]],["impl Freeze for WasmEdge_LoaderContext",1,["wasmedge_sys::ffi::WasmEdge_LoaderContext"]],["impl Freeze for WasmEdge_MemoryInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_MemoryInstanceContext"]],["impl Freeze for WasmEdge_MemoryTypeContext",1,["wasmedge_sys::ffi::WasmEdge_MemoryTypeContext"]],["impl Freeze for WasmEdge_ModuleDescriptor",1,["wasmedge_sys::ffi::WasmEdge_ModuleDescriptor"]],["impl Freeze for WasmEdge_ModuleInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_ModuleInstanceContext"]],["impl Freeze for WasmEdge_PluginContext",1,["wasmedge_sys::ffi::WasmEdge_PluginContext"]],["impl Freeze for WasmEdge_PluginDescriptor",1,["wasmedge_sys::ffi::WasmEdge_PluginDescriptor"]],["impl Freeze for WasmEdge_PluginVersionData",1,["wasmedge_sys::ffi::WasmEdge_PluginVersionData"]],["impl Freeze for WasmEdge_ProgramOption",1,["wasmedge_sys::ffi::WasmEdge_ProgramOption"]],["impl Freeze for WasmEdge_Result",1,["wasmedge_sys::ffi::WasmEdge_Result"]],["impl Freeze for WasmEdge_StatisticsContext",1,["wasmedge_sys::ffi::WasmEdge_StatisticsContext"]],["impl Freeze for WasmEdge_StoreContext",1,["wasmedge_sys::ffi::WasmEdge_StoreContext"]],["impl Freeze for WasmEdge_String",1,["wasmedge_sys::ffi::WasmEdge_String"]],["impl Freeze for WasmEdge_TableInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_TableInstanceContext"]],["impl Freeze for WasmEdge_TableTypeContext",1,["wasmedge_sys::ffi::WasmEdge_TableTypeContext"]],["impl Freeze for WasmEdge_TagInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_TagInstanceContext"]],["impl Freeze for WasmEdge_TagTypeContext",1,["wasmedge_sys::ffi::WasmEdge_TagTypeContext"]],["impl Freeze for WasmEdge_VMContext",1,["wasmedge_sys::ffi::WasmEdge_VMContext"]],["impl Freeze for WasmEdge_ValType",1,["wasmedge_sys::ffi::WasmEdge_ValType"]],["impl Freeze for WasmEdge_ValidatorContext",1,["wasmedge_sys::ffi::WasmEdge_ValidatorContext"]],["impl Freeze for WasmEdge_Value",1,["wasmedge_sys::ffi::WasmEdge_Value"]],["impl Freeze for ModuleDescriptor",1,["wasmedge_sys::plugin::ModuleDescriptor"]],["impl Freeze for Plugin",1,["wasmedge_sys::plugin::Plugin"]],["impl Freeze for PluginDescriptor",1,["wasmedge_sys::plugin::PluginDescriptor"]],["impl Freeze for PluginManager",1,["wasmedge_sys::plugin::PluginManager"]],["impl Freeze for PluginVersion",1,["wasmedge_sys::plugin::PluginVersion"]],["impl Freeze for ProgramOption",1,["wasmedge_sys::plugin::ProgramOption"]],["impl Freeze for CallingFrame",1,["wasmedge_sys::frame::CallingFrame"]],["impl Freeze for Compiler",1,["wasmedge_sys::compiler::Compiler"]],["impl Freeze for Config",1,["wasmedge_sys::config::Config"]],["impl Freeze for Executor",1,["wasmedge_sys::executor::Executor"]],["impl Freeze for Function",1,["wasmedge_sys::instance::function::Function"]],["impl Freeze for Global",1,["wasmedge_sys::instance::global::Global"]],["impl Freeze for Instance",1,["wasmedge_sys::instance::module::Instance"]],["impl Freeze for Loader",1,["wasmedge_sys::loader::Loader"]],["impl Freeze for Memory",1,["wasmedge_sys::instance::memory::Memory"]],["impl Freeze for Module",1,["wasmedge_sys::ast_module::Module"]],["impl Freeze for Statistics",1,["wasmedge_sys::statistics::Statistics"]],["impl Freeze for Store",1,["wasmedge_sys::store::Store"]],["impl Freeze for Table",1,["wasmedge_sys::instance::table::Table"]],["impl Freeze for Validator",1,["wasmedge_sys::validator::Validator"]],["impl Freeze for WasiModule",1,["wasmedge_sys::instance::module::WasiModule"]],["impl Freeze for WasmValue",1,["wasmedge_sys::types::WasmValue"]],["impl Freeze for WasmEdgeString",1,["wasmedge_sys::types::WasmEdgeString"]],["impl<'module> Freeze for ExportType<'module>",1,["wasmedge_sys::ast_module::ExportType"]],["impl<'module> Freeze for ImportType<'module>",1,["wasmedge_sys::ast_module::ImportType"]],["impl<D, Ref> Freeze for InnerRef<D, Ref>
where\n D: Freeze,\n Ref: ?Sized,
",1,["wasmedge_sys::instance::InnerRef"]],["impl<T> Freeze for AsyncImportObject<T>",1,["wasmedge_sys::async::module::AsyncImportObject"]],["impl<T> Freeze for ImportModule<T>
where\n T: ?Sized,
",1,["wasmedge_sys::instance::module::ImportModule"]]]],["wasmedge_types",[["impl Freeze for CompilerOptimizationLevel",1,["wasmedge_types::CompilerOptimizationLevel"]],["impl Freeze for CompilerOutputFormat",1,["wasmedge_types::CompilerOutputFormat"]],["impl Freeze for ExternalInstanceType",1,["wasmedge_types::ExternalInstanceType"]],["impl Freeze for HostRegistration",1,["wasmedge_types::HostRegistration"]],["impl Freeze for Mutability",1,["wasmedge_types::Mutability"]],["impl Freeze for NeverType",1,["wasmedge_types::NeverType"]],["impl Freeze for RefType",1,["wasmedge_types::RefType"]],["impl Freeze for ValType",1,["wasmedge_types::ValType"]],["impl Freeze for CoreCommonError",1,["wasmedge_types::error::CoreCommonError"]],["impl Freeze for CoreComponentError",1,["wasmedge_types::error::CoreComponentError"]],["impl Freeze for CoreError",1,["wasmedge_types::error::CoreError"]],["impl Freeze for CoreExecutionError",1,["wasmedge_types::error::CoreExecutionError"]],["impl Freeze for CoreInstantiationError",1,["wasmedge_types::error::CoreInstantiationError"]],["impl Freeze for CoreLoadError",1,["wasmedge_types::error::CoreLoadError"]],["impl Freeze for CoreValidationError",1,["wasmedge_types::error::CoreValidationError"]],["impl Freeze for ExportError",1,["wasmedge_types::error::ExportError"]],["impl Freeze for FuncError",1,["wasmedge_types::error::FuncError"]],["impl Freeze for GlobalError",1,["wasmedge_types::error::GlobalError"]],["impl Freeze for HostFuncError",1,["wasmedge_types::error::HostFuncError"]],["impl Freeze for ImportError",1,["wasmedge_types::error::ImportError"]],["impl Freeze for InstanceError",1,["wasmedge_types::error::InstanceError"]],["impl Freeze for MemError",1,["wasmedge_types::error::MemError"]],["impl Freeze for PluginError",1,["wasmedge_types::error::PluginError"]],["impl Freeze for StoreError",1,["wasmedge_types::error::StoreError"]],["impl Freeze for TableError",1,["wasmedge_types::error::TableError"]],["impl Freeze for VmError",1,["wasmedge_types::error::VmError"]],["impl Freeze for WasmEdgeError",1,["wasmedge_types::error::WasmEdgeError"]],["impl Freeze for FuncType",1,["wasmedge_types::FuncType"]],["impl Freeze for GlobalType",1,["wasmedge_types::GlobalType"]],["impl Freeze for MemoryType",1,["wasmedge_types::MemoryType"]],["impl Freeze for TableType",1,["wasmedge_types::TableType"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[25844,9109,24854,10239]} \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Send.js b/trait.impl/core/marker/trait.Send.js new file mode 100644 index 000000000..dd877bc78 --- /dev/null +++ b/trait.impl/core/marker/trait.Send.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Send for AddressFamily",1,["async_wasi::snapshots::common::net::AddressFamily"]],["impl Send for ConnectState",1,["async_wasi::snapshots::common::net::ConnectState"]],["impl Send for PrePoll",1,["async_wasi::snapshots::common::net::PrePoll"]],["impl Send for SocketType",1,["async_wasi::snapshots::common::net::SocketType"]],["impl Send for Subscription",1,["async_wasi::snapshots::common::net::Subscription"]],["impl Send for SubscriptionFdType",1,["async_wasi::snapshots::common::net::SubscriptionFdType"]],["impl Send for Advice",1,["async_wasi::snapshots::common::vfs::Advice"]],["impl Send for SystemTimeSpec",1,["async_wasi::snapshots::common::vfs::SystemTimeSpec"]],["impl Send for DiskInode",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskInode"]],["impl Send for VFD",1,["async_wasi::snapshots::env::VFD"]],["impl Send for AddressFamily",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::AddressFamily"]],["impl Send for Errno",1,["async_wasi::snapshots::common::error::Errno"]],["impl Send for AsyncWasiSocket",1,["async_wasi::snapshots::common::net::async_tokio::AsyncWasiSocket"]],["impl Send for SubscriptionClock",1,["async_wasi::snapshots::common::net::SubscriptionClock"]],["impl Send for SubscriptionFd",1,["async_wasi::snapshots::common::net::SubscriptionFd"]],["impl Send for WasiSocketState",1,["async_wasi::snapshots::common::net::WasiSocketState"]],["impl Send for __wasi_address_t",1,["async_wasi::snapshots::common::types::__wasi_address_t"]],["impl Send for __wasi_addrinfo_t",1,["async_wasi::snapshots::common::types::__wasi_addrinfo_t"]],["impl Send for __wasi_ciovec_t",1,["async_wasi::snapshots::common::types::__wasi_ciovec_t"]],["impl Send for __wasi_dirent_t",1,["async_wasi::snapshots::common::types::__wasi_dirent_t"]],["impl Send for __wasi_event_fd_readwrite_t",1,["async_wasi::snapshots::common::types::__wasi_event_fd_readwrite_t"]],["impl Send for __wasi_event_t",1,["async_wasi::snapshots::common::types::__wasi_event_t"]],["impl Send for __wasi_fdstat_t",1,["async_wasi::snapshots::common::types::__wasi_fdstat_t"]],["impl Send for __wasi_filestat_t",1,["async_wasi::snapshots::common::types::__wasi_filestat_t"]],["impl Send for __wasi_iovec_t",1,["async_wasi::snapshots::common::types::__wasi_iovec_t"]],["impl Send for __wasi_prestat_dir_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_dir_t"]],["impl Send for __wasi_prestat_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_t"]],["impl Send for __wasi_sockaddr_in_t",1,["async_wasi::snapshots::common::types::__wasi_sockaddr_in_t"]],["impl Send for __wasi_sockaddr_t",1,["async_wasi::snapshots::common::types::__wasi_sockaddr_t"]],["impl Send for __wasi_subscription_clock_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_clock_t"]],["impl Send for __wasi_subscription_fd_readwrite_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_fd_readwrite_t"]],["impl Send for __wasi_subscription_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_t"]],["impl Send for __wasi_subscription_u_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_u_t"]],["impl Send for __wasi_timeval",1,["async_wasi::snapshots::common::types::__wasi_timeval"]],["impl Send for MemoryDir",1,["async_wasi::snapshots::common::vfs::impls::MemoryDir"]],["impl Send for MemoryFile",1,["async_wasi::snapshots::common::vfs::impls::MemoryFile"]],["impl Send for FdFlags",1,["async_wasi::snapshots::common::vfs::FdFlags"]],["impl Send for FdStat",1,["async_wasi::snapshots::common::vfs::FdStat"]],["impl Send for FileType",1,["async_wasi::snapshots::common::vfs::FileType"]],["impl Send for Filestat",1,["async_wasi::snapshots::common::vfs::Filestat"]],["impl Send for Lookupflags",1,["async_wasi::snapshots::common::vfs::Lookupflags"]],["impl Send for OFlags",1,["async_wasi::snapshots::common::vfs::OFlags"]],["impl Send for ReaddirEntity",1,["async_wasi::snapshots::common::vfs::ReaddirEntity"]],["impl Send for RiFlags",1,["async_wasi::snapshots::common::vfs::RiFlags"]],["impl Send for RoFlags",1,["async_wasi::snapshots::common::vfs::RoFlags"]],["impl Send for SdFlags",1,["async_wasi::snapshots::common::vfs::SdFlags"]],["impl Send for SiFlags",1,["async_wasi::snapshots::common::vfs::SiFlags"]],["impl Send for WASIRights",1,["async_wasi::snapshots::common::vfs::WASIRights"]],["impl Send for DiskDir",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskDir"]],["impl Send for DiskFile",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskFile"]],["impl Send for DiskFileSys",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskFileSys"]],["impl Send for VFS",1,["async_wasi::snapshots::env::VFS"]],["impl Send for WasiAddrinfo",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::WasiAddrinfo"]],["impl Send for WasiSockaddr",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::WasiSockaddr"]],["impl Send for WasiCtx",1,["async_wasi::snapshots::WasiCtx"]],["impl Send for __wasi_prestat_u_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_u_t"]],["impl Send for __wasi_subscription_u_u_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_u_u_t"]],["impl<D, F> Send for Inode<D, F>
where\n D: Send,\n F: Send,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::Inode"]],["impl<D, F> Send for WasiVirtualSys<D, F>
where\n D: Send,\n F: Send,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::WasiVirtualSys"]],["impl<IN, OUT, ERR> Send for StdioSys<IN, OUT, ERR>
where\n IN: Send,\n OUT: Send,\n ERR: Send,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::StdioSys"]],["impl<R> Send for InPipline<R>
where\n R: Send,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::InPipline"]],["impl<T> Send for WasmPtr<T>
where\n T: Send,
",1,["async_wasi::snapshots::common::memory::WasmPtr"]],["impl<W> Send for OutPipeline<W>
where\n W: Send,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::OutPipeline"]]]],["wasmedge_sdk",[["impl Send for ExecutionTarget",1,["wasmedge_sdk::plugin::ExecutionTarget"]],["impl Send for GraphEncoding",1,["wasmedge_sdk::plugin::GraphEncoding"]],["impl Send for Val",1,["wasmedge_sdk::types::Val"]],["impl Send for CommonConfigOptions",1,["wasmedge_sdk::config::CommonConfigOptions"]],["impl Send for CompilerConfigOptions",1,["wasmedge_sdk::config::CompilerConfigOptions"]],["impl Send for Config",1,["wasmedge_sdk::config::Config"]],["impl Send for ConfigBuilder",1,["wasmedge_sdk::config::ConfigBuilder"]],["impl Send for RuntimeConfigOptions",1,["wasmedge_sdk::config::RuntimeConfigOptions"]],["impl Send for StatisticsConfigOptions",1,["wasmedge_sdk::config::StatisticsConfigOptions"]],["impl Send for NNPreload",1,["wasmedge_sdk::plugin::NNPreload"]],["impl Send for Plugin",1,["wasmedge_sdk::plugin::Plugin"]],["impl Send for PluginManager",1,["wasmedge_sdk::plugin::PluginManager"]],["impl Send for Compiler",1,["wasmedge_sdk::compiler::Compiler"]],["impl Send for LogManager",1,["wasmedge_sdk::log::LogManager"]],["impl Send for Module",1,["wasmedge_sdk::module::Module"]],["impl Send for Statistics",1,["wasmedge_sdk::statistics::Statistics"]],["impl Send for ExternRef",1,["wasmedge_sdk::types::ExternRef"]],["impl Send for CoreVersion",1,["wasmedge_sdk::utils::CoreVersion"]],["impl Send for Driver",1,["wasmedge_sdk::utils::Driver"]],["impl<'inst, T> Send for Vm<'inst, T>
where\n T: ?Sized,
",1,["wasmedge_sdk::async::vm::Vm"]],["impl<'inst, T> Send for Store<'inst, T>
where\n T: Send + ?Sized,
",1,["wasmedge_sdk::store::Store"]],["impl<'inst, T> Send for Vm<'inst, T>
where\n T: Send + ?Sized,
",1,["wasmedge_sdk::vm::Vm"]],["impl<'module> Send for ExportType<'module>",1,["wasmedge_sdk::module::ExportType"]],["impl<'module> Send for ImportType<'module>",1,["wasmedge_sdk::module::ImportType"]],["impl<Data> Send for ImportObjectBuilder<Data>",1,["wasmedge_sdk::async::import::ImportObjectBuilder"]],["impl<Data> Send for ImportObjectBuilder<Data>
where\n Data: Send,
",1,["wasmedge_sdk::import::ImportObjectBuilder"]]]],["wasmedge_sys",[["impl !Send for AsyncCx",1,["wasmedge_sys::async::fiber::AsyncCx"]],["impl !Send for WasmEdge_Bytes",1,["wasmedge_sys::ffi::WasmEdge_Bytes"]],["impl !Send for WasmEdge_ModuleDescriptor",1,["wasmedge_sys::ffi::WasmEdge_ModuleDescriptor"]],["impl !Send for WasmEdge_PluginDescriptor",1,["wasmedge_sys::ffi::WasmEdge_PluginDescriptor"]],["impl !Send for WasmEdge_ProgramOption",1,["wasmedge_sys::ffi::WasmEdge_ProgramOption"]],["impl !Send for WasmEdge_String",1,["wasmedge_sys::ffi::WasmEdge_String"]],["impl !Send for ModuleDescriptor",1,["wasmedge_sys::plugin::ModuleDescriptor"]],["impl !Send for PluginDescriptor",1,["wasmedge_sys::plugin::PluginDescriptor"]],["impl Send for ProgramOptionType",1,["wasmedge_sys::plugin::ProgramOptionType"]],["impl Send for AsyncState"],["impl Send for AsyncFunction",1,["wasmedge_sys::async::function::AsyncFunction"]],["impl Send for AsyncInstance",1,["wasmedge_sys::async::module::AsyncInstance"]],["impl Send for AsyncWasiModule",1,["wasmedge_sys::async::module::AsyncWasiModule"]],["impl Send for WasmEdge_ASTModuleContext",1,["wasmedge_sys::ffi::WasmEdge_ASTModuleContext"]],["impl Send for WasmEdge_Async",1,["wasmedge_sys::ffi::WasmEdge_Async"]],["impl Send for WasmEdge_CallingFrameContext",1,["wasmedge_sys::ffi::WasmEdge_CallingFrameContext"]],["impl Send for WasmEdge_CompilerContext",1,["wasmedge_sys::ffi::WasmEdge_CompilerContext"]],["impl Send for WasmEdge_ConfigureContext",1,["wasmedge_sys::ffi::WasmEdge_ConfigureContext"]],["impl Send for WasmEdge_ExecutorContext",1,["wasmedge_sys::ffi::WasmEdge_ExecutorContext"]],["impl Send for WasmEdge_ExportTypeContext",1,["wasmedge_sys::ffi::WasmEdge_ExportTypeContext"]],["impl Send for WasmEdge_FunctionInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_FunctionInstanceContext"]],["impl Send for WasmEdge_FunctionTypeContext",1,["wasmedge_sys::ffi::WasmEdge_FunctionTypeContext"]],["impl Send for WasmEdge_GlobalInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_GlobalInstanceContext"]],["impl Send for WasmEdge_GlobalTypeContext",1,["wasmedge_sys::ffi::WasmEdge_GlobalTypeContext"]],["impl Send for WasmEdge_ImportTypeContext",1,["wasmedge_sys::ffi::WasmEdge_ImportTypeContext"]],["impl Send for WasmEdge_Limit",1,["wasmedge_sys::ffi::WasmEdge_Limit"]],["impl Send for WasmEdge_LoaderContext",1,["wasmedge_sys::ffi::WasmEdge_LoaderContext"]],["impl Send for WasmEdge_MemoryInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_MemoryInstanceContext"]],["impl Send for WasmEdge_MemoryTypeContext",1,["wasmedge_sys::ffi::WasmEdge_MemoryTypeContext"]],["impl Send for WasmEdge_ModuleInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_ModuleInstanceContext"]],["impl Send for WasmEdge_PluginContext",1,["wasmedge_sys::ffi::WasmEdge_PluginContext"]],["impl Send for WasmEdge_PluginVersionData",1,["wasmedge_sys::ffi::WasmEdge_PluginVersionData"]],["impl Send for WasmEdge_Result",1,["wasmedge_sys::ffi::WasmEdge_Result"]],["impl Send for WasmEdge_StatisticsContext",1,["wasmedge_sys::ffi::WasmEdge_StatisticsContext"]],["impl Send for WasmEdge_StoreContext",1,["wasmedge_sys::ffi::WasmEdge_StoreContext"]],["impl Send for WasmEdge_TableInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_TableInstanceContext"]],["impl Send for WasmEdge_TableTypeContext",1,["wasmedge_sys::ffi::WasmEdge_TableTypeContext"]],["impl Send for WasmEdge_TagInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_TagInstanceContext"]],["impl Send for WasmEdge_TagTypeContext",1,["wasmedge_sys::ffi::WasmEdge_TagTypeContext"]],["impl Send for WasmEdge_VMContext",1,["wasmedge_sys::ffi::WasmEdge_VMContext"]],["impl Send for WasmEdge_ValType",1,["wasmedge_sys::ffi::WasmEdge_ValType"]],["impl Send for WasmEdge_ValidatorContext",1,["wasmedge_sys::ffi::WasmEdge_ValidatorContext"]],["impl Send for WasmEdge_Value",1,["wasmedge_sys::ffi::WasmEdge_Value"]],["impl Send for Plugin",1,["wasmedge_sys::plugin::Plugin"]],["impl Send for PluginManager",1,["wasmedge_sys::plugin::PluginManager"]],["impl Send for PluginVersion",1,["wasmedge_sys::plugin::PluginVersion"]],["impl Send for ProgramOption"],["impl Send for CallingFrame",1,["wasmedge_sys::frame::CallingFrame"]],["impl Send for Compiler",1,["wasmedge_sys::compiler::Compiler"]],["impl Send for Config",1,["wasmedge_sys::config::Config"]],["impl Send for Executor",1,["wasmedge_sys::executor::Executor"]],["impl Send for Function",1,["wasmedge_sys::instance::function::Function"]],["impl Send for Global",1,["wasmedge_sys::instance::global::Global"]],["impl Send for Instance",1,["wasmedge_sys::instance::module::Instance"]],["impl Send for Loader",1,["wasmedge_sys::loader::Loader"]],["impl Send for Memory",1,["wasmedge_sys::instance::memory::Memory"]],["impl Send for Module",1,["wasmedge_sys::ast_module::Module"]],["impl Send for Statistics",1,["wasmedge_sys::statistics::Statistics"]],["impl Send for Store",1,["wasmedge_sys::store::Store"]],["impl Send for Table",1,["wasmedge_sys::instance::table::Table"]],["impl Send for Validator",1,["wasmedge_sys::validator::Validator"]],["impl Send for WasiModule",1,["wasmedge_sys::instance::module::WasiModule"]],["impl Send for WasmValue",1,["wasmedge_sys::types::WasmValue"]],["impl Send for WasmEdgeString",1,["wasmedge_sys::types::WasmEdgeString"]],["impl<'module> Send for ExportType<'module>",1,["wasmedge_sys::ast_module::ExportType"]],["impl<'module> Send for ImportType<'module>",1,["wasmedge_sys::ast_module::ImportType"]],["impl<D, Ref> Send for InnerRef<D, Ref>
where\n D: Send,\n Ref: Send + ?Sized,
",1,["wasmedge_sys::instance::InnerRef"]],["impl<T> Send for AsyncImportObject<T>",1,["wasmedge_sys::async::module::AsyncImportObject"]],["impl<T> Send for ImportModule<T>
where\n T: Send + ?Sized,
",1,["wasmedge_sys::instance::module::ImportModule"]]]],["wasmedge_types",[["impl Send for CompilerOptimizationLevel",1,["wasmedge_types::CompilerOptimizationLevel"]],["impl Send for CompilerOutputFormat",1,["wasmedge_types::CompilerOutputFormat"]],["impl Send for ExternalInstanceType",1,["wasmedge_types::ExternalInstanceType"]],["impl Send for HostRegistration",1,["wasmedge_types::HostRegistration"]],["impl Send for Mutability",1,["wasmedge_types::Mutability"]],["impl Send for NeverType"],["impl Send for RefType",1,["wasmedge_types::RefType"]],["impl Send for ValType",1,["wasmedge_types::ValType"]],["impl Send for CoreCommonError",1,["wasmedge_types::error::CoreCommonError"]],["impl Send for CoreComponentError",1,["wasmedge_types::error::CoreComponentError"]],["impl Send for CoreError",1,["wasmedge_types::error::CoreError"]],["impl Send for CoreExecutionError",1,["wasmedge_types::error::CoreExecutionError"]],["impl Send for CoreInstantiationError",1,["wasmedge_types::error::CoreInstantiationError"]],["impl Send for CoreLoadError",1,["wasmedge_types::error::CoreLoadError"]],["impl Send for CoreValidationError",1,["wasmedge_types::error::CoreValidationError"]],["impl Send for ExportError",1,["wasmedge_types::error::ExportError"]],["impl Send for FuncError",1,["wasmedge_types::error::FuncError"]],["impl Send for GlobalError",1,["wasmedge_types::error::GlobalError"]],["impl Send for HostFuncError",1,["wasmedge_types::error::HostFuncError"]],["impl Send for ImportError",1,["wasmedge_types::error::ImportError"]],["impl Send for InstanceError",1,["wasmedge_types::error::InstanceError"]],["impl Send for MemError",1,["wasmedge_types::error::MemError"]],["impl Send for PluginError",1,["wasmedge_types::error::PluginError"]],["impl Send for StoreError",1,["wasmedge_types::error::StoreError"]],["impl Send for TableError",1,["wasmedge_types::error::TableError"]],["impl Send for VmError",1,["wasmedge_types::error::VmError"]],["impl Send for WasmEdgeError",1,["wasmedge_types::error::WasmEdgeError"]],["impl Send for FuncType",1,["wasmedge_types::FuncType"]],["impl Send for GlobalType",1,["wasmedge_types::GlobalType"]],["impl Send for MemoryType",1,["wasmedge_types::MemoryType"]],["impl Send for TableType",1,["wasmedge_types::TableType"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[25915,9581,24626,10021]} \ No newline at end of file diff --git a/trait.impl/core/marker/trait.StructuralPartialEq.js b/trait.impl/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 000000000..050edbf5a --- /dev/null +++ b/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl StructuralPartialEq for ConnectState"],["impl StructuralPartialEq for Errno"],["impl StructuralPartialEq for FileType"],["impl StructuralPartialEq for Filestat"],["impl StructuralPartialEq for SdFlags"]]],["wasmedge_sdk",[["impl StructuralPartialEq for ExecutionTarget"],["impl StructuralPartialEq for GraphEncoding"]]],["wasmedge_sys",[["impl StructuralPartialEq for ProgramOptionType"]]],["wasmedge_types",[["impl StructuralPartialEq for CompilerOptimizationLevel"],["impl StructuralPartialEq for CompilerOutputFormat"],["impl StructuralPartialEq for ExternalInstanceType"],["impl StructuralPartialEq for HostRegistration"],["impl StructuralPartialEq for Mutability"],["impl StructuralPartialEq for RefType"],["impl StructuralPartialEq for ValType"],["impl StructuralPartialEq for CoreCommonError"],["impl StructuralPartialEq for CoreComponentError"],["impl StructuralPartialEq for CoreError"],["impl StructuralPartialEq for CoreExecutionError"],["impl StructuralPartialEq for CoreInstantiationError"],["impl StructuralPartialEq for CoreLoadError"],["impl StructuralPartialEq for CoreValidationError"],["impl StructuralPartialEq for ExportError"],["impl StructuralPartialEq for FuncError"],["impl StructuralPartialEq for GlobalError"],["impl StructuralPartialEq for HostFuncError"],["impl StructuralPartialEq for ImportError"],["impl StructuralPartialEq for InstanceError"],["impl StructuralPartialEq for MemError"],["impl StructuralPartialEq for PluginError"],["impl StructuralPartialEq for StoreError"],["impl StructuralPartialEq for TableError"],["impl StructuralPartialEq for VmError"],["impl StructuralPartialEq for WasmEdgeError"],["impl StructuralPartialEq for FuncType"],["impl StructuralPartialEq for GlobalType"],["impl StructuralPartialEq for MemoryType"],["impl StructuralPartialEq for TableType"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1759,689,363,9901]} \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Sync.js b/trait.impl/core/marker/trait.Sync.js new file mode 100644 index 000000000..adb756eb3 --- /dev/null +++ b/trait.impl/core/marker/trait.Sync.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Sync for AddressFamily",1,["async_wasi::snapshots::common::net::AddressFamily"]],["impl Sync for ConnectState",1,["async_wasi::snapshots::common::net::ConnectState"]],["impl Sync for PrePoll",1,["async_wasi::snapshots::common::net::PrePoll"]],["impl Sync for SocketType",1,["async_wasi::snapshots::common::net::SocketType"]],["impl Sync for Subscription",1,["async_wasi::snapshots::common::net::Subscription"]],["impl Sync for SubscriptionFdType",1,["async_wasi::snapshots::common::net::SubscriptionFdType"]],["impl Sync for Advice",1,["async_wasi::snapshots::common::vfs::Advice"]],["impl Sync for SystemTimeSpec",1,["async_wasi::snapshots::common::vfs::SystemTimeSpec"]],["impl Sync for DiskInode",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskInode"]],["impl Sync for VFD",1,["async_wasi::snapshots::env::VFD"]],["impl Sync for AddressFamily",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::AddressFamily"]],["impl Sync for Errno",1,["async_wasi::snapshots::common::error::Errno"]],["impl Sync for AsyncWasiSocket",1,["async_wasi::snapshots::common::net::async_tokio::AsyncWasiSocket"]],["impl Sync for SubscriptionClock",1,["async_wasi::snapshots::common::net::SubscriptionClock"]],["impl Sync for SubscriptionFd",1,["async_wasi::snapshots::common::net::SubscriptionFd"]],["impl Sync for WasiSocketState",1,["async_wasi::snapshots::common::net::WasiSocketState"]],["impl Sync for __wasi_address_t",1,["async_wasi::snapshots::common::types::__wasi_address_t"]],["impl Sync for __wasi_addrinfo_t",1,["async_wasi::snapshots::common::types::__wasi_addrinfo_t"]],["impl Sync for __wasi_ciovec_t",1,["async_wasi::snapshots::common::types::__wasi_ciovec_t"]],["impl Sync for __wasi_dirent_t",1,["async_wasi::snapshots::common::types::__wasi_dirent_t"]],["impl Sync for __wasi_event_fd_readwrite_t",1,["async_wasi::snapshots::common::types::__wasi_event_fd_readwrite_t"]],["impl Sync for __wasi_event_t",1,["async_wasi::snapshots::common::types::__wasi_event_t"]],["impl Sync for __wasi_fdstat_t",1,["async_wasi::snapshots::common::types::__wasi_fdstat_t"]],["impl Sync for __wasi_filestat_t",1,["async_wasi::snapshots::common::types::__wasi_filestat_t"]],["impl Sync for __wasi_iovec_t",1,["async_wasi::snapshots::common::types::__wasi_iovec_t"]],["impl Sync for __wasi_prestat_dir_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_dir_t"]],["impl Sync for __wasi_prestat_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_t"]],["impl Sync for __wasi_sockaddr_in_t",1,["async_wasi::snapshots::common::types::__wasi_sockaddr_in_t"]],["impl Sync for __wasi_sockaddr_t",1,["async_wasi::snapshots::common::types::__wasi_sockaddr_t"]],["impl Sync for __wasi_subscription_clock_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_clock_t"]],["impl Sync for __wasi_subscription_fd_readwrite_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_fd_readwrite_t"]],["impl Sync for __wasi_subscription_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_t"]],["impl Sync for __wasi_subscription_u_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_u_t"]],["impl Sync for __wasi_timeval",1,["async_wasi::snapshots::common::types::__wasi_timeval"]],["impl Sync for MemoryDir",1,["async_wasi::snapshots::common::vfs::impls::MemoryDir"]],["impl Sync for MemoryFile",1,["async_wasi::snapshots::common::vfs::impls::MemoryFile"]],["impl Sync for FdFlags",1,["async_wasi::snapshots::common::vfs::FdFlags"]],["impl Sync for FdStat",1,["async_wasi::snapshots::common::vfs::FdStat"]],["impl Sync for FileType",1,["async_wasi::snapshots::common::vfs::FileType"]],["impl Sync for Filestat",1,["async_wasi::snapshots::common::vfs::Filestat"]],["impl Sync for Lookupflags",1,["async_wasi::snapshots::common::vfs::Lookupflags"]],["impl Sync for OFlags",1,["async_wasi::snapshots::common::vfs::OFlags"]],["impl Sync for ReaddirEntity",1,["async_wasi::snapshots::common::vfs::ReaddirEntity"]],["impl Sync for RiFlags",1,["async_wasi::snapshots::common::vfs::RiFlags"]],["impl Sync for RoFlags",1,["async_wasi::snapshots::common::vfs::RoFlags"]],["impl Sync for SdFlags",1,["async_wasi::snapshots::common::vfs::SdFlags"]],["impl Sync for SiFlags",1,["async_wasi::snapshots::common::vfs::SiFlags"]],["impl Sync for WASIRights",1,["async_wasi::snapshots::common::vfs::WASIRights"]],["impl Sync for DiskDir",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskDir"]],["impl Sync for DiskFile",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskFile"]],["impl Sync for DiskFileSys",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskFileSys"]],["impl Sync for VFS",1,["async_wasi::snapshots::env::VFS"]],["impl Sync for WasiAddrinfo",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::WasiAddrinfo"]],["impl Sync for WasiSockaddr",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::WasiSockaddr"]],["impl Sync for WasiCtx",1,["async_wasi::snapshots::WasiCtx"]],["impl Sync for __wasi_prestat_u_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_u_t"]],["impl Sync for __wasi_subscription_u_u_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_u_u_t"]],["impl<D, F> Sync for Inode<D, F>
where\n D: Sync,\n F: Sync,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::Inode"]],["impl<D, F> Sync for WasiVirtualSys<D, F>
where\n D: Sync,\n F: Sync,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::WasiVirtualSys"]],["impl<IN, OUT, ERR> Sync for StdioSys<IN, OUT, ERR>
where\n IN: Sync,\n OUT: Sync,\n ERR: Sync,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::StdioSys"]],["impl<R> Sync for InPipline<R>
where\n R: Sync,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::InPipline"]],["impl<T> Sync for WasmPtr<T>
where\n T: Sync,
",1,["async_wasi::snapshots::common::memory::WasmPtr"]],["impl<W> Sync for OutPipeline<W>
where\n W: Sync,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::OutPipeline"]]]],["wasmedge_sdk",[["impl Sync for ExecutionTarget",1,["wasmedge_sdk::plugin::ExecutionTarget"]],["impl Sync for GraphEncoding",1,["wasmedge_sdk::plugin::GraphEncoding"]],["impl Sync for Val",1,["wasmedge_sdk::types::Val"]],["impl Sync for CommonConfigOptions",1,["wasmedge_sdk::config::CommonConfigOptions"]],["impl Sync for CompilerConfigOptions",1,["wasmedge_sdk::config::CompilerConfigOptions"]],["impl Sync for Config",1,["wasmedge_sdk::config::Config"]],["impl Sync for ConfigBuilder",1,["wasmedge_sdk::config::ConfigBuilder"]],["impl Sync for RuntimeConfigOptions",1,["wasmedge_sdk::config::RuntimeConfigOptions"]],["impl Sync for StatisticsConfigOptions",1,["wasmedge_sdk::config::StatisticsConfigOptions"]],["impl Sync for NNPreload",1,["wasmedge_sdk::plugin::NNPreload"]],["impl Sync for Plugin",1,["wasmedge_sdk::plugin::Plugin"]],["impl Sync for PluginManager",1,["wasmedge_sdk::plugin::PluginManager"]],["impl Sync for Compiler",1,["wasmedge_sdk::compiler::Compiler"]],["impl Sync for LogManager",1,["wasmedge_sdk::log::LogManager"]],["impl Sync for Module",1,["wasmedge_sdk::module::Module"]],["impl Sync for Statistics",1,["wasmedge_sdk::statistics::Statistics"]],["impl Sync for ExternRef",1,["wasmedge_sdk::types::ExternRef"]],["impl Sync for CoreVersion",1,["wasmedge_sdk::utils::CoreVersion"]],["impl Sync for Driver",1,["wasmedge_sdk::utils::Driver"]],["impl<'inst, T> Sync for Vm<'inst, T>
where\n T: Sync + ?Sized,
",1,["wasmedge_sdk::async::vm::Vm"]],["impl<'inst, T> Sync for Store<'inst, T>
where\n T: Sync + ?Sized,
",1,["wasmedge_sdk::store::Store"]],["impl<'inst, T> Sync for Vm<'inst, T>
where\n T: Sync + ?Sized,
",1,["wasmedge_sdk::vm::Vm"]],["impl<'module> Sync for ExportType<'module>",1,["wasmedge_sdk::module::ExportType"]],["impl<'module> Sync for ImportType<'module>",1,["wasmedge_sdk::module::ImportType"]],["impl<Data> Sync for ImportObjectBuilder<Data>
where\n Data: Sync,
",1,["wasmedge_sdk::async::import::ImportObjectBuilder"]],["impl<Data> Sync for ImportObjectBuilder<Data>
where\n Data: Sync,
",1,["wasmedge_sdk::import::ImportObjectBuilder"]]]],["wasmedge_sys",[["impl !Sync for AsyncCx",1,["wasmedge_sys::async::fiber::AsyncCx"]],["impl !Sync for WasmEdge_Bytes",1,["wasmedge_sys::ffi::WasmEdge_Bytes"]],["impl !Sync for WasmEdge_ModuleDescriptor",1,["wasmedge_sys::ffi::WasmEdge_ModuleDescriptor"]],["impl !Sync for WasmEdge_PluginDescriptor",1,["wasmedge_sys::ffi::WasmEdge_PluginDescriptor"]],["impl !Sync for WasmEdge_ProgramOption",1,["wasmedge_sys::ffi::WasmEdge_ProgramOption"]],["impl !Sync for WasmEdge_String",1,["wasmedge_sys::ffi::WasmEdge_String"]],["impl !Sync for ModuleDescriptor",1,["wasmedge_sys::plugin::ModuleDescriptor"]],["impl !Sync for PluginDescriptor",1,["wasmedge_sys::plugin::PluginDescriptor"]],["impl Sync for ProgramOptionType",1,["wasmedge_sys::plugin::ProgramOptionType"]],["impl Sync for AsyncState"],["impl Sync for AsyncFunction",1,["wasmedge_sys::async::function::AsyncFunction"]],["impl Sync for AsyncInstance",1,["wasmedge_sys::async::module::AsyncInstance"]],["impl Sync for AsyncWasiModule",1,["wasmedge_sys::async::module::AsyncWasiModule"]],["impl Sync for WasmEdge_ASTModuleContext",1,["wasmedge_sys::ffi::WasmEdge_ASTModuleContext"]],["impl Sync for WasmEdge_Async",1,["wasmedge_sys::ffi::WasmEdge_Async"]],["impl Sync for WasmEdge_CallingFrameContext",1,["wasmedge_sys::ffi::WasmEdge_CallingFrameContext"]],["impl Sync for WasmEdge_CompilerContext",1,["wasmedge_sys::ffi::WasmEdge_CompilerContext"]],["impl Sync for WasmEdge_ConfigureContext",1,["wasmedge_sys::ffi::WasmEdge_ConfigureContext"]],["impl Sync for WasmEdge_ExecutorContext",1,["wasmedge_sys::ffi::WasmEdge_ExecutorContext"]],["impl Sync for WasmEdge_ExportTypeContext",1,["wasmedge_sys::ffi::WasmEdge_ExportTypeContext"]],["impl Sync for WasmEdge_FunctionInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_FunctionInstanceContext"]],["impl Sync for WasmEdge_FunctionTypeContext",1,["wasmedge_sys::ffi::WasmEdge_FunctionTypeContext"]],["impl Sync for WasmEdge_GlobalInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_GlobalInstanceContext"]],["impl Sync for WasmEdge_GlobalTypeContext",1,["wasmedge_sys::ffi::WasmEdge_GlobalTypeContext"]],["impl Sync for WasmEdge_ImportTypeContext",1,["wasmedge_sys::ffi::WasmEdge_ImportTypeContext"]],["impl Sync for WasmEdge_Limit",1,["wasmedge_sys::ffi::WasmEdge_Limit"]],["impl Sync for WasmEdge_LoaderContext",1,["wasmedge_sys::ffi::WasmEdge_LoaderContext"]],["impl Sync for WasmEdge_MemoryInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_MemoryInstanceContext"]],["impl Sync for WasmEdge_MemoryTypeContext",1,["wasmedge_sys::ffi::WasmEdge_MemoryTypeContext"]],["impl Sync for WasmEdge_ModuleInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_ModuleInstanceContext"]],["impl Sync for WasmEdge_PluginContext",1,["wasmedge_sys::ffi::WasmEdge_PluginContext"]],["impl Sync for WasmEdge_PluginVersionData",1,["wasmedge_sys::ffi::WasmEdge_PluginVersionData"]],["impl Sync for WasmEdge_Result",1,["wasmedge_sys::ffi::WasmEdge_Result"]],["impl Sync for WasmEdge_StatisticsContext",1,["wasmedge_sys::ffi::WasmEdge_StatisticsContext"]],["impl Sync for WasmEdge_StoreContext",1,["wasmedge_sys::ffi::WasmEdge_StoreContext"]],["impl Sync for WasmEdge_TableInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_TableInstanceContext"]],["impl Sync for WasmEdge_TableTypeContext",1,["wasmedge_sys::ffi::WasmEdge_TableTypeContext"]],["impl Sync for WasmEdge_TagInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_TagInstanceContext"]],["impl Sync for WasmEdge_TagTypeContext",1,["wasmedge_sys::ffi::WasmEdge_TagTypeContext"]],["impl Sync for WasmEdge_VMContext",1,["wasmedge_sys::ffi::WasmEdge_VMContext"]],["impl Sync for WasmEdge_ValType",1,["wasmedge_sys::ffi::WasmEdge_ValType"]],["impl Sync for WasmEdge_ValidatorContext",1,["wasmedge_sys::ffi::WasmEdge_ValidatorContext"]],["impl Sync for WasmEdge_Value",1,["wasmedge_sys::ffi::WasmEdge_Value"]],["impl Sync for Plugin",1,["wasmedge_sys::plugin::Plugin"]],["impl Sync for PluginManager",1,["wasmedge_sys::plugin::PluginManager"]],["impl Sync for PluginVersion",1,["wasmedge_sys::plugin::PluginVersion"]],["impl Sync for ProgramOption"],["impl Sync for CallingFrame",1,["wasmedge_sys::frame::CallingFrame"]],["impl Sync for Compiler",1,["wasmedge_sys::compiler::Compiler"]],["impl Sync for Config",1,["wasmedge_sys::config::Config"]],["impl Sync for Executor",1,["wasmedge_sys::executor::Executor"]],["impl Sync for Function",1,["wasmedge_sys::instance::function::Function"]],["impl Sync for Global",1,["wasmedge_sys::instance::global::Global"]],["impl Sync for Instance",1,["wasmedge_sys::instance::module::Instance"]],["impl Sync for Loader",1,["wasmedge_sys::loader::Loader"]],["impl Sync for Memory",1,["wasmedge_sys::instance::memory::Memory"]],["impl Sync for Module",1,["wasmedge_sys::ast_module::Module"]],["impl Sync for Statistics",1,["wasmedge_sys::statistics::Statistics"]],["impl Sync for Store",1,["wasmedge_sys::store::Store"]],["impl Sync for Table",1,["wasmedge_sys::instance::table::Table"]],["impl Sync for Validator",1,["wasmedge_sys::validator::Validator"]],["impl Sync for WasiModule",1,["wasmedge_sys::instance::module::WasiModule"]],["impl Sync for WasmValue",1,["wasmedge_sys::types::WasmValue"]],["impl Sync for WasmEdgeString",1,["wasmedge_sys::types::WasmEdgeString"]],["impl<'module> Sync for ExportType<'module>",1,["wasmedge_sys::ast_module::ExportType"]],["impl<'module> Sync for ImportType<'module>",1,["wasmedge_sys::ast_module::ImportType"]],["impl<D, Ref> Sync for InnerRef<D, Ref>
where\n D: Sync,\n Ref: Sync + ?Sized,
",1,["wasmedge_sys::instance::InnerRef"]],["impl<T> Sync for AsyncImportObject<T>
where\n T: Sync,
",1,["wasmedge_sys::async::module::AsyncImportObject"]],["impl<T> Sync for ImportModule<T>
where\n T: Sync + ?Sized,
",1,["wasmedge_sys::instance::module::ImportModule"]]]],["wasmedge_types",[["impl Sync for CompilerOptimizationLevel",1,["wasmedge_types::CompilerOptimizationLevel"]],["impl Sync for CompilerOutputFormat",1,["wasmedge_types::CompilerOutputFormat"]],["impl Sync for ExternalInstanceType",1,["wasmedge_types::ExternalInstanceType"]],["impl Sync for HostRegistration",1,["wasmedge_types::HostRegistration"]],["impl Sync for Mutability",1,["wasmedge_types::Mutability"]],["impl Sync for NeverType"],["impl Sync for RefType",1,["wasmedge_types::RefType"]],["impl Sync for ValType",1,["wasmedge_types::ValType"]],["impl Sync for CoreCommonError",1,["wasmedge_types::error::CoreCommonError"]],["impl Sync for CoreComponentError",1,["wasmedge_types::error::CoreComponentError"]],["impl Sync for CoreError",1,["wasmedge_types::error::CoreError"]],["impl Sync for CoreExecutionError",1,["wasmedge_types::error::CoreExecutionError"]],["impl Sync for CoreInstantiationError",1,["wasmedge_types::error::CoreInstantiationError"]],["impl Sync for CoreLoadError",1,["wasmedge_types::error::CoreLoadError"]],["impl Sync for CoreValidationError",1,["wasmedge_types::error::CoreValidationError"]],["impl Sync for ExportError",1,["wasmedge_types::error::ExportError"]],["impl Sync for FuncError",1,["wasmedge_types::error::FuncError"]],["impl Sync for GlobalError",1,["wasmedge_types::error::GlobalError"]],["impl Sync for HostFuncError",1,["wasmedge_types::error::HostFuncError"]],["impl Sync for ImportError",1,["wasmedge_types::error::ImportError"]],["impl Sync for InstanceError",1,["wasmedge_types::error::InstanceError"]],["impl Sync for MemError",1,["wasmedge_types::error::MemError"]],["impl Sync for PluginError",1,["wasmedge_types::error::PluginError"]],["impl Sync for StoreError",1,["wasmedge_types::error::StoreError"]],["impl Sync for TableError",1,["wasmedge_types::error::TableError"]],["impl Sync for VmError",1,["wasmedge_types::error::VmError"]],["impl Sync for WasmEdgeError",1,["wasmedge_types::error::WasmEdgeError"]],["impl Sync for FuncType",1,["wasmedge_types::FuncType"]],["impl Sync for GlobalType",1,["wasmedge_types::GlobalType"]],["impl Sync for MemoryType",1,["wasmedge_types::MemoryType"]],["impl Sync for TableType",1,["wasmedge_types::TableType"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[25915,9895,24801,10021]} \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Unpin.js b/trait.impl/core/marker/trait.Unpin.js new file mode 100644 index 000000000..33080a870 --- /dev/null +++ b/trait.impl/core/marker/trait.Unpin.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Unpin for AddressFamily",1,["async_wasi::snapshots::common::net::AddressFamily"]],["impl Unpin for ConnectState",1,["async_wasi::snapshots::common::net::ConnectState"]],["impl Unpin for PrePoll",1,["async_wasi::snapshots::common::net::PrePoll"]],["impl Unpin for SocketType",1,["async_wasi::snapshots::common::net::SocketType"]],["impl Unpin for Subscription",1,["async_wasi::snapshots::common::net::Subscription"]],["impl Unpin for SubscriptionFdType",1,["async_wasi::snapshots::common::net::SubscriptionFdType"]],["impl Unpin for Advice",1,["async_wasi::snapshots::common::vfs::Advice"]],["impl Unpin for SystemTimeSpec",1,["async_wasi::snapshots::common::vfs::SystemTimeSpec"]],["impl Unpin for DiskInode",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskInode"]],["impl Unpin for VFD",1,["async_wasi::snapshots::env::VFD"]],["impl Unpin for AddressFamily",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::AddressFamily"]],["impl Unpin for Errno",1,["async_wasi::snapshots::common::error::Errno"]],["impl Unpin for AsyncWasiSocket",1,["async_wasi::snapshots::common::net::async_tokio::AsyncWasiSocket"]],["impl Unpin for SubscriptionClock",1,["async_wasi::snapshots::common::net::SubscriptionClock"]],["impl Unpin for SubscriptionFd",1,["async_wasi::snapshots::common::net::SubscriptionFd"]],["impl Unpin for WasiSocketState",1,["async_wasi::snapshots::common::net::WasiSocketState"]],["impl Unpin for __wasi_address_t",1,["async_wasi::snapshots::common::types::__wasi_address_t"]],["impl Unpin for __wasi_addrinfo_t",1,["async_wasi::snapshots::common::types::__wasi_addrinfo_t"]],["impl Unpin for __wasi_ciovec_t",1,["async_wasi::snapshots::common::types::__wasi_ciovec_t"]],["impl Unpin for __wasi_dirent_t",1,["async_wasi::snapshots::common::types::__wasi_dirent_t"]],["impl Unpin for __wasi_event_fd_readwrite_t",1,["async_wasi::snapshots::common::types::__wasi_event_fd_readwrite_t"]],["impl Unpin for __wasi_event_t",1,["async_wasi::snapshots::common::types::__wasi_event_t"]],["impl Unpin for __wasi_fdstat_t",1,["async_wasi::snapshots::common::types::__wasi_fdstat_t"]],["impl Unpin for __wasi_filestat_t",1,["async_wasi::snapshots::common::types::__wasi_filestat_t"]],["impl Unpin for __wasi_iovec_t",1,["async_wasi::snapshots::common::types::__wasi_iovec_t"]],["impl Unpin for __wasi_prestat_dir_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_dir_t"]],["impl Unpin for __wasi_prestat_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_t"]],["impl Unpin for __wasi_sockaddr_in_t",1,["async_wasi::snapshots::common::types::__wasi_sockaddr_in_t"]],["impl Unpin for __wasi_sockaddr_t",1,["async_wasi::snapshots::common::types::__wasi_sockaddr_t"]],["impl Unpin for __wasi_subscription_clock_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_clock_t"]],["impl Unpin for __wasi_subscription_fd_readwrite_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_fd_readwrite_t"]],["impl Unpin for __wasi_subscription_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_t"]],["impl Unpin for __wasi_subscription_u_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_u_t"]],["impl Unpin for __wasi_timeval",1,["async_wasi::snapshots::common::types::__wasi_timeval"]],["impl Unpin for MemoryDir",1,["async_wasi::snapshots::common::vfs::impls::MemoryDir"]],["impl Unpin for MemoryFile",1,["async_wasi::snapshots::common::vfs::impls::MemoryFile"]],["impl Unpin for FdFlags",1,["async_wasi::snapshots::common::vfs::FdFlags"]],["impl Unpin for FdStat",1,["async_wasi::snapshots::common::vfs::FdStat"]],["impl Unpin for FileType",1,["async_wasi::snapshots::common::vfs::FileType"]],["impl Unpin for Filestat",1,["async_wasi::snapshots::common::vfs::Filestat"]],["impl Unpin for Lookupflags",1,["async_wasi::snapshots::common::vfs::Lookupflags"]],["impl Unpin for OFlags",1,["async_wasi::snapshots::common::vfs::OFlags"]],["impl Unpin for ReaddirEntity",1,["async_wasi::snapshots::common::vfs::ReaddirEntity"]],["impl Unpin for RiFlags",1,["async_wasi::snapshots::common::vfs::RiFlags"]],["impl Unpin for RoFlags",1,["async_wasi::snapshots::common::vfs::RoFlags"]],["impl Unpin for SdFlags",1,["async_wasi::snapshots::common::vfs::SdFlags"]],["impl Unpin for SiFlags",1,["async_wasi::snapshots::common::vfs::SiFlags"]],["impl Unpin for WASIRights",1,["async_wasi::snapshots::common::vfs::WASIRights"]],["impl Unpin for DiskDir",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskDir"]],["impl Unpin for DiskFile",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskFile"]],["impl Unpin for DiskFileSys",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskFileSys"]],["impl Unpin for VFS",1,["async_wasi::snapshots::env::VFS"]],["impl Unpin for WasiAddrinfo",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::WasiAddrinfo"]],["impl Unpin for WasiSockaddr",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::WasiSockaddr"]],["impl Unpin for WasiCtx",1,["async_wasi::snapshots::WasiCtx"]],["impl Unpin for __wasi_prestat_u_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_u_t"]],["impl Unpin for __wasi_subscription_u_u_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_u_u_t"]],["impl<D, F> Unpin for Inode<D, F>
where\n D: Unpin,\n F: Unpin,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::Inode"]],["impl<D, F> Unpin for WasiVirtualSys<D, F>
where\n D: Unpin,\n F: Unpin,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::WasiVirtualSys"]],["impl<IN, OUT, ERR> Unpin for StdioSys<IN, OUT, ERR>
where\n IN: Unpin,\n OUT: Unpin,\n ERR: Unpin,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::StdioSys"]],["impl<R> Unpin for InPipline<R>
where\n R: Unpin,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::InPipline"]],["impl<T> Unpin for WasmPtr<T>
where\n T: Unpin,
",1,["async_wasi::snapshots::common::memory::WasmPtr"]],["impl<W> Unpin for OutPipeline<W>
where\n W: Unpin,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::OutPipeline"]]]],["wasmedge_sdk",[["impl Unpin for ExecutionTarget",1,["wasmedge_sdk::plugin::ExecutionTarget"]],["impl Unpin for GraphEncoding",1,["wasmedge_sdk::plugin::GraphEncoding"]],["impl Unpin for Val",1,["wasmedge_sdk::types::Val"]],["impl Unpin for CommonConfigOptions",1,["wasmedge_sdk::config::CommonConfigOptions"]],["impl Unpin for CompilerConfigOptions",1,["wasmedge_sdk::config::CompilerConfigOptions"]],["impl Unpin for Config",1,["wasmedge_sdk::config::Config"]],["impl Unpin for ConfigBuilder",1,["wasmedge_sdk::config::ConfigBuilder"]],["impl Unpin for RuntimeConfigOptions",1,["wasmedge_sdk::config::RuntimeConfigOptions"]],["impl Unpin for StatisticsConfigOptions",1,["wasmedge_sdk::config::StatisticsConfigOptions"]],["impl Unpin for NNPreload",1,["wasmedge_sdk::plugin::NNPreload"]],["impl Unpin for Plugin",1,["wasmedge_sdk::plugin::Plugin"]],["impl Unpin for PluginManager",1,["wasmedge_sdk::plugin::PluginManager"]],["impl Unpin for Compiler",1,["wasmedge_sdk::compiler::Compiler"]],["impl Unpin for LogManager",1,["wasmedge_sdk::log::LogManager"]],["impl Unpin for Module",1,["wasmedge_sdk::module::Module"]],["impl Unpin for Statistics",1,["wasmedge_sdk::statistics::Statistics"]],["impl Unpin for ExternRef",1,["wasmedge_sdk::types::ExternRef"]],["impl Unpin for CoreVersion",1,["wasmedge_sdk::utils::CoreVersion"]],["impl Unpin for Driver",1,["wasmedge_sdk::utils::Driver"]],["impl<'inst, T> Unpin for Vm<'inst, T>
where\n T: ?Sized,
",1,["wasmedge_sdk::async::vm::Vm"]],["impl<'inst, T> Unpin for Store<'inst, T>
where\n T: ?Sized,
",1,["wasmedge_sdk::store::Store"]],["impl<'inst, T> Unpin for Vm<'inst, T>
where\n T: ?Sized,
",1,["wasmedge_sdk::vm::Vm"]],["impl<'module> Unpin for ExportType<'module>",1,["wasmedge_sdk::module::ExportType"]],["impl<'module> Unpin for ImportType<'module>",1,["wasmedge_sdk::module::ImportType"]],["impl<Data> Unpin for ImportObjectBuilder<Data>
where\n Data: Unpin,
",1,["wasmedge_sdk::async::import::ImportObjectBuilder"]],["impl<Data> Unpin for ImportObjectBuilder<Data>
where\n Data: Unpin,
",1,["wasmedge_sdk::import::ImportObjectBuilder"]]]],["wasmedge_sys",[["impl Unpin for ProgramOptionType",1,["wasmedge_sys::plugin::ProgramOptionType"]],["impl Unpin for AsyncCx",1,["wasmedge_sys::async::fiber::AsyncCx"]],["impl Unpin for AsyncState",1,["wasmedge_sys::async::fiber::AsyncState"]],["impl Unpin for AsyncFunction",1,["wasmedge_sys::async::function::AsyncFunction"]],["impl Unpin for AsyncInstance",1,["wasmedge_sys::async::module::AsyncInstance"]],["impl Unpin for AsyncWasiModule",1,["wasmedge_sys::async::module::AsyncWasiModule"]],["impl Unpin for WasmEdge_ASTModuleContext",1,["wasmedge_sys::ffi::WasmEdge_ASTModuleContext"]],["impl Unpin for WasmEdge_Async",1,["wasmedge_sys::ffi::WasmEdge_Async"]],["impl Unpin for WasmEdge_Bytes",1,["wasmedge_sys::ffi::WasmEdge_Bytes"]],["impl Unpin for WasmEdge_CallingFrameContext",1,["wasmedge_sys::ffi::WasmEdge_CallingFrameContext"]],["impl Unpin for WasmEdge_CompilerContext",1,["wasmedge_sys::ffi::WasmEdge_CompilerContext"]],["impl Unpin for WasmEdge_ConfigureContext",1,["wasmedge_sys::ffi::WasmEdge_ConfigureContext"]],["impl Unpin for WasmEdge_ExecutorContext",1,["wasmedge_sys::ffi::WasmEdge_ExecutorContext"]],["impl Unpin for WasmEdge_ExportTypeContext",1,["wasmedge_sys::ffi::WasmEdge_ExportTypeContext"]],["impl Unpin for WasmEdge_FunctionInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_FunctionInstanceContext"]],["impl Unpin for WasmEdge_FunctionTypeContext",1,["wasmedge_sys::ffi::WasmEdge_FunctionTypeContext"]],["impl Unpin for WasmEdge_GlobalInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_GlobalInstanceContext"]],["impl Unpin for WasmEdge_GlobalTypeContext",1,["wasmedge_sys::ffi::WasmEdge_GlobalTypeContext"]],["impl Unpin for WasmEdge_ImportTypeContext",1,["wasmedge_sys::ffi::WasmEdge_ImportTypeContext"]],["impl Unpin for WasmEdge_Limit",1,["wasmedge_sys::ffi::WasmEdge_Limit"]],["impl Unpin for WasmEdge_LoaderContext",1,["wasmedge_sys::ffi::WasmEdge_LoaderContext"]],["impl Unpin for WasmEdge_MemoryInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_MemoryInstanceContext"]],["impl Unpin for WasmEdge_MemoryTypeContext",1,["wasmedge_sys::ffi::WasmEdge_MemoryTypeContext"]],["impl Unpin for WasmEdge_ModuleDescriptor",1,["wasmedge_sys::ffi::WasmEdge_ModuleDescriptor"]],["impl Unpin for WasmEdge_ModuleInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_ModuleInstanceContext"]],["impl Unpin for WasmEdge_PluginContext",1,["wasmedge_sys::ffi::WasmEdge_PluginContext"]],["impl Unpin for WasmEdge_PluginDescriptor",1,["wasmedge_sys::ffi::WasmEdge_PluginDescriptor"]],["impl Unpin for WasmEdge_PluginVersionData",1,["wasmedge_sys::ffi::WasmEdge_PluginVersionData"]],["impl Unpin for WasmEdge_ProgramOption",1,["wasmedge_sys::ffi::WasmEdge_ProgramOption"]],["impl Unpin for WasmEdge_Result",1,["wasmedge_sys::ffi::WasmEdge_Result"]],["impl Unpin for WasmEdge_StatisticsContext",1,["wasmedge_sys::ffi::WasmEdge_StatisticsContext"]],["impl Unpin for WasmEdge_StoreContext",1,["wasmedge_sys::ffi::WasmEdge_StoreContext"]],["impl Unpin for WasmEdge_String",1,["wasmedge_sys::ffi::WasmEdge_String"]],["impl Unpin for WasmEdge_TableInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_TableInstanceContext"]],["impl Unpin for WasmEdge_TableTypeContext",1,["wasmedge_sys::ffi::WasmEdge_TableTypeContext"]],["impl Unpin for WasmEdge_TagInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_TagInstanceContext"]],["impl Unpin for WasmEdge_TagTypeContext",1,["wasmedge_sys::ffi::WasmEdge_TagTypeContext"]],["impl Unpin for WasmEdge_VMContext",1,["wasmedge_sys::ffi::WasmEdge_VMContext"]],["impl Unpin for WasmEdge_ValType",1,["wasmedge_sys::ffi::WasmEdge_ValType"]],["impl Unpin for WasmEdge_ValidatorContext",1,["wasmedge_sys::ffi::WasmEdge_ValidatorContext"]],["impl Unpin for WasmEdge_Value",1,["wasmedge_sys::ffi::WasmEdge_Value"]],["impl Unpin for ModuleDescriptor",1,["wasmedge_sys::plugin::ModuleDescriptor"]],["impl Unpin for Plugin",1,["wasmedge_sys::plugin::Plugin"]],["impl Unpin for PluginDescriptor",1,["wasmedge_sys::plugin::PluginDescriptor"]],["impl Unpin for PluginManager",1,["wasmedge_sys::plugin::PluginManager"]],["impl Unpin for PluginVersion",1,["wasmedge_sys::plugin::PluginVersion"]],["impl Unpin for ProgramOption",1,["wasmedge_sys::plugin::ProgramOption"]],["impl Unpin for CallingFrame",1,["wasmedge_sys::frame::CallingFrame"]],["impl Unpin for Compiler",1,["wasmedge_sys::compiler::Compiler"]],["impl Unpin for Config",1,["wasmedge_sys::config::Config"]],["impl Unpin for Executor",1,["wasmedge_sys::executor::Executor"]],["impl Unpin for Function",1,["wasmedge_sys::instance::function::Function"]],["impl Unpin for Global",1,["wasmedge_sys::instance::global::Global"]],["impl Unpin for Instance",1,["wasmedge_sys::instance::module::Instance"]],["impl Unpin for Loader",1,["wasmedge_sys::loader::Loader"]],["impl Unpin for Memory",1,["wasmedge_sys::instance::memory::Memory"]],["impl Unpin for Module",1,["wasmedge_sys::ast_module::Module"]],["impl Unpin for Statistics",1,["wasmedge_sys::statistics::Statistics"]],["impl Unpin for Store",1,["wasmedge_sys::store::Store"]],["impl Unpin for Table",1,["wasmedge_sys::instance::table::Table"]],["impl Unpin for Validator",1,["wasmedge_sys::validator::Validator"]],["impl Unpin for WasiModule",1,["wasmedge_sys::instance::module::WasiModule"]],["impl Unpin for WasmValue",1,["wasmedge_sys::types::WasmValue"]],["impl Unpin for WasmEdgeString",1,["wasmedge_sys::types::WasmEdgeString"]],["impl<'module> Unpin for ExportType<'module>",1,["wasmedge_sys::ast_module::ExportType"]],["impl<'module> Unpin for ImportType<'module>",1,["wasmedge_sys::ast_module::ImportType"]],["impl<D, Ref> Unpin for InnerRef<D, Ref>
where\n D: Unpin,\n Ref: Unpin + ?Sized,
",1,["wasmedge_sys::instance::InnerRef"]],["impl<T> Unpin for AsyncImportObject<T>
where\n T: Unpin,
",1,["wasmedge_sys::async::module::AsyncImportObject"]],["impl<T> Unpin for ImportModule<T>
where\n T: Unpin + ?Sized,
",1,["wasmedge_sys::instance::module::ImportModule"]]]],["wasmedge_types",[["impl Unpin for CompilerOptimizationLevel",1,["wasmedge_types::CompilerOptimizationLevel"]],["impl Unpin for CompilerOutputFormat",1,["wasmedge_types::CompilerOutputFormat"]],["impl Unpin for ExternalInstanceType",1,["wasmedge_types::ExternalInstanceType"]],["impl Unpin for HostRegistration",1,["wasmedge_types::HostRegistration"]],["impl Unpin for Mutability",1,["wasmedge_types::Mutability"]],["impl Unpin for NeverType",1,["wasmedge_types::NeverType"]],["impl Unpin for RefType",1,["wasmedge_types::RefType"]],["impl Unpin for ValType",1,["wasmedge_types::ValType"]],["impl Unpin for CoreCommonError",1,["wasmedge_types::error::CoreCommonError"]],["impl Unpin for CoreComponentError",1,["wasmedge_types::error::CoreComponentError"]],["impl Unpin for CoreError",1,["wasmedge_types::error::CoreError"]],["impl Unpin for CoreExecutionError",1,["wasmedge_types::error::CoreExecutionError"]],["impl Unpin for CoreInstantiationError",1,["wasmedge_types::error::CoreInstantiationError"]],["impl Unpin for CoreLoadError",1,["wasmedge_types::error::CoreLoadError"]],["impl Unpin for CoreValidationError",1,["wasmedge_types::error::CoreValidationError"]],["impl Unpin for ExportError",1,["wasmedge_types::error::ExportError"]],["impl Unpin for FuncError",1,["wasmedge_types::error::FuncError"]],["impl Unpin for GlobalError",1,["wasmedge_types::error::GlobalError"]],["impl Unpin for HostFuncError",1,["wasmedge_types::error::HostFuncError"]],["impl Unpin for ImportError",1,["wasmedge_types::error::ImportError"]],["impl Unpin for InstanceError",1,["wasmedge_types::error::InstanceError"]],["impl Unpin for MemError",1,["wasmedge_types::error::MemError"]],["impl Unpin for PluginError",1,["wasmedge_types::error::PluginError"]],["impl Unpin for StoreError",1,["wasmedge_types::error::StoreError"]],["impl Unpin for TableError",1,["wasmedge_types::error::TableError"]],["impl Unpin for VmError",1,["wasmedge_types::error::VmError"]],["impl Unpin for WasmEdgeError",1,["wasmedge_types::error::WasmEdgeError"]],["impl Unpin for FuncType",1,["wasmedge_types::FuncType"]],["impl Unpin for GlobalType",1,["wasmedge_types::GlobalType"]],["impl Unpin for MemoryType",1,["wasmedge_types::MemoryType"]],["impl Unpin for TableType",1,["wasmedge_types::TableType"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[26134,9571,25099,10146]} \ No newline at end of file diff --git a/trait.impl/core/ops/arith/trait.Add.js b/trait.impl/core/ops/arith/trait.Add.js new file mode 100644 index 000000000..94adb52f9 --- /dev/null +++ b/trait.impl/core/ops/arith/trait.Add.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl<T: Sized> Add<usize> for WasmPtr<T>"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[591]} \ No newline at end of file diff --git a/trait.impl/core/ops/arith/trait.Sub.js b/trait.impl/core/ops/arith/trait.Sub.js new file mode 100644 index 000000000..c4e85bcf3 --- /dev/null +++ b/trait.impl/core/ops/arith/trait.Sub.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Sub for FdFlags"],["impl Sub for Lookupflags"],["impl Sub for OFlags"],["impl Sub for RiFlags"],["impl Sub for RoFlags"],["impl Sub for SdFlags"],["impl Sub for SiFlags"],["impl Sub for WASIRights"],["impl<T: Sized> Sub<usize> for WasmPtr<T>"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[3049]} \ No newline at end of file diff --git a/trait.impl/core/ops/arith/trait.SubAssign.js b/trait.impl/core/ops/arith/trait.SubAssign.js new file mode 100644 index 000000000..94e5f0026 --- /dev/null +++ b/trait.impl/core/ops/arith/trait.SubAssign.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl SubAssign for FdFlags"],["impl SubAssign for Lookupflags"],["impl SubAssign for OFlags"],["impl SubAssign for RiFlags"],["impl SubAssign for RoFlags"],["impl SubAssign for SdFlags"],["impl SubAssign for SiFlags"],["impl SubAssign for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2618]} \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.BitAnd.js b/trait.impl/core/ops/bit/trait.BitAnd.js new file mode 100644 index 000000000..1a30115ba --- /dev/null +++ b/trait.impl/core/ops/bit/trait.BitAnd.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl BitAnd for FdFlags"],["impl BitAnd for Lookupflags"],["impl BitAnd for OFlags"],["impl BitAnd for RiFlags"],["impl BitAnd for RoFlags"],["impl BitAnd for SdFlags"],["impl BitAnd for SiFlags"],["impl BitAnd for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2514]} \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.BitAndAssign.js b/trait.impl/core/ops/bit/trait.BitAndAssign.js new file mode 100644 index 000000000..83eca10bc --- /dev/null +++ b/trait.impl/core/ops/bit/trait.BitAndAssign.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl BitAndAssign for FdFlags"],["impl BitAndAssign for Lookupflags"],["impl BitAndAssign for OFlags"],["impl BitAndAssign for RiFlags"],["impl BitAndAssign for RoFlags"],["impl BitAndAssign for SdFlags"],["impl BitAndAssign for SiFlags"],["impl BitAndAssign for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2658]} \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.BitOr.js b/trait.impl/core/ops/bit/trait.BitOr.js new file mode 100644 index 000000000..8f81cc207 --- /dev/null +++ b/trait.impl/core/ops/bit/trait.BitOr.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl BitOr for FdFlags"],["impl BitOr for Lookupflags"],["impl BitOr for OFlags"],["impl BitOr for RiFlags"],["impl BitOr for RoFlags"],["impl BitOr for SdFlags"],["impl BitOr for SiFlags"],["impl BitOr for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2490]} \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.BitOrAssign.js b/trait.impl/core/ops/bit/trait.BitOrAssign.js new file mode 100644 index 000000000..63e44f171 --- /dev/null +++ b/trait.impl/core/ops/bit/trait.BitOrAssign.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl BitOrAssign for FdFlags"],["impl BitOrAssign for Lookupflags"],["impl BitOrAssign for OFlags"],["impl BitOrAssign for RiFlags"],["impl BitOrAssign for RoFlags"],["impl BitOrAssign for SdFlags"],["impl BitOrAssign for SiFlags"],["impl BitOrAssign for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2634]} \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.BitXor.js b/trait.impl/core/ops/bit/trait.BitXor.js new file mode 100644 index 000000000..ec6d8507d --- /dev/null +++ b/trait.impl/core/ops/bit/trait.BitXor.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl BitXor for FdFlags"],["impl BitXor for Lookupflags"],["impl BitXor for OFlags"],["impl BitXor for RiFlags"],["impl BitXor for RoFlags"],["impl BitXor for SdFlags"],["impl BitXor for SiFlags"],["impl BitXor for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2514]} \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.BitXorAssign.js b/trait.impl/core/ops/bit/trait.BitXorAssign.js new file mode 100644 index 000000000..bfb426d36 --- /dev/null +++ b/trait.impl/core/ops/bit/trait.BitXorAssign.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl BitXorAssign for FdFlags"],["impl BitXorAssign for Lookupflags"],["impl BitXorAssign for OFlags"],["impl BitXorAssign for RiFlags"],["impl BitXorAssign for RoFlags"],["impl BitXorAssign for SdFlags"],["impl BitXorAssign for SiFlags"],["impl BitXorAssign for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2658]} \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.Not.js b/trait.impl/core/ops/bit/trait.Not.js new file mode 100644 index 000000000..3260e7212 --- /dev/null +++ b/trait.impl/core/ops/bit/trait.Not.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Not for FdFlags"],["impl Not for Lookupflags"],["impl Not for OFlags"],["impl Not for RiFlags"],["impl Not for RoFlags"],["impl Not for SdFlags"],["impl Not for SiFlags"],["impl Not for WASIRights"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2442]} \ No newline at end of file diff --git a/trait.impl/core/ops/deref/trait.Deref.js b/trait.impl/core/ops/deref/trait.Deref.js new file mode 100644 index 000000000..e7c646465 --- /dev/null +++ b/trait.impl/core/ops/deref/trait.Deref.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sys",[["impl<D, Ref> Deref for InnerRef<D, &Ref>"],["impl<D, Ref> Deref for InnerRef<D, &mut Ref>"],["impl<T: Send> Deref for AsyncImportObject<T>"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1351]} \ No newline at end of file diff --git a/trait.impl/core/ops/deref/trait.DerefMut.js b/trait.impl/core/ops/deref/trait.DerefMut.js new file mode 100644 index 000000000..eeed47924 --- /dev/null +++ b/trait.impl/core/ops/deref/trait.DerefMut.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sys",[["impl<D, Ref> DerefMut for InnerRef<D, &mut Ref>"],["impl<T: Send> DerefMut for AsyncImportObject<T>"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[945]} \ No newline at end of file diff --git a/trait.impl/core/ops/drop/trait.Drop.js b/trait.impl/core/ops/drop/trait.Drop.js new file mode 100644 index 000000000..70c153cf0 --- /dev/null +++ b/trait.impl/core/ops/drop/trait.Drop.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl Drop for MemoryDir"],["impl Drop for MemoryFile"]]],["wasmedge_sys",[["impl Drop for Compiler"],["impl Drop for Config"],["impl Drop for Executor"],["impl Drop for Function"],["impl Drop for Global"],["impl Drop for ImportType<'_>"],["impl Drop for Instance"],["impl Drop for Loader"],["impl Drop for Memory"],["impl Drop for Module"],["impl Drop for Statistics"],["impl Drop for Store"],["impl Drop for Table"],["impl Drop for Validator"],["impl Drop for WasmEdgeString"],["impl<T: ?Sized> Drop for ImportModule<T>"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[669,4484]} \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js new file mode 100644 index 000000000..8c3d11058 --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl !RefUnwindSafe for VFD",1,["async_wasi::snapshots::env::VFD"]],["impl !RefUnwindSafe for AsyncWasiSocket",1,["async_wasi::snapshots::common::net::async_tokio::AsyncWasiSocket"]],["impl !RefUnwindSafe for VFS",1,["async_wasi::snapshots::env::VFS"]],["impl !RefUnwindSafe for WasiCtx",1,["async_wasi::snapshots::WasiCtx"]],["impl RefUnwindSafe for AddressFamily",1,["async_wasi::snapshots::common::net::AddressFamily"]],["impl RefUnwindSafe for ConnectState",1,["async_wasi::snapshots::common::net::ConnectState"]],["impl RefUnwindSafe for PrePoll",1,["async_wasi::snapshots::common::net::PrePoll"]],["impl RefUnwindSafe for SocketType",1,["async_wasi::snapshots::common::net::SocketType"]],["impl RefUnwindSafe for Subscription",1,["async_wasi::snapshots::common::net::Subscription"]],["impl RefUnwindSafe for SubscriptionFdType",1,["async_wasi::snapshots::common::net::SubscriptionFdType"]],["impl RefUnwindSafe for Advice",1,["async_wasi::snapshots::common::vfs::Advice"]],["impl RefUnwindSafe for SystemTimeSpec",1,["async_wasi::snapshots::common::vfs::SystemTimeSpec"]],["impl RefUnwindSafe for DiskInode",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskInode"]],["impl RefUnwindSafe for AddressFamily",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::AddressFamily"]],["impl RefUnwindSafe for Errno",1,["async_wasi::snapshots::common::error::Errno"]],["impl RefUnwindSafe for SubscriptionClock",1,["async_wasi::snapshots::common::net::SubscriptionClock"]],["impl RefUnwindSafe for SubscriptionFd",1,["async_wasi::snapshots::common::net::SubscriptionFd"]],["impl RefUnwindSafe for WasiSocketState",1,["async_wasi::snapshots::common::net::WasiSocketState"]],["impl RefUnwindSafe for __wasi_address_t",1,["async_wasi::snapshots::common::types::__wasi_address_t"]],["impl RefUnwindSafe for __wasi_addrinfo_t",1,["async_wasi::snapshots::common::types::__wasi_addrinfo_t"]],["impl RefUnwindSafe for __wasi_ciovec_t",1,["async_wasi::snapshots::common::types::__wasi_ciovec_t"]],["impl RefUnwindSafe for __wasi_dirent_t",1,["async_wasi::snapshots::common::types::__wasi_dirent_t"]],["impl RefUnwindSafe for __wasi_event_fd_readwrite_t",1,["async_wasi::snapshots::common::types::__wasi_event_fd_readwrite_t"]],["impl RefUnwindSafe for __wasi_event_t",1,["async_wasi::snapshots::common::types::__wasi_event_t"]],["impl RefUnwindSafe for __wasi_fdstat_t",1,["async_wasi::snapshots::common::types::__wasi_fdstat_t"]],["impl RefUnwindSafe for __wasi_filestat_t",1,["async_wasi::snapshots::common::types::__wasi_filestat_t"]],["impl RefUnwindSafe for __wasi_iovec_t",1,["async_wasi::snapshots::common::types::__wasi_iovec_t"]],["impl RefUnwindSafe for __wasi_prestat_dir_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_dir_t"]],["impl RefUnwindSafe for __wasi_prestat_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_t"]],["impl RefUnwindSafe for __wasi_sockaddr_in_t",1,["async_wasi::snapshots::common::types::__wasi_sockaddr_in_t"]],["impl RefUnwindSafe for __wasi_sockaddr_t",1,["async_wasi::snapshots::common::types::__wasi_sockaddr_t"]],["impl RefUnwindSafe for __wasi_subscription_clock_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_clock_t"]],["impl RefUnwindSafe for __wasi_subscription_fd_readwrite_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_fd_readwrite_t"]],["impl RefUnwindSafe for __wasi_subscription_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_t"]],["impl RefUnwindSafe for __wasi_subscription_u_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_u_t"]],["impl RefUnwindSafe for __wasi_timeval",1,["async_wasi::snapshots::common::types::__wasi_timeval"]],["impl RefUnwindSafe for MemoryDir",1,["async_wasi::snapshots::common::vfs::impls::MemoryDir"]],["impl RefUnwindSafe for MemoryFile",1,["async_wasi::snapshots::common::vfs::impls::MemoryFile"]],["impl RefUnwindSafe for FdFlags",1,["async_wasi::snapshots::common::vfs::FdFlags"]],["impl RefUnwindSafe for FdStat",1,["async_wasi::snapshots::common::vfs::FdStat"]],["impl RefUnwindSafe for FileType",1,["async_wasi::snapshots::common::vfs::FileType"]],["impl RefUnwindSafe for Filestat",1,["async_wasi::snapshots::common::vfs::Filestat"]],["impl RefUnwindSafe for Lookupflags",1,["async_wasi::snapshots::common::vfs::Lookupflags"]],["impl RefUnwindSafe for OFlags",1,["async_wasi::snapshots::common::vfs::OFlags"]],["impl RefUnwindSafe for ReaddirEntity",1,["async_wasi::snapshots::common::vfs::ReaddirEntity"]],["impl RefUnwindSafe for RiFlags",1,["async_wasi::snapshots::common::vfs::RiFlags"]],["impl RefUnwindSafe for RoFlags",1,["async_wasi::snapshots::common::vfs::RoFlags"]],["impl RefUnwindSafe for SdFlags",1,["async_wasi::snapshots::common::vfs::SdFlags"]],["impl RefUnwindSafe for SiFlags",1,["async_wasi::snapshots::common::vfs::SiFlags"]],["impl RefUnwindSafe for WASIRights",1,["async_wasi::snapshots::common::vfs::WASIRights"]],["impl RefUnwindSafe for DiskDir",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskDir"]],["impl RefUnwindSafe for DiskFile",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskFile"]],["impl RefUnwindSafe for DiskFileSys",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskFileSys"]],["impl RefUnwindSafe for WasiAddrinfo",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::WasiAddrinfo"]],["impl RefUnwindSafe for WasiSockaddr",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::WasiSockaddr"]],["impl RefUnwindSafe for __wasi_prestat_u_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_u_t"]],["impl RefUnwindSafe for __wasi_subscription_u_u_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_u_u_t"]],["impl<D, F> RefUnwindSafe for Inode<D, F>
where\n D: RefUnwindSafe,\n F: RefUnwindSafe,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::Inode"]],["impl<D, F> RefUnwindSafe for WasiVirtualSys<D, F>
where\n D: RefUnwindSafe,\n F: RefUnwindSafe,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::WasiVirtualSys"]],["impl<IN, OUT, ERR> RefUnwindSafe for StdioSys<IN, OUT, ERR>
where\n IN: RefUnwindSafe,\n OUT: RefUnwindSafe,\n ERR: RefUnwindSafe,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::StdioSys"]],["impl<R> RefUnwindSafe for InPipline<R>
where\n R: RefUnwindSafe,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::InPipline"]],["impl<T> RefUnwindSafe for WasmPtr<T>
where\n T: RefUnwindSafe,
",1,["async_wasi::snapshots::common::memory::WasmPtr"]],["impl<W> RefUnwindSafe for OutPipeline<W>
where\n W: RefUnwindSafe,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::OutPipeline"]]]],["wasmedge_sdk",[["impl RefUnwindSafe for ExecutionTarget",1,["wasmedge_sdk::plugin::ExecutionTarget"]],["impl RefUnwindSafe for GraphEncoding",1,["wasmedge_sdk::plugin::GraphEncoding"]],["impl RefUnwindSafe for Val",1,["wasmedge_sdk::types::Val"]],["impl RefUnwindSafe for CommonConfigOptions",1,["wasmedge_sdk::config::CommonConfigOptions"]],["impl RefUnwindSafe for CompilerConfigOptions",1,["wasmedge_sdk::config::CompilerConfigOptions"]],["impl RefUnwindSafe for Config",1,["wasmedge_sdk::config::Config"]],["impl RefUnwindSafe for ConfigBuilder",1,["wasmedge_sdk::config::ConfigBuilder"]],["impl RefUnwindSafe for RuntimeConfigOptions",1,["wasmedge_sdk::config::RuntimeConfigOptions"]],["impl RefUnwindSafe for StatisticsConfigOptions",1,["wasmedge_sdk::config::StatisticsConfigOptions"]],["impl RefUnwindSafe for NNPreload",1,["wasmedge_sdk::plugin::NNPreload"]],["impl RefUnwindSafe for Plugin",1,["wasmedge_sdk::plugin::Plugin"]],["impl RefUnwindSafe for PluginManager",1,["wasmedge_sdk::plugin::PluginManager"]],["impl RefUnwindSafe for Compiler",1,["wasmedge_sdk::compiler::Compiler"]],["impl RefUnwindSafe for LogManager",1,["wasmedge_sdk::log::LogManager"]],["impl RefUnwindSafe for Module",1,["wasmedge_sdk::module::Module"]],["impl RefUnwindSafe for Statistics",1,["wasmedge_sdk::statistics::Statistics"]],["impl RefUnwindSafe for ExternRef",1,["wasmedge_sdk::types::ExternRef"]],["impl RefUnwindSafe for CoreVersion",1,["wasmedge_sdk::utils::CoreVersion"]],["impl RefUnwindSafe for Driver",1,["wasmedge_sdk::utils::Driver"]],["impl<'inst, T> !RefUnwindSafe for Vm<'inst, T>",1,["wasmedge_sdk::async::vm::Vm"]],["impl<'inst, T> RefUnwindSafe for Store<'inst, T>
where\n T: RefUnwindSafe + ?Sized,
",1,["wasmedge_sdk::store::Store"]],["impl<'inst, T> RefUnwindSafe for Vm<'inst, T>
where\n T: RefUnwindSafe + ?Sized,
",1,["wasmedge_sdk::vm::Vm"]],["impl<'module> RefUnwindSafe for ExportType<'module>",1,["wasmedge_sdk::module::ExportType"]],["impl<'module> RefUnwindSafe for ImportType<'module>",1,["wasmedge_sdk::module::ImportType"]],["impl<Data> RefUnwindSafe for ImportObjectBuilder<Data>
where\n Data: RefUnwindSafe,
",1,["wasmedge_sdk::async::import::ImportObjectBuilder"]],["impl<Data> RefUnwindSafe for ImportObjectBuilder<Data>
where\n Data: RefUnwindSafe,
",1,["wasmedge_sdk::import::ImportObjectBuilder"]]]],["wasmedge_sys",[["impl !RefUnwindSafe for AsyncState",1,["wasmedge_sys::async::fiber::AsyncState"]],["impl !RefUnwindSafe for AsyncWasiModule",1,["wasmedge_sys::async::module::AsyncWasiModule"]],["impl RefUnwindSafe for ProgramOptionType",1,["wasmedge_sys::plugin::ProgramOptionType"]],["impl RefUnwindSafe for AsyncCx",1,["wasmedge_sys::async::fiber::AsyncCx"]],["impl RefUnwindSafe for AsyncFunction",1,["wasmedge_sys::async::function::AsyncFunction"]],["impl RefUnwindSafe for AsyncInstance",1,["wasmedge_sys::async::module::AsyncInstance"]],["impl RefUnwindSafe for WasmEdge_ASTModuleContext",1,["wasmedge_sys::ffi::WasmEdge_ASTModuleContext"]],["impl RefUnwindSafe for WasmEdge_Async",1,["wasmedge_sys::ffi::WasmEdge_Async"]],["impl RefUnwindSafe for WasmEdge_Bytes",1,["wasmedge_sys::ffi::WasmEdge_Bytes"]],["impl RefUnwindSafe for WasmEdge_CallingFrameContext",1,["wasmedge_sys::ffi::WasmEdge_CallingFrameContext"]],["impl RefUnwindSafe for WasmEdge_CompilerContext",1,["wasmedge_sys::ffi::WasmEdge_CompilerContext"]],["impl RefUnwindSafe for WasmEdge_ConfigureContext",1,["wasmedge_sys::ffi::WasmEdge_ConfigureContext"]],["impl RefUnwindSafe for WasmEdge_ExecutorContext",1,["wasmedge_sys::ffi::WasmEdge_ExecutorContext"]],["impl RefUnwindSafe for WasmEdge_ExportTypeContext",1,["wasmedge_sys::ffi::WasmEdge_ExportTypeContext"]],["impl RefUnwindSafe for WasmEdge_FunctionInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_FunctionInstanceContext"]],["impl RefUnwindSafe for WasmEdge_FunctionTypeContext",1,["wasmedge_sys::ffi::WasmEdge_FunctionTypeContext"]],["impl RefUnwindSafe for WasmEdge_GlobalInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_GlobalInstanceContext"]],["impl RefUnwindSafe for WasmEdge_GlobalTypeContext",1,["wasmedge_sys::ffi::WasmEdge_GlobalTypeContext"]],["impl RefUnwindSafe for WasmEdge_ImportTypeContext",1,["wasmedge_sys::ffi::WasmEdge_ImportTypeContext"]],["impl RefUnwindSafe for WasmEdge_Limit",1,["wasmedge_sys::ffi::WasmEdge_Limit"]],["impl RefUnwindSafe for WasmEdge_LoaderContext",1,["wasmedge_sys::ffi::WasmEdge_LoaderContext"]],["impl RefUnwindSafe for WasmEdge_MemoryInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_MemoryInstanceContext"]],["impl RefUnwindSafe for WasmEdge_MemoryTypeContext",1,["wasmedge_sys::ffi::WasmEdge_MemoryTypeContext"]],["impl RefUnwindSafe for WasmEdge_ModuleDescriptor",1,["wasmedge_sys::ffi::WasmEdge_ModuleDescriptor"]],["impl RefUnwindSafe for WasmEdge_ModuleInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_ModuleInstanceContext"]],["impl RefUnwindSafe for WasmEdge_PluginContext",1,["wasmedge_sys::ffi::WasmEdge_PluginContext"]],["impl RefUnwindSafe for WasmEdge_PluginDescriptor",1,["wasmedge_sys::ffi::WasmEdge_PluginDescriptor"]],["impl RefUnwindSafe for WasmEdge_PluginVersionData",1,["wasmedge_sys::ffi::WasmEdge_PluginVersionData"]],["impl RefUnwindSafe for WasmEdge_ProgramOption",1,["wasmedge_sys::ffi::WasmEdge_ProgramOption"]],["impl RefUnwindSafe for WasmEdge_Result",1,["wasmedge_sys::ffi::WasmEdge_Result"]],["impl RefUnwindSafe for WasmEdge_StatisticsContext",1,["wasmedge_sys::ffi::WasmEdge_StatisticsContext"]],["impl RefUnwindSafe for WasmEdge_StoreContext",1,["wasmedge_sys::ffi::WasmEdge_StoreContext"]],["impl RefUnwindSafe for WasmEdge_String",1,["wasmedge_sys::ffi::WasmEdge_String"]],["impl RefUnwindSafe for WasmEdge_TableInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_TableInstanceContext"]],["impl RefUnwindSafe for WasmEdge_TableTypeContext",1,["wasmedge_sys::ffi::WasmEdge_TableTypeContext"]],["impl RefUnwindSafe for WasmEdge_TagInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_TagInstanceContext"]],["impl RefUnwindSafe for WasmEdge_TagTypeContext",1,["wasmedge_sys::ffi::WasmEdge_TagTypeContext"]],["impl RefUnwindSafe for WasmEdge_VMContext",1,["wasmedge_sys::ffi::WasmEdge_VMContext"]],["impl RefUnwindSafe for WasmEdge_ValType",1,["wasmedge_sys::ffi::WasmEdge_ValType"]],["impl RefUnwindSafe for WasmEdge_ValidatorContext",1,["wasmedge_sys::ffi::WasmEdge_ValidatorContext"]],["impl RefUnwindSafe for WasmEdge_Value",1,["wasmedge_sys::ffi::WasmEdge_Value"]],["impl RefUnwindSafe for ModuleDescriptor",1,["wasmedge_sys::plugin::ModuleDescriptor"]],["impl RefUnwindSafe for Plugin",1,["wasmedge_sys::plugin::Plugin"]],["impl RefUnwindSafe for PluginDescriptor",1,["wasmedge_sys::plugin::PluginDescriptor"]],["impl RefUnwindSafe for PluginManager",1,["wasmedge_sys::plugin::PluginManager"]],["impl RefUnwindSafe for PluginVersion",1,["wasmedge_sys::plugin::PluginVersion"]],["impl RefUnwindSafe for ProgramOption",1,["wasmedge_sys::plugin::ProgramOption"]],["impl RefUnwindSafe for CallingFrame",1,["wasmedge_sys::frame::CallingFrame"]],["impl RefUnwindSafe for Compiler",1,["wasmedge_sys::compiler::Compiler"]],["impl RefUnwindSafe for Config",1,["wasmedge_sys::config::Config"]],["impl RefUnwindSafe for Executor",1,["wasmedge_sys::executor::Executor"]],["impl RefUnwindSafe for Function",1,["wasmedge_sys::instance::function::Function"]],["impl RefUnwindSafe for Global",1,["wasmedge_sys::instance::global::Global"]],["impl RefUnwindSafe for Instance",1,["wasmedge_sys::instance::module::Instance"]],["impl RefUnwindSafe for Loader",1,["wasmedge_sys::loader::Loader"]],["impl RefUnwindSafe for Memory",1,["wasmedge_sys::instance::memory::Memory"]],["impl RefUnwindSafe for Module",1,["wasmedge_sys::ast_module::Module"]],["impl RefUnwindSafe for Statistics",1,["wasmedge_sys::statistics::Statistics"]],["impl RefUnwindSafe for Store",1,["wasmedge_sys::store::Store"]],["impl RefUnwindSafe for Table",1,["wasmedge_sys::instance::table::Table"]],["impl RefUnwindSafe for Validator",1,["wasmedge_sys::validator::Validator"]],["impl RefUnwindSafe for WasiModule",1,["wasmedge_sys::instance::module::WasiModule"]],["impl RefUnwindSafe for WasmValue",1,["wasmedge_sys::types::WasmValue"]],["impl RefUnwindSafe for WasmEdgeString",1,["wasmedge_sys::types::WasmEdgeString"]],["impl<'module> RefUnwindSafe for ExportType<'module>",1,["wasmedge_sys::ast_module::ExportType"]],["impl<'module> RefUnwindSafe for ImportType<'module>",1,["wasmedge_sys::ast_module::ImportType"]],["impl<D, Ref> RefUnwindSafe for InnerRef<D, Ref>
where\n D: RefUnwindSafe,\n Ref: RefUnwindSafe + ?Sized,
",1,["wasmedge_sys::instance::InnerRef"]],["impl<T> RefUnwindSafe for AsyncImportObject<T>
where\n T: RefUnwindSafe,
",1,["wasmedge_sys::async::module::AsyncImportObject"]],["impl<T> RefUnwindSafe for ImportModule<T>
where\n T: RefUnwindSafe + ?Sized,
",1,["wasmedge_sys::instance::module::ImportModule"]]]],["wasmedge_types",[["impl RefUnwindSafe for CompilerOptimizationLevel",1,["wasmedge_types::CompilerOptimizationLevel"]],["impl RefUnwindSafe for CompilerOutputFormat",1,["wasmedge_types::CompilerOutputFormat"]],["impl RefUnwindSafe for ExternalInstanceType",1,["wasmedge_types::ExternalInstanceType"]],["impl RefUnwindSafe for HostRegistration",1,["wasmedge_types::HostRegistration"]],["impl RefUnwindSafe for Mutability",1,["wasmedge_types::Mutability"]],["impl RefUnwindSafe for NeverType",1,["wasmedge_types::NeverType"]],["impl RefUnwindSafe for RefType",1,["wasmedge_types::RefType"]],["impl RefUnwindSafe for ValType",1,["wasmedge_types::ValType"]],["impl RefUnwindSafe for CoreCommonError",1,["wasmedge_types::error::CoreCommonError"]],["impl RefUnwindSafe for CoreComponentError",1,["wasmedge_types::error::CoreComponentError"]],["impl RefUnwindSafe for CoreError",1,["wasmedge_types::error::CoreError"]],["impl RefUnwindSafe for CoreExecutionError",1,["wasmedge_types::error::CoreExecutionError"]],["impl RefUnwindSafe for CoreInstantiationError",1,["wasmedge_types::error::CoreInstantiationError"]],["impl RefUnwindSafe for CoreLoadError",1,["wasmedge_types::error::CoreLoadError"]],["impl RefUnwindSafe for CoreValidationError",1,["wasmedge_types::error::CoreValidationError"]],["impl RefUnwindSafe for ExportError",1,["wasmedge_types::error::ExportError"]],["impl RefUnwindSafe for FuncError",1,["wasmedge_types::error::FuncError"]],["impl RefUnwindSafe for GlobalError",1,["wasmedge_types::error::GlobalError"]],["impl RefUnwindSafe for HostFuncError",1,["wasmedge_types::error::HostFuncError"]],["impl RefUnwindSafe for ImportError",1,["wasmedge_types::error::ImportError"]],["impl RefUnwindSafe for InstanceError",1,["wasmedge_types::error::InstanceError"]],["impl RefUnwindSafe for MemError",1,["wasmedge_types::error::MemError"]],["impl RefUnwindSafe for PluginError",1,["wasmedge_types::error::PluginError"]],["impl RefUnwindSafe for StoreError",1,["wasmedge_types::error::StoreError"]],["impl RefUnwindSafe for TableError",1,["wasmedge_types::error::TableError"]],["impl RefUnwindSafe for VmError",1,["wasmedge_types::error::VmError"]],["impl RefUnwindSafe for WasmEdgeError",1,["wasmedge_types::error::WasmEdgeError"]],["impl RefUnwindSafe for FuncType",1,["wasmedge_types::FuncType"]],["impl RefUnwindSafe for GlobalType",1,["wasmedge_types::GlobalType"]],["impl RefUnwindSafe for MemoryType",1,["wasmedge_types::MemoryType"]],["impl RefUnwindSafe for TableType",1,["wasmedge_types::TableType"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[29569,11081,28532,11603]} \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js new file mode 100644 index 000000000..9d8e5ea5b --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["async_wasi",[["impl !UnwindSafe for VFD",1,["async_wasi::snapshots::env::VFD"]],["impl !UnwindSafe for AsyncWasiSocket",1,["async_wasi::snapshots::common::net::async_tokio::AsyncWasiSocket"]],["impl !UnwindSafe for VFS",1,["async_wasi::snapshots::env::VFS"]],["impl !UnwindSafe for WasiCtx",1,["async_wasi::snapshots::WasiCtx"]],["impl UnwindSafe for AddressFamily",1,["async_wasi::snapshots::common::net::AddressFamily"]],["impl UnwindSafe for ConnectState",1,["async_wasi::snapshots::common::net::ConnectState"]],["impl UnwindSafe for PrePoll",1,["async_wasi::snapshots::common::net::PrePoll"]],["impl UnwindSafe for SocketType",1,["async_wasi::snapshots::common::net::SocketType"]],["impl UnwindSafe for Subscription",1,["async_wasi::snapshots::common::net::Subscription"]],["impl UnwindSafe for SubscriptionFdType",1,["async_wasi::snapshots::common::net::SubscriptionFdType"]],["impl UnwindSafe for Advice",1,["async_wasi::snapshots::common::vfs::Advice"]],["impl UnwindSafe for SystemTimeSpec",1,["async_wasi::snapshots::common::vfs::SystemTimeSpec"]],["impl UnwindSafe for DiskInode",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskInode"]],["impl UnwindSafe for AddressFamily",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::AddressFamily"]],["impl UnwindSafe for Errno",1,["async_wasi::snapshots::common::error::Errno"]],["impl UnwindSafe for SubscriptionClock",1,["async_wasi::snapshots::common::net::SubscriptionClock"]],["impl UnwindSafe for SubscriptionFd",1,["async_wasi::snapshots::common::net::SubscriptionFd"]],["impl UnwindSafe for WasiSocketState",1,["async_wasi::snapshots::common::net::WasiSocketState"]],["impl UnwindSafe for __wasi_address_t",1,["async_wasi::snapshots::common::types::__wasi_address_t"]],["impl UnwindSafe for __wasi_addrinfo_t",1,["async_wasi::snapshots::common::types::__wasi_addrinfo_t"]],["impl UnwindSafe for __wasi_ciovec_t",1,["async_wasi::snapshots::common::types::__wasi_ciovec_t"]],["impl UnwindSafe for __wasi_dirent_t",1,["async_wasi::snapshots::common::types::__wasi_dirent_t"]],["impl UnwindSafe for __wasi_event_fd_readwrite_t",1,["async_wasi::snapshots::common::types::__wasi_event_fd_readwrite_t"]],["impl UnwindSafe for __wasi_event_t",1,["async_wasi::snapshots::common::types::__wasi_event_t"]],["impl UnwindSafe for __wasi_fdstat_t",1,["async_wasi::snapshots::common::types::__wasi_fdstat_t"]],["impl UnwindSafe for __wasi_filestat_t",1,["async_wasi::snapshots::common::types::__wasi_filestat_t"]],["impl UnwindSafe for __wasi_iovec_t",1,["async_wasi::snapshots::common::types::__wasi_iovec_t"]],["impl UnwindSafe for __wasi_prestat_dir_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_dir_t"]],["impl UnwindSafe for __wasi_prestat_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_t"]],["impl UnwindSafe for __wasi_sockaddr_in_t",1,["async_wasi::snapshots::common::types::__wasi_sockaddr_in_t"]],["impl UnwindSafe for __wasi_sockaddr_t",1,["async_wasi::snapshots::common::types::__wasi_sockaddr_t"]],["impl UnwindSafe for __wasi_subscription_clock_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_clock_t"]],["impl UnwindSafe for __wasi_subscription_fd_readwrite_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_fd_readwrite_t"]],["impl UnwindSafe for __wasi_subscription_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_t"]],["impl UnwindSafe for __wasi_subscription_u_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_u_t"]],["impl UnwindSafe for __wasi_timeval",1,["async_wasi::snapshots::common::types::__wasi_timeval"]],["impl UnwindSafe for MemoryDir",1,["async_wasi::snapshots::common::vfs::impls::MemoryDir"]],["impl UnwindSafe for MemoryFile",1,["async_wasi::snapshots::common::vfs::impls::MemoryFile"]],["impl UnwindSafe for FdFlags",1,["async_wasi::snapshots::common::vfs::FdFlags"]],["impl UnwindSafe for FdStat",1,["async_wasi::snapshots::common::vfs::FdStat"]],["impl UnwindSafe for FileType",1,["async_wasi::snapshots::common::vfs::FileType"]],["impl UnwindSafe for Filestat",1,["async_wasi::snapshots::common::vfs::Filestat"]],["impl UnwindSafe for Lookupflags",1,["async_wasi::snapshots::common::vfs::Lookupflags"]],["impl UnwindSafe for OFlags",1,["async_wasi::snapshots::common::vfs::OFlags"]],["impl UnwindSafe for ReaddirEntity",1,["async_wasi::snapshots::common::vfs::ReaddirEntity"]],["impl UnwindSafe for RiFlags",1,["async_wasi::snapshots::common::vfs::RiFlags"]],["impl UnwindSafe for RoFlags",1,["async_wasi::snapshots::common::vfs::RoFlags"]],["impl UnwindSafe for SdFlags",1,["async_wasi::snapshots::common::vfs::SdFlags"]],["impl UnwindSafe for SiFlags",1,["async_wasi::snapshots::common::vfs::SiFlags"]],["impl UnwindSafe for WASIRights",1,["async_wasi::snapshots::common::vfs::WASIRights"]],["impl UnwindSafe for DiskDir",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskDir"]],["impl UnwindSafe for DiskFile",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskFile"]],["impl UnwindSafe for DiskFileSys",1,["async_wasi::snapshots::common::vfs::virtual_sys::DiskFileSys"]],["impl UnwindSafe for WasiAddrinfo",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::WasiAddrinfo"]],["impl UnwindSafe for WasiSockaddr",1,["async_wasi::snapshots::preview_1::async_socket::addrinfo::WasiSockaddr"]],["impl UnwindSafe for __wasi_prestat_u_t",1,["async_wasi::snapshots::common::types::__wasi_prestat_u_t"]],["impl UnwindSafe for __wasi_subscription_u_u_t",1,["async_wasi::snapshots::common::types::__wasi_subscription_u_u_t"]],["impl<D, F> UnwindSafe for Inode<D, F>
where\n D: UnwindSafe,\n F: UnwindSafe,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::Inode"]],["impl<D, F> UnwindSafe for WasiVirtualSys<D, F>
where\n D: UnwindSafe,\n F: UnwindSafe,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::WasiVirtualSys"]],["impl<IN, OUT, ERR> UnwindSafe for StdioSys<IN, OUT, ERR>
where\n IN: UnwindSafe,\n OUT: UnwindSafe,\n ERR: UnwindSafe,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::StdioSys"]],["impl<R> UnwindSafe for InPipline<R>
where\n R: UnwindSafe,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::InPipline"]],["impl<T> UnwindSafe for WasmPtr<T>
where\n T: UnwindSafe,
",1,["async_wasi::snapshots::common::memory::WasmPtr"]],["impl<W> UnwindSafe for OutPipeline<W>
where\n W: UnwindSafe,
",1,["async_wasi::snapshots::common::vfs::virtual_sys::OutPipeline"]]]],["wasmedge_sdk",[["impl UnwindSafe for ExecutionTarget",1,["wasmedge_sdk::plugin::ExecutionTarget"]],["impl UnwindSafe for GraphEncoding",1,["wasmedge_sdk::plugin::GraphEncoding"]],["impl UnwindSafe for Val",1,["wasmedge_sdk::types::Val"]],["impl UnwindSafe for CommonConfigOptions",1,["wasmedge_sdk::config::CommonConfigOptions"]],["impl UnwindSafe for CompilerConfigOptions",1,["wasmedge_sdk::config::CompilerConfigOptions"]],["impl UnwindSafe for Config",1,["wasmedge_sdk::config::Config"]],["impl UnwindSafe for ConfigBuilder",1,["wasmedge_sdk::config::ConfigBuilder"]],["impl UnwindSafe for RuntimeConfigOptions",1,["wasmedge_sdk::config::RuntimeConfigOptions"]],["impl UnwindSafe for StatisticsConfigOptions",1,["wasmedge_sdk::config::StatisticsConfigOptions"]],["impl UnwindSafe for NNPreload",1,["wasmedge_sdk::plugin::NNPreload"]],["impl UnwindSafe for Plugin",1,["wasmedge_sdk::plugin::Plugin"]],["impl UnwindSafe for PluginManager",1,["wasmedge_sdk::plugin::PluginManager"]],["impl UnwindSafe for Compiler",1,["wasmedge_sdk::compiler::Compiler"]],["impl UnwindSafe for LogManager",1,["wasmedge_sdk::log::LogManager"]],["impl UnwindSafe for Module",1,["wasmedge_sdk::module::Module"]],["impl UnwindSafe for Statistics",1,["wasmedge_sdk::statistics::Statistics"]],["impl UnwindSafe for ExternRef",1,["wasmedge_sdk::types::ExternRef"]],["impl UnwindSafe for CoreVersion",1,["wasmedge_sdk::utils::CoreVersion"]],["impl UnwindSafe for Driver",1,["wasmedge_sdk::utils::Driver"]],["impl<'inst, T> !UnwindSafe for Vm<'inst, T>",1,["wasmedge_sdk::async::vm::Vm"]],["impl<'inst, T> !UnwindSafe for Store<'inst, T>",1,["wasmedge_sdk::store::Store"]],["impl<'inst, T> !UnwindSafe for Vm<'inst, T>",1,["wasmedge_sdk::vm::Vm"]],["impl<'module> UnwindSafe for ExportType<'module>",1,["wasmedge_sdk::module::ExportType"]],["impl<'module> UnwindSafe for ImportType<'module>",1,["wasmedge_sdk::module::ImportType"]],["impl<Data> UnwindSafe for ImportObjectBuilder<Data>
where\n Data: UnwindSafe,
",1,["wasmedge_sdk::async::import::ImportObjectBuilder"]],["impl<Data> UnwindSafe for ImportObjectBuilder<Data>
where\n Data: UnwindSafe,
",1,["wasmedge_sdk::import::ImportObjectBuilder"]]]],["wasmedge_sys",[["impl !UnwindSafe for AsyncWasiModule",1,["wasmedge_sys::async::module::AsyncWasiModule"]],["impl UnwindSafe for ProgramOptionType",1,["wasmedge_sys::plugin::ProgramOptionType"]],["impl UnwindSafe for AsyncCx",1,["wasmedge_sys::async::fiber::AsyncCx"]],["impl UnwindSafe for AsyncState",1,["wasmedge_sys::async::fiber::AsyncState"]],["impl UnwindSafe for AsyncFunction",1,["wasmedge_sys::async::function::AsyncFunction"]],["impl UnwindSafe for AsyncInstance",1,["wasmedge_sys::async::module::AsyncInstance"]],["impl UnwindSafe for WasmEdge_ASTModuleContext",1,["wasmedge_sys::ffi::WasmEdge_ASTModuleContext"]],["impl UnwindSafe for WasmEdge_Async",1,["wasmedge_sys::ffi::WasmEdge_Async"]],["impl UnwindSafe for WasmEdge_Bytes",1,["wasmedge_sys::ffi::WasmEdge_Bytes"]],["impl UnwindSafe for WasmEdge_CallingFrameContext",1,["wasmedge_sys::ffi::WasmEdge_CallingFrameContext"]],["impl UnwindSafe for WasmEdge_CompilerContext",1,["wasmedge_sys::ffi::WasmEdge_CompilerContext"]],["impl UnwindSafe for WasmEdge_ConfigureContext",1,["wasmedge_sys::ffi::WasmEdge_ConfigureContext"]],["impl UnwindSafe for WasmEdge_ExecutorContext",1,["wasmedge_sys::ffi::WasmEdge_ExecutorContext"]],["impl UnwindSafe for WasmEdge_ExportTypeContext",1,["wasmedge_sys::ffi::WasmEdge_ExportTypeContext"]],["impl UnwindSafe for WasmEdge_FunctionInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_FunctionInstanceContext"]],["impl UnwindSafe for WasmEdge_FunctionTypeContext",1,["wasmedge_sys::ffi::WasmEdge_FunctionTypeContext"]],["impl UnwindSafe for WasmEdge_GlobalInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_GlobalInstanceContext"]],["impl UnwindSafe for WasmEdge_GlobalTypeContext",1,["wasmedge_sys::ffi::WasmEdge_GlobalTypeContext"]],["impl UnwindSafe for WasmEdge_ImportTypeContext",1,["wasmedge_sys::ffi::WasmEdge_ImportTypeContext"]],["impl UnwindSafe for WasmEdge_Limit",1,["wasmedge_sys::ffi::WasmEdge_Limit"]],["impl UnwindSafe for WasmEdge_LoaderContext",1,["wasmedge_sys::ffi::WasmEdge_LoaderContext"]],["impl UnwindSafe for WasmEdge_MemoryInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_MemoryInstanceContext"]],["impl UnwindSafe for WasmEdge_MemoryTypeContext",1,["wasmedge_sys::ffi::WasmEdge_MemoryTypeContext"]],["impl UnwindSafe for WasmEdge_ModuleDescriptor",1,["wasmedge_sys::ffi::WasmEdge_ModuleDescriptor"]],["impl UnwindSafe for WasmEdge_ModuleInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_ModuleInstanceContext"]],["impl UnwindSafe for WasmEdge_PluginContext",1,["wasmedge_sys::ffi::WasmEdge_PluginContext"]],["impl UnwindSafe for WasmEdge_PluginDescriptor",1,["wasmedge_sys::ffi::WasmEdge_PluginDescriptor"]],["impl UnwindSafe for WasmEdge_PluginVersionData",1,["wasmedge_sys::ffi::WasmEdge_PluginVersionData"]],["impl UnwindSafe for WasmEdge_ProgramOption",1,["wasmedge_sys::ffi::WasmEdge_ProgramOption"]],["impl UnwindSafe for WasmEdge_Result",1,["wasmedge_sys::ffi::WasmEdge_Result"]],["impl UnwindSafe for WasmEdge_StatisticsContext",1,["wasmedge_sys::ffi::WasmEdge_StatisticsContext"]],["impl UnwindSafe for WasmEdge_StoreContext",1,["wasmedge_sys::ffi::WasmEdge_StoreContext"]],["impl UnwindSafe for WasmEdge_String",1,["wasmedge_sys::ffi::WasmEdge_String"]],["impl UnwindSafe for WasmEdge_TableInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_TableInstanceContext"]],["impl UnwindSafe for WasmEdge_TableTypeContext",1,["wasmedge_sys::ffi::WasmEdge_TableTypeContext"]],["impl UnwindSafe for WasmEdge_TagInstanceContext",1,["wasmedge_sys::ffi::WasmEdge_TagInstanceContext"]],["impl UnwindSafe for WasmEdge_TagTypeContext",1,["wasmedge_sys::ffi::WasmEdge_TagTypeContext"]],["impl UnwindSafe for WasmEdge_VMContext",1,["wasmedge_sys::ffi::WasmEdge_VMContext"]],["impl UnwindSafe for WasmEdge_ValType",1,["wasmedge_sys::ffi::WasmEdge_ValType"]],["impl UnwindSafe for WasmEdge_ValidatorContext",1,["wasmedge_sys::ffi::WasmEdge_ValidatorContext"]],["impl UnwindSafe for WasmEdge_Value",1,["wasmedge_sys::ffi::WasmEdge_Value"]],["impl UnwindSafe for ModuleDescriptor",1,["wasmedge_sys::plugin::ModuleDescriptor"]],["impl UnwindSafe for Plugin",1,["wasmedge_sys::plugin::Plugin"]],["impl UnwindSafe for PluginDescriptor",1,["wasmedge_sys::plugin::PluginDescriptor"]],["impl UnwindSafe for PluginManager",1,["wasmedge_sys::plugin::PluginManager"]],["impl UnwindSafe for PluginVersion",1,["wasmedge_sys::plugin::PluginVersion"]],["impl UnwindSafe for ProgramOption",1,["wasmedge_sys::plugin::ProgramOption"]],["impl UnwindSafe for CallingFrame",1,["wasmedge_sys::frame::CallingFrame"]],["impl UnwindSafe for Compiler",1,["wasmedge_sys::compiler::Compiler"]],["impl UnwindSafe for Config",1,["wasmedge_sys::config::Config"]],["impl UnwindSafe for Executor",1,["wasmedge_sys::executor::Executor"]],["impl UnwindSafe for Function",1,["wasmedge_sys::instance::function::Function"]],["impl UnwindSafe for Global",1,["wasmedge_sys::instance::global::Global"]],["impl UnwindSafe for Instance",1,["wasmedge_sys::instance::module::Instance"]],["impl UnwindSafe for Loader",1,["wasmedge_sys::loader::Loader"]],["impl UnwindSafe for Memory",1,["wasmedge_sys::instance::memory::Memory"]],["impl UnwindSafe for Module",1,["wasmedge_sys::ast_module::Module"]],["impl UnwindSafe for Statistics",1,["wasmedge_sys::statistics::Statistics"]],["impl UnwindSafe for Store",1,["wasmedge_sys::store::Store"]],["impl UnwindSafe for Table",1,["wasmedge_sys::instance::table::Table"]],["impl UnwindSafe for Validator",1,["wasmedge_sys::validator::Validator"]],["impl UnwindSafe for WasiModule",1,["wasmedge_sys::instance::module::WasiModule"]],["impl UnwindSafe for WasmValue",1,["wasmedge_sys::types::WasmValue"]],["impl UnwindSafe for WasmEdgeString",1,["wasmedge_sys::types::WasmEdgeString"]],["impl<'module> UnwindSafe for ExportType<'module>",1,["wasmedge_sys::ast_module::ExportType"]],["impl<'module> UnwindSafe for ImportType<'module>",1,["wasmedge_sys::ast_module::ImportType"]],["impl<D, Ref> UnwindSafe for InnerRef<D, Ref>
where\n D: UnwindSafe,\n Ref: UnwindSafe + ?Sized,
",1,["wasmedge_sys::instance::InnerRef"]],["impl<T> UnwindSafe for AsyncImportObject<T>
where\n T: UnwindSafe,
",1,["wasmedge_sys::async::module::AsyncImportObject"]],["impl<T> UnwindSafe for ImportModule<T>
where\n T: UnwindSafe + ?Sized,
",1,["wasmedge_sys::instance::module::ImportModule"]]]],["wasmedge_types",[["impl UnwindSafe for CompilerOptimizationLevel",1,["wasmedge_types::CompilerOptimizationLevel"]],["impl UnwindSafe for CompilerOutputFormat",1,["wasmedge_types::CompilerOutputFormat"]],["impl UnwindSafe for ExternalInstanceType",1,["wasmedge_types::ExternalInstanceType"]],["impl UnwindSafe for HostRegistration",1,["wasmedge_types::HostRegistration"]],["impl UnwindSafe for Mutability",1,["wasmedge_types::Mutability"]],["impl UnwindSafe for NeverType",1,["wasmedge_types::NeverType"]],["impl UnwindSafe for RefType",1,["wasmedge_types::RefType"]],["impl UnwindSafe for ValType",1,["wasmedge_types::ValType"]],["impl UnwindSafe for CoreCommonError",1,["wasmedge_types::error::CoreCommonError"]],["impl UnwindSafe for CoreComponentError",1,["wasmedge_types::error::CoreComponentError"]],["impl UnwindSafe for CoreError",1,["wasmedge_types::error::CoreError"]],["impl UnwindSafe for CoreExecutionError",1,["wasmedge_types::error::CoreExecutionError"]],["impl UnwindSafe for CoreInstantiationError",1,["wasmedge_types::error::CoreInstantiationError"]],["impl UnwindSafe for CoreLoadError",1,["wasmedge_types::error::CoreLoadError"]],["impl UnwindSafe for CoreValidationError",1,["wasmedge_types::error::CoreValidationError"]],["impl UnwindSafe for ExportError",1,["wasmedge_types::error::ExportError"]],["impl UnwindSafe for FuncError",1,["wasmedge_types::error::FuncError"]],["impl UnwindSafe for GlobalError",1,["wasmedge_types::error::GlobalError"]],["impl UnwindSafe for HostFuncError",1,["wasmedge_types::error::HostFuncError"]],["impl UnwindSafe for ImportError",1,["wasmedge_types::error::ImportError"]],["impl UnwindSafe for InstanceError",1,["wasmedge_types::error::InstanceError"]],["impl UnwindSafe for MemError",1,["wasmedge_types::error::MemError"]],["impl UnwindSafe for PluginError",1,["wasmedge_types::error::PluginError"]],["impl UnwindSafe for StoreError",1,["wasmedge_types::error::StoreError"]],["impl UnwindSafe for TableError",1,["wasmedge_types::error::TableError"]],["impl UnwindSafe for VmError",1,["wasmedge_types::error::VmError"]],["impl UnwindSafe for WasmEdgeError",1,["wasmedge_types::error::WasmEdgeError"]],["impl UnwindSafe for FuncType",1,["wasmedge_types::FuncType"]],["impl UnwindSafe for GlobalType",1,["wasmedge_types::GlobalType"]],["impl UnwindSafe for MemoryType",1,["wasmedge_types::MemoryType"]],["impl UnwindSafe for TableType",1,["wasmedge_types::TableType"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[28912,10101,27874,11324]} \ No newline at end of file diff --git a/trait.impl/core/str/traits/trait.FromStr.js b/trait.impl/core/str/traits/trait.FromStr.js new file mode 100644 index 000000000..ced950cce --- /dev/null +++ b/trait.impl/core/str/traits/trait.FromStr.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sdk",[["impl FromStr for ExecutionTarget"],["impl FromStr for GraphEncoding"],["impl FromStr for NNPreload"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[933]} \ No newline at end of file diff --git a/trait.impl/wasmedge_sdk/async/vm/trait.AsyncInst.js b/trait.impl/wasmedge_sdk/async/vm/trait.AsyncInst.js new file mode 100644 index 000000000..9891e8acc --- /dev/null +++ b/trait.impl/wasmedge_sdk/async/vm/trait.AsyncInst.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sdk",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[19]} \ No newline at end of file diff --git a/trait.impl/wasmedge_sdk/io/trait.WasmVal.js b/trait.impl/wasmedge_sdk/io/trait.WasmVal.js new file mode 100644 index 000000000..9891e8acc --- /dev/null +++ b/trait.impl/wasmedge_sdk/io/trait.WasmVal.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sdk",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[19]} \ No newline at end of file diff --git a/trait.impl/wasmedge_sdk/io/trait.WasmValType.js b/trait.impl/wasmedge_sdk/io/trait.WasmValType.js new file mode 100644 index 000000000..9891e8acc --- /dev/null +++ b/trait.impl/wasmedge_sdk/io/trait.WasmValType.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sdk",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[19]} \ No newline at end of file diff --git a/trait.impl/wasmedge_sdk/io/trait.WasmValTypeList.js b/trait.impl/wasmedge_sdk/io/trait.WasmValTypeList.js new file mode 100644 index 000000000..9891e8acc --- /dev/null +++ b/trait.impl/wasmedge_sdk/io/trait.WasmValTypeList.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sdk",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[19]} \ No newline at end of file diff --git a/trait.impl/wasmedge_sys/instance/function/trait.AsFunc.js b/trait.impl/wasmedge_sys/instance/function/trait.AsFunc.js new file mode 100644 index 000000000..011a04d0e --- /dev/null +++ b/trait.impl/wasmedge_sys/instance/function/trait.AsFunc.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sys",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[19]} \ No newline at end of file diff --git a/trait.impl/wasmedge_sys/instance/module/trait.AsInstance.js b/trait.impl/wasmedge_sys/instance/module/trait.AsInstance.js new file mode 100644 index 000000000..c487d6b72 --- /dev/null +++ b/trait.impl/wasmedge_sys/instance/module/trait.AsInstance.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["wasmedge_sdk",[]],["wasmedge_sys",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[19,20]} \ No newline at end of file diff --git a/type.impl/async_wasi/snapshots/common/types/type.__wasi_fd_t.js b/type.impl/async_wasi/snapshots/common/types/type.__wasi_fd_t.js new file mode 100644 index 000000000..6757be8e2 --- /dev/null +++ b/type.impl/async_wasi/snapshots/common/types/type.__wasi_fd_t.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["async_wasi",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[17]} \ No newline at end of file diff --git a/type.impl/async_wasi/snapshots/struct.WasiCtx.js b/type.impl/async_wasi/snapshots/struct.WasiCtx.js new file mode 100644 index 000000000..1380b2a50 --- /dev/null +++ b/type.impl/async_wasi/snapshots/struct.WasiCtx.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sys",[["
Source§

impl Debug for WasiCtx

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","wasmedge_sys::WasiCtx"],["
Source§

impl Default for WasiCtx

Source§

fn default() -> WasiCtx

Returns the “default value” for a type. Read more
","Default","wasmedge_sys::WasiCtx"],["
Source§

impl WasiCtx

Source

pub fn new() -> WasiCtx

Source

pub fn create_with_vfs(vfs: VFS) -> WasiCtx

Source

pub fn mount_file_sys(\n &mut self,\n guest_path: &str,\n file_sys: Box<dyn WasiFileSys<Index = usize> + Sync + Send>,\n)

Source

pub fn push_arg(&mut self, arg: String)

Source

pub fn push_args(&mut self, args: Vec<String>)

Source

pub fn push_env(&mut self, env: String)

The format of the env argument should be “KEY=VALUE”

\n
Source

pub fn push_envs(&mut self, envs: Vec<String>)

",0,"wasmedge_sys::WasiCtx"]]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[8115]} \ No newline at end of file diff --git a/type.impl/core/option/enum.Option.js b/type.impl/core/option/enum.Option.js new file mode 100644 index 000000000..6d1dd7914 --- /dev/null +++ b/type.impl/core/option/enum.Option.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sys",[["
1.0.0 · Source§

impl<T> Clone for Option<T>
where\n T: Clone,

Source§

fn clone(&self) -> Option<T>

Returns a copy of the value. Read more
Source§

fn clone_from(&mut self, source: &Option<T>)

Performs copy-assignment from source. Read more
","Clone","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.0.0 · Source§

impl<T> Debug for Option<T>
where\n T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.0.0 · Source§

impl<T> Default for Option<T>

Source§

fn default() -> Option<T>

Returns None.

\n
§Examples
\n
let opt: Option<u32> = Option::default();\nassert!(opt.is_none());
\n
","Default","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
§

impl<T> Encode for Option<T>
where\n T: Encode,

§

fn encode(&self, sink: &mut Vec<u8>)

Encode the type into the given byte sink.
","Encode","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.12.0 · Source§

impl<T> From<T> for Option<T>

Source§

fn from(val: T) -> Option<T>

Moves val into a new Some.

\n
§Examples
\n
let o: Option<u8> = Option::from(67);\n\nassert_eq!(Some(67), o);
\n
","From","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.0.0 · Source§

impl<A, V> FromIterator<Option<A>> for Option<V>
where\n V: FromIterator<A>,

Source§

fn from_iter<I>(iter: I) -> Option<V>
where\n I: IntoIterator<Item = Option<A>>,

Takes each element in the Iterator: if it is None,\nno further elements are taken, and the None is\nreturned. Should no None occur, a container of type\nV containing the values of each Option is returned.

\n
§Examples
\n

Here is an example which increments every integer in a vector.\nWe use the checked variant of add that returns None when the\ncalculation would result in an overflow.

\n\n
let items = vec![0_u16, 1, 2];\n\nlet res: Option<Vec<u16>> = items\n    .iter()\n    .map(|x| x.checked_add(1))\n    .collect();\n\nassert_eq!(res, Some(vec![1, 2, 3]));
\n

As you can see, this will return the expected, valid items.

\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let items = vec![2_u16, 1, 0];\n\nlet res: Option<Vec<u16>> = items\n    .iter()\n    .map(|x| x.checked_sub(1))\n    .collect();\n\nassert_eq!(res, None);
\n

Since the last element is zero, it would underflow. Thus, the resulting\nvalue is None.

\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first None.

\n\n
let items = vec![3_u16, 2, 1, 10];\n\nlet mut shared = 0;\n\nlet res: Option<Vec<u16>> = items\n    .iter()\n    .map(|x| { shared += x; x.checked_sub(2) })\n    .collect();\n\nassert_eq!(res, None);\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
Source§

impl<T> FromResidual<Option<Infallible>> for Option<T>

Source§

fn from_residual(residual: Option<Infallible>) -> Option<T>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
Source§

impl<T> FromResidual<Yeet<()>> for Option<T>

Source§

fn from_residual(_: Yeet<()>) -> Option<T>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.0.0 · Source§

impl<T> Hash for Option<T>
where\n T: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.0.0 · Source§

impl<T> IntoIterator for Option<T>

Source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n
§Examples
\n
let x = Some(\"string\");\nlet v: Vec<&str> = x.into_iter().collect();\nassert_eq!(v, [\"string\"]);\n\nlet x = None;\nlet v: Vec<&str> = x.into_iter().collect();\nassert!(v.is_empty());
\n
Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
Source§

impl<T> Option<T>

1.0.0 (const: 1.48.0) · Source

pub const fn is_some(&self) -> bool

Returns true if the option is a Some value.

\n
§Examples
\n
let x: Option<u32> = Some(2);\nassert_eq!(x.is_some(), true);\n\nlet x: Option<u32> = None;\nassert_eq!(x.is_some(), false);
\n
1.70.0 · Source

pub fn is_some_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the option is a Some and the value inside of it matches a predicate.

\n
§Examples
\n
let x: Option<u32> = Some(2);\nassert_eq!(x.is_some_and(|x| x > 1), true);\n\nlet x: Option<u32> = Some(0);\nassert_eq!(x.is_some_and(|x| x > 1), false);\n\nlet x: Option<u32> = None;\nassert_eq!(x.is_some_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · Source

pub const fn is_none(&self) -> bool

Returns true if the option is a None value.

\n
§Examples
\n
let x: Option<u32> = Some(2);\nassert_eq!(x.is_none(), false);\n\nlet x: Option<u32> = None;\nassert_eq!(x.is_none(), true);
\n
1.82.0 · Source

pub fn is_none_or(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the option is a None or the value inside of it matches a predicate.

\n
§Examples
\n
let x: Option<u32> = Some(2);\nassert_eq!(x.is_none_or(|x| x > 1), true);\n\nlet x: Option<u32> = Some(0);\nassert_eq!(x.is_none_or(|x| x > 1), false);\n\nlet x: Option<u32> = None;\nassert_eq!(x.is_none_or(|x| x > 1), true);
\n
1.0.0 (const: 1.48.0) · Source

pub const fn as_ref(&self) -> Option<&T>

Converts from &Option<T> to Option<&T>.

\n
§Examples
\n

Calculates the length of an Option<String> as an Option<usize>\nwithout moving the String. The map method takes the self argument by value,\nconsuming the original, so this technique uses as_ref to first take an Option to a\nreference to the value inside the original.

\n\n
let text: Option<String> = Some(\"Hello, world!\".to_string());\n// First, cast `Option<String>` to `Option<&String>` with `as_ref`,\n// then consume *that* with `map`, leaving `text` on the stack.\nlet text_length: Option<usize> = text.as_ref().map(|s| s.len());\nprintln!(\"still can print text: {text:?}\");
\n
1.0.0 (const: 1.83.0) · Source

pub const fn as_mut(&mut self) -> Option<&mut T>

Converts from &mut Option<T> to Option<&mut T>.

\n
§Examples
\n
let mut x = Some(2);\nmatch x.as_mut() {\n    Some(v) => *v = 42,\n    None => {},\n}\nassert_eq!(x, Some(42));
\n
1.33.0 (const: 1.84.0) · Source

pub const fn as_pin_ref(self: Pin<&Option<T>>) -> Option<Pin<&T>>

Converts from Pin<&Option<T>> to Option<Pin<&T>>.

\n
1.33.0 (const: 1.84.0) · Source

pub const fn as_pin_mut(self: Pin<&mut Option<T>>) -> Option<Pin<&mut T>>

Converts from Pin<&mut Option<T>> to Option<Pin<&mut T>>.

\n
1.75.0 (const: 1.84.0) · Source

pub const fn as_slice(&self) -> &[T]

Returns a slice of the contained value, if any. If this is None, an\nempty slice is returned. This can be useful to have a single type of\niterator over an Option or slice.

\n

Note: Should you have an Option<&T> and wish to get a slice of T,\nyou can unpack it via opt.map_or(&[], std::slice::from_ref).

\n
§Examples
\n
assert_eq!(\n    [Some(1234).as_slice(), None.as_slice()],\n    [&[1234][..], &[][..]],\n);
\n

The inverse of this function is (discounting\nborrowing) [_]::first:

\n\n
for i in [Some(1234_u16), None] {\n    assert_eq!(i.as_ref(), i.as_slice().first());\n}
\n
1.75.0 (const: 1.84.0) · Source

pub const fn as_mut_slice(&mut self) -> &mut [T]

Returns a mutable slice of the contained value, if any. If this is\nNone, an empty slice is returned. This can be useful to have a\nsingle type of iterator over an Option or slice.

\n

Note: Should you have an Option<&mut T> instead of a\n&mut Option<T>, which this method takes, you can obtain a mutable\nslice via opt.map_or(&mut [], std::slice::from_mut).

\n
§Examples
\n
assert_eq!(\n    [Some(1234).as_mut_slice(), None.as_mut_slice()],\n    [&mut [1234][..], &mut [][..]],\n);
\n

The result is a mutable slice of zero or one items that points into\nour original Option:

\n\n
let mut x = Some(1234);\nx.as_mut_slice()[0] += 1;\nassert_eq!(x, Some(1235));
\n

The inverse of this method (discounting borrowing)\nis [_]::first_mut:

\n\n
assert_eq!(Some(123).as_mut_slice().first_mut(), Some(&mut 123))
\n
1.0.0 (const: 1.83.0) · Source

pub const fn expect(self, msg: &str) -> T

Returns the contained Some value, consuming the self value.

\n
§Panics
\n

Panics if the value is a None with a custom panic message provided by\nmsg.

\n
§Examples
\n
let x = Some(\"value\");\nassert_eq!(x.expect(\"fruits are healthy\"), \"value\");
\n\n
let x: Option<&str> = None;\nx.expect(\"fruits are healthy\"); // panics with `fruits are healthy`
\n
§Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Option should be Some.

\n\n
let item = slice.get(0)\n    .expect(\"slice should not be empty\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our\nrecommendation please refer to the section on “Common Message\nStyles” in the std::error module docs.

\n
1.0.0 (const: 1.83.0) · Source

pub const fn unwrap(self) -> T

Returns the contained Some value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the None\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the self value equals None.

\n
§Examples
\n
let x = Some(\"air\");\nassert_eq!(x.unwrap(), \"air\");
\n\n
let x: Option<&str> = None;\nassert_eq!(x.unwrap(), \"air\"); // fails
\n
1.0.0 · Source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Some value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
assert_eq!(Some(\"car\").unwrap_or(\"bike\"), \"car\");\nassert_eq!(None.unwrap_or(\"bike\"), \"bike\");
\n
1.0.0 · Source

pub fn unwrap_or_else<F>(self, f: F) -> T
where\n F: FnOnce() -> T,

Returns the contained Some value or computes it from a closure.

\n
§Examples
\n
let k = 10;\nassert_eq!(Some(4).unwrap_or_else(|| 2 * k), 4);\nassert_eq!(None.unwrap_or_else(|| 2 * k), 20);
\n
1.0.0 · Source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Some value or a default.

\n

Consumes the self argument then, if Some, returns the contained\nvalue, otherwise if None, returns the default value for that\ntype.

\n
§Examples
\n
let x: Option<u32> = None;\nlet y: Option<u32> = Some(12);\n\nassert_eq!(x.unwrap_or_default(), 0);\nassert_eq!(y.unwrap_or_default(), 12);
\n
1.58.0 (const: 1.83.0) · Source

pub const unsafe fn unwrap_unchecked(self) -> T

Returns the contained Some value, consuming the self value,\nwithout checking that the value is not None.

\n
§Safety
\n

Calling this method on None is undefined behavior.

\n
§Examples
\n
let x = Some(\"air\");\nassert_eq!(unsafe { x.unwrap_unchecked() }, \"air\");
\n\n
let x: Option<&str> = None;\nassert_eq!(unsafe { x.unwrap_unchecked() }, \"air\"); // Undefined behavior!
\n
1.0.0 · Source

pub fn map<U, F>(self, f: F) -> Option<U>
where\n F: FnOnce(T) -> U,

Maps an Option<T> to Option<U> by applying a function to a contained value (if Some) or returns None (if None).

\n
§Examples
\n

Calculates the length of an Option<String> as an\nOption<usize>, consuming the original:

\n\n
let maybe_some_string = Some(String::from(\"Hello, World!\"));\n// `Option::map` takes self *by value*, consuming `maybe_some_string`\nlet maybe_some_len = maybe_some_string.map(|s| s.len());\nassert_eq!(maybe_some_len, Some(13));\n\nlet x: Option<&str> = None;\nassert_eq!(x.map(|s| s.len()), None);
\n
1.76.0 · Source

pub fn inspect<F>(self, f: F) -> Option<T>
where\n F: FnOnce(&T),

Calls a function with a reference to the contained value if Some.

\n

Returns the original option.

\n
§Examples
\n
let list = vec![1, 2, 3];\n\n// prints \"got: 2\"\nlet x = list\n    .get(1)\n    .inspect(|x| println!(\"got: {x}\"))\n    .expect(\"list should be long enough\");\n\n// prints nothing\nlist.get(5).inspect(|x| println!(\"got: {x}\"));
\n
1.0.0 · Source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default result (if none),\nor applies a function to the contained value (if any).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let x = Some(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Option<&str> = None;\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.0.0 · Source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce() -> U,\n F: FnOnce(T) -> U,

Computes a default function result (if none), or\napplies a different function to the contained value (if any).

\n
§Basic examples
\n
let k = 21;\n\nlet x = Some(\"foo\");\nassert_eq!(x.map_or_else(|| 2 * k, |v| v.len()), 3);\n\nlet x: Option<&str> = None;\nassert_eq!(x.map_or_else(|| 2 * k, |v| v.len()), 42);
\n
§Handling a Result-based fallback
\n

A somewhat common occurrence when dealing with optional values\nin combination with Result<T, E> is the case where one wants to invoke\na fallible fallback if the option is not present. This example\nparses a command line argument (if present), or the contents of a file to\nan integer. However, unlike accessing the command line argument, reading\nthe file is fallible, so it must be wrapped with Ok.

\n\n
let v: u64 = std::env::args()\n   .nth(1)\n   .map_or_else(|| std::fs::read_to_string(\"/etc/someconfig.conf\"), Ok)?\n   .parse()?;
\n
1.0.0 · Source

pub fn ok_or<E>(self, err: E) -> Result<T, E>

Transforms the Option<T> into a Result<T, E>, mapping Some(v) to\nOk(v) and None to Err(err).

\n

Arguments passed to ok_or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use ok_or_else, which is\nlazily evaluated.

\n
§Examples
\n
let x = Some(\"foo\");\nassert_eq!(x.ok_or(0), Ok(\"foo\"));\n\nlet x: Option<&str> = None;\nassert_eq!(x.ok_or(0), Err(0));
\n
1.0.0 · Source

pub fn ok_or_else<E, F>(self, err: F) -> Result<T, E>
where\n F: FnOnce() -> E,

Transforms the Option<T> into a Result<T, E>, mapping Some(v) to\nOk(v) and None to Err(err()).

\n
§Examples
\n
let x = Some(\"foo\");\nassert_eq!(x.ok_or_else(|| 0), Ok(\"foo\"));\n\nlet x: Option<&str> = None;\nassert_eq!(x.ok_or_else(|| 0), Err(0));
\n
1.40.0 · Source

pub fn as_deref(&self) -> Option<&<T as Deref>::Target>
where\n T: Deref,

Converts from Option<T> (or &Option<T>) to Option<&T::Target>.

\n

Leaves the original Option in-place, creating a new one with a reference\nto the original one, additionally coercing the contents via Deref.

\n
§Examples
\n
let x: Option<String> = Some(\"hey\".to_owned());\nassert_eq!(x.as_deref(), Some(\"hey\"));\n\nlet x: Option<String> = None;\nassert_eq!(x.as_deref(), None);
\n
1.40.0 · Source

pub fn as_deref_mut(&mut self) -> Option<&mut <T as Deref>::Target>
where\n T: DerefMut,

Converts from Option<T> (or &mut Option<T>) to Option<&mut T::Target>.

\n

Leaves the original Option in-place, creating a new one containing a mutable reference to\nthe inner type’s Deref::Target type.

\n
§Examples
\n
let mut x: Option<String> = Some(\"hey\".to_owned());\nassert_eq!(x.as_deref_mut().map(|x| {\n    x.make_ascii_uppercase();\n    x\n}), Some(\"HEY\".to_owned().as_mut_str()));
\n
1.0.0 · Source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n
§Examples
\n
let x = Some(4);\nassert_eq!(x.iter().next(), Some(&4));\n\nlet x: Option<u32> = None;\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · Source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n
§Examples
\n
let mut x = Some(4);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 42,\n    None => {},\n}\nassert_eq!(x, Some(42));\n\nlet mut x: Option<u32> = None;\nassert_eq!(x.iter_mut().next(), None);
\n
1.0.0 · Source

pub fn and<U>(self, optb: Option<U>) -> Option<U>

Returns None if the option is None, otherwise returns optb.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
§Examples
\n
let x = Some(2);\nlet y: Option<&str> = None;\nassert_eq!(x.and(y), None);\n\nlet x: Option<u32> = None;\nlet y = Some(\"foo\");\nassert_eq!(x.and(y), None);\n\nlet x = Some(2);\nlet y = Some(\"foo\");\nassert_eq!(x.and(y), Some(\"foo\"));\n\nlet x: Option<u32> = None;\nlet y: Option<&str> = None;\nassert_eq!(x.and(y), None);
\n
1.0.0 · Source

pub fn and_then<U, F>(self, f: F) -> Option<U>
where\n F: FnOnce(T) -> Option<U>,

Returns None if the option is None, otherwise calls f with the\nwrapped value and returns the result.

\n

Some languages call this operation flatmap.

\n
§Examples
\n
fn sq_then_to_string(x: u32) -> Option<String> {\n    x.checked_mul(x).map(|sq| sq.to_string())\n}\n\nassert_eq!(Some(2).and_then(sq_then_to_string), Some(4.to_string()));\nassert_eq!(Some(1_000_000).and_then(sq_then_to_string), None); // overflowed!\nassert_eq!(None.and_then(sq_then_to_string), None);
\n

Often used to chain fallible operations that may return None.

\n\n
let arr_2d = [[\"A0\", \"A1\"], [\"B0\", \"B1\"]];\n\nlet item_0_1 = arr_2d.get(0).and_then(|row| row.get(1));\nassert_eq!(item_0_1, Some(&\"A1\"));\n\nlet item_2_0 = arr_2d.get(2).and_then(|row| row.get(0));\nassert_eq!(item_2_0, None);
\n
1.27.0 · Source

pub fn filter<P>(self, predicate: P) -> Option<T>
where\n P: FnOnce(&T) -> bool,

Returns None if the option is None, otherwise calls predicate\nwith the wrapped value and returns:

\n
    \n
  • Some(t) if predicate returns true (where t is the wrapped\nvalue), and
  • \n
  • None if predicate returns false.
  • \n
\n

This function works similar to Iterator::filter(). You can imagine\nthe Option<T> being an iterator over one or zero elements. filter()\nlets you decide which elements to keep.

\n
§Examples
\n
fn is_even(n: &i32) -> bool {\n    n % 2 == 0\n}\n\nassert_eq!(None.filter(is_even), None);\nassert_eq!(Some(3).filter(is_even), None);\nassert_eq!(Some(4).filter(is_even), Some(4));
\n
1.0.0 · Source

pub fn or(self, optb: Option<T>) -> Option<T>

Returns the option if it contains a value, otherwise returns optb.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
§Examples
\n
let x = Some(2);\nlet y = None;\nassert_eq!(x.or(y), Some(2));\n\nlet x = None;\nlet y = Some(100);\nassert_eq!(x.or(y), Some(100));\n\nlet x = Some(2);\nlet y = Some(100);\nassert_eq!(x.or(y), Some(2));\n\nlet x: Option<u32> = None;\nlet y = None;\nassert_eq!(x.or(y), None);
\n
1.0.0 · Source

pub fn or_else<F>(self, f: F) -> Option<T>
where\n F: FnOnce() -> Option<T>,

Returns the option if it contains a value, otherwise calls f and\nreturns the result.

\n
§Examples
\n
fn nobody() -> Option<&'static str> { None }\nfn vikings() -> Option<&'static str> { Some(\"vikings\") }\n\nassert_eq!(Some(\"barbarians\").or_else(vikings), Some(\"barbarians\"));\nassert_eq!(None.or_else(vikings), Some(\"vikings\"));\nassert_eq!(None.or_else(nobody), None);
\n
1.37.0 · Source

pub fn xor(self, optb: Option<T>) -> Option<T>

Returns Some if exactly one of self, optb is Some, otherwise returns None.

\n
§Examples
\n
let x = Some(2);\nlet y: Option<u32> = None;\nassert_eq!(x.xor(y), Some(2));\n\nlet x: Option<u32> = None;\nlet y = Some(2);\nassert_eq!(x.xor(y), Some(2));\n\nlet x = Some(2);\nlet y = Some(2);\nassert_eq!(x.xor(y), None);\n\nlet x: Option<u32> = None;\nlet y: Option<u32> = None;\nassert_eq!(x.xor(y), None);
\n
1.53.0 · Source

pub fn insert(&mut self, value: T) -> &mut T

Inserts value into the option, then returns a mutable reference to it.

\n

If the option already contains a value, the old value is dropped.

\n

See also Option::get_or_insert, which doesn’t update the value if\nthe option already contains Some.

\n
§Example
\n
let mut opt = None;\nlet val = opt.insert(1);\nassert_eq!(*val, 1);\nassert_eq!(opt.unwrap(), 1);\nlet val = opt.insert(2);\nassert_eq!(*val, 2);\n*val = 3;\nassert_eq!(opt.unwrap(), 3);
\n
1.20.0 · Source

pub fn get_or_insert(&mut self, value: T) -> &mut T

Inserts value into the option if it is None, then\nreturns a mutable reference to the contained value.

\n

See also Option::insert, which updates the value even if\nthe option already contains Some.

\n
§Examples
\n
let mut x = None;\n\n{\n    let y: &mut u32 = x.get_or_insert(5);\n    assert_eq!(y, &5);\n\n    *y = 7;\n}\n\nassert_eq!(x, Some(7));
\n
1.83.0 · Source

pub fn get_or_insert_default(&mut self) -> &mut T
where\n T: Default,

Inserts the default value into the option if it is None, then\nreturns a mutable reference to the contained value.

\n
§Examples
\n
let mut x = None;\n\n{\n    let y: &mut u32 = x.get_or_insert_default();\n    assert_eq!(y, &0);\n\n    *y = 7;\n}\n\nassert_eq!(x, Some(7));
\n
1.20.0 · Source

pub fn get_or_insert_with<F>(&mut self, f: F) -> &mut T
where\n F: FnOnce() -> T,

Inserts a value computed from f into the option if it is None,\nthen returns a mutable reference to the contained value.

\n
§Examples
\n
let mut x = None;\n\n{\n    let y: &mut u32 = x.get_or_insert_with(|| 5);\n    assert_eq!(y, &5);\n\n    *y = 7;\n}\n\nassert_eq!(x, Some(7));
\n
1.0.0 (const: 1.83.0) · Source

pub const fn take(&mut self) -> Option<T>

Takes the value out of the option, leaving a None in its place.

\n
§Examples
\n
let mut x = Some(2);\nlet y = x.take();\nassert_eq!(x, None);\nassert_eq!(y, Some(2));\n\nlet mut x: Option<u32> = None;\nlet y = x.take();\nassert_eq!(x, None);\nassert_eq!(y, None);
\n
1.80.0 · Source

pub fn take_if<P>(&mut self, predicate: P) -> Option<T>
where\n P: FnOnce(&mut T) -> bool,

Takes the value out of the option, but only if the predicate evaluates to\ntrue on a mutable reference to the value.

\n

In other words, replaces self with None if the predicate returns true.\nThis method operates similar to Option::take but conditional.

\n
§Examples
\n
let mut x = Some(42);\n\nlet prev = x.take_if(|v| if *v == 42 {\n    *v += 1;\n    false\n} else {\n    false\n});\nassert_eq!(x, Some(43));\nassert_eq!(prev, None);\n\nlet prev = x.take_if(|v| *v == 43);\nassert_eq!(x, None);\nassert_eq!(prev, Some(43));
\n
1.31.0 (const: 1.83.0) · Source

pub const fn replace(&mut self, value: T) -> Option<T>

Replaces the actual value in the option by the value given in parameter,\nreturning the old value if present,\nleaving a Some in its place without deinitializing either one.

\n
§Examples
\n
let mut x = Some(2);\nlet old = x.replace(5);\nassert_eq!(x, Some(5));\nassert_eq!(old, Some(2));\n\nlet mut x = None;\nlet old = x.replace(3);\nassert_eq!(x, Some(3));\nassert_eq!(old, None);
\n
1.46.0 · Source

pub fn zip<U>(self, other: Option<U>) -> Option<(T, U)>

Zips self with another Option.

\n

If self is Some(s) and other is Some(o), this method returns Some((s, o)).\nOtherwise, None is returned.

\n
§Examples
\n
let x = Some(1);\nlet y = Some(\"hi\");\nlet z = None::<u8>;\n\nassert_eq!(x.zip(y), Some((1, \"hi\")));\nassert_eq!(x.zip(z), None);
\n
Source

pub fn zip_with<U, F, R>(self, other: Option<U>, f: F) -> Option<R>
where\n F: FnOnce(T, U) -> R,

🔬This is a nightly-only experimental API. (option_zip)

Zips self and another Option with function f.

\n

If self is Some(s) and other is Some(o), this method returns Some(f(s, o)).\nOtherwise, None is returned.

\n
§Examples
\n
#![feature(option_zip)]\n\n#[derive(Debug, PartialEq)]\nstruct Point {\n    x: f64,\n    y: f64,\n}\n\nimpl Point {\n    fn new(x: f64, y: f64) -> Self {\n        Self { x, y }\n    }\n}\n\nlet x = Some(17.5);\nlet y = Some(42.7);\n\nassert_eq!(x.zip_with(y, Point::new), Some(Point { x: 17.5, y: 42.7 }));\nassert_eq!(x.zip_with(None, Point::new), None);
\n
",0,"wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.0.0 · Source§

impl<T> Ord for Option<T>
where\n T: Ord,

Source§

fn cmp(&self, other: &Option<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
§

impl<'a, T> Parse<'a> for Option<T>
where\n T: Peek + Parse<'a>,

§

fn parse(parser: Parser<'a>) -> Result<Option<T>, Error>

Attempts to parse Self from parser, returning an error if it could\nnot be parsed. Read more
","Parse<'a>","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.0.0 · Source§

impl<T> PartialEq for Option<T>
where\n T: PartialEq,

Source§

fn eq(&self, other: &Option<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.0.0 · Source§

impl<T> PartialOrd for Option<T>
where\n T: PartialOrd,

Source§

fn partial_cmp(&self, other: &Option<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.37.0 · Source§

impl<T, U> Product<Option<U>> for Option<T>
where\n T: Product<U>,

Source§

fn product<I>(iter: I) -> Option<T>
where\n I: Iterator<Item = Option<U>>,

Takes each element in the Iterator: if it is a None, no further\nelements are taken, and the None is returned. Should no None\noccur, the product of all elements is returned.

\n
§Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns None:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Option<usize> = nums.iter().map(|w| w.parse::<usize>().ok()).product();\nassert_eq!(total, Some(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Option<usize> = nums.iter().map(|w| w.parse::<usize>().ok()).product();\nassert_eq!(total, None);
\n
","Product>","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.37.0 · Source§

impl<T, U> Sum<Option<U>> for Option<T>
where\n T: Sum<U>,

Source§

fn sum<I>(iter: I) -> Option<T>
where\n I: Iterator<Item = Option<U>>,

Takes each element in the Iterator: if it is a None, no further\nelements are taken, and the None is returned. Should no None\noccur, the sum of all elements is returned.

\n
§Examples
\n

This sums up the position of the character ‘a’ in a vector of strings,\nif a word did not have the character ‘a’ the operation returns None:

\n\n
let words = vec![\"have\", \"a\", \"great\", \"day\"];\nlet total: Option<usize> = words.iter().map(|w| w.find('a')).sum();\nassert_eq!(total, Some(5));\nlet words = vec![\"have\", \"a\", \"good\", \"day\"];\nlet total: Option<usize> = words.iter().map(|w| w.find('a')).sum();\nassert_eq!(total, None);
\n
","Sum>","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
Source§

impl<T> Try for Option<T>

Source§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
Source§

type Residual = Option<Infallible>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
Source§

fn from_output(output: <Option<T> as Try>::Output) -> Option<T>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
Source§

fn branch(\n self,\n) -> ControlFlow<<Option<T> as Try>::Residual, <Option<T> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.0.0 · Source§

impl<T> Copy for Option<T>
where\n T: Copy,

","Copy","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.0.0 · Source§

impl<T> Eq for Option<T>
where\n T: Eq,

","Eq","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"],["
1.0.0 · Source§

impl<T> StructuralPartialEq for Option<T>

","StructuralPartialEq","wasmedge_sys::ffi::WasmEdge_HostFunc_t","wasmedge_sys::ffi::WasmEdge_WrapFunc_t"]]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[158392]} \ No newline at end of file diff --git a/type.impl/core/result/enum.Result.js b/type.impl/core/result/enum.Result.js new file mode 100644 index 000000000..d0b37cd9d --- /dev/null +++ b/type.impl/core/result/enum.Result.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sdk",[["
1.0.0 · Source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

Source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
Source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","wasmedge_sdk::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","wasmedge_sdk::WasmEdgeResult"],["
1.0.0 · Source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

Source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","wasmedge_sdk::WasmEdgeResult"],["
Source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","wasmedge_sdk::WasmEdgeResult"],["
Source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","wasmedge_sdk::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","wasmedge_sdk::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> IntoIterator for Result<T, E>

Source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","wasmedge_sdk::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

Source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","wasmedge_sdk::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

Source§

fn eq(&self, other: &Result<T, E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","wasmedge_sdk::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

Source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","wasmedge_sdk::WasmEdgeResult"],["
1.16.0 · Source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

Source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
§Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","wasmedge_sdk::WasmEdgeResult"],["
Source§

impl<T, E> Residual<T> for Result<Infallible, E>

Source§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","wasmedge_sdk::WasmEdgeResult"],["
Source§

impl<T, E> Result<&T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"wasmedge_sdk::WasmEdgeResult"],["
Source§

impl<T, E> Result<&mut T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"wasmedge_sdk::WasmEdgeResult"],["
Source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: 1.83.0) · Source

pub const fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
§Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"wasmedge_sdk::WasmEdgeResult"],["
Source§

impl<T, E> Result<Result<T, E>, E>

Source

pub const fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
§Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"wasmedge_sdk::WasmEdgeResult"],["
Source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · Source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · Source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · Source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · Source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
§Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · Source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · Source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · Source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: 1.83.0) · Source

pub const fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
§Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · Source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
§Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · Source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · Source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
§Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · Source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
§Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · Source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls a function with a reference to the contained value if Ok.

\n

Returns the original result.

\n
§Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · Source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls a function with a reference to the contained value if Err.

\n

Returns the original result.

\n
§Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · Source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
§Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · Source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
§Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · Source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · Source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · Source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
§Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
§Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · Source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
§Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · Source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
§Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · Source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · Source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
Source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
§Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
Source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
§Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · Source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · Source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
§Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · Source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · Source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
§Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · Source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · Source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
§Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · Source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
§Safety
\n

Calling this method on an Err is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · Source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
§Safety
\n

Calling this method on an Ok is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"wasmedge_sdk::WasmEdgeResult"],["
1.16.0 · Source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

Source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
§Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","wasmedge_sdk::WasmEdgeResult"],["
1.61.0 · Source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

Source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","wasmedge_sdk::WasmEdgeResult"],["
Source§

impl<T, E> Try for Result<T, E>

Source§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
Source§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
Source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
Source§

fn branch(\n self,\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","wasmedge_sdk::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","wasmedge_sdk::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","wasmedge_sdk::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","wasmedge_sdk::WasmEdgeResult"]]],["wasmedge_types",[["
1.0.0 · Source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

Source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
Source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","wasmedge_types::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","wasmedge_types::WasmEdgeResult"],["
1.0.0 · Source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

Source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","wasmedge_types::WasmEdgeResult"],["
Source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","wasmedge_types::WasmEdgeResult"],["
Source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","wasmedge_types::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","wasmedge_types::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> IntoIterator for Result<T, E>

Source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","wasmedge_types::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

Source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","wasmedge_types::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

Source§

fn eq(&self, other: &Result<T, E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","wasmedge_types::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

Source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","wasmedge_types::WasmEdgeResult"],["
1.16.0 · Source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

Source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
§Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","wasmedge_types::WasmEdgeResult"],["
Source§

impl<T, E> Residual<T> for Result<Infallible, E>

Source§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","wasmedge_types::WasmEdgeResult"],["
Source§

impl<T, E> Result<&T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"wasmedge_types::WasmEdgeResult"],["
Source§

impl<T, E> Result<&mut T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"wasmedge_types::WasmEdgeResult"],["
Source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: 1.83.0) · Source

pub const fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
§Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"wasmedge_types::WasmEdgeResult"],["
Source§

impl<T, E> Result<Result<T, E>, E>

Source

pub const fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
§Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"wasmedge_types::WasmEdgeResult"],["
Source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · Source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · Source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · Source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · Source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
§Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · Source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · Source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · Source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: 1.83.0) · Source

pub const fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
§Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · Source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
§Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · Source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · Source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
§Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · Source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
§Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · Source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls a function with a reference to the contained value if Ok.

\n

Returns the original result.

\n
§Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · Source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls a function with a reference to the contained value if Err.

\n

Returns the original result.

\n
§Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · Source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
§Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · Source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
§Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · Source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · Source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · Source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
§Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
§Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · Source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
§Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · Source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
§Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · Source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · Source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
Source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
§Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
Source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
§Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · Source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · Source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
§Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · Source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · Source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
§Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · Source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · Source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
§Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · Source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
§Safety
\n

Calling this method on an Err is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · Source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
§Safety
\n

Calling this method on an Ok is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"wasmedge_types::WasmEdgeResult"],["
1.16.0 · Source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

Source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
§Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","wasmedge_types::WasmEdgeResult"],["
1.61.0 · Source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

Source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","wasmedge_types::WasmEdgeResult"],["
Source§

impl<T, E> Try for Result<T, E>

Source§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
Source§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
Source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
Source§

fn branch(\n self,\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","wasmedge_types::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","wasmedge_types::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","wasmedge_types::WasmEdgeResult"],["
1.0.0 · Source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","wasmedge_types::WasmEdgeResult"]]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[159816,159865]} \ No newline at end of file diff --git a/type.impl/std/os/raw/type.c_int.js b/type.impl/std/os/raw/type.c_int.js new file mode 100644 index 000000000..6757be8e2 --- /dev/null +++ b/type.impl/std/os/raw/type.c_int.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["async_wasi",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[17]} \ No newline at end of file diff --git a/type.impl/std/os/raw/type.c_long.js b/type.impl/std/os/raw/type.c_long.js new file mode 100644 index 000000000..6757be8e2 --- /dev/null +++ b/type.impl/std/os/raw/type.c_long.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["async_wasi",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[17]} \ No newline at end of file diff --git a/type.impl/std/os/raw/type.c_uchar.js b/type.impl/std/os/raw/type.c_uchar.js new file mode 100644 index 000000000..6757be8e2 --- /dev/null +++ b/type.impl/std/os/raw/type.c_uchar.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["async_wasi",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[17]} \ No newline at end of file diff --git a/type.impl/std/os/raw/type.c_uint.js b/type.impl/std/os/raw/type.c_uint.js new file mode 100644 index 000000000..e53c59578 --- /dev/null +++ b/type.impl/std/os/raw/type.c_uint.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["async_wasi",[]],["wasmedge_sys",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[17,20]} \ No newline at end of file diff --git a/type.impl/std/os/raw/type.c_ulong.js b/type.impl/std/os/raw/type.c_ulong.js new file mode 100644 index 000000000..6757be8e2 --- /dev/null +++ b/type.impl/std/os/raw/type.c_ulong.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["async_wasi",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[17]} \ No newline at end of file diff --git a/type.impl/std/os/raw/type.c_ushort.js b/type.impl/std/os/raw/type.c_ushort.js new file mode 100644 index 000000000..6757be8e2 --- /dev/null +++ b/type.impl/std/os/raw/type.c_ushort.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["async_wasi",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[17]} \ No newline at end of file diff --git a/type.impl/std/primitive.fn.js b/type.impl/std/primitive.fn.js new file mode 100644 index 000000000..f2bc2e6b0 --- /dev/null +++ b/type.impl/std/primitive.fn.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sys",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[19]} \ No newline at end of file diff --git a/type.impl/std/primitive.i128.js b/type.impl/std/primitive.i128.js new file mode 100644 index 000000000..f2bc2e6b0 --- /dev/null +++ b/type.impl/std/primitive.i128.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sys",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[19]} \ No newline at end of file diff --git a/type.impl/std/primitive.i32.js b/type.impl/std/primitive.i32.js new file mode 100644 index 000000000..6757be8e2 --- /dev/null +++ b/type.impl/std/primitive.i32.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["async_wasi",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[17]} \ No newline at end of file diff --git a/type.impl/std/primitive.i64.js b/type.impl/std/primitive.i64.js new file mode 100644 index 000000000..6757be8e2 --- /dev/null +++ b/type.impl/std/primitive.i64.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["async_wasi",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[17]} \ No newline at end of file diff --git a/type.impl/std/primitive.u128.js b/type.impl/std/primitive.u128.js new file mode 100644 index 000000000..f2bc2e6b0 --- /dev/null +++ b/type.impl/std/primitive.u128.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sys",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[19]} \ No newline at end of file diff --git a/type.impl/std/primitive.u16.js b/type.impl/std/primitive.u16.js new file mode 100644 index 000000000..6757be8e2 --- /dev/null +++ b/type.impl/std/primitive.u16.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["async_wasi",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[17]} \ No newline at end of file diff --git a/type.impl/std/primitive.u32.js b/type.impl/std/primitive.u32.js new file mode 100644 index 000000000..6757be8e2 --- /dev/null +++ b/type.impl/std/primitive.u32.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["async_wasi",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[17]} \ No newline at end of file diff --git a/type.impl/std/primitive.u64.js b/type.impl/std/primitive.u64.js new file mode 100644 index 000000000..6757be8e2 --- /dev/null +++ b/type.impl/std/primitive.u64.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["async_wasi",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[17]} \ No newline at end of file diff --git a/type.impl/std/primitive.u8.js b/type.impl/std/primitive.u8.js new file mode 100644 index 000000000..6757be8e2 --- /dev/null +++ b/type.impl/std/primitive.u8.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["async_wasi",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[17]} \ No newline at end of file diff --git a/type.impl/wasmedge_sdk/type.Instance.js b/type.impl/wasmedge_sdk/type.Instance.js new file mode 100644 index 000000000..2e2d0c939 --- /dev/null +++ b/type.impl/wasmedge_sdk/type.Instance.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sdk",[]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[19]} \ No newline at end of file diff --git a/type.impl/wasmedge_sys/async/module/struct.AsyncImportObject.js b/type.impl/wasmedge_sys/async/module/struct.AsyncImportObject.js new file mode 100644 index 000000000..779440d2d --- /dev/null +++ b/type.impl/wasmedge_sys/async/module/struct.AsyncImportObject.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sdk",[["
Source§

impl<T> AsInstance for AsyncImportObject<T>
where\n T: Send,

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table(\n &self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Table, &Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref(\n &self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Memory, &Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut(\n &mut self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Memory, &mut Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Source§

fn get_global(\n &self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Global, &Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut(\n &mut self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Global, &mut Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func(\n &self,\n name: &str,\n) -> Result<InnerRef<Function, &Instance>, Box<WasmEdgeError>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut(\n &mut self,\n name: &str,\n) -> Result<InnerRef<Function, &mut Instance>, Box<WasmEdgeError>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
","AsInstance","wasmedge_sdk::async::import::ImportObject"],["
Source§

impl<T> AsMut<ImportModule<T>> for AsyncImportObject<T>
where\n T: Send,

Source§

fn as_mut(&mut self) -> &mut ImportModule<T>

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut>","wasmedge_sdk::async::import::ImportObject"],["
Source§

impl<T> AsRef<ImportModule<T>> for AsyncImportObject<T>
where\n T: Send,

Source§

fn as_ref(&self) -> &ImportModule<T>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","wasmedge_sdk::async::import::ImportObject"],["
Source§

impl<T> AsyncImportObject<T>
where\n T: Send,

Source

pub fn create(\n name: impl AsRef<str>,\n data: Box<T>,\n) -> Result<AsyncImportObject<T>, Box<WasmEdgeError>>

Source

pub fn add_async_func(&mut self, name: impl AsRef<str>, func: AsyncFunction)

",0,"wasmedge_sdk::async::import::ImportObject"],["
Source§

impl<T> Debug for AsyncImportObject<T>
where\n T: Debug + Send,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","wasmedge_sdk::async::import::ImportObject"],["
Source§

impl<T> Deref for AsyncImportObject<T>
where\n T: Send,

Source§

type Target = ImportModule<T>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<AsyncImportObject<T> as Deref>::Target

Dereferences the value.
","Deref","wasmedge_sdk::async::import::ImportObject"],["
Source§

impl<T> DerefMut for AsyncImportObject<T>
where\n T: Send,

Source§

fn deref_mut(&mut self) -> &mut <AsyncImportObject<T> as Deref>::Target

Mutably dereferences the value.
","DerefMut","wasmedge_sdk::async::import::ImportObject"]]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[35990]} \ No newline at end of file diff --git a/type.impl/wasmedge_sys/instance/module/struct.ImportModule.js b/type.impl/wasmedge_sys/instance/module/struct.ImportModule.js new file mode 100644 index 000000000..95f3ed380 --- /dev/null +++ b/type.impl/wasmedge_sys/instance/module/struct.ImportModule.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sdk",[["
Source§

impl<T> AsInstance for ImportModule<T>

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table(\n &self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Table, &Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref(\n &self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Memory, &Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut(\n &mut self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Memory, &mut Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Source§

fn get_global(\n &self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Global, &Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut(\n &mut self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Global, &mut Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func(\n &self,\n name: &str,\n) -> Result<InnerRef<Function, &Instance>, Box<WasmEdgeError>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut(\n &mut self,\n name: &str,\n) -> Result<InnerRef<Function, &mut Instance>, Box<WasmEdgeError>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
","AsInstance","wasmedge_sdk::import::ImportObject"],["
Source§

impl<T> Debug for ImportModule<T>
where\n T: Debug + ?Sized,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","wasmedge_sdk::import::ImportObject"],["
Source§

impl<T> Drop for ImportModule<T>
where\n T: ?Sized,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","wasmedge_sdk::import::ImportObject"],["
Source§

impl<T> ImportModule<T>

Source

pub fn create(\n name: impl AsRef<str>,\n data: Box<T>,\n) -> Result<ImportModule<T>, Box<WasmEdgeError>>

Creates a module instance which is used to import host functions, tables, memories, and globals into a wasm module.

\n
§Argument
\n
    \n
  • \n

    name - The name of the import module instance.

    \n
  • \n
  • \n

    data - The host context data used in this function.

    \n
  • \n
\n
§Error
\n

If fail to create the import module instance, then an error is returned.

\n
Source

pub unsafe fn as_raw(&self) -> *mut WasmEdge_ModuleInstanceContext

§Safety
\n

Provides a raw pointer to the inner module instance context.\nThe lifetime of the returned pointer must not exceed that of the object itself.

\n
Source

pub unsafe fn from_raw(\n ctx: *mut WasmEdge_ModuleInstanceContext,\n) -> ImportModule<T>

§Safety
\n

This function will take over the lifetime management of ctx, so do not call ffi::WasmEdge_ModuleInstanceDelete on ctx after this.

\n
Source

pub fn get_host_data(&self) -> &T

Source

pub fn get_host_data_mut(&mut self) -> &mut T

",0,"wasmedge_sdk::import::ImportObject"],["
Source§

impl<T> ImportModule<T>

Source

pub fn add_func(&mut self, name: impl AsRef<str>, func: Function)

Source

pub fn add_table(&mut self, name: impl AsRef<str>, table: Table)

Source

pub fn add_memory(&mut self, name: impl AsRef<str>, memory: Memory)

Source

pub fn add_global(&mut self, name: impl AsRef<str>, global: Global)

",0,"wasmedge_sdk::import::ImportObject"]]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[34940]} \ No newline at end of file diff --git a/type.impl/wasmedge_sys/instance/module/struct.Instance.js b/type.impl/wasmedge_sys/instance/module/struct.Instance.js new file mode 100644 index 000000000..c7c6e6524 --- /dev/null +++ b/type.impl/wasmedge_sys/instance/module/struct.Instance.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sdk",[["
Source§

impl AsInstance for Instance

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table(\n &self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Table, &Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref(\n &self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Memory, &Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut(\n &mut self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Memory, &mut Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Source§

fn get_global(\n &self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Global, &Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut(\n &mut self,\n name: impl AsRef<str>,\n) -> Result<InnerRef<Global, &mut Self>, Box<WasmEdgeError>>
where\n Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func(\n &self,\n name: &str,\n) -> Result<InnerRef<Function, &Instance>, Box<WasmEdgeError>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut(\n &mut self,\n name: &str,\n) -> Result<InnerRef<Function, &mut Instance>, Box<WasmEdgeError>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
","AsInstance","wasmedge_sdk::instance::Instance"],["
Source§

impl Debug for Instance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","wasmedge_sdk::instance::Instance"],["
Source§

impl Drop for Instance

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","wasmedge_sdk::instance::Instance"]]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[25234]} \ No newline at end of file diff --git a/type.impl/wasmedge_sys/instance/struct.InnerRef.js b/type.impl/wasmedge_sys/instance/struct.InnerRef.js new file mode 100644 index 000000000..42a30e5c0 --- /dev/null +++ b/type.impl/wasmedge_sys/instance/struct.InnerRef.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sys",[["
Source§

impl<D: Clone, Ref> Clone for InnerRef<D, &mut Ref>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","wasmedge_sys::instance::function::FuncRef"],["
Source§

impl<D: Debug, Ref> Debug for InnerRef<D, Ref>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","wasmedge_sys::instance::function::FuncRef"],["
Source§

impl<D, Ref> Deref for InnerRef<D, &Ref>

Source§

type Target = D

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
","Deref","wasmedge_sys::instance::function::FuncRef"],["
Source§

impl<D, Ref> Deref for InnerRef<D, &mut Ref>

Source§

type Target = D

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
","Deref","wasmedge_sys::instance::function::FuncRef"],["
Source§

impl<D, Ref> DerefMut for InnerRef<D, &mut Ref>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
","DerefMut","wasmedge_sys::instance::function::FuncRef"],["
Source§

impl<D, Ref: ?Sized> InnerRef<D, &Ref>

Source

pub unsafe fn create_from_ref(value: ManuallyDrop<D>, _r: &Ref) -> Self

§Safety
\n

The return value type of this function should ensure the correctness of lifetimes.

\n
Source

pub unsafe fn create_ref(value: ManuallyDrop<D>) -> Self

§Safety
\n

The return value type of this function should ensure the correctness of lifetimes.

\n
",0,"wasmedge_sys::instance::function::FuncRef"],["
Source§

impl<D, Ref: ?Sized> InnerRef<D, &mut Ref>

Source

pub unsafe fn create_from_mut(value: ManuallyDrop<D>, _r: &mut Ref) -> Self

§Safety
\n

The return value type of this function should ensure the correctness of lifetimes.

\n
Source

pub unsafe fn create_mut(value: ManuallyDrop<D>) -> Self

§Safety
\n

The return value type of this function should ensure the correctness of lifetimes.

\n
",0,"wasmedge_sys::instance::function::FuncRef"]]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[15059]} \ No newline at end of file diff --git a/type.impl/wasmedge_sys/struct.Instance.js b/type.impl/wasmedge_sys/struct.Instance.js new file mode 100644 index 000000000..1c175782c --- /dev/null +++ b/type.impl/wasmedge_sys/struct.Instance.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sys",[["
Source§

impl AsInstance for Instance

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table(\n &self,\n name: impl AsRef<str>,\n) -> WasmEdgeResult<InnerRef<Table, &Self>>
where\n Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref(\n &self,\n name: impl AsRef<str>,\n) -> WasmEdgeResult<InnerRef<Memory, &Self>>
where\n Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut(\n &mut self,\n name: impl AsRef<str>,\n) -> WasmEdgeResult<InnerRef<Memory, &mut Self>>
where\n Self: Sized,

Source§

fn get_global(\n &self,\n name: impl AsRef<str>,\n) -> WasmEdgeResult<InnerRef<Global, &Self>>
where\n Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut(\n &mut self,\n name: impl AsRef<str>,\n) -> WasmEdgeResult<InnerRef<Global, &mut Self>>
where\n Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut(&mut self, name: &str) -> WasmEdgeResult<FuncRef<&mut Instance>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
","AsInstance","wasmedge_sys::plugin::PluginModule"],["
Source§

impl Debug for Instance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","wasmedge_sys::plugin::PluginModule"],["
Source§

impl Drop for Instance

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","wasmedge_sys::plugin::PluginModule"]]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[21822]} \ No newline at end of file diff --git a/type.impl/wasmedge_sys/types/struct.WasmValue.js b/type.impl/wasmedge_sys/types/struct.WasmValue.js new file mode 100644 index 000000000..3de8b0304 --- /dev/null +++ b/type.impl/wasmedge_sys/types/struct.WasmValue.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sdk",[["
Source§

impl Clone for WasmValue

Source§

fn clone(&self) -> WasmValue

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","wasmedge_sdk::WasmValue"],["
Source§

impl Debug for WasmValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","wasmedge_sdk::WasmValue"],["
Source§

impl From<Val> for WasmValue

Source§

fn from(val: Val) -> Self

Converts to this type from the input type.
","From","wasmedge_sdk::WasmValue"],["
Source§

impl From<WasmEdge_Value> for WasmValue

Source§

fn from(raw_val: WasmEdge_Value) -> WasmValue

Converts to this type from the input type.
","From","wasmedge_sdk::WasmValue"],["
Source§

impl WasmValue

Source

pub fn as_raw(&self) -> WasmEdge_Value

Returns the raw WasmEdge_Value.

\n
Source

pub fn ty(&self) -> ValType

Returns the type of a WasmValue.

\n
Source

pub fn from_i32(val: i32) -> WasmValue

Creates a WasmValue from a i32 value.

\n
§Argument
\n
    \n
  • val - The source i32 value.
  • \n
\n
Source

pub fn to_i32(&self) -> i32

Generates a i32 value from a WasmValue.

\n
Source

pub fn from_i64(val: i64) -> WasmValue

Creates a WasmValue from a i64 value.

\n
§Argument
\n
    \n
  • val - The source i64 value.
  • \n
\n
Source

pub fn to_i64(&self) -> i64

Generates a i64 value from a WasmValue.

\n
Source

pub fn from_f32(val: f32) -> WasmValue

Creates a WasmValue from a f32 value.

\n
§Argument
\n
    \n
  • val - The source f32 value.
  • \n
\n
Source

pub fn to_f32(&self) -> f32

Generates a f32 value from a WasmValue.

\n
Source

pub fn from_f64(val: f64) -> WasmValue

Creates a WasmValue from a f64 value.

\n
§Argument
\n
    \n
  • val - The source f64 value.
  • \n
\n
Source

pub fn to_f64(&self) -> f64

Generates a f64 value from a WasmValue.

\n
Source

pub fn from_v128(val: i128) -> WasmValue

Creates a WasmValue from a i128 value.

\n
§Argument
\n
    \n
  • val - The source i128 value.
  • \n
\n
Source

pub fn to_v128(&self) -> i128

Generates a v128 value from a WasmValue.

\n
Source

pub fn is_null_ref(&self) -> bool

Checks if a WasmValue is NullRef or not.

\n
Source

pub fn from_func_ref<Func>(func_ref: &Func) -> WasmValue
where\n Func: AsFunc,

Creates a WasmValue from a FuncRef.

\n

Notice that the WasmValues generated from FuncRefs are only meaningful when the bulk_memory_operations or reference_types option is enabled in the Config.

\n
§Argument
\n\n
Source

pub fn func_ref(&self) -> Option<InnerRef<Function, &WasmValue>>

Returns the FuncRef(crate::FuncRef).

\n

If the WasmValue is a NullRef, then None is returned.

\n
Source

pub fn from_extern_ref<T>(extern_obj: &mut T) -> WasmValue

Creates a WasmValue from a reference to an external object.

\n

The WasmValues generated by this function are only meaningful when the reference_types option is enabled in\nthe Config.

\n
§Argument
\n
    \n
  • extern_obj - The reference to an external object.
  • \n
\n
Source

pub fn null_extern_ref() -> WasmValue

Creates a null WasmValue with a ExternRef.

\n
§Argument
\n
    \n
  • val - The [RefType`] value.
  • \n
\n
Source

pub fn extern_ref<T>(&self) -> Option<&T>

Returns the reference to an external object.

\n

If the WasmValue is a NullRef, then None is returned.

\n
",0,"wasmedge_sdk::WasmValue"],["
Source§

impl Copy for WasmValue

","Copy","wasmedge_sdk::WasmValue"]]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[24348]} \ No newline at end of file diff --git a/type.impl/wasmedge_types/enum.NeverType.js b/type.impl/wasmedge_types/enum.NeverType.js new file mode 100644 index 000000000..29cf25f47 --- /dev/null +++ b/type.impl/wasmedge_types/enum.NeverType.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["wasmedge_sdk",[["
Source§

impl Clone for NeverType

Source§

fn clone(&self) -> NeverType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","wasmedge_sdk::NeverType"],["
Source§

impl Debug for NeverType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","wasmedge_sdk::NeverType"],["
Source§

impl Send for NeverType

","Send","wasmedge_sdk::NeverType"],["
Source§

impl Sync for NeverType

","Sync","wasmedge_sdk::NeverType"]]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[5011]} \ No newline at end of file diff --git a/wasmedge_macro/all.html b/wasmedge_macro/all.html new file mode 100644 index 000000000..26614c017 --- /dev/null +++ b/wasmedge_macro/all.html @@ -0,0 +1 @@ +List of all items in this crate

List of all items

Attribute Macros

\ No newline at end of file diff --git a/wasmedge_macro/attr.async_host_function.html b/wasmedge_macro/attr.async_host_function.html new file mode 100644 index 000000000..373bf55e3 --- /dev/null +++ b/wasmedge_macro/attr.async_host_function.html @@ -0,0 +1,2 @@ +async_host_function in wasmedge_macro - Rust
wasmedge_macro

Attribute Macro async_host_function

Source
#[async_host_function]
Expand description

Declare a native async function that will be used to create an async host function instance.

+
\ No newline at end of file diff --git a/wasmedge_macro/attr.host_function.html b/wasmedge_macro/attr.host_function.html new file mode 100644 index 000000000..1e628c469 --- /dev/null +++ b/wasmedge_macro/attr.host_function.html @@ -0,0 +1,2 @@ +host_function in wasmedge_macro - Rust
wasmedge_macro

Attribute Macro host_function

Source
#[host_function]
Expand description

Declare a native function that will be used to create a host function instance.

+
\ No newline at end of file diff --git a/wasmedge_macro/index.html b/wasmedge_macro/index.html new file mode 100644 index 000000000..93cc55681 --- /dev/null +++ b/wasmedge_macro/index.html @@ -0,0 +1,3 @@ +wasmedge_macro - Rust

Crate wasmedge_macro

Source
Expand description

§Overview

+

The wasmedge-macro crate defines a group of procedural macros used by both wasmedge-sdk and wasmedge-sys crates.

+

Attribute Macros§

  • Declare a native async function that will be used to create an async host function instance.
  • Declare a native function that will be used to create a host function instance.
\ No newline at end of file diff --git a/wasmedge_macro/sidebar-items.js b/wasmedge_macro/sidebar-items.js new file mode 100644 index 000000000..88eec8d55 --- /dev/null +++ b/wasmedge_macro/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"attr":["async_host_function","host_function"]}; \ No newline at end of file diff --git a/wasmedge_sdk/all.html b/wasmedge_sdk/all.html new file mode 100644 index 000000000..46f7207a1 --- /dev/null +++ b/wasmedge_sdk/all.html @@ -0,0 +1 @@ +List of all items in this crate
\ No newline at end of file diff --git a/wasmedge_sdk/async/import/index.html b/wasmedge_sdk/async/import/index.html new file mode 100644 index 000000000..a19eb76eb --- /dev/null +++ b/wasmedge_sdk/async/import/index.html @@ -0,0 +1 @@ +wasmedge_sdk::async::import - Rust
wasmedge_sdk::async

Module import

Source

Structs§

Type Aliases§

  • Defines an import object that contains the required import data used when instantiating a module.
\ No newline at end of file diff --git a/wasmedge_sdk/async/import/sidebar-items.js b/wasmedge_sdk/async/import/sidebar-items.js new file mode 100644 index 000000000..a07d2506d --- /dev/null +++ b/wasmedge_sdk/async/import/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["ImportObjectBuilder"],"type":["ImportObject"]}; \ No newline at end of file diff --git a/wasmedge_sdk/async/import/struct.ImportObjectBuilder.html b/wasmedge_sdk/async/import/struct.ImportObjectBuilder.html new file mode 100644 index 000000000..a7b13361f --- /dev/null +++ b/wasmedge_sdk/async/import/struct.ImportObjectBuilder.html @@ -0,0 +1,105 @@ +ImportObjectBuilder in wasmedge_sdk::async::import - Rust
wasmedge_sdk::async::import

Struct ImportObjectBuilder

Source
pub struct ImportObjectBuilder<Data: Send> { /* private fields */ }
Expand description

Creates a async import object.

+

Implementations§

Source§

impl<Data: Send> ImportObjectBuilder<Data>

Source

pub fn new(name: impl AsRef<str>, data: Data) -> WasmEdgeResult<Self>

Creates a new ImportObjectBuilder.

+
Source

pub fn with_func<Args, Rets>( + &mut self, + name: impl AsRef<str>, + real_func: AsyncFn<'_, '_, '_, '_, Data>, +) -> WasmEdgeResult<&mut Self>
where + Args: WasmValTypeList, + Rets: WasmValTypeList,

Adds a host function to the ImportObject to create.

+

N.B. that this function can be used in thread-safe scenarios.

+
§Arguments
+
    +
  • +

    name - The exported name of the host function to add.

    +
  • +
  • +

    real_func - The native function.

    +
  • +
  • +

    data - The host context data used in this function.

    +
  • +
+
§error
+

If fail to create or add the host function, then an error is returned.

+
Source

pub fn with_func_by_type( + &mut self, + name: impl AsRef<str>, + ty: FuncType, + real_func: AsyncFn<'_, '_, '_, '_, Data>, +) -> WasmEdgeResult<&mut Self>

Adds a host function to the ImportObject to create.

+

N.B. that this function can be used in thread-safe scenarios.

+
§Arguments
+
    +
  • +

    name - The exported name of the host function to add.

    +
  • +
  • +

    ty - The function type.

    +
  • +
  • +

    real_func - The native function.

    +
  • +
  • +

    data - The host context data used in this function.

    +
  • +
+
§error
+

If fail to create or add the host function, then an error is returned.

+
Source

pub fn with_global(self, name: impl AsRef<str>, global: Global) -> Self

Adds a global to the ImportObject to create.

+
§Arguments
+ +
Source

pub fn with_memory(self, name: impl AsRef<str>, memory: Memory) -> Self

Adds a memory to the ImportObject to create.

+
§Arguments
+ +
Source

pub fn with_table(self, name: impl AsRef<str>, table: Table) -> Self

Adds a table to the ImportObject to create.

+
§Arguments
+
    +
  • +

    name - The exported name of the table to add.

    +
  • +
  • +

    table - The wasm table instance to add.

    +
  • +
+
Source

pub fn build(self) -> ImportObject<Data>

Creates a new ImportObject.

+
§Argument
+
    +
  • +

    name - The name of the ImportObject to create.

    +
  • +
  • +

    host_data - The host context data to be stored in the module instance.

    +
  • +
+
§Error
+

If fail to create the ImportObject, then an error is returned.

+

Trait Implementations§

Source§

impl<Data: Debug + Send> Debug for ImportObjectBuilder<Data>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Data> Freeze for ImportObjectBuilder<Data>

§

impl<Data> RefUnwindSafe for ImportObjectBuilder<Data>
where + Data: RefUnwindSafe,

§

impl<Data> Send for ImportObjectBuilder<Data>

§

impl<Data> Sync for ImportObjectBuilder<Data>
where + Data: Sync,

§

impl<Data> Unpin for ImportObjectBuilder<Data>
where + Data: Unpin,

§

impl<Data> UnwindSafe for ImportObjectBuilder<Data>
where + Data: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/async/import/type.ImportObject.html b/wasmedge_sdk/async/import/type.ImportObject.html new file mode 100644 index 000000000..0fe5b5012 --- /dev/null +++ b/wasmedge_sdk/async/import/type.ImportObject.html @@ -0,0 +1,3 @@ +ImportObject in wasmedge_sdk::async::import - Rust
wasmedge_sdk::async::import

Type Alias ImportObject

Source
pub type ImportObject<T> = AsyncImportObject<T>;
Expand description

Defines an import object that contains the required import data used when instantiating a module.

+

An ImportObject instance is created with ImportObjectBuilder.

+

Aliased Type§

struct ImportObject<T>(/* private fields */);

Trait Implementations§

\ No newline at end of file diff --git a/wasmedge_sdk/async/index.html b/wasmedge_sdk/async/index.html new file mode 100644 index 000000000..435224eb0 --- /dev/null +++ b/wasmedge_sdk/async/index.html @@ -0,0 +1 @@ +wasmedge_sdk::async - Rust
wasmedge_sdk

Module async

Source

Modules§

Structs§

\ No newline at end of file diff --git a/wasmedge_sdk/async/sidebar-items.js b/wasmedge_sdk/async/sidebar-items.js new file mode 100644 index 000000000..6dee4e38f --- /dev/null +++ b/wasmedge_sdk/async/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["import","vm","wasi"],"struct":["AsyncInstance"]}; \ No newline at end of file diff --git a/wasmedge_sdk/async/struct.AsyncInstance.html b/wasmedge_sdk/async/struct.AsyncInstance.html new file mode 100644 index 000000000..ec6306180 --- /dev/null +++ b/wasmedge_sdk/async/struct.AsyncInstance.html @@ -0,0 +1,38 @@ +AsyncInstance in wasmedge_sdk::async - Rust
wasmedge_sdk::async

Struct AsyncInstance

Source
pub struct AsyncInstance(/* private fields */);

Trait Implementations§

Source§

impl AsMut<Instance> for AsyncInstance

Source§

fn as_mut(&mut self) -> &mut Instance

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Instance> for AsyncInstance

Source§

fn as_ref(&self) -> &Instance

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for AsyncInstance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<Inst> AsInstance for Inst
where + Inst: AsMut<Instance> + AsRef<Instance>,

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table( + &self, + name: impl AsRef<str>, +) -> Result<InnerRef<Table, &Self>, Box<WasmEdgeError>>
where + Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref( + &self, + name: impl AsRef<str>, +) -> Result<InnerRef<Memory, &Self>, Box<WasmEdgeError>>
where + Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut( + &mut self, + name: impl AsRef<str>, +) -> Result<InnerRef<Memory, &mut Self>, Box<WasmEdgeError>>
where + Self: Sized,

Source§

fn get_global( + &self, + name: impl AsRef<str>, +) -> Result<InnerRef<Global, &Self>, Box<WasmEdgeError>>
where + Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut( + &mut self, + name: impl AsRef<str>, +) -> Result<InnerRef<Global, &mut Self>, Box<WasmEdgeError>>
where + Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func( + &self, + name: &str, +) -> Result<InnerRef<Function, &Instance>, Box<WasmEdgeError>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut( + &mut self, + name: &str, +) -> Result<InnerRef<Function, &mut Instance>, Box<WasmEdgeError>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/async/vm/index.html b/wasmedge_sdk/async/vm/index.html new file mode 100644 index 000000000..b460a8fa1 --- /dev/null +++ b/wasmedge_sdk/async/vm/index.html @@ -0,0 +1,2 @@ +wasmedge_sdk::async::vm - Rust
wasmedge_sdk::async

Module vm

Source
Expand description

Defines WasmEdge Vm struct.

+

Structs§

  • A Vm defines a virtual environment for managing WebAssembly programs.

Traits§

\ No newline at end of file diff --git a/wasmedge_sdk/async/vm/sidebar-items.js b/wasmedge_sdk/async/vm/sidebar-items.js new file mode 100644 index 000000000..1803d366b --- /dev/null +++ b/wasmedge_sdk/async/vm/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Vm"],"trait":["AsyncInst"]}; \ No newline at end of file diff --git a/wasmedge_sdk/async/vm/struct.Vm.html b/wasmedge_sdk/async/vm/struct.Vm.html new file mode 100644 index 000000000..6ade19966 --- /dev/null +++ b/wasmedge_sdk/async/vm/struct.Vm.html @@ -0,0 +1,149 @@ +Vm in wasmedge_sdk::async::vm - Rust
wasmedge_sdk::async::vm

Struct Vm

Source
pub struct Vm<'inst, T: ?Sized + Send + AsyncInst> { /* private fields */ }
Expand description

A Vm defines a virtual environment for managing WebAssembly programs.

+

§Example

+

The example below presents how to register a module as named module in a Vm instance and run a target wasm function.

+ +
// If the version of rust used is less than v1.63, please uncomment the follow attribute.
+// #![feature(explicit_generic_args_with_impl_trait)]
+#[cfg(not(feature = "async"))]
+use wasmedge_sdk::{params, VmBuilder, WasmVal, wat2wasm, ValType, NeverType};
+
+#[cfg_attr(test, test)]
+fn main() -> Result<(), Box<dyn std::error::Error>> {
+    #[cfg(not(feature = "async"))]
+    {
+        // create a Vm context
+        let vm = VmBuilder::new().build()?;
+
+        // register a wasm module from the given in-memory wasm bytes
+        let wasm_bytes = wat2wasm(
+            br#"(module
+            (export "fib" (func $fib))
+            (func $fib (param $n i32) (result i32)
+             (if
+              (i32.lt_s
+               (local.get $n)
+               (i32.const 2)
+              )
+              (then
+               (return (i32.const 1))
+              )
+             )
+             (return
+              (i32.add
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 2)
+                )
+               )
+               (call $fib
+                (i32.sub
+                 (local.get $n)
+                 (i32.const 1)
+                )
+               )
+              )
+             )
+            )
+           )
+        "#,
+        )?;
+        let mut vm = vm.register_module_from_bytes("extern", wasm_bytes)?;
+
+        // run `fib` function in the named module instance
+        let returns = vm.run_func(Some("extern"), "fib", params!(10))?;
+        assert_eq!(returns.len(), 1);
+        assert_eq!(returns[0].to_i32(), 89);
+    }
+
+    Ok(())
+}
+

Implementations§

Source§

impl<'inst, T: ?Sized + Send + AsyncInst> Vm<'inst, T>

Source

pub fn new(store: Store<'inst, T>) -> Self

Source

pub fn register_module( + &mut self, + mod_name: Option<&str>, + module: Module, +) -> WasmEdgeResult<&mut Self>

Registers a wasm module into this vm as a named or active module instance.

+
§Arguments
+
    +
  • +

    mod_name - The exported name for the registered module. If None, then the module is registered as an active instance.

    +
  • +
  • +

    module - The module to be registered.

    +
  • +
+
§Error
+

If fail to register the given module, then an error is returned.

+
Source

pub async fn run_func( + &mut self, + mod_name: Option<&str>, + func_name: impl AsRef<str>, + args: impl IntoIterator<Item = WasmValue> + Send, +) -> WasmEdgeResult<Vec<WasmValue>>

Runs an exported wasm function in a (named or active) module instance.

+
§Arguments
+
    +
  • +

    mod_name - The exported name of the module instance, which holds the target function. If None, then the active module is used.

    +
  • +
  • +

    func_name - The exported name of the target wasm function.

    +
  • +
  • +

    args - The arguments to be passed to the target wasm function.

    +
  • +
+
§Error
+

If fail to run the wasm function, then an error is returned.

+
Source

pub async fn run_func_with_timeout( + &mut self, + mod_name: Option<&str>, + func_name: impl AsRef<str>, + args: impl IntoIterator<Item = WasmValue> + Send, + timeout: Duration, +) -> WasmEdgeResult<Vec<WasmValue>>

Runs an exported wasm function in a (named or active) module instance with a timeout setting

+
§Arguments
+
    +
  • +

    mod_name - The exported name of the module instance, which holds the target function. If None, then the active module is used.

    +
  • +
  • +

    func_name - The exported name of the target wasm function.

    +
  • +
  • +

    args - The arguments to be passed to the target wasm function.

    +
  • +
  • +

    timeout - The maximum execution time of the function to be run.

    +
  • +
+
§Error
+

If fail to run the wasm function, then an error is returned.

+
Source

pub fn store(&self) -> &Store<'inst, T>

Returns a reference to the internal store from this vm.

+
Source

pub fn store_mut(&mut self) -> &mut Store<'inst, T>

Returns a mutable reference to the internal store from this vm.

+
Source

pub fn active_module(&self) -> Option<&Instance>

Returns a reference to the active module instance from this vm.

+
§Error
+

If fail to get the reference to the active module instance, then an error is returned.

+
Source

pub fn active_module_mut(&mut self) -> Option<&mut Instance>

Returns a mutable reference to the active module instance from this vm.

+
§Error
+

If fail to get the mutable reference to the active module instance, then an error is returned.

+
Source

pub fn contains_module(&self, mod_name: impl AsRef<str>) -> bool

Checks if the vm contains a named module instance.

+
§Argument
+
    +
  • mod_name - The exported name of the target module instance.
  • +
+
Source

pub fn named_instance_count(&self) -> usize

Returns the count of the named module instances this vm holds.

+
Source

pub fn instance_names(&self) -> Vec<String>

Returns the names of all named module instances this vm holds.

+

Trait Implementations§

Source§

impl<'inst, T: Debug + ?Sized + Send + AsyncInst> Debug for Vm<'inst, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'inst, T> !Freeze for Vm<'inst, T>

§

impl<'inst, T> !RefUnwindSafe for Vm<'inst, T>

§

impl<'inst, T> Send for Vm<'inst, T>
where + T: ?Sized,

§

impl<'inst, T> Sync for Vm<'inst, T>
where + T: Sync + ?Sized,

§

impl<'inst, T> Unpin for Vm<'inst, T>
where + T: ?Sized,

§

impl<'inst, T> !UnwindSafe for Vm<'inst, T>

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/async/vm/trait.AsyncInst.html b/wasmedge_sdk/async/vm/trait.AsyncInst.html new file mode 100644 index 000000000..0a20fa99b --- /dev/null +++ b/wasmedge_sdk/async/vm/trait.AsyncInst.html @@ -0,0 +1 @@ +AsyncInst in wasmedge_sdk::async::vm - Rust
wasmedge_sdk::async::vm

Trait AsyncInst

Source
pub trait AsyncInst: AsInstance { }

Implementors§

Source§

impl<T: Send + SyncInst> AsyncInst for T

Source§

impl<T: Send> AsyncInst for ImportObject<T>

\ No newline at end of file diff --git a/wasmedge_sdk/async/wasi/index.html b/wasmedge_sdk/async/wasi/index.html new file mode 100644 index 000000000..f8cc77d72 --- /dev/null +++ b/wasmedge_sdk/async/wasi/index.html @@ -0,0 +1 @@ +wasmedge_sdk::async::wasi - Rust
wasmedge_sdk::async

Module wasi

Source

Re-exports§

Structs§

\ No newline at end of file diff --git a/wasmedge_sdk/async/wasi/sidebar-items.js b/wasmedge_sdk/async/wasi/sidebar-items.js new file mode 100644 index 000000000..912faca42 --- /dev/null +++ b/wasmedge_sdk/async/wasi/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AsyncWasiModule"]}; \ No newline at end of file diff --git a/wasmedge_sdk/async/wasi/struct.AsyncWasiModule.html b/wasmedge_sdk/async/wasi/struct.AsyncWasiModule.html new file mode 100644 index 000000000..680210c22 --- /dev/null +++ b/wasmedge_sdk/async/wasi/struct.AsyncWasiModule.html @@ -0,0 +1,39 @@ +AsyncWasiModule in wasmedge_sdk::async::wasi - Rust
wasmedge_sdk::async::wasi

Struct AsyncWasiModule

Source
pub struct AsyncWasiModule(/* private fields */);
Expand description

A AsyncWasiModule is a module instance for the WASI specification and used in the async scenario.

+

Implementations§

Source§

impl AsyncWasiModule

Source

pub fn create( + args: Option<Vec<impl AsRef<str>>>, + envs: Option<Vec<(impl AsRef<str>, impl AsRef<str>)>>, +) -> Result<AsyncWasiModule, Box<WasmEdgeError>>

Creates a AsyncWasiModule instance.

+
§Arguments
+
    +
  • +

    args - The commandline arguments. The first argument is the program name.

    +
  • +
  • +

    envs - The environment variables.

    +
  • +
+
§Error
+

If fail to create a AsyncWasiModule instance, then an error is returned.

+
Source

pub fn create_from_wasi_context( + wasi_ctx: WasiCtx, +) -> Result<AsyncWasiModule, Box<WasmEdgeError>>

Creates a AsyncWasiModule instance with the given wasi context.

+
§Arguments
+
    +
  • wasi_ctx - The WasiCtx instance.
  • +
+
§Error
+

If fail to create AsyncWasiModule instance, then an error is returned.

+
Source

pub fn name(&self) -> &str

Returns the name of the module instance.

+
Source

pub fn exit_code(&self) -> u32

Returns the WASI exit code.

+

The WASI exit code can be accessed after running the “_start” function of a wasm32-wasi program.

+

Trait Implementations§

Source§

impl AsMut<AsyncImportObject<WasiCtx>> for AsyncWasiModule

Source§

fn as_mut(&mut self) -> &mut AsyncImportObject<WasiCtx>

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<AsyncImportObject<WasiCtx>> for AsyncWasiModule

Source§

fn as_ref(&self) -> &AsyncImportObject<WasiCtx>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for AsyncWasiModule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/attr.async_host_function.html b/wasmedge_sdk/attr.async_host_function.html new file mode 100644 index 000000000..338121592 --- /dev/null +++ b/wasmedge_sdk/attr.async_host_function.html @@ -0,0 +1,2 @@ +async_host_function in wasmedge_sdk - Rust
wasmedge_sdk

Attribute Macro async_host_function

#[async_host_function]
Available on crate feature async and Linux only.
Expand description

Declare a native async function that will be used to create an async host function instance.

+
\ No newline at end of file diff --git a/wasmedge_sdk/attr.host_function.html b/wasmedge_sdk/attr.host_function.html new file mode 100644 index 000000000..2014f35ba --- /dev/null +++ b/wasmedge_sdk/attr.host_function.html @@ -0,0 +1,2 @@ +host_function in wasmedge_sdk - Rust
wasmedge_sdk

Attribute Macro host_function

#[host_function]
Expand description

Declare a native function that will be used to create a host function instance.

+
\ No newline at end of file diff --git a/wasmedge_sdk/compiler/struct.Compiler.html b/wasmedge_sdk/compiler/struct.Compiler.html new file mode 100644 index 000000000..a5757dc6a --- /dev/null +++ b/wasmedge_sdk/compiler/struct.Compiler.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/struct.Compiler.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/config/index.html b/wasmedge_sdk/config/index.html new file mode 100644 index 000000000..a01d829a3 --- /dev/null +++ b/wasmedge_sdk/config/index.html @@ -0,0 +1,2 @@ +wasmedge_sdk::config - Rust
wasmedge_sdk

Module config

Source
Expand description

Defines the structs used to construct configurations.

+

Structs§

\ No newline at end of file diff --git a/wasmedge_sdk/config/sidebar-items.js b/wasmedge_sdk/config/sidebar-items.js new file mode 100644 index 000000000..e8c9c310e --- /dev/null +++ b/wasmedge_sdk/config/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["CommonConfigOptions","CompilerConfigOptions","Config","ConfigBuilder","RuntimeConfigOptions","StatisticsConfigOptions"]}; \ No newline at end of file diff --git a/wasmedge_sdk/config/struct.CommonConfigOptions.html b/wasmedge_sdk/config/struct.CommonConfigOptions.html new file mode 100644 index 000000000..595ae45dd --- /dev/null +++ b/wasmedge_sdk/config/struct.CommonConfigOptions.html @@ -0,0 +1,143 @@ +CommonConfigOptions in wasmedge_sdk::config - Rust
wasmedge_sdk::config

Struct CommonConfigOptions

Source
pub struct CommonConfigOptions { /* private fields */ }
Expand description

Defines the common configuration options.

+

CommonConfigOptions is used to set the common configuration options, which are

+ +

Implementations§

Source§

impl CommonConfigOptions

Source

pub fn new() -> Self

Creates a new instance of CommonConfigOptions.

+

The default options are:

+
    +
  • mutable_globals: true,
  • +
  • non_trap_conversions: true,
  • +
  • sign_extension_operators: true,
  • +
  • multi_value: true,
  • +
  • bulk_memory_operations: true,
  • +
  • reference_types: true,
  • +
  • simd: true,
  • +
  • multi_memories: false,
  • +
  • threads: false,
  • +
  • gc: false,
  • +
  • tail_call: false,
  • +
  • function_references: false,
  • +
  • interpreter_mode: false,
  • +
+
Source

pub fn mutable_globals(self, enable: bool) -> Self

Enables or disables the ImportExportMutGlobals option.

+
§Argument
+
    +
  • enable specifies if the option turns on or not.
  • +
+
Source

pub fn non_trap_conversions(self, enable: bool) -> Self

Enables or disables the NonTrapFloatToIntConversions option.

+
§Argument
+
    +
  • enable specifies if the option turns on or not.
  • +
+
Source

pub fn sign_extension_operators(self, enable: bool) -> Self

Enables or disables the SignExtensionOperators option.

+
§Argument
+
    +
  • enable specifies if the option turns on or not.
  • +
+
Source

pub fn multi_value(self, enable: bool) -> Self

Enables or disables the MultiValue option.

+
§Argument
+
    +
  • enable specifies if the option turns on or not.
  • +
+
Source

pub fn bulk_memory_operations(self, enable: bool) -> Self

Enables or disables the BulkMemoryOperations option.

+
§Argument
+
    +
  • enable specifies if the option turns on or not.
  • +
+
Source

pub fn reference_types(self, enable: bool) -> Self

Enables or disables the ReferenceTypes option.

+
§Argument
+
    +
  • enable specifies if the option turns on or not.
  • +
+
Source

pub fn simd(self, enable: bool) -> Self

Enables or disables the SIMD option.

+
§Argument
+
    +
  • enable specifies if the option turns on or not.
  • +
+
Source

pub fn multi_memories(self, enable: bool) -> Self

Enables or disables the MultiMemories option.

+
§Argument
+
    +
  • enable specifies if the option turns on or not.
  • +
+
Source

pub fn threads(self, enable: bool) -> Self

Enables or disables the Threads option.

+
§Argument
+
    +
  • enable specifies if the option turns on or not.
  • +
+
Source

pub fn gc(self, enable: bool) -> Self

Enables or disables the GC option.

+
§Argument
+
    +
  • enable specifies if the option turns on or not.
  • +
+
Source

pub fn tail_call(self, enable: bool) -> Self

Enables or disables the TailCall option.

+
§Argument
+
    +
  • enable specifies if the option turns on or not.
  • +
+
Source

pub fn function_references(self, enable: bool) -> Self

Enables or disables the FunctionReferences option.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn interpreter_mode(self, enable: bool) -> Self

Enables or disables the ForceInterpreter option.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+

Trait Implementations§

Source§

impl Clone for CommonConfigOptions

Source§

fn clone(&self) -> CommonConfigOptions

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CommonConfigOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CommonConfigOptions

Source§

fn default() -> Self

Creates a new default instance of CommonConfigOptions.

+

The default options are:

+
    +
  • mutable_globals: true,
  • +
  • non_trap_conversions: true,
  • +
  • sign_extension_operators: true,
  • +
  • multi_value: true,
  • +
  • bulk_memory_operations: true,
  • +
  • reference_types: true,
  • +
  • simd: true,
  • +
  • multi_memories: false,
  • +
  • threads: false,
  • +
  • tail_call: false,
  • +
  • function_references: false,
  • +
  • interpreter_mode: false,
  • +
+
Source§

impl Copy for CommonConfigOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/config/struct.CompilerConfigOptions.html b/wasmedge_sdk/config/struct.CompilerConfigOptions.html new file mode 100644 index 000000000..02e9f0974 --- /dev/null +++ b/wasmedge_sdk/config/struct.CompilerConfigOptions.html @@ -0,0 +1,86 @@ +CompilerConfigOptions in wasmedge_sdk::config - Rust
wasmedge_sdk::config

Struct CompilerConfigOptions

Source
pub struct CompilerConfigOptions { /* private fields */ }
Available on crate feature aot only.
Expand description

Defines a group of configuration options for AOT compiler.

+

CompilerConfigOptions is used to set the AOT compiler related configuration options, which are

+
    +
  • +

    Compiler Optimization Levels

    +
      +
    • +

      O0 performs as many optimizations as possible.

      +
    • +
    • +

      O1 optimizes quickly without destroying debuggability

      +
    • +
    • +

      02 optimizes for fast execution as much as possible without triggering significant incremental +compile time or code size growth

      +
    • +
    • +

      O3 optimizes for fast execution as much as possible

      +
    • +
    • +

      Os optimizes for small code size as much as possible without triggering significant incremental +compile time or execution time slowdowns

      +
    • +
    • +

      Oz optimizes for small code size as much as possible

      +
    • +
    +
  • +
  • +

    Compiler Output Formats

    +
      +
    • Native specifies the output format is native dynamic library (*.wasm.so)
    • +
    • Wasm specifies the output format is WebAssembly with AOT compiled codes in custom section (*.wasm).
    • +
    +
  • +
  • +

    dump_ir determines if AOT compiler generates IR or not

    +
  • +
  • +

    generic_binary determines if AOT compiler generates the generic binary or not.

    +
  • +
  • +

    interruptible determines if AOT compiler generates interruptible binary or not.

    +
  • +
+

The configuration options above are only effective to AOT compiler.

+

Implementations§

Source§

impl CompilerConfigOptions

Source

pub fn new() -> Self

Creates a new instance of CompilerConfigOptions.

+
Source

pub fn out_format(self, format: CompilerOutputFormat) -> Self

Sets the output binary format of AOT compiler.

+
§Argument
+
    +
  • format specifies the format of the output binary.
  • +
+
Source

pub fn optimization_level(self, level: CompilerOptimizationLevel) -> Self

Sets the optimization level of AOT compiler.

+
§Argument
+
    +
  • level specifies the optimization level of AOT compiler.
  • +
+
Source

pub fn dump_ir(self, enable: bool) -> Self

Sets the dump IR option of AOT compiler.

+
§Argument
+
    +
  • enable specifies if dump ir or not.
  • +
+
Source

pub fn generic_binary(self, enable: bool) -> Self

Sets the generic binary option of AOT compiler.

+
§Argument
+
    +
  • enable specifies if generate the generic binary or not when perform AOT compilation.
  • +
+
Source

pub fn interruptible(self, enable: bool) -> Self

Enables or Disables the Interruptible option of AOT compiler.

+

This option determines to generate interruptible binary or not when compilation in AOT compiler.

+
§Argument
+
    +
  • enable specifies if turn on the Interruptible option.
  • +
+

Trait Implementations§

Source§

impl Clone for CompilerConfigOptions

Source§

fn clone(&self) -> CompilerConfigOptions

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompilerConfigOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CompilerConfigOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for CompilerConfigOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/config/struct.Config.html b/wasmedge_sdk/config/struct.Config.html new file mode 100644 index 000000000..821582169 --- /dev/null +++ b/wasmedge_sdk/config/struct.Config.html @@ -0,0 +1,65 @@ +Config in wasmedge_sdk::config - Rust
wasmedge_sdk::config

Struct Config

Source
pub struct Config { /* private fields */ }
Expand description

Defines Config struct used to check/set the configuration options.

+

§Example

+

The following code shows how to create a Config with ConfigBuilder.

+ +

+use wasmedge_sdk::{config::{Config, ConfigBuilder, CommonConfigOptions, StatisticsConfigOptions, RuntimeConfigOptions}};
+use wasmedge_types::{CompilerOutputFormat, CompilerOptimizationLevel};
+
+let common_options = CommonConfigOptions::default()
+    .bulk_memory_operations(true)
+    .multi_value(true)
+    .mutable_globals(true)
+    .non_trap_conversions(true)
+    .reference_types(true)
+    .sign_extension_operators(true)
+    .simd(true);
+
+let stat_options = StatisticsConfigOptions::default()
+    .count_instructions(true)
+    .measure_cost(true)
+    .measure_time(true);
+
+let runtime_options = RuntimeConfigOptions::default().max_memory_pages(1024);
+
+
+let result = ConfigBuilder::new(common_options)
+    .with_statistics_config(stat_options)
+    .with_runtime_config(runtime_options)
+    .build();
+assert!(result.is_ok());
+let config = result.unwrap();
+

Implementations§

Source§

impl Config

Source

pub fn max_memory_pages(&self) -> u32

Returns the number of the memory pages available.

+
Source

pub fn mutable_globals_enabled(&self) -> bool

Checks if the ImportExportMutGlobals option turns on or not.

+
Source

pub fn non_trap_conversions_enabled(&self) -> bool

Checks if the NonTrapFloatToIntConversions option turns on or not.

+
Source

pub fn sign_extension_operators_enabled(&self) -> bool

Checks if the SignExtensionOperators option turns on or not.

+
Source

pub fn multi_value_enabled(&self) -> bool

Checks if the MultiValue option turns on or not.

+
Source

pub fn bulk_memory_operations_enabled(&self) -> bool

Checks if the BulkMemoryOperations option turns on or not.

+
Source

pub fn reference_types_enabled(&self) -> bool

Checks if the ReferenceTypes option turns on or not.

+
Source

pub fn simd_enabled(&self) -> bool

Checks if the SIMD option turns on or not.

+
Source

pub fn multi_memories_enabled(&self) -> bool

Checks if the MultiMemories option turns on or not.

+
Source

pub fn threads_enabled(&self) -> bool

Checks if the Threads option turns on or not.

+
Source

pub fn tail_call_enabled(&self) -> bool

Checks if the TailCall option turns on or not.

+
Source

pub fn function_references_enabled(&self) -> bool

Checks if the FunctionReferences option turns on or not.

+
Source

pub fn interpreter_mode_enabled(&self) -> bool

Checks if the ForceInterpreter option turns on or not.

+
Source

pub fn optimization_level(&self) -> CompilerOptimizationLevel

Available on crate feature aot only.

Returns the optimization level of AOT compiler.

+
Source

pub fn out_format(&self) -> CompilerOutputFormat

Available on crate feature aot only.

Returns the output binary format of AOT compiler.

+
Source

pub fn dump_ir_enabled(&self) -> bool

Available on crate feature aot only.

Checks if the dump IR option turns on or not.

+
Source

pub fn generic_binary_enabled(&self) -> bool

Available on crate feature aot only.

Checks if the generic binary option of AOT compiler turns on or not.

+
Source

pub fn interruptible_enabled(&self) -> bool

Available on crate feature aot only.

Checks if the Interruptible option of AOT Compiler turns on or not.

+
Source

pub fn instruction_counting_enabled(&self) -> bool

Checks if the instruction counting option turns on or not.

+
Source

pub fn cost_measuring_enabled(&self) -> bool

Checks if the cost measuring option turns on or not.

+
Source

pub fn time_measuring_enabled(&self) -> bool

Checks if the cost measuring option turns on or not.

+

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/config/struct.ConfigBuilder.html b/wasmedge_sdk/config/struct.ConfigBuilder.html new file mode 100644 index 000000000..6ca3bafbc --- /dev/null +++ b/wasmedge_sdk/config/struct.ConfigBuilder.html @@ -0,0 +1,31 @@ +ConfigBuilder in wasmedge_sdk::config - Rust
wasmedge_sdk::config

Struct ConfigBuilder

Source
pub struct ConfigBuilder { /* private fields */ }
Expand description

Defines a builder for creating a Config.

+

Implementations§

Source§

impl ConfigBuilder

Source

pub fn new(options: CommonConfigOptions) -> Self

Creates a new ConfigBuilder with the given CommonConfigOptions setting.

+
Source

pub fn with_statistics_config(self, options: StatisticsConfigOptions) -> Self

Sets the StatisticsConfigOptions for the ConfigBuilder.

+
§Argument
+ +
Source

pub fn with_runtime_config(self, options: RuntimeConfigOptions) -> Self

Sets the RuntimeConfigOptions for the ConfigBuilder.

+
§Argument
+ +
Source

pub fn with_compiler_config(self, options: CompilerConfigOptions) -> Self

Available on crate feature aot only.

Sets the CompilerConfigOptions for the ConfigBuilder.

+
§Argument
+ +
Source

pub fn build(self) -> WasmEdgeResult<Config>

Creates a new Config from the ConfigBuilder.

+
§Errors
+

If fail to create a Config, then an error is returned.

+

Trait Implementations§

Source§

impl Debug for ConfigBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ConfigBuilder

Source§

fn default() -> ConfigBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/config/struct.RuntimeConfigOptions.html b/wasmedge_sdk/config/struct.RuntimeConfigOptions.html new file mode 100644 index 000000000..4812c5443 --- /dev/null +++ b/wasmedge_sdk/config/struct.RuntimeConfigOptions.html @@ -0,0 +1,25 @@ +RuntimeConfigOptions in wasmedge_sdk::config - Rust
wasmedge_sdk::config

Struct RuntimeConfigOptions

Source
pub struct RuntimeConfigOptions { /* private fields */ }
Expand description

Defines a group of runtime configuration options.

+

RuntimeConfigOptions is used to set the runtime configuration options, which are

+
    +
  • maximum_memory_page limits the page size of Memory. This option is only effective to +Executor.
  • +
+

Implementations§

Source§

impl RuntimeConfigOptions

Source

pub fn new() -> Self

Creates a new instance of RuntimeConfigOptions.

+
Source

pub fn max_memory_pages(self, count: u32) -> Self

Sets the maximum number of the memory pages available.

+
§Argument
+
    +
  • count specifies the page count (64KB per page).
  • +
+

Trait Implementations§

Source§

impl Clone for RuntimeConfigOptions

Source§

fn clone(&self) -> RuntimeConfigOptions

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RuntimeConfigOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RuntimeConfigOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for RuntimeConfigOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/config/struct.StatisticsConfigOptions.html b/wasmedge_sdk/config/struct.StatisticsConfigOptions.html new file mode 100644 index 000000000..3230ea96c --- /dev/null +++ b/wasmedge_sdk/config/struct.StatisticsConfigOptions.html @@ -0,0 +1,42 @@ +StatisticsConfigOptions in wasmedge_sdk::config - Rust
wasmedge_sdk::config

Struct StatisticsConfigOptions

Source
pub struct StatisticsConfigOptions { /* private fields */ }
Expand description

Defines a group of the statistics configuration options.

+

StatisticsConfigOptions is used to set the statistics configuration options, which are

+
    +
  • +

    count_instructions determines if measuring the count of instructions when running a compiled or pure WASM.

    +
  • +
  • +

    measure_cost determines if measuring the instruction costs when running a compiled or pure WASM.

    +
  • +
  • +

    measure_time determines if measuring the running time when running a compiled or pure WASM.

    +
  • +
+

Implementations§

Source§

impl StatisticsConfigOptions

Source

pub fn new() -> Self

Creates a new instance of StatisticsConfigOptions.

+
Source

pub fn count_instructions(self, enable: bool) -> Self

Sets the instruction counting option.

+
§Argument
+
    +
  • enable specifies if support instruction counting or not when execution after AOT compilation.
  • +
+
Source

pub fn measure_cost(self, enable: bool) -> Self

Sets the cost measuring option.

+
§Argument
+
    +
  • enable specifies if support cost measuring or not when execution after AOT compilation.
  • +
+
Source

pub fn measure_time(self, enable: bool) -> Self

Sets the time measuring option.

+
§Argument
+
    +
  • enable specifies if support time measuring or not when execution after AOT compilation.
  • +
+

Trait Implementations§

Source§

impl Clone for StatisticsConfigOptions

Source§

fn clone(&self) -> StatisticsConfigOptions

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StatisticsConfigOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StatisticsConfigOptions

Source§

fn default() -> StatisticsConfigOptions

Returns the “default value” for a type. Read more
Source§

impl Copy for StatisticsConfigOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/enum.CompilerOptimizationLevel.html b/wasmedge_sdk/enum.CompilerOptimizationLevel.html new file mode 100644 index 000000000..43fe7417f --- /dev/null +++ b/wasmedge_sdk/enum.CompilerOptimizationLevel.html @@ -0,0 +1,29 @@ +CompilerOptimizationLevel in wasmedge_sdk - Rust
wasmedge_sdk

Enum CompilerOptimizationLevel

Source
pub enum CompilerOptimizationLevel {
+    O0,
+    O1,
+    O2,
+    O3,
+    Os,
+    Oz,
+}
Expand description

Defines WasmEdge AOT compiler optimization level.

+

Variants§

§

O0

Disable as many optimizations as possible.

+
§

O1

Optimize quickly without destroying debuggability.

+
§

O2

Optimize for fast execution as much as possible without triggering significant incremental compile time or code size growth.

+
§

O3

Optimize for fast execution as much as possible.

+
§

Os

Optimize for small code size as much as possible without triggering +significant incremental compile time or execution time slowdowns.

+
§

Oz

Optimize for small code size as much as possible.

+

Trait Implementations§

Source§

impl Clone for CompilerOptimizationLevel

Source§

fn clone(&self) -> CompilerOptimizationLevel

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompilerOptimizationLevel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<i32> for CompilerOptimizationLevel

Source§

fn from(val: i32) -> CompilerOptimizationLevel

Converts to this type from the input type.
Source§

impl From<u32> for CompilerOptimizationLevel

Source§

fn from(val: u32) -> CompilerOptimizationLevel

Converts to this type from the input type.
Source§

impl PartialEq for CompilerOptimizationLevel

Source§

fn eq(&self, other: &CompilerOptimizationLevel) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for CompilerOptimizationLevel

Source§

impl Eq for CompilerOptimizationLevel

Source§

impl StructuralPartialEq for CompilerOptimizationLevel

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/enum.CompilerOutputFormat.html b/wasmedge_sdk/enum.CompilerOutputFormat.html new file mode 100644 index 000000000..a46f405f8 --- /dev/null +++ b/wasmedge_sdk/enum.CompilerOutputFormat.html @@ -0,0 +1,20 @@ +CompilerOutputFormat in wasmedge_sdk - Rust
wasmedge_sdk

Enum CompilerOutputFormat

Source
pub enum CompilerOutputFormat {
+    Native,
+    Wasm,
+}
Expand description

Defines WasmEdge AOT compiler output binary format.

+

Variants§

§

Native

Native dynamic library format.

+
§

Wasm

WebAssembly with AOT compiled codes in custom sections.

+

Trait Implementations§

Source§

impl Clone for CompilerOutputFormat

Source§

fn clone(&self) -> CompilerOutputFormat

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompilerOutputFormat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<i32> for CompilerOutputFormat

Source§

fn from(val: i32) -> CompilerOutputFormat

Converts to this type from the input type.
Source§

impl From<u32> for CompilerOutputFormat

Source§

fn from(val: u32) -> CompilerOutputFormat

Converts to this type from the input type.
Source§

impl PartialEq for CompilerOutputFormat

Source§

fn eq(&self, other: &CompilerOutputFormat) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for CompilerOutputFormat

Source§

impl Eq for CompilerOutputFormat

Source§

impl StructuralPartialEq for CompilerOutputFormat

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/enum.ExternalInstanceType.html b/wasmedge_sdk/enum.ExternalInstanceType.html new file mode 100644 index 000000000..6b9c75de7 --- /dev/null +++ b/wasmedge_sdk/enum.ExternalInstanceType.html @@ -0,0 +1,25 @@ +ExternalInstanceType in wasmedge_sdk - Rust
wasmedge_sdk

Enum ExternalInstanceType

Source
pub enum ExternalInstanceType {
+    Func(FuncType),
+    Table(TableType),
+    Memory(MemoryType),
+    Global(GlobalType),
+}
Expand description

Defines the type of external WasmEdge instances.

+

Variants§

§

Func(FuncType)

A WasmEdge instance that is a WasmEdge Func.

+
§

Table(TableType)

A WasmEdge instance that is a WasmEdge Table.

+
§

Memory(MemoryType)

A WasmEdge instance that is a WasmEdge Memory.

+
§

Global(GlobalType)

A WasmEdge instance that is a WasmEdge Global.

+

Trait Implementations§

Source§

impl Clone for ExternalInstanceType

Source§

fn clone(&self) -> ExternalInstanceType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExternalInstanceType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for ExternalInstanceType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<i32> for ExternalInstanceType

Source§

fn from(value: i32) -> ExternalInstanceType

Converts to this type from the input type.
Source§

impl From<u32> for ExternalInstanceType

Source§

fn from(value: u32) -> ExternalInstanceType

Converts to this type from the input type.
Source§

impl PartialEq for ExternalInstanceType

Source§

fn eq(&self, other: &ExternalInstanceType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for ExternalInstanceType

Source§

impl StructuralPartialEq for ExternalInstanceType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/enum.HostRegistration.html b/wasmedge_sdk/enum.HostRegistration.html new file mode 100644 index 000000000..f23909998 --- /dev/null +++ b/wasmedge_sdk/enum.HostRegistration.html @@ -0,0 +1,27 @@ +HostRegistration in wasmedge_sdk - Rust
wasmedge_sdk

Enum HostRegistration

Source
pub enum HostRegistration {
+    Wasi,
+    WasmEdgeProcess,
+    WasiNn,
+    WasiCryptoCommon,
+    WasiCryptoAsymmetricCommon,
+    WasiCryptoKx,
+    WasiCryptoSignatures,
+    WasiCryptoSymmetric,
+}
Expand description

Defines WasmEdge host module registration enum.

+

Variants§

§

Wasi

§

WasmEdgeProcess

§

WasiNn

§

WasiCryptoCommon

§

WasiCryptoAsymmetricCommon

§

WasiCryptoKx

§

WasiCryptoSignatures

§

WasiCryptoSymmetric

Trait Implementations§

Source§

impl Clone for HostRegistration

Source§

fn clone(&self) -> HostRegistration

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HostRegistration

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<u32> for HostRegistration

Source§

fn from(val: u32) -> HostRegistration

Converts to this type from the input type.
Source§

impl Hash for HostRegistration

Source§

fn hash<__H>(&self, state: &mut __H)
where + __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for HostRegistration

Source§

fn eq(&self, other: &HostRegistration) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for HostRegistration

Source§

impl Eq for HostRegistration

Source§

impl StructuralPartialEq for HostRegistration

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/enum.Mutability.html b/wasmedge_sdk/enum.Mutability.html new file mode 100644 index 000000000..613f87d7d --- /dev/null +++ b/wasmedge_sdk/enum.Mutability.html @@ -0,0 +1,21 @@ +Mutability in wasmedge_sdk - Rust
wasmedge_sdk

Enum Mutability

Source
pub enum Mutability {
+    Const,
+    Var,
+}
Expand description

Defines the mutability property of WasmEdge Global variables.

+

Mutability determines the mutability property of a WasmEdge Global variable is either mutable or immutable.

+

Variants§

§

Const

Identifies an immutable global variable.

+
§

Var

Identifies a mutable global variable.

+

Trait Implementations§

Source§

impl Clone for Mutability

Source§

fn clone(&self) -> Mutability

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Mutability

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<i32> for Mutability

Source§

fn from(value: i32) -> Mutability

Converts to this type from the input type.
Source§

impl From<u32> for Mutability

Source§

fn from(value: u32) -> Mutability

Converts to this type from the input type.
Source§

impl PartialEq for Mutability

Source§

fn eq(&self, other: &Mutability) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for Mutability

Source§

impl Eq for Mutability

Source§

impl StructuralPartialEq for Mutability

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/enum.RefType.html b/wasmedge_sdk/enum.RefType.html new file mode 100644 index 000000000..71f43d361 --- /dev/null +++ b/wasmedge_sdk/enum.RefType.html @@ -0,0 +1,20 @@ +RefType in wasmedge_sdk - Rust
wasmedge_sdk

Enum RefType

Source
pub enum RefType {
+    FuncRef,
+    ExternRef,
+}
Expand description

Defines WasmEdge reference types.

+

Variants§

§

FuncRef

Refers to the infinite union of all references to host functions, regardless of their function types.

+
§

ExternRef

Refers to the infinite union of all references to objects and that can be passed into WebAssembly under this type.

+

Trait Implementations§

Source§

impl Clone for RefType

Source§

fn clone(&self) -> RefType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RefType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<RefType> for ValType

Source§

fn from(value: RefType) -> ValType

Converts to this type from the input type.
Source§

impl From<ValType> for RefType

Source§

fn from(value: ValType) -> RefType

Converts to this type from the input type.
Source§

impl PartialEq for RefType

Source§

fn eq(&self, other: &RefType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for RefType

Source§

impl Eq for RefType

Source§

impl StructuralPartialEq for RefType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/enum.ValType.html b/wasmedge_sdk/enum.ValType.html new file mode 100644 index 000000000..1e768f9cc --- /dev/null +++ b/wasmedge_sdk/enum.ValType.html @@ -0,0 +1,36 @@ +ValType in wasmedge_sdk - Rust
wasmedge_sdk

Enum ValType

Source
pub enum ValType {
+    I32,
+    I64,
+    F32,
+    F64,
+    V128,
+    FuncRef,
+    ExternRef,
+    UnsupportedRef,
+}
Expand description

Defines WasmEdge value types.

+

Variants§

§

I32

32-bit integer.

+

Integers are not inherently signed or unsigned, their interpretation is determined by individual operations.

+
§

I64

64-bit integer.

+

Integers are not inherently signed or unsigned, their interpretation is determined by individual operations.

+
§

F32

32-bit floating-point data as defined by the IEEE 754-2019.

+
§

F64

64-bit floating-point data as defined by the IEEE 754-2019.

+
§

V128

128-bit vector of packed integer or floating-point data.

+

The packed data can be interpreted as signed or unsigned integers, single or double precision floating-point +values, or a single 128 bit type. The interpretation is determined by individual operations.

+
§

FuncRef

A reference to a host function.

+
§

ExternRef

A reference to object.

+
§

UnsupportedRef

A reference that unsupported by c-api.

+

Trait Implementations§

Source§

impl Clone for ValType

Source§

fn clone(&self) -> ValType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ValType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<RefType> for ValType

Source§

fn from(value: RefType) -> ValType

Converts to this type from the input type.
Source§

impl From<ValType> for RefType

Source§

fn from(value: ValType) -> RefType

Converts to this type from the input type.
Source§

impl From<WasmEdge_ValType> for ValType

Source§

fn from(value: WasmEdge_ValType) -> ValType

Converts to this type from the input type.
Source§

impl PartialEq for ValType

Source§

fn eq(&self, other: &ValType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for ValType

Source§

impl Eq for ValType

Source§

impl StructuralPartialEq for ValType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.CoreCommonError.html b/wasmedge_sdk/error/enum.CoreCommonError.html new file mode 100644 index 000000000..edb0bb815 --- /dev/null +++ b/wasmedge_sdk/error/enum.CoreCommonError.html @@ -0,0 +1,29 @@ +CoreCommonError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum CoreCommonError

Source
pub enum CoreCommonError {
+    Terminated,
+    RuntimeError,
+    CostLimitExceeded,
+    WrongVMWorkflow,
+    FuncNotFound,
+    AOTDisabled,
+    Interrupted,
+    UserDefError,
+    NotValidated,
+    NonNullRequired,
+    SetValueToConst,
+    SetValueErrorType,
+}
Expand description

The error type for the common errors from WasmEdge Core.

+

Variants§

§

Terminated

§

RuntimeError

§

CostLimitExceeded

§

WrongVMWorkflow

§

FuncNotFound

§

AOTDisabled

§

Interrupted

§

UserDefError

§

NotValidated

§

NonNullRequired

§

SetValueToConst

§

SetValueErrorType

Trait Implementations§

Source§

impl Clone for CoreCommonError

Source§

fn clone(&self) -> CoreCommonError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreCommonError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for CoreCommonError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for CoreCommonError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CoreCommonError

Source§

fn eq(&self, other: &CoreCommonError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreCommonError

Source§

impl StructuralPartialEq for CoreCommonError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.CoreComponentError.html b/wasmedge_sdk/error/enum.CoreComponentError.html new file mode 100644 index 000000000..3e91f3495 --- /dev/null +++ b/wasmedge_sdk/error/enum.CoreComponentError.html @@ -0,0 +1,29 @@ +CoreComponentError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum CoreComponentError

Source
pub enum CoreComponentError {
+    MalformedSort,
+    MalformedAliasTarget,
+    MalformedCoreInstance,
+    MalformedInstance,
+    MalformedDefType,
+    MalformedRecordType,
+    MalformedVariantType,
+    MalformedTupleType,
+    MalformedFlagsType,
+    MalformedCanonical,
+    UnknownCanonicalOption,
+    MalformedName,
+}
Expand description

The error type for the component model phase from WasmEdge Core.

+

Variants§

§

MalformedSort

§

MalformedAliasTarget

§

MalformedCoreInstance

§

MalformedInstance

§

MalformedDefType

§

MalformedRecordType

§

MalformedVariantType

§

MalformedTupleType

§

MalformedFlagsType

§

MalformedCanonical

§

UnknownCanonicalOption

§

MalformedName

Trait Implementations§

Source§

impl Clone for CoreComponentError

Source§

fn clone(&self) -> CoreComponentError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreComponentError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for CoreComponentError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for CoreComponentError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CoreComponentError

Source§

fn eq(&self, other: &CoreComponentError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreComponentError

Source§

impl StructuralPartialEq for CoreComponentError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.CoreError.html b/wasmedge_sdk/error/enum.CoreError.html new file mode 100644 index 000000000..22aef9e1d --- /dev/null +++ b/wasmedge_sdk/error/enum.CoreError.html @@ -0,0 +1,24 @@ +CoreError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum CoreError

Source
pub enum CoreError {
+    Common(CoreCommonError),
+    Load(CoreLoadError),
+    Validation(CoreValidationError),
+    Instantiation(CoreInstantiationError),
+    Execution(CoreExecutionError),
+    Component(CoreComponentError),
+    UnknownError(u32),
+}
Expand description

The error types raised by WasmEdge Core.

+

Variants§

Trait Implementations§

Source§

impl Clone for CoreError

Source§

fn clone(&self) -> CoreError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for CoreError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for CoreError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CoreError> for WasmEdgeError

Source§

fn from(source: CoreError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl PartialEq for CoreError

Source§

fn eq(&self, other: &CoreError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreError

Source§

impl StructuralPartialEq for CoreError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.CoreExecutionError.html b/wasmedge_sdk/error/enum.CoreExecutionError.html new file mode 100644 index 000000000..521cee731 --- /dev/null +++ b/wasmedge_sdk/error/enum.CoreExecutionError.html @@ -0,0 +1,41 @@ +CoreExecutionError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum CoreExecutionError

Source
pub enum CoreExecutionError {
+
Show 24 variants WrongInstanceAddress, + WrongInstanceIndex, + InstrTypeMismatch, + FuncSigMismatch, + DivideByZero, + IntegerOverflow, + InvalidConvToInt, + TableOutOfBounds, + MemoryOutOfBounds, + ArrayOutOfBounds, + Unreachable, + UninitializedElement, + UndefinedElement, + IndirectCallTypeMismatch, + HostFuncFailed, + RefTypeMismatch, + UnalignedAtomicAccess, + ExpectSharedMemory, + CastNullToNonNull, + AccessNullFunc, + AccessNullStruct, + AccessNullArray, + AccessNullI31, + CastFailed, +
}
Expand description

The error type for the execution phase from WasmEdge Core.

+

Variants§

§

WrongInstanceAddress

§

WrongInstanceIndex

§

InstrTypeMismatch

§

FuncSigMismatch

§

DivideByZero

§

IntegerOverflow

§

InvalidConvToInt

§

TableOutOfBounds

§

MemoryOutOfBounds

§

ArrayOutOfBounds

§

Unreachable

§

UninitializedElement

§

UndefinedElement

§

IndirectCallTypeMismatch

§

HostFuncFailed

§

RefTypeMismatch

§

UnalignedAtomicAccess

§

ExpectSharedMemory

§

CastNullToNonNull

§

AccessNullFunc

§

AccessNullStruct

§

AccessNullArray

§

AccessNullI31

§

CastFailed

Trait Implementations§

Source§

impl Clone for CoreExecutionError

Source§

fn clone(&self) -> CoreExecutionError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreExecutionError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for CoreExecutionError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for CoreExecutionError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CoreExecutionError

Source§

fn eq(&self, other: &CoreExecutionError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreExecutionError

Source§

impl StructuralPartialEq for CoreExecutionError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.CoreInstantiationError.html b/wasmedge_sdk/error/enum.CoreInstantiationError.html new file mode 100644 index 000000000..aaad9e52d --- /dev/null +++ b/wasmedge_sdk/error/enum.CoreInstantiationError.html @@ -0,0 +1,22 @@ +CoreInstantiationError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum CoreInstantiationError

Source
pub enum CoreInstantiationError {
+    ModuleNameConflict,
+    IncompatibleImportType,
+    UnknownImport,
+    DataSegDoesNotFit,
+    ElemSegDoesNotFit,
+}
Expand description

The error type for the instantiation phase from WasmEdge Core.

+

Variants§

§

ModuleNameConflict

§

IncompatibleImportType

§

UnknownImport

§

DataSegDoesNotFit

§

ElemSegDoesNotFit

Trait Implementations§

Source§

impl Clone for CoreInstantiationError

Source§

fn clone(&self) -> CoreInstantiationError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreInstantiationError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for CoreInstantiationError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for CoreInstantiationError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CoreInstantiationError

Source§

fn eq(&self, other: &CoreInstantiationError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreInstantiationError

Source§

impl StructuralPartialEq for CoreInstantiationError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.CoreLoadError.html b/wasmedge_sdk/error/enum.CoreLoadError.html new file mode 100644 index 000000000..f9e3a45fc --- /dev/null +++ b/wasmedge_sdk/error/enum.CoreLoadError.html @@ -0,0 +1,45 @@ +CoreLoadError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum CoreLoadError

Source
pub enum CoreLoadError {
+
Show 28 variants IllegalPath, + ReadError, + UnexpectedEnd, + MalformedMagic, + MalformedVersion, + MalformedSection, + SectionSizeMismatch, + LengthOutOfBounds, + JunkSection, + IncompatibleFuncCode, + IncompatibleDataCount, + DataCountRequired, + MalformedImportKind, + MalformedExportKind, + ExpectedZeroByte, + InvalidMut, + TooManyLocals, + MalformedValType, + MalformedElemType, + MalformedRefType, + MalformedUTF8, + IntegerTooLarge, + IntegerTooLong, + IllegalOpCode, + IllegalGrammar, + SharedMemoryNoMax, + IntrinsicsTableNotFound, + MalformedTable, +
}
Expand description

The error type for the load phase from WasmEdge Core.

+

Variants§

§

IllegalPath

§

ReadError

§

UnexpectedEnd

§

MalformedMagic

§

MalformedVersion

§

MalformedSection

§

SectionSizeMismatch

§

LengthOutOfBounds

§

JunkSection

§

IncompatibleFuncCode

§

IncompatibleDataCount

§

DataCountRequired

§

MalformedImportKind

§

MalformedExportKind

§

ExpectedZeroByte

§

InvalidMut

§

TooManyLocals

§

MalformedValType

§

MalformedElemType

§

MalformedRefType

§

MalformedUTF8

§

IntegerTooLarge

§

IntegerTooLong

§

IllegalOpCode

§

IllegalGrammar

§

SharedMemoryNoMax

§

IntrinsicsTableNotFound

§

MalformedTable

Trait Implementations§

Source§

impl Clone for CoreLoadError

Source§

fn clone(&self) -> CoreLoadError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreLoadError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for CoreLoadError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for CoreLoadError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CoreLoadError

Source§

fn eq(&self, other: &CoreLoadError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreLoadError

Source§

impl StructuralPartialEq for CoreLoadError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.CoreValidationError.html b/wasmedge_sdk/error/enum.CoreValidationError.html new file mode 100644 index 000000000..c2b800b32 --- /dev/null +++ b/wasmedge_sdk/error/enum.CoreValidationError.html @@ -0,0 +1,53 @@ +CoreValidationError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum CoreValidationError

Source
pub enum CoreValidationError {
+
Show 36 variants InvalidAlignment, + TypeCheckFailed, + InvalidLabelIdx, + InvalidLocalIdx, + InvalidFieldIdx, + InvalidFuncTypeIdx, + InvalidFuncIdx, + InvalidTableIdx, + InvalidMemoryIdx, + InvalidGlobalIdx, + InvalidElemIdx, + InvalidDataIdx, + InvalidRefIdx, + ConstExprRequired, + DupExportName, + ImmutableGlobal, + ImmutableField, + ImmutableArray, + InvalidResultArity, + MultiTables, + MultiMemories, + InvalidLimit, + InvalidMemPages, + InvalidStartFunc, + InvalidLaneIdx, + InvalidUninitLocal, + InvalidNotDefaultableField, + InvalidNotDefaultableArray, + InvalidPackedField, + InvalidPackedArray, + InvalidUnpackedField, + InvalidUnpackedArray, + InvalidBrRefType, + ArrayTypesMismatch, + ArrayTypesNumtypeRequired, + InvalidSubType, +
}
Expand description

The error type for the validation phase from WasmEdge Core.

+

Variants§

§

InvalidAlignment

§

TypeCheckFailed

§

InvalidLabelIdx

§

InvalidLocalIdx

§

InvalidFieldIdx

§

InvalidFuncTypeIdx

§

InvalidFuncIdx

§

InvalidTableIdx

§

InvalidMemoryIdx

§

InvalidGlobalIdx

§

InvalidElemIdx

§

InvalidDataIdx

§

InvalidRefIdx

§

ConstExprRequired

§

DupExportName

§

ImmutableGlobal

§

ImmutableField

§

ImmutableArray

§

InvalidResultArity

§

MultiTables

§

MultiMemories

§

InvalidLimit

§

InvalidMemPages

§

InvalidStartFunc

§

InvalidLaneIdx

§

InvalidUninitLocal

§

InvalidNotDefaultableField

§

InvalidNotDefaultableArray

§

InvalidPackedField

§

InvalidPackedArray

§

InvalidUnpackedField

§

InvalidUnpackedArray

§

InvalidBrRefType

§

ArrayTypesMismatch

§

ArrayTypesNumtypeRequired

§

InvalidSubType

Trait Implementations§

Source§

impl Clone for CoreValidationError

Source§

fn clone(&self) -> CoreValidationError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreValidationError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for CoreValidationError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for CoreValidationError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CoreValidationError

Source§

fn eq(&self, other: &CoreValidationError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreValidationError

Source§

impl StructuralPartialEq for CoreValidationError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.ExportError.html b/wasmedge_sdk/error/enum.ExportError.html new file mode 100644 index 000000000..581ea05e6 --- /dev/null +++ b/wasmedge_sdk/error/enum.ExportError.html @@ -0,0 +1,25 @@ +ExportError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum ExportError

Source
pub enum ExportError {
+    Type {
+        expected: ExternalInstanceType,
+        actual: ExternalInstanceType,
+    },
+    FuncType(String),
+    TableType(String),
+    MemType(String),
+    GlobalType(String),
+}
Expand description

The error types for WasmEdge ExportType.

+

Variants§

§

Type

§

FuncType(String)

§

TableType(String)

§

MemType(String)

§

GlobalType(String)

Trait Implementations§

Source§

impl Clone for ExportError

Source§

fn clone(&self) -> ExportError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExportError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for ExportError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for ExportError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ExportError> for WasmEdgeError

Source§

fn from(source: ExportError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl PartialEq for ExportError

Source§

fn eq(&self, other: &ExportError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for ExportError

Source§

impl StructuralPartialEq for ExportError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.FuncError.html b/wasmedge_sdk/error/enum.FuncError.html new file mode 100644 index 000000000..928476b7d --- /dev/null +++ b/wasmedge_sdk/error/enum.FuncError.html @@ -0,0 +1,20 @@ +FuncError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum FuncError

Source
pub enum FuncError {
+    Create,
+    CreateBinding(String),
+    Type,
+}
Expand description

The error types for WasmEdge Function.

+

Variants§

§

Create

§

CreateBinding(String)

§

Type

Trait Implementations§

Source§

impl Clone for FuncError

Source§

fn clone(&self) -> FuncError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FuncError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for FuncError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for FuncError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<FuncError> for WasmEdgeError

Source§

fn from(source: FuncError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl PartialEq for FuncError

Source§

fn eq(&self, other: &FuncError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for FuncError

Source§

impl StructuralPartialEq for FuncError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.GlobalError.html b/wasmedge_sdk/error/enum.GlobalError.html new file mode 100644 index 000000000..450d4ea33 --- /dev/null +++ b/wasmedge_sdk/error/enum.GlobalError.html @@ -0,0 +1,21 @@ +GlobalError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum GlobalError

Source
pub enum GlobalError {
+    Create,
+    Type,
+    ModifyConst,
+    UnmatchedValType,
+}
Expand description

The error types for WasmEdge Global.

+

Variants§

§

Create

§

Type

§

ModifyConst

§

UnmatchedValType

Trait Implementations§

Source§

impl Clone for GlobalError

Source§

fn clone(&self) -> GlobalError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GlobalError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for GlobalError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for GlobalError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<GlobalError> for WasmEdgeError

Source§

fn from(source: GlobalError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl PartialEq for GlobalError

Source§

fn eq(&self, other: &GlobalError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for GlobalError

Source§

impl StructuralPartialEq for GlobalError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.HostFuncError.html b/wasmedge_sdk/error/enum.HostFuncError.html new file mode 100644 index 000000000..23af8cd15 --- /dev/null +++ b/wasmedge_sdk/error/enum.HostFuncError.html @@ -0,0 +1,19 @@ +HostFuncError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum HostFuncError

Source
pub enum HostFuncError {
+    User(u32),
+    Runtime(u32),
+}
Expand description

The error type for the host function definition.

+

Variants§

§

User(u32)

§

Runtime(u32)

Trait Implementations§

Source§

impl Clone for HostFuncError

Source§

fn clone(&self) -> HostFuncError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HostFuncError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for HostFuncError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for HostFuncError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for HostFuncError

Source§

fn eq(&self, other: &HostFuncError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for HostFuncError

Source§

impl StructuralPartialEq for HostFuncError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.ImportError.html b/wasmedge_sdk/error/enum.ImportError.html new file mode 100644 index 000000000..ab4a94916 --- /dev/null +++ b/wasmedge_sdk/error/enum.ImportError.html @@ -0,0 +1,25 @@ +ImportError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum ImportError

Source
pub enum ImportError {
+    Type {
+        expected: ExternalInstanceType,
+        actual: ExternalInstanceType,
+    },
+    FuncType(String),
+    TableType(String),
+    MemType(String),
+    GlobalType(String),
+}
Expand description

The error types for WasmEdge ImportType.

+

Variants§

§

Type

§

FuncType(String)

§

TableType(String)

§

MemType(String)

§

GlobalType(String)

Trait Implementations§

Source§

impl Clone for ImportError

Source§

fn clone(&self) -> ImportError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ImportError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for ImportError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for ImportError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ImportError> for WasmEdgeError

Source§

fn from(source: ImportError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl PartialEq for ImportError

Source§

fn eq(&self, other: &ImportError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for ImportError

Source§

impl StructuralPartialEq for ImportError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.InstanceError.html b/wasmedge_sdk/error/enum.InstanceError.html new file mode 100644 index 000000000..5e29992ca --- /dev/null +++ b/wasmedge_sdk/error/enum.InstanceError.html @@ -0,0 +1,26 @@ +InstanceError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum InstanceError

Source
pub enum InstanceError {
+    Create,
+    CreateWasi,
+    CreateWasmEdgeProcess,
+    CreateImportModule,
+    NotFoundFunc(String),
+    NotFoundTable(String),
+    NotFoundMem(String),
+    NotFoundGlobal(String),
+    NotFoundMappedFdHandler,
+}
Expand description

The error types for WasmEdge Instance.

+

Variants§

§

Create

§

CreateWasi

§

CreateWasmEdgeProcess

§

CreateImportModule

§

NotFoundFunc(String)

§

NotFoundTable(String)

§

NotFoundMem(String)

§

NotFoundGlobal(String)

§

NotFoundMappedFdHandler

Trait Implementations§

Source§

impl Clone for InstanceError

Source§

fn clone(&self) -> InstanceError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InstanceError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for InstanceError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for InstanceError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<InstanceError> for WasmEdgeError

Source§

fn from(source: InstanceError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl PartialEq for InstanceError

Source§

fn eq(&self, other: &InstanceError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for InstanceError

Source§

impl StructuralPartialEq for InstanceError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.MemError.html b/wasmedge_sdk/error/enum.MemError.html new file mode 100644 index 000000000..0e7e040fc --- /dev/null +++ b/wasmedge_sdk/error/enum.MemError.html @@ -0,0 +1,23 @@ +MemError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum MemError

Source
pub enum MemError {
+    Create,
+    CreateSharedType,
+    Type,
+    ConstPtr,
+    MutPtr,
+    Ptr2Ref,
+}
Expand description

The error types for WasmEdge Memory.

+

Variants§

§

Create

§

CreateSharedType

§

Type

§

ConstPtr

§

MutPtr

§

Ptr2Ref

Trait Implementations§

Source§

impl Clone for MemError

Source§

fn clone(&self) -> MemError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MemError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for MemError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for MemError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<MemError> for WasmEdgeError

Source§

fn from(source: MemError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl PartialEq for MemError

Source§

fn eq(&self, other: &MemError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for MemError

Source§

impl StructuralPartialEq for MemError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.PluginError.html b/wasmedge_sdk/error/enum.PluginError.html new file mode 100644 index 000000000..53e9c553a --- /dev/null +++ b/wasmedge_sdk/error/enum.PluginError.html @@ -0,0 +1,19 @@ +PluginError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum PluginError

Source
pub enum PluginError {
+    Create(String),
+    NotFound(String),
+}
Expand description

The error types for WasmEdge plugin.

+

Variants§

§

Create(String)

§

NotFound(String)

Trait Implementations§

Source§

impl Clone for PluginError

Source§

fn clone(&self) -> PluginError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PluginError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for PluginError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for PluginError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<PluginError> for WasmEdgeError

Source§

fn from(source: PluginError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl PartialEq for PluginError

Source§

fn eq(&self, other: &PluginError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for PluginError

Source§

impl StructuralPartialEq for PluginError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.StoreError.html b/wasmedge_sdk/error/enum.StoreError.html new file mode 100644 index 000000000..ecea9747f --- /dev/null +++ b/wasmedge_sdk/error/enum.StoreError.html @@ -0,0 +1,40 @@ +StoreError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum StoreError

Source
pub enum StoreError {
+    Create,
+    NotFoundFunc(String),
+    NotFoundFuncRegistered {
+        func_name: String,
+        mod_name: String,
+    },
+    NotFoundTable(String),
+    NotFoundTableRegistered {
+        table_name: String,
+        mod_name: String,
+    },
+    NotFoundMem(String),
+    NotFoundMemRegistered {
+        mem_name: String,
+        mod_name: String,
+    },
+    NotFoundGlobal(String),
+    NotFoundGlobalRegistered {
+        global_name: String,
+        mod_name: String,
+    },
+    NotFoundModule(String),
+    NotFoundActiveModule,
+}
Expand description

The error types for WasmEdge Store.

+

Variants§

§

Create

§

NotFoundFunc(String)

§

NotFoundFuncRegistered

Fields

§func_name: String
§mod_name: String
§

NotFoundTable(String)

§

NotFoundTableRegistered

Fields

§table_name: String
§mod_name: String
§

NotFoundMem(String)

§

NotFoundMemRegistered

Fields

§mem_name: String
§mod_name: String
§

NotFoundGlobal(String)

§

NotFoundGlobalRegistered

Fields

§global_name: String
§mod_name: String
§

NotFoundModule(String)

§

NotFoundActiveModule

Trait Implementations§

Source§

impl Clone for StoreError

Source§

fn clone(&self) -> StoreError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StoreError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for StoreError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for StoreError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<StoreError> for WasmEdgeError

Source§

fn from(source: StoreError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl PartialEq for StoreError

Source§

fn eq(&self, other: &StoreError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for StoreError

Source§

impl StructuralPartialEq for StoreError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.TableError.html b/wasmedge_sdk/error/enum.TableError.html new file mode 100644 index 000000000..60772e028 --- /dev/null +++ b/wasmedge_sdk/error/enum.TableError.html @@ -0,0 +1,19 @@ +TableError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum TableError

Source
pub enum TableError {
+    Create,
+    Type,
+}
Expand description

The error types for WasmEdge Table.

+

Variants§

§

Create

§

Type

Trait Implementations§

Source§

impl Clone for TableError

Source§

fn clone(&self) -> TableError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TableError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for TableError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for TableError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<TableError> for WasmEdgeError

Source§

fn from(source: TableError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl PartialEq for TableError

Source§

fn eq(&self, other: &TableError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for TableError

Source§

impl StructuralPartialEq for TableError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.VmError.html b/wasmedge_sdk/error/enum.VmError.html new file mode 100644 index 000000000..f0ca487ba --- /dev/null +++ b/wasmedge_sdk/error/enum.VmError.html @@ -0,0 +1,39 @@ +VmError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum VmError

Source
pub enum VmError {
+
Show 22 variants Create, + CreateWithWasiContext, + NotFoundFuncType(String), + NotFoundModule(String), + NotFoundWasiModule, + NotFoundWasmEdgeProcessModule, + NotFoundWasiNnModule, + NotFoundWasiCryptoCommonModule, + NotFoundWasiCryptoAsymmetricCommonModule, + NotFoundWasiCryptoSymmetricModule, + NotFoundWasiCryptoKxModule, + NotFoundWasiCryptoSignaturesModule, + NotFoundStore, + NotFoundStatistics, + NotFoundImportModule(String), + DuplicateImportModule(String), + DuplicateModuleInstance(String), + NotFoundLoader, + NotFoundValidator, + NotFoundExecutor, + InvalidImportModule, + NotFoundActiveModule, +
}
Expand description

The error types for WasmEdge Vm.

+

Variants§

§

Create

§

CreateWithWasiContext

§

NotFoundFuncType(String)

§

NotFoundModule(String)

§

NotFoundWasiModule

§

NotFoundWasmEdgeProcessModule

§

NotFoundWasiNnModule

§

NotFoundWasiCryptoCommonModule

§

NotFoundWasiCryptoAsymmetricCommonModule

§

NotFoundWasiCryptoSymmetricModule

§

NotFoundWasiCryptoKxModule

§

NotFoundWasiCryptoSignaturesModule

§

NotFoundStore

§

NotFoundStatistics

§

NotFoundImportModule(String)

§

DuplicateImportModule(String)

§

DuplicateModuleInstance(String)

§

NotFoundLoader

§

NotFoundValidator

§

NotFoundExecutor

§

InvalidImportModule

§

NotFoundActiveModule

Trait Implementations§

Source§

impl Clone for VmError

Source§

fn clone(&self) -> VmError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VmError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for VmError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for VmError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<VmError> for WasmEdgeError

Source§

fn from(source: VmError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl PartialEq for VmError

Source§

fn eq(&self, other: &VmError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for VmError

Source§

impl StructuralPartialEq for VmError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/enum.WasmEdgeError.html b/wasmedge_sdk/error/enum.WasmEdgeError.html new file mode 100644 index 000000000..692eb4a04 --- /dev/null +++ b/wasmedge_sdk/error/enum.WasmEdgeError.html @@ -0,0 +1,49 @@ +WasmEdgeError in wasmedge_sdk::error - Rust
wasmedge_sdk::error

Enum WasmEdgeError

Source
pub enum WasmEdgeError {
+
Show 31 variants Operation(String), + User(u32), + Core(CoreError), + ImportObjCreate, + ExecutorCreate, + Store(StoreError), + StatisticsCreate, + ModuleCreate, + LoaderCreate, + ConfigCreate, + CompilerCreate, + ValidatorCreate, + Vm(VmError), + Func(FuncError), + FuncTypeCreate, + ExecuteTimeout, + Mem(MemError), + MemTypeCreate, + Global(GlobalError), + GlobalTypeCreate, + Table(TableError), + TableTypeCreate, + Import(ImportError), + Export(ExportError), + Instance(InstanceError), + Plugin(PluginError), + FoundNulByte(NulError), + NotFoundNulByte(FromBytesWithNulError), + Utf8(Utf8Error), + FromUtf8(FromUtf8Error), + WindowsPathConversion(String), +
}
Expand description

The error types used by both wasmedge-sys and wasmedge crates.

+

Variants§

§

Operation(String)

§

User(u32)

§

Core(CoreError)

Errors raised by WasmEdge Core.

+
§

ImportObjCreate

§

ExecutorCreate

§

Store(StoreError)

§

StatisticsCreate

§

ModuleCreate

§

LoaderCreate

§

ConfigCreate

§

CompilerCreate

§

ValidatorCreate

§

Vm(VmError)

§

Func(FuncError)

§

FuncTypeCreate

§

ExecuteTimeout

§

Mem(MemError)

§

MemTypeCreate

§

Global(GlobalError)

§

GlobalTypeCreate

§

Table(TableError)

§

TableTypeCreate

§

Import(ImportError)

§

Export(ExportError)

§

Instance(InstanceError)

§

Plugin(PluginError)

§

FoundNulByte(NulError)

§

NotFoundNulByte(FromBytesWithNulError)

§

Utf8(Utf8Error)

§

FromUtf8(FromUtf8Error)

§

WindowsPathConversion(String)

Trait Implementations§

Source§

impl Clone for WasmEdgeError

Source§

fn clone(&self) -> WasmEdgeError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdgeError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for WasmEdgeError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for WasmEdgeError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CoreError> for WasmEdgeError

Source§

fn from(source: CoreError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<ExportError> for WasmEdgeError

Source§

fn from(source: ExportError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<FromBytesWithNulError> for WasmEdgeError

Source§

fn from(source: FromBytesWithNulError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for WasmEdgeError

Source§

fn from(source: FromUtf8Error) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<FuncError> for WasmEdgeError

Source§

fn from(source: FuncError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<GlobalError> for WasmEdgeError

Source§

fn from(source: GlobalError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<ImportError> for WasmEdgeError

Source§

fn from(source: ImportError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<InstanceError> for WasmEdgeError

Source§

fn from(source: InstanceError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<MemError> for WasmEdgeError

Source§

fn from(source: MemError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<NulError> for WasmEdgeError

Source§

fn from(source: NulError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<PluginError> for WasmEdgeError

Source§

fn from(source: PluginError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<StoreError> for WasmEdgeError

Source§

fn from(source: StoreError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<TableError> for WasmEdgeError

Source§

fn from(source: TableError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<Utf8Error> for WasmEdgeError

Source§

fn from(source: Utf8Error) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl From<VmError> for WasmEdgeError

Source§

fn from(source: VmError) -> WasmEdgeError

Converts to this type from the input type.
Source§

impl PartialEq for WasmEdgeError

Source§

fn eq(&self, other: &WasmEdgeError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for WasmEdgeError

Source§

impl StructuralPartialEq for WasmEdgeError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/error/index.html b/wasmedge_sdk/error/index.html new file mode 100644 index 000000000..43bc43aa6 --- /dev/null +++ b/wasmedge_sdk/error/index.html @@ -0,0 +1,2 @@ +wasmedge_sdk::error - Rust
wasmedge_sdk

Module error

Source
Expand description

Defines WasmEdge error types.

+

Enums§

\ No newline at end of file diff --git a/wasmedge_sdk/error/sidebar-items.js b/wasmedge_sdk/error/sidebar-items.js new file mode 100644 index 000000000..1435083c3 --- /dev/null +++ b/wasmedge_sdk/error/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["CoreCommonError","CoreComponentError","CoreError","CoreExecutionError","CoreInstantiationError","CoreLoadError","CoreValidationError","ExportError","FuncError","GlobalError","HostFuncError","ImportError","InstanceError","MemError","PluginError","StoreError","TableError","VmError","WasmEdgeError"]}; \ No newline at end of file diff --git a/wasmedge_sdk/fn.wat2wasm.html b/wasmedge_sdk/fn.wat2wasm.html new file mode 100644 index 000000000..a5169c03e --- /dev/null +++ b/wasmedge_sdk/fn.wat2wasm.html @@ -0,0 +1,27 @@ +wat2wasm in wasmedge_sdk - Rust
wasmedge_sdk

Function wat2wasm

pub fn wat2wasm(bytes: &[u8]) -> Result<Cow<'_, [u8]>, Error>
Expand description

Parses in-memory bytes as either the WebAssembly Text format, or a +binary WebAssembly module.

+

This function will attempt to interpret the given bytes as one of two +options:

+
    +
  • A utf-8 string which is a *.wat file to be parsed.
  • +
  • A binary WebAssembly file starting with b"\0asm"
  • +
+

If the input is a string then it will be parsed as *.wat, and then after +parsing it will be encoded back into a WebAssembly binary module. If the +input is a binary that starts with b"\0asm" it will be returned verbatim. +Everything that doesn’t start with b"\0asm" will be parsed as a utf-8 +*.wat file, returning errors as appropriate.

+

For more information about parsing wat files, see [parse_str].

+

§Errors

+

In addition to all of the errors that can be returned from [parse_str], +this function will also return an error if the input does not start with +b"\0asm" and is invalid utf-8. (failed to even try to call [parse_str]).

+

§Examples

+
// Parsing bytes that are actually `*.wat` files
+assert_eq!(&*wat::parse_bytes(b"(module)")?, b"\0asm\x01\0\0\0");
+assert!(wat::parse_bytes(b"module").is_err());
+assert!(wat::parse_bytes(b"binary\0file\0\that\0is\0not\0wat").is_err());
+
+// Pass through binaries that look like real wasm files
+assert_eq!(&*wat::parse_bytes(b"\0asm\x01\0\0\0")?, b"\0asm\x01\0\0\0");
+
\ No newline at end of file diff --git a/wasmedge_sdk/import/struct.ImportObjectBuilder.html b/wasmedge_sdk/import/struct.ImportObjectBuilder.html new file mode 100644 index 000000000..82961596b --- /dev/null +++ b/wasmedge_sdk/import/struct.ImportObjectBuilder.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/struct.ImportObjectBuilder.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/import/trait.AsInstance.html b/wasmedge_sdk/import/trait.AsInstance.html new file mode 100644 index 000000000..f1376b087 --- /dev/null +++ b/wasmedge_sdk/import/trait.AsInstance.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/trait.AsInstance.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/import/type.ImportObject.html b/wasmedge_sdk/import/type.ImportObject.html new file mode 100644 index 000000000..2b93bf394 --- /dev/null +++ b/wasmedge_sdk/import/type.ImportObject.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/type.ImportObject.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/index.html b/wasmedge_sdk/index.html new file mode 100644 index 000000000..caf552ef9 --- /dev/null +++ b/wasmedge_sdk/index.html @@ -0,0 +1,72 @@ +wasmedge_sdk - Rust

Crate wasmedge_sdk

Source
Expand description

§Overview

+

WasmEdge Rust SDK provides idiomatic Rust language bindings for WasmEdge

+

Notice: This project is still under active development and not guaranteed to have a stable API.

+ +

§Get Started

+

Since this crate depends on the WasmEdge C API, it needs to be installed in your system first. Please refer to WasmEdge Installation and Uninstallation to install the WasmEdge library. The versioning table below shows the version of the WasmEdge library required by each version of the wasmedge-sdk crate.

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
wasmedge-sdkWasmEdge libwasmedge-syswasmedge-typeswasmedge-macroasync-wasi
0.14.10.14.00.19.20.6.00.6.10.2.0
0.14.00.14.00.19.00.6.00.6.10.2.0
0.13.5-newapi0.13.50.18.00.5.00.6.10.2.0
0.13.20.13.50.17.50.4.40.6.10.1.0
0.13.10.13.50.17.40.4.40.6.10.1.0
0.13.00.13.50.17.30.4.40.6.10.1.0
0.12.20.13.40.17.20.4.40.6.10.1.0
0.12.10.13.40.17.10.4.40.6.10.1.0
0.12.00.13.40.17.00.4.40.6.10.1.0
0.11.20.13.30.16.20.4.30.6.10.1.0
0.11.00.13.30.16.00.4.30.6.00.0.3
0.10.10.13.30.15.10.4.20.5.00.0.2
0.10.00.13.20.15.00.4.20.5.00.0.2
0.9.00.13.10.14.00.4.20.4.00.0.1
0.9.00.13.00.14.00.4.20.4.00.0.1
0.8.10.12.10.13.10.4.10.3.0-
0.8.00.12.00.13.00.4.10.3.0-
0.7.10.11.20.12.20.3.10.3.0-
0.7.00.11.20.120.3.10.3.0-
0.6.00.11.20.110.3.00.2.0-
0.5.00.11.10.100.3.00.1.0-
0.4.00.11.00.90.2.1--
0.3.00.10.10.80.2--
0.1.00.10.00.70.1--
+
+

WasmEdge Rust SDK will automatically search for the WasmEdge library in your system. Alternatively you can set the WASMEDGE_DIR environment variable to the path of the WasmEdge library (or the WASMEDGE_INCLUDE_DIR and WASMEDGE_LIB_DIR variables for more fine-grained control). If you want to use a local cmake build of WasmEdge you can set the WASMEDGE_BUILD_DIR instead.

+

WasmEdge Rust SDK will search for the WasmEdge library in the following paths in order:

+
    +
  • $WASMEDGE_[INCLUDE|LIB]_DIR
  • +
  • $WASMEDGE_DIR
  • +
  • $WASMEDGE_BUILD_DIR
  • +
  • $HOME/.wasmedge
  • +
  • /usr/local
  • +
  • $HOME/.local
  • +
+

When the standalone feature is enabled the correct library will be downloaded during build time and the previous locations are ignored. You can specify a proxy for the download process using the WASMEDGE_STANDALONE_PROXY, WASMEDGE_STANDALONE_PROXY_USER and WASMEDGE_STANDALONE_PROXY_PASS environment variables. You can set the WASMEDGE_STANDALONE_ARCHIVE environment variable to use a local archive instead of downloading one. +The following architectures are supported for automatic downloads:

+
+ + + +
oslibcarchitecturelinking type
macos-x86_64, aarch64dynamic
linuxglibcx86_64, aarch64static, dynamic
linuxmuslx86_64, aarch64static
+
+

This crate uses rust-bindgen during the build process. If you would like to use an external rust-bindgen you can set the WASMEDGE_RUST_BINDGEN_PATH environment variable to the bindgen executable path. This is particularly useful in systems like Alpine Linux (see rust-lang/rust-bindgen#2360, rust-lang/rust-bindgen#2333).

+

Notice: The minimum supported Rust version is 1.71.

+

§API Reference

+ +

§Examples

+

The Examples of WasmEdge RustSDK repo contains a number of examples that demonstrate how to use the WasmEdge Rust SDK.

+

§Contributing

+

Please read the contribution guidelines on how to contribute code.

+

§License

+

This project is licensed under the terms of the Apache 2.0 license.

+

Modules§

  • Defines the structs used to construct configurations.
  • Defines WasmEdge error types.
  • Defines plugin related structs.
  • Defines the general types.
  • Defines WasmEdge Driver and CoreVersion types

Macros§

Structs§

  • Defines WasmEdge ahead-of-time(AOT) compiler and the relevant APIs.
  • Defines the types of the exported instances.
  • Struct of WasmEdge FuncType.
  • Struct of WasmEdge GlobalType.
  • Creates a import object.
  • Defines the types of the imported instances.
  • Manipulates the runtime logger.
  • Struct of WasmEdge MemoryType.
  • Defines compiled in-memory representation of an input WASM binary.
  • Used to collect statistics of the WasmEdge runtime, such as the count of instructions in execution.
  • The Store is a collection of registered modules and assists wasm modules in finding the import modules they need.
  • Struct of WasmEdge TableType.
  • A Vm defines a virtual environment for managing WebAssembly programs.

Enums§

Traits§

  • The object as an module instance is required to implement this trait.
  • Defines the function converting a value of Rust type to the one of Wasm type.
  • Describes the mapping of Rust type to Wasm type.
  • Describes the mapping of a tuple of Rust types to Wasm types.

Functions§

Type Aliases§

  • Defines an import object that contains the required import data used when instantiating a module.
  • Represents an instantiated module.
  • This is a workaround solution to the never type in Rust. It will be replaced by ! once it is stable.
  • The WasmEdge result type.
  • WebAssembly value type.

Attribute Macros§

  • async_host_functionasync and Linux
    Declare a native async function that will be used to create an async host function instance.
  • Declare a native function that will be used to create a host function instance.
\ No newline at end of file diff --git a/wasmedge_sdk/instance/type.Instance.html b/wasmedge_sdk/instance/type.Instance.html new file mode 100644 index 000000000..a12e8fcf1 --- /dev/null +++ b/wasmedge_sdk/instance/type.Instance.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/type.Instance.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/io/trait.WasmVal.html b/wasmedge_sdk/io/trait.WasmVal.html new file mode 100644 index 000000000..0c52198b0 --- /dev/null +++ b/wasmedge_sdk/io/trait.WasmVal.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/trait.WasmVal.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/io/trait.WasmValType.html b/wasmedge_sdk/io/trait.WasmValType.html new file mode 100644 index 000000000..42a8bbae2 --- /dev/null +++ b/wasmedge_sdk/io/trait.WasmValType.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/trait.WasmValType.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/io/trait.WasmValTypeList.html b/wasmedge_sdk/io/trait.WasmValTypeList.html new file mode 100644 index 000000000..05388c26f --- /dev/null +++ b/wasmedge_sdk/io/trait.WasmValTypeList.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/trait.WasmValTypeList.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/log/struct.LogManager.html b/wasmedge_sdk/log/struct.LogManager.html new file mode 100644 index 000000000..2ead988d7 --- /dev/null +++ b/wasmedge_sdk/log/struct.LogManager.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/struct.LogManager.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/macro.params!.html b/wasmedge_sdk/macro.params!.html new file mode 100644 index 000000000..612a78740 --- /dev/null +++ b/wasmedge_sdk/macro.params!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.params.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/macro.params.html b/wasmedge_sdk/macro.params.html new file mode 100644 index 000000000..c23a96d40 --- /dev/null +++ b/wasmedge_sdk/macro.params.html @@ -0,0 +1,5 @@ +params in wasmedge_sdk - Rust
wasmedge_sdk

Macro params

Source
macro_rules! params {
+    ( $( $x:expr ),* ) => { ... };
+}
Expand description

Generates arguments of WasmValue types.

+

Notice that to use the macro, it is required to use WasmVal trait.

+
\ No newline at end of file diff --git a/wasmedge_sdk/module/struct.ExportType.html b/wasmedge_sdk/module/struct.ExportType.html new file mode 100644 index 000000000..b2868a97c --- /dev/null +++ b/wasmedge_sdk/module/struct.ExportType.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/struct.ExportType.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/module/struct.ImportType.html b/wasmedge_sdk/module/struct.ImportType.html new file mode 100644 index 000000000..a3071ce71 --- /dev/null +++ b/wasmedge_sdk/module/struct.ImportType.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/struct.ImportType.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/module/struct.Module.html b/wasmedge_sdk/module/struct.Module.html new file mode 100644 index 000000000..4718eef0f --- /dev/null +++ b/wasmedge_sdk/module/struct.Module.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/struct.Module.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/plugin/enum.ExecutionTarget.html b/wasmedge_sdk/plugin/enum.ExecutionTarget.html new file mode 100644 index 000000000..46cbed594 --- /dev/null +++ b/wasmedge_sdk/plugin/enum.ExecutionTarget.html @@ -0,0 +1,27 @@ +ExecutionTarget in wasmedge_sdk::plugin - Rust
wasmedge_sdk::plugin

Enum ExecutionTarget

Source
pub enum ExecutionTarget {
+    CPU,
+    GPU,
+    TPU,
+    AUTO,
+}
Available on crate feature wasi_nn only.
Expand description

Define where the graph should be executed.

+

Variants§

§

CPU

§

GPU

§

TPU

§

AUTO

Trait Implementations§

Source§

impl Clone for ExecutionTarget

Source§

fn clone(&self) -> ExecutionTarget

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExecutionTarget

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ExecutionTarget

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for ExecutionTarget

Source§

type Err = WasmEdgeError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Ord for ExecutionTarget

Source§

fn cmp(&self, other: &ExecutionTarget) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ExecutionTarget

Source§

fn eq(&self, other: &ExecutionTarget) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PartialOrd for ExecutionTarget

Source§

fn partial_cmp(&self, other: &ExecutionTarget) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > +operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
Source§

impl Eq for ExecutionTarget

Source§

impl StructuralPartialEq for ExecutionTarget

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/plugin/enum.GraphEncoding.html b/wasmedge_sdk/plugin/enum.GraphEncoding.html new file mode 100644 index 000000000..f7f461d23 --- /dev/null +++ b/wasmedge_sdk/plugin/enum.GraphEncoding.html @@ -0,0 +1,30 @@ +GraphEncoding in wasmedge_sdk::plugin - Rust
wasmedge_sdk::plugin

Enum GraphEncoding

Source
pub enum GraphEncoding {
+    OpenVINO,
+    ONNX,
+    TensorFlow,
+    PyTorch,
+    TensorFlowLite,
+    Autodetect,
+    GGML,
+}
Available on crate feature wasi_nn only.
Expand description

Describes the encoding of the graph.

+

Variants§

§

OpenVINO

§

ONNX

§

TensorFlow

§

PyTorch

§

TensorFlowLite

§

Autodetect

§

GGML

Trait Implementations§

Source§

impl Clone for GraphEncoding

Source§

fn clone(&self) -> GraphEncoding

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GraphEncoding

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for GraphEncoding

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for GraphEncoding

Source§

type Err = WasmEdgeError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Ord for GraphEncoding

Source§

fn cmp(&self, other: &GraphEncoding) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for GraphEncoding

Source§

fn eq(&self, other: &GraphEncoding) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PartialOrd for GraphEncoding

Source§

fn partial_cmp(&self, other: &GraphEncoding) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > +operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
Source§

impl Eq for GraphEncoding

Source§

impl StructuralPartialEq for GraphEncoding

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/plugin/ffi/index.html b/wasmedge_sdk/plugin/ffi/index.html new file mode 100644 index 000000000..525e0dca9 --- /dev/null +++ b/wasmedge_sdk/plugin/ffi/index.html @@ -0,0 +1,2 @@ +wasmedge_sdk::plugin::ffi - Rust
wasmedge_sdk::plugin

Module ffi

Source
Expand description

Defines low-level types used in Plugin development.

+

Structs§

\ No newline at end of file diff --git a/wasmedge_sdk/plugin/ffi/sidebar-items.js b/wasmedge_sdk/plugin/ffi/sidebar-items.js new file mode 100644 index 000000000..048f6f7c4 --- /dev/null +++ b/wasmedge_sdk/plugin/ffi/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["WasmEdge_ModuleDescriptor","WasmEdge_ModuleInstanceContext","WasmEdge_PluginDescriptor"]}; \ No newline at end of file diff --git a/wasmedge_sdk/plugin/ffi/struct.WasmEdge_ModuleDescriptor.html b/wasmedge_sdk/plugin/ffi/struct.WasmEdge_ModuleDescriptor.html new file mode 100644 index 000000000..eaf50a256 --- /dev/null +++ b/wasmedge_sdk/plugin/ffi/struct.WasmEdge_ModuleDescriptor.html @@ -0,0 +1,18 @@ +WasmEdge_ModuleDescriptor in wasmedge_sdk::plugin::ffi - Rust
wasmedge_sdk::plugin::ffi

Struct WasmEdge_ModuleDescriptor

Source
#[repr(C)]
pub struct WasmEdge_ModuleDescriptor { + pub Name: *const i8, + pub Description: *const i8, + pub Create: Option<unsafe extern "C" fn(_: *const WasmEdge_ModuleDescriptor) -> *mut WasmEdge_ModuleInstanceContext>, +}
Expand description

Module descriptor for plugins.

+

Fields§

§Name: *const i8§Description: *const i8§Create: Option<unsafe extern "C" fn(_: *const WasmEdge_ModuleDescriptor) -> *mut WasmEdge_ModuleInstanceContext>

Trait Implementations§

Source§

impl Clone for WasmEdge_ModuleDescriptor

Source§

fn clone(&self) -> WasmEdge_ModuleDescriptor

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_ModuleDescriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_ModuleDescriptor

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/plugin/ffi/struct.WasmEdge_ModuleInstanceContext.html b/wasmedge_sdk/plugin/ffi/struct.WasmEdge_ModuleInstanceContext.html new file mode 100644 index 000000000..4c9fc1849 --- /dev/null +++ b/wasmedge_sdk/plugin/ffi/struct.WasmEdge_ModuleInstanceContext.html @@ -0,0 +1,13 @@ +WasmEdge_ModuleInstanceContext in wasmedge_sdk::plugin::ffi - Rust
wasmedge_sdk::plugin::ffi

Struct WasmEdge_ModuleInstanceContext

Source
#[repr(C)]
pub struct WasmEdge_ModuleInstanceContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_ModuleInstanceContext

Source§

fn clone(&self) -> WasmEdge_ModuleInstanceContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_ModuleInstanceContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_ModuleInstanceContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/plugin/ffi/struct.WasmEdge_PluginDescriptor.html b/wasmedge_sdk/plugin/ffi/struct.WasmEdge_PluginDescriptor.html new file mode 100644 index 000000000..3c2986857 --- /dev/null +++ b/wasmedge_sdk/plugin/ffi/struct.WasmEdge_PluginDescriptor.html @@ -0,0 +1,23 @@ +WasmEdge_PluginDescriptor in wasmedge_sdk::plugin::ffi - Rust
wasmedge_sdk::plugin::ffi

Struct WasmEdge_PluginDescriptor

Source
#[repr(C)]
pub struct WasmEdge_PluginDescriptor { + pub Name: *const i8, + pub Description: *const i8, + pub APIVersion: u32, + pub Version: WasmEdge_PluginVersionData, + pub ModuleCount: u32, + pub ProgramOptionCount: u32, + pub ModuleDescriptions: *mut WasmEdge_ModuleDescriptor, + pub ProgramOptions: *mut WasmEdge_ProgramOption, +}
Expand description

Plugin descriptor for plugins.

+

Fields§

§Name: *const i8§Description: *const i8§APIVersion: u32§Version: WasmEdge_PluginVersionData§ModuleCount: u32§ProgramOptionCount: u32§ModuleDescriptions: *mut WasmEdge_ModuleDescriptor§ProgramOptions: *mut WasmEdge_ProgramOption

Trait Implementations§

Source§

impl Clone for WasmEdge_PluginDescriptor

Source§

fn clone(&self) -> WasmEdge_PluginDescriptor

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_PluginDescriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_PluginDescriptor

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/plugin/index.html b/wasmedge_sdk/plugin/index.html new file mode 100644 index 000000000..dd6781046 --- /dev/null +++ b/wasmedge_sdk/plugin/index.html @@ -0,0 +1,2 @@ +wasmedge_sdk::plugin - Rust
wasmedge_sdk

Module plugin

Source
Expand description

Defines plugin related structs.

+

Modules§

  • Defines low-level types used in Plugin development.

Structs§

  • NNPreloadwasi_nn
    Preload config for initializing the wasi_nn plug-in.
  • Represents a loaded plugin. It provides the APIs for accessing the plugin.
  • Defines the API to manage plugins.

Enums§

Type Aliases§

\ No newline at end of file diff --git a/wasmedge_sdk/plugin/sidebar-items.js b/wasmedge_sdk/plugin/sidebar-items.js new file mode 100644 index 000000000..df1817498 --- /dev/null +++ b/wasmedge_sdk/plugin/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["ExecutionTarget","GraphEncoding"],"mod":["ffi"],"struct":["NNPreload","Plugin","PluginManager"],"type":["PluginInstance"]}; \ No newline at end of file diff --git a/wasmedge_sdk/plugin/struct.NNPreload.html b/wasmedge_sdk/plugin/struct.NNPreload.html new file mode 100644 index 000000000..400a4e78d --- /dev/null +++ b/wasmedge_sdk/plugin/struct.NNPreload.html @@ -0,0 +1,34 @@ +NNPreload in wasmedge_sdk::plugin - Rust
wasmedge_sdk::plugin

Struct NNPreload

Source
pub struct NNPreload { /* private fields */ }
Available on crate feature wasi_nn only.
Expand description

Preload config for initializing the wasi_nn plug-in.

+

Implementations§

Source§

impl NNPreload

Source

pub fn new( + alias: impl AsRef<str>, + backend: GraphEncoding, + target: ExecutionTarget, + path: impl AsRef<Path>, +) -> Self

Creates a new preload config.

+
§Arguments
+
    +
  • +

    alias - The alias of the model in the WASI-NN environment.

    +
  • +
  • +

    backend - The inference backend.

    +
  • +
  • +

    target - The execution target, on which the inference runs.

    +
  • +
  • +

    path - The path to the model file. Note that the path is the guest path instead of the host path.

    +
  • +
+

Trait Implementations§

Source§

impl Debug for NNPreload

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for NNPreload

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for NNPreload

Source§

type Err = WasmEdgeError

The associated error which can be returned from parsing.
Source§

fn from_str(preload: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/plugin/struct.Plugin.html b/wasmedge_sdk/plugin/struct.Plugin.html new file mode 100644 index 000000000..860c9eec7 --- /dev/null +++ b/wasmedge_sdk/plugin/struct.Plugin.html @@ -0,0 +1,25 @@ +Plugin in wasmedge_sdk::plugin - Rust
wasmedge_sdk::plugin

Struct Plugin

Source
pub struct Plugin { /* private fields */ }
Expand description

Represents a loaded plugin. It provides the APIs for accessing the plugin.

+

Implementations§

Source§

impl Plugin

Source

pub fn name(&self) -> String

Returns the name of this plugin.

+
Source

pub fn mod_count(&self) -> u32

Returns the count of the module instances in this plugin.

+
Source

pub fn mod_names(&self) -> Vec<String>

Returns the names of all module instances in this plugin.

+
Source

pub fn mod_instance( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<PluginInstance>

Returns a module instance that is generated from the module with the given name in this plugin.

+
§Argument
+
    +
  • name - The name of the target module.
  • +
+
§Error
+

If failed to return the plugin module instance, then return PluginError::Create error.

+

Trait Implementations§

Source§

impl Debug for Plugin

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Plugin

§

impl RefUnwindSafe for Plugin

§

impl Send for Plugin

§

impl Sync for Plugin

§

impl Unpin for Plugin

§

impl UnwindSafe for Plugin

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/plugin/struct.PluginManager.html b/wasmedge_sdk/plugin/struct.PluginManager.html new file mode 100644 index 000000000..1f2750bf2 --- /dev/null +++ b/wasmedge_sdk/plugin/struct.PluginManager.html @@ -0,0 +1,91 @@ +PluginManager in wasmedge_sdk::plugin - Rust
wasmedge_sdk::plugin

Struct PluginManager

Source
pub struct PluginManager {}
Expand description

Defines the API to manage plugins.

+

Implementations§

Source§

impl PluginManager

Source

pub fn load(path: Option<&Path>) -> WasmEdgeResult<()>

Load plugins from the given path.

+
    +
  • +

    If the path is not given, then the default plugin paths will be used. The default plugin paths are

    +
      +
    • +

      The environment variable “WASMEDGE_PLUGIN_PATH”.

      +
    • +
    • +

      The ../plugin/ directory related to the WasmEdge installation path.

      +
    • +
    • +

      The wasmedge/ directory under the library path if the WasmEdge is installed under the “/usr”.

      +
    • +
    +
  • +
  • +

    If the path is given, then

    +
      +
    • +

      If the path is pointing at a file , then it indicates that a single plugin will be loaded from the file.

      +
    • +
    • +

      If the path is pointing at a directory, then the method will load plugins from the files in the directory.

      +
    • +
    +
  • +
+
§Argument
+
    +
  • path - A path to a plugin file or a directory holding plugin files. If None, then the default plugin path will be used.
  • +
+
Source

pub fn nn_preload(preloads: Vec<NNPreload>)

Available on crate feature wasi_nn only.

Initialize the wasi_nn plug-in with the preloads.

+

Note that this function is only available after loading the wasi_nn plug-in and before creating, and before creating the module instance from the plug-in.

+
§Argument
+
    +
  • preloads - The preload list.
  • +
+
§Example
+
// load wasinn-pytorch-plugin from the default plugin directory: /usr/local/lib/wasmedge
+PluginManager::load(None)?;
+// preload named model
+PluginManager::nn_preload(vec![NNPreload::new(
+    "default",
+    GraphEncoding::GGML,
+    ExecutionTarget::CPU,
+    "llama-2-7b-chat.Q5_K_M.gguf",
+)]);
+

If a preload is string, then use NNPreload::from_str to create a NNPreload instance:

+ +
use std::str::FromStr;
+
+// load wasinn-pytorch-plugin from the default plugin directory: /usr/local/lib/wasmedge
+PluginManager::load(None)?;
+// preload named model
+PluginManager::nn_preload(vec![NNPreload::from_str("default:GGML:CPU:llama-2-7b-chat.Q5_K_M.gguf")?]);
+
+
Source

pub fn count() -> u32

Returns the count of loaded plugins.

+
Source

pub fn names() -> Vec<String>

Returns the names of all loaded plugins.

+
Source

pub fn find(name: impl AsRef<str>) -> WasmEdgeResult<Plugin>

Returns the target plugin by its name.

+
§Argument
+
    +
  • name - The name of the target plugin.
  • +
+
§Error
+

If failed to return the plugin module instance, then return PluginError::NotFound error.

+
Source

pub fn create_plugin_instance( + pname: impl AsRef<str>, + mname: impl AsRef<str>, +) -> WasmEdgeResult<PluginInstance>

Source

pub fn init_wasmedge_process(allowed_cmds: Option<Vec<&str>>, allowed: bool)

Available on Linux and crate feature wasmedge_process and non-crate feature static only.

Initializes the wasmedge_process plugin module instance with the parameters.

+
§Arguments
+
    +
  • +

    allowed_cmds - A white list of commands.

    +
  • +
  • +

    allowed - Determines if wasmedge_process is allowed to execute all commands on the white list.

    +
  • +
+
Source

pub fn auto_detect_plugins() -> WasmEdgeResult<Vec<Instance>>

Source§

impl PluginManager

Trait Implementations§

Source§

impl Debug for PluginManager

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/plugin/type.PluginInstance.html b/wasmedge_sdk/plugin/type.PluginInstance.html new file mode 100644 index 000000000..4e98a8b22 --- /dev/null +++ b/wasmedge_sdk/plugin/type.PluginInstance.html @@ -0,0 +1 @@ +PluginInstance in wasmedge_sdk::plugin - Rust
wasmedge_sdk::plugin

Type Alias PluginInstance

Source
pub type PluginInstance = Instance;

Aliased Type§

struct PluginInstance { /* private fields */ }
\ No newline at end of file diff --git a/wasmedge_sdk/sidebar-items.js b/wasmedge_sdk/sidebar-items.js new file mode 100644 index 000000000..0c050cc08 --- /dev/null +++ b/wasmedge_sdk/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"attr":["async_host_function","host_function"],"enum":["CompilerOptimizationLevel","CompilerOutputFormat","ExternalInstanceType","HostRegistration","Mutability","RefType","ValType"],"fn":["wat2wasm"],"macro":["params"],"mod":["async","config","error","plugin","types","utils","wasi"],"struct":["Compiler","ExportType","FuncType","GlobalType","ImportObjectBuilder","ImportType","LogManager","MemoryType","Module","Statistics","Store","TableType","Vm"],"trait":["AsInstance","WasmVal","WasmValType","WasmValTypeList"],"type":["ImportObject","Instance","NeverType","WasmEdgeResult","WasmValue"]}; \ No newline at end of file diff --git a/wasmedge_sdk/statistics/struct.Statistics.html b/wasmedge_sdk/statistics/struct.Statistics.html new file mode 100644 index 000000000..d3cd8648d --- /dev/null +++ b/wasmedge_sdk/statistics/struct.Statistics.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/struct.Statistics.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/store/struct.Store.html b/wasmedge_sdk/store/struct.Store.html new file mode 100644 index 000000000..dd6c2b44e --- /dev/null +++ b/wasmedge_sdk/store/struct.Store.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/struct.Store.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/struct.Compiler.html b/wasmedge_sdk/struct.Compiler.html new file mode 100644 index 000000000..238ff9289 --- /dev/null +++ b/wasmedge_sdk/struct.Compiler.html @@ -0,0 +1,55 @@ +Compiler in wasmedge_sdk - Rust
wasmedge_sdk

Struct Compiler

Source
pub struct Compiler { /* private fields */ }
Available on crate feature aot only.
Expand description

Defines WasmEdge ahead-of-time(AOT) compiler and the relevant APIs.

+

Implementations§

Source§

impl Compiler

Source

pub fn new(config: Option<&Config>) -> WasmEdgeResult<Self>

Creates a new AOT compiler.

+
§Error
+

If fail to create a AOT compiler, then an error is returned.

+
Source

pub fn compile_from_file( + &self, + wasm_file: impl AsRef<Path>, + filename: impl AsRef<str>, + out_dir: impl AsRef<Path>, +) -> WasmEdgeResult<PathBuf>

Compiles the given wasm file into a shared library file (*.so in Linux, *.dylib in macOS, or *.dll in Windows). The file path of the generated shared library file will be returned if the method works successfully.

+
§Arguments
+
    +
  • +

    wasm_file - The target wasm file.

    +
  • +
  • +

    filename - The filename of the generated shared library file.

    +
  • +
  • +

    out_dir - The target directory to save the generated shared library file.

    +
  • +
+
§Error
+

If fail to compile, then an error is returned.

+
Source

pub fn compile_from_bytes( + &self, + bytes: impl AsRef<[u8]>, + filename: impl AsRef<str>, + out_dir: impl AsRef<Path>, +) -> WasmEdgeResult<PathBuf>

Compiles the given wasm bytes into a shared library file (*.so in Linux, *.dylib in macOS, or *.dll in Windows). The file path of the generated shared library file will be returned if the method works successfully.

+
§Argument
+
    +
  • +

    bytes - A in-memory WASM bytes.

    +
  • +
  • +

    filename - The filename of the generated shared library file.

    +
  • +
  • +

    out_dir - The target directory to save the generated shared library file.

    +
  • +
+
§Error
+

If fail to compile, then an error is returned.

+

Trait Implementations§

Source§

impl Debug for Compiler

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/struct.ExportType.html b/wasmedge_sdk/struct.ExportType.html new file mode 100644 index 000000000..3d6f7e750 --- /dev/null +++ b/wasmedge_sdk/struct.ExportType.html @@ -0,0 +1,14 @@ +ExportType in wasmedge_sdk - Rust
wasmedge_sdk

Struct ExportType

Source
pub struct ExportType<'module> { /* private fields */ }
Expand description

Defines the types of the exported instances.

+

Implementations§

Source§

impl ExportType<'_>

Source

pub fn name(&self) -> Cow<'_, str>

Returns the exported name of the WasmEdge instance.

+
Source

pub fn ty(&self) -> WasmEdgeResult<ExternalInstanceType>

Returns the type of the exported WasmEdge instance, which is one of the types defined in ExternalInstanceType.

+

Trait Implementations§

Source§

impl<'module> Debug for ExportType<'module>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'module> Freeze for ExportType<'module>

§

impl<'module> RefUnwindSafe for ExportType<'module>

§

impl<'module> Send for ExportType<'module>

§

impl<'module> Sync for ExportType<'module>

§

impl<'module> Unpin for ExportType<'module>

§

impl<'module> UnwindSafe for ExportType<'module>

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/struct.FuncType.html b/wasmedge_sdk/struct.FuncType.html new file mode 100644 index 000000000..a58ae15fa --- /dev/null +++ b/wasmedge_sdk/struct.FuncType.html @@ -0,0 +1,30 @@ +FuncType in wasmedge_sdk - Rust
wasmedge_sdk

Struct FuncType

Source
pub struct FuncType { /* private fields */ }
Expand description

Struct of WasmEdge FuncType.

+

A FuncType is used to declare the types of the parameters and return values of a WasmEdge Func to be created.

+

Implementations§

Source§

impl FuncType

Source

pub fn new(args: Vec<ValType>, returns: Vec<ValType>) -> FuncType

Creates a new FuncType with the given types of arguments and returns.

+
§Arguments
+
    +
  • +

    args - A vector of ValTypes that represent the types of the arguments.

    +
  • +
  • +

    returns - A vector of ValTypes that represent the types of the returns.

    +
  • +
+
Source

pub fn args(&self) -> &[ValType]

Returns the types of the arguments of a host function.

+
Source

pub fn args_len(&self) -> usize

Returns the number of the arguments of a host function.

+
Source

pub fn returns(&self) -> &[ValType]

Returns the types of the returns of a host function.

+
Source

pub fn returns_len(&self) -> usize

Returns the number of the returns of a host function.

+

Trait Implementations§

Source§

impl Clone for FuncType

Source§

fn clone(&self) -> FuncType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FuncType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for FuncType

Source§

fn default() -> FuncType

Returns the “default value” for a type. Read more
Source§

impl From<&FuncTypeOwn> for FuncType

Source§

fn from(ty: &FuncTypeOwn) -> FuncType

Converts to this type from the input type.
Source§

impl PartialEq for FuncType

Source§

fn eq(&self, other: &FuncType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for FuncType

Source§

impl StructuralPartialEq for FuncType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/struct.GlobalType.html b/wasmedge_sdk/struct.GlobalType.html new file mode 100644 index 000000000..aa36dde63 --- /dev/null +++ b/wasmedge_sdk/struct.GlobalType.html @@ -0,0 +1,28 @@ +GlobalType in wasmedge_sdk - Rust
wasmedge_sdk

Struct GlobalType

Source
pub struct GlobalType { /* private fields */ }
Expand description

Struct of WasmEdge GlobalType.

+

A GlobalType is used to declare the type of a WasmEdge Global to be created.

+

Implementations§

Source§

impl GlobalType

Source

pub fn new(ty: ValType, mutability: Mutability) -> GlobalType

Creates a new GlobalType with the given value type and mutability.

+
§Arguments
+
    +
  • +

    ty - The value type of the global to be created.

    +
  • +
  • +

    mutability - The value mutability property of the global to be created.

    +
  • +
+
Source

pub fn value_ty(&self) -> ValType

Returns the value type defined in the GlobalType.

+
Source

pub fn mutability(&self) -> Mutability

Returns the value mutability property defined in the GlobalType.

+

Trait Implementations§

Source§

impl Clone for GlobalType

Source§

fn clone(&self) -> GlobalType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GlobalType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for GlobalType

Source§

fn default() -> GlobalType

Returns the “default value” for a type. Read more
Source§

impl From<&GlobalType> for GlobalType

Source§

fn from(ty: &GlobalType) -> GlobalType

Converts to this type from the input type.
Source§

impl PartialEq for GlobalType

Source§

fn eq(&self, other: &GlobalType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for GlobalType

Source§

impl StructuralPartialEq for GlobalType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/struct.ImportObjectBuilder.html b/wasmedge_sdk/struct.ImportObjectBuilder.html new file mode 100644 index 000000000..3224a5058 --- /dev/null +++ b/wasmedge_sdk/struct.ImportObjectBuilder.html @@ -0,0 +1,106 @@ +ImportObjectBuilder in wasmedge_sdk - Rust
wasmedge_sdk

Struct ImportObjectBuilder

Source
pub struct ImportObjectBuilder<Data> { /* private fields */ }
Expand description

Creates a import object.

+

Implementations§

Source§

impl<Data> ImportObjectBuilder<Data>

Source

pub fn new(name: &str, data: Data) -> WasmEdgeResult<Self>

Creates a new ImportObjectBuilder.

+
Source

pub fn with_func<Args, Rets>( + &mut self, + name: impl AsRef<str>, + real_func: SyncFn<Data>, +) -> WasmEdgeResult<&mut Self>
where + Args: WasmValTypeList, + Rets: WasmValTypeList,

Adds a host function to the ImportObject to create.

+

N.B. that this function can be used in thread-safe scenarios.

+
§Arguments
+
    +
  • +

    name - The exported name of the host function to add.

    +
  • +
  • +

    real_func - The native function.

    +
  • +
  • +

    data - The host context data used in this function.

    +
  • +
+
§error
+

If fail to create or add the host function, then an error is returned.

+
Source

pub fn with_func_by_type( + &mut self, + name: impl AsRef<str>, + ty: FuncType, + real_func: SyncFn<Data>, +) -> WasmEdgeResult<&mut Self>

Adds a host function to the ImportObject to create.

+

N.B. that this function can be used in thread-safe scenarios.

+
§Arguments
+
    +
  • +

    name - The exported name of the host function to add.

    +
  • +
  • +

    ty - The function type.

    +
  • +
  • +

    real_func - The native function.

    +
  • +
  • +

    data - The host context data used in this function.

    +
  • +
+
§error
+

If fail to create or add the host function, then an error is returned.

+
Source

pub fn with_global(self, name: impl AsRef<str>, global: Global) -> Self

Adds a global to the ImportObject to create.

+
§Arguments
+ +
Source

pub fn with_memory(self, name: impl AsRef<str>, memory: Memory) -> Self

Adds a memory to the ImportObject to create.

+
§Arguments
+ +
Source

pub fn with_table(self, name: impl AsRef<str>, table: Table) -> Self

Adds a table to the ImportObject to create.

+
§Arguments
+
    +
  • +

    name - The exported name of the table to add.

    +
  • +
  • +

    table - The wasm table instance to add.

    +
  • +
+
Source

pub fn build(self) -> ImportObject<Data>

Creates a new ImportObject.

+
§Argument
+
    +
  • +

    name - The name of the ImportObject to create.

    +
  • +
  • +

    host_data - The host context data to be stored in the module instance.

    +
  • +
+
§Error
+

If fail to create the ImportObject, then an error is returned.

+

Trait Implementations§

Source§

impl<Data: Debug> Debug for ImportObjectBuilder<Data>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Data> Freeze for ImportObjectBuilder<Data>

§

impl<Data> RefUnwindSafe for ImportObjectBuilder<Data>
where + Data: RefUnwindSafe,

§

impl<Data> Send for ImportObjectBuilder<Data>
where + Data: Send,

§

impl<Data> Sync for ImportObjectBuilder<Data>
where + Data: Sync,

§

impl<Data> Unpin for ImportObjectBuilder<Data>
where + Data: Unpin,

§

impl<Data> UnwindSafe for ImportObjectBuilder<Data>
where + Data: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/struct.ImportType.html b/wasmedge_sdk/struct.ImportType.html new file mode 100644 index 000000000..722ea3c22 --- /dev/null +++ b/wasmedge_sdk/struct.ImportType.html @@ -0,0 +1,15 @@ +ImportType in wasmedge_sdk - Rust
wasmedge_sdk

Struct ImportType

Source
pub struct ImportType<'module> { /* private fields */ }
Expand description

Defines the types of the imported instances.

+

Implementations§

Source§

impl ImportType<'_>

Source

pub fn name(&self) -> Cow<'_, str>

Returns the imported name of the WasmEdge instance.

+
Source

pub fn module_name(&self) -> Cow<'_, str>

Returns the name of the module hosting the imported WasmEdge instance.

+
Source

pub fn ty(&self) -> WasmEdgeResult<ExternalInstanceType>

Returns the type of the imported WasmEdge instance, which is one of the types defined in ExternalInstanceType.

+

Trait Implementations§

Source§

impl<'module> Debug for ImportType<'module>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'module> Freeze for ImportType<'module>

§

impl<'module> RefUnwindSafe for ImportType<'module>

§

impl<'module> Send for ImportType<'module>

§

impl<'module> Sync for ImportType<'module>

§

impl<'module> Unpin for ImportType<'module>

§

impl<'module> UnwindSafe for ImportType<'module>

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/struct.LogManager.html b/wasmedge_sdk/struct.LogManager.html new file mode 100644 index 000000000..ae8e0cbf8 --- /dev/null +++ b/wasmedge_sdk/struct.LogManager.html @@ -0,0 +1,15 @@ +LogManager in wasmedge_sdk - Rust
wasmedge_sdk

Struct LogManager

Source
pub struct LogManager {}
Expand description

Manipulates the runtime logger.

+

Implementations§

Source§

impl LogManager

Source

pub fn log_debug_info()

Logs the debug information.

+
Source

pub fn log_error_info()

Logs the error information.

+
Source

pub fn log_off()

Sets the logging system off.

+

Trait Implementations§

Source§

impl Debug for LogManager

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/struct.MemoryType.html b/wasmedge_sdk/struct.MemoryType.html new file mode 100644 index 000000000..b17490734 --- /dev/null +++ b/wasmedge_sdk/struct.MemoryType.html @@ -0,0 +1,36 @@ +MemoryType in wasmedge_sdk - Rust
wasmedge_sdk

Struct MemoryType

Source
pub struct MemoryType { /* private fields */ }
Expand description

Struct of WasmEdge MemoryType.

+

A MemoryType is used to declare the size range of a WasmEdge Memory to be created.

+

Implementations§

Source§

impl MemoryType

Source

pub fn new( + min: u32, + max: Option<u32>, + shared: bool, +) -> Result<MemoryType, Box<WasmEdgeError>>

Creates a new MemoryType with the given size range.

+
§Arguments
+
    +
  • +

    min - The minimum size of the memory to be created.

    +
  • +
  • +

    max - The maximum size of the memory to be created. If shared is set to true, max must be set.

    +
  • +
  • +

    shared - Enables shared memory if true.

    +
  • +
+
Source

pub fn minimum(&self) -> u32

Returns the minimum size defined in the MemoryType.

+
Source

pub fn maximum(&self) -> Option<u32>

Returns the maximum size defined in the MemoryType.

+
Source

pub fn shared(&self) -> bool

Returns whether the memory is shared.

+

Trait Implementations§

Source§

impl Clone for MemoryType

Source§

fn clone(&self) -> MemoryType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MemoryType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for MemoryType

Source§

fn default() -> MemoryType

Returns the “default value” for a type. Read more
Source§

impl From<&MemType> for MemoryType

Source§

fn from(ty: &MemType) -> MemoryType

Converts to this type from the input type.
Source§

impl PartialEq for MemoryType

Source§

fn eq(&self, other: &MemoryType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for MemoryType

Source§

impl StructuralPartialEq for MemoryType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/struct.Module.html b/wasmedge_sdk/struct.Module.html new file mode 100644 index 000000000..58b991f55 --- /dev/null +++ b/wasmedge_sdk/struct.Module.html @@ -0,0 +1,54 @@ +Module in wasmedge_sdk - Rust
wasmedge_sdk

Struct Module

Source
pub struct Module { /* private fields */ }
Expand description

Defines compiled in-memory representation of an input WASM binary.

+

A Module is a compiled in-memory representation of an input WebAssembly binary. In the instantiation process, a Module is instatiated to a module instance, from which the exported function, table, memory, and global instances can be fetched.

+

Implementations§

Source§

impl Module

Source

pub fn from_file( + config: Option<&Config>, + file: impl AsRef<Path>, +) -> WasmEdgeResult<Self>

Returns a validated module from a file.

+
§Arguments
+
    +
  • +

    config - The global configuration.

    +
  • +
  • +

    file - A wasm file or an AOT wasm file.

    +
  • +
+
§Error
+

If fail to load and valiate a module from a file, returns an error.

+
Source

pub fn from_bytes( + config: Option<&Config>, + bytes: impl AsRef<[u8]>, +) -> WasmEdgeResult<Self>

Loads a WebAssembly binary module from in-memory bytes.

+
§Arguments
+
    +
  • +

    config - The global configuration.

    +
  • +
  • +

    bytes - The in-memory bytes to be parsed.

    +
  • +
+
§Error
+

If fail to load and valiate the WebAssembly module from the given in-memory bytes, returns an error.

+
Source

pub fn count_of_imports(&self) -> u32

Returns the count of the imported WasmEdge instances in the module.

+
Source

pub fn imports(&self) -> Vec<ImportType<'_>>

Returns the import types of all imported WasmEdge instances in the module.

+
Source

pub fn count_of_exports(&self) -> u32

Returns the count of the exported WasmEdge instances from the module.

+
Source

pub fn exports(&self) -> Vec<ExportType<'_>>

Returns the export types of all exported WasmEdge instances (including funcs, tables, globals and memories) from the module.

+
Source

pub fn get_export(&self, name: impl AsRef<str>) -> Option<ExternalInstanceType>

Gets the export type by the name of a specific exported WasmEdge instance, such as func, table, global or memory instance.

+
§Argument
+
    +
  • name - The name of the target exported WasmEdge instance, such as func, table, global or memory instance.
  • +
+

Trait Implementations§

Source§

impl Clone for Module

Source§

fn clone(&self) -> Module

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Module

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Module

§

impl RefUnwindSafe for Module

§

impl Send for Module

§

impl Sync for Module

§

impl Unpin for Module

§

impl UnwindSafe for Module

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/struct.Statistics.html b/wasmedge_sdk/struct.Statistics.html new file mode 100644 index 000000000..38e744ab1 --- /dev/null +++ b/wasmedge_sdk/struct.Statistics.html @@ -0,0 +1,47 @@ +Statistics in wasmedge_sdk - Rust
wasmedge_sdk

Struct Statistics

Source
pub struct Statistics { /* private fields */ }
Expand description

Used to collect statistics of the WasmEdge runtime, such as the count of instructions in execution.

+

Implementations§

Source§

impl Statistics

Source

pub fn new() -> WasmEdgeResult<Self>

Creates a new Statistics.

+
§Error
+

If fail to create a Statistics, then an error is returned.

+
Source

pub fn count(&self) -> u64

Returns the instruction count in execution.

+
Source

pub fn count_per_second(&self) -> f64

Returns the instruction count per second in execution.

+
§Notice
+

For the following cases,

+
    +
  • Statistics is not enabled, or
  • +
  • the total execution time is 0
  • +
+

The instructions per second could be NaN, which represents divided-by-zero. +Use the is_nan function of F64 to check the return value before use it, +for example,

+ +
use wasmedge_sdk::Statistics;
+
+// create a Statistics instance
+let stat = Statistics::new().expect("fail to create a Statistics");
+
+// check instruction count per second
+assert!(stat.count_per_second().is_nan());
+
Source

pub fn cost(&self) -> u64

Returns the total cost in execution.

+
Source

pub fn set_cost_table(&mut self, cost_table: impl AsRef<[u64]>)

Sets the cost of instructions.

+
§Arguments
+
    +
  • cost_table specifies the slice of cost table.
  • +
+
Source

pub fn set_cost_limit(&mut self, limit: u64)

Sets the cost limit in execution.

+
§Arguments
+
    +
  • limit specifies the cost limit.
  • +
+

Trait Implementations§

Source§

impl Clone for Statistics

Source§

fn clone(&self) -> Statistics

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Statistics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/struct.Store.html b/wasmedge_sdk/struct.Store.html new file mode 100644 index 000000000..2f3ca39b2 --- /dev/null +++ b/wasmedge_sdk/struct.Store.html @@ -0,0 +1,55 @@ +Store in wasmedge_sdk - Rust
wasmedge_sdk

Struct Store

Source
pub struct Store<'inst, T: ?Sized> { /* private fields */ }
Expand description

The Store is a collection of registered modules and assists wasm modules in finding the import modules they need.

+

Implementations§

Source§

impl<'inst, T: AsInstance + ?Sized> Store<'inst, T>

Source

pub fn new( + config: Option<&Config>, + instances: HashMap<String, &'inst mut T>, +) -> WasmEdgeResult<Self>

Creates a new Store.

+
§Error
+

If fail to create a new Store, then an error is returned.

+
Source

pub fn register_active_module( + &mut self, + module: &Module, +) -> WasmEdgeResult<Instance>

Registers and instantiates a WasmEdge compiled module into this store as an anonymous active module instance, and returns the module instance.

+
§Arguments
+
    +
  • +

    executor - The executor that runs the host functions in this store.

    +
  • +
  • +

    module - The validated module to be registered.

    +
  • +
+
§Error
+

If fail to register the given module, then an error is returned.

+
Source

pub fn register_named_module( + &mut self, + name: impl AsRef<str>, + module: &Module, +) -> WasmEdgeResult<()>

Source

pub fn named_instance_count(&self) -> usize

Returns the number of the named module instances in this store.

+
Source

pub fn instance_names(&self) -> Vec<String>

Returns the names of all registered named module instances.

+
Source

pub fn contains(&self, mod_name: impl AsRef<str>) -> bool

Checks if the store contains a named module instance.

+
§Argument
+
    +
  • mod_name - The name of the named module.
  • +
+
Source

pub fn get_instance_and_executor( + &mut self, + mod_name: impl AsRef<str>, +) -> Option<(&mut T, &mut Executor)>

Source

pub fn get_named_wasm_and_executor( + &mut self, + mod_name: impl AsRef<str>, +) -> Option<(&mut Instance, &mut Executor)>

Source

pub fn executor(&mut self) -> &mut Executor

Trait Implementations§

Source§

impl<T: ?Sized> Debug for Store<'_, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'inst, T> Freeze for Store<'inst, T>
where + T: ?Sized,

§

impl<'inst, T> RefUnwindSafe for Store<'inst, T>
where + T: RefUnwindSafe + ?Sized,

§

impl<'inst, T> Send for Store<'inst, T>
where + T: Send + ?Sized,

§

impl<'inst, T> Sync for Store<'inst, T>
where + T: Sync + ?Sized,

§

impl<'inst, T> Unpin for Store<'inst, T>
where + T: ?Sized,

§

impl<'inst, T> !UnwindSafe for Store<'inst, T>

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/struct.TableType.html b/wasmedge_sdk/struct.TableType.html new file mode 100644 index 000000000..84c6f5088 --- /dev/null +++ b/wasmedge_sdk/struct.TableType.html @@ -0,0 +1,32 @@ +TableType in wasmedge_sdk - Rust
wasmedge_sdk

Struct TableType

Source
pub struct TableType { /* private fields */ }
Expand description

Struct of WasmEdge TableType.

+

A TableType is used to declare the element type and the size range of a WasmEdge Table to be created.

+

Implementations§

Source§

impl TableType

Source

pub fn new(elem_ty: RefType, min: u32, max: Option<u32>) -> TableType

Creates a new TableType with the given element type and the size range.

+
§Arguments
+
    +
  • +

    elem_ty - The element type of the table to be created.

    +
  • +
  • +

    min - The minimum size of the table to be created.

    +
  • +
  • +

    max - The maximum size of the table to be created.

    +
  • +
+
Source

pub fn elem_ty(&self) -> RefType

Returns the element type defined in the TableType.

+
Source

pub fn minimum(&self) -> u32

Returns the minimum size defined in the TableType.

+
Source

pub fn maximum(&self) -> Option<u32>

Returns the maximum size defined in the TableType.

+

Trait Implementations§

Source§

impl Clone for TableType

Source§

fn clone(&self) -> TableType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TableType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for TableType

Source§

fn default() -> TableType

Returns the “default value” for a type. Read more
Source§

impl From<&TableType> for TableType

Source§

fn from(ty: &TableType) -> TableType

Converts to this type from the input type.
Source§

impl PartialEq for TableType

Source§

fn eq(&self, other: &TableType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for TableType

Source§

impl StructuralPartialEq for TableType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/struct.Vm.html b/wasmedge_sdk/struct.Vm.html new file mode 100644 index 000000000..e174889b8 --- /dev/null +++ b/wasmedge_sdk/struct.Vm.html @@ -0,0 +1,146 @@ +Vm in wasmedge_sdk - Rust
wasmedge_sdk

Struct Vm

Source
pub struct Vm<'inst, T: ?Sized + SyncInst> { /* private fields */ }
Expand description

A Vm defines a virtual environment for managing WebAssembly programs.

+

§Example

+

The example below presents how to register a module as named module in a Vm instance and run a target wasm function.

+ +
use std::collections::HashMap;
+use wasmedge_sdk::{params, Store, Module, WasmVal, wat2wasm, ValType, NeverType, Vm, vm::SyncInst};
+
+// create a Vm context
+let mut vm =
+    Vm::new(Store::new(None, HashMap::<String, &mut dyn SyncInst>::new()).unwrap());
+// register a wasm module from the given in-memory wasm bytes
+// load wasm module
+let result = wat2wasm(
+    br#"(module
+    (export "fib" (func $fib))
+    (func $fib (param $n i32) (result i32)
+     (if
+      (i32.lt_s
+       (local.get $n)
+       (i32.const 2)
+      )
+      (then
+        (return i32.const 1)
+      )
+     )
+     (return
+      (i32.add
+       (call $fib
+        (i32.sub
+         (local.get $n)
+         (i32.const 2)
+        )
+       )
+       (call $fib
+        (i32.sub
+         (local.get $n)
+         (i32.const 1)
+        )
+       )
+      )
+     )
+    )
+   )
+"#,
+);
+assert!(result.is_ok());
+let wasm_bytes = result.unwrap();
+// run `fib` function from the wasm bytes
+let fib_module = Module::from_bytes(None, wasm_bytes).unwrap();
+vm.register_module(None, fib_module).unwrap();
+let result = vm.run_func(None, "fib", params!(10i32));
+assert!(result.is_ok());
+let returns = result.unwrap();
+assert_eq!(returns.len(), 1);
+assert_eq!(returns[0].to_i32(), 89);
+

Implementations§

Source§

impl<'inst, T: ?Sized + SyncInst> Vm<'inst, T>

Source

pub fn new(store: Store<'inst, T>) -> Self

Source

pub fn register_module( + &mut self, + mod_name: Option<&str>, + module: Module, +) -> WasmEdgeResult<&mut Self>

Registers a wasm module into this vm as a named or active module instance.

+
§Arguments
+
    +
  • +

    mod_name - The exported name for the registered module. If None, then the module is registered as an active instance.

    +
  • +
  • +

    module - The module to be registered.

    +
  • +
+
§Error
+

If fail to register the given module, then an error is returned.

+
Source

pub fn run_func( + &mut self, + mod_name: Option<&str>, + func_name: impl AsRef<str>, + args: impl IntoIterator<Item = WasmValue>, +) -> WasmEdgeResult<Vec<WasmValue>>

Runs an exported wasm function in a (named or active) module instance.

+
§Arguments
+
    +
  • +

    mod_name - The exported name of the module instance, which holds the target function. If None, then the active module is used.

    +
  • +
  • +

    func_name - The exported name of the target wasm function.

    +
  • +
  • +

    args - The arguments to be passed to the target wasm function.

    +
  • +
+
§Error
+

If fail to run the wasm function, then an error is returned.

+
Source

pub fn run_func_with_timeout( + &mut self, + mod_name: Option<&str>, + func_name: impl AsRef<str>, + args: impl IntoIterator<Item = WasmValue>, + timeout: Duration, +) -> WasmEdgeResult<Vec<WasmValue>>

Runs an exported wasm function in a (named or active) module instance with a timeout setting

+
§Arguments
+
    +
  • +

    mod_name - The exported name of the module instance, which holds the target function. If None, then the active module is used.

    +
  • +
  • +

    func_name - The exported name of the target wasm function.

    +
  • +
  • +

    args - The arguments to be passed to the target wasm function.

    +
  • +
  • +

    timeout - The maximum execution time of the function to be run.

    +
  • +
+
§Error
+

If fail to run the wasm function, then an error is returned.

+
Source

pub fn store(&self) -> &Store<'inst, T>

Returns a reference to the internal store from this vm.

+
Source

pub fn store_mut(&mut self) -> &mut Store<'inst, T>

Returns a mutable reference to the internal store from this vm.

+
Source

pub fn active_module(&self) -> Option<&Instance>

Returns a reference to the active module instance from this vm.

+
§Error
+

If fail to get the reference to the active module instance, then an error is returned.

+
Source

pub fn active_module_mut(&mut self) -> Option<&mut Instance>

Returns a mutable reference to the active module instance from this vm.

+
§Error
+

If fail to get the mutable reference to the active module instance, then an error is returned.

+
Source

pub fn contains_module(&self, mod_name: impl AsRef<str>) -> bool

Checks if the vm contains a named module instance.

+
§Argument
+
    +
  • mod_name - The exported name of the target module instance.
  • +
+
Source

pub fn named_instance_count(&self) -> usize

Returns the count of the named module instances this vm holds.

+
Source

pub fn instance_names(&self) -> Vec<String>

Returns the names of all named module instances this vm holds.

+

Trait Implementations§

Source§

impl<'inst, T: Debug + ?Sized + SyncInst> Debug for Vm<'inst, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'inst, T> Freeze for Vm<'inst, T>
where + T: ?Sized,

§

impl<'inst, T> RefUnwindSafe for Vm<'inst, T>
where + T: RefUnwindSafe + ?Sized,

§

impl<'inst, T> Send for Vm<'inst, T>
where + T: Send + ?Sized,

§

impl<'inst, T> Sync for Vm<'inst, T>
where + T: Sync + ?Sized,

§

impl<'inst, T> Unpin for Vm<'inst, T>
where + T: ?Sized,

§

impl<'inst, T> !UnwindSafe for Vm<'inst, T>

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/trait.AsInstance.html b/wasmedge_sdk/trait.AsInstance.html new file mode 100644 index 000000000..46111ec3a --- /dev/null +++ b/wasmedge_sdk/trait.AsInstance.html @@ -0,0 +1,125 @@ +AsInstance in wasmedge_sdk - Rust
wasmedge_sdk

Trait AsInstance

Source
pub trait AsInstance {
+
Show 17 methods // Required method + unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext; + + // Provided methods + fn name(&self) -> Option<String> { ... } + fn get_table( + &self, + name: impl AsRef<str>, + ) -> Result<InnerRef<Table, &Self>, Box<WasmEdgeError>> + where Self: Sized { ... } + fn get_memory_ref( + &self, + name: impl AsRef<str>, + ) -> Result<InnerRef<Memory, &Self>, Box<WasmEdgeError>> + where Self: Sized { ... } + fn get_memory_mut( + &mut self, + name: impl AsRef<str>, + ) -> Result<InnerRef<Memory, &mut Self>, Box<WasmEdgeError>> + where Self: Sized { ... } + fn get_global( + &self, + name: impl AsRef<str>, + ) -> Result<InnerRef<Global, &Self>, Box<WasmEdgeError>> + where Self: Sized { ... } + fn get_global_mut( + &mut self, + name: impl AsRef<str>, + ) -> Result<InnerRef<Global, &mut Self>, Box<WasmEdgeError>> + where Self: Sized { ... } + fn func_len(&self) -> u32 { ... } + fn func_names(&self) -> Option<Vec<String>> { ... } + fn get_func( + &self, + name: &str, + ) -> Result<InnerRef<Function, &Instance>, Box<WasmEdgeError>> { ... } + fn get_func_mut( + &mut self, + name: &str, + ) -> Result<InnerRef<Function, &mut Instance>, Box<WasmEdgeError>> { ... } + fn table_len(&self) -> u32 { ... } + fn table_names(&self) -> Option<Vec<String>> { ... } + fn mem_len(&self) -> u32 { ... } + fn mem_names(&self) -> Option<Vec<String>> { ... } + fn global_len(&self) -> u32 { ... } + fn global_names(&self) -> Option<Vec<String>> { ... } +
}
Expand description

The object as an module instance is required to implement this trait.

+

Required Methods§

Source

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

§Safety
+

Provides a raw pointer to the inner module instance context. +The lifetime of the returned pointer must not exceed that of the object itself.

+

Provided Methods§

Source

fn name(&self) -> Option<String>

Returns the name of this exported module instance.

+

If this module instance is an active module instance, then None is returned.

+
Source

fn get_table( + &self, + name: impl AsRef<str>, +) -> Result<InnerRef<Table, &Self>, Box<WasmEdgeError>>
where + Self: Sized,

Returns the exported table instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target table instance, then an error is returned.

+
Source

fn get_memory_ref( + &self, + name: impl AsRef<str>, +) -> Result<InnerRef<Memory, &Self>, Box<WasmEdgeError>>
where + Self: Sized,

Returns the exported memory instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target memory instance, then an error is returned.

+
Source

fn get_memory_mut( + &mut self, + name: impl AsRef<str>, +) -> Result<InnerRef<Memory, &mut Self>, Box<WasmEdgeError>>
where + Self: Sized,

Source

fn get_global( + &self, + name: impl AsRef<str>, +) -> Result<InnerRef<Global, &Self>, Box<WasmEdgeError>>
where + Self: Sized,

Returns the exported global instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target global instance, then an error is returned.

+
Source

fn get_global_mut( + &mut self, + name: impl AsRef<str>, +) -> Result<InnerRef<Global, &mut Self>, Box<WasmEdgeError>>
where + Self: Sized,

Source

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.

+
Source

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.

+
Source

fn get_func( + &self, + name: &str, +) -> Result<InnerRef<Function, &Instance>, Box<WasmEdgeError>>

Returns the exported function instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target function, then an error is returned.

+
Source

fn get_func_mut( + &mut self, + name: &str, +) -> Result<InnerRef<Function, &mut Instance>, Box<WasmEdgeError>>

Returns the exported function instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target function, then an error is returned.

+
Source

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.

+
Source

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.

+
Source

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.

+
Source

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.

+
Source

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.

+
Source

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.

+

Implementors§

Source§

impl AsInstance for Instance

Source§

impl<Inst> AsInstance for Inst
where + Inst: AsMut<Instance> + AsRef<Instance>,

Source§

impl<T> AsInstance for AsyncImportObject<T>
where + T: Send,

Source§

impl<T> AsInstance for ImportModule<T>

\ No newline at end of file diff --git a/wasmedge_sdk/trait.WasmVal.html b/wasmedge_sdk/trait.WasmVal.html new file mode 100644 index 000000000..ab3280615 --- /dev/null +++ b/wasmedge_sdk/trait.WasmVal.html @@ -0,0 +1,5 @@ +WasmVal in wasmedge_sdk - Rust
wasmedge_sdk

Trait WasmVal

Source
pub trait WasmVal {
+    // Required method
+    fn to_wasm_value(self) -> WasmValue;
+}
Expand description

Defines the function converting a value of Rust type to the one of Wasm type.

+

Required Methods§

Implementations on Foreign Types§

Source§

impl WasmVal for f32

Source§

impl WasmVal for f64

Source§

impl WasmVal for i8

Source§

impl WasmVal for i16

Source§

impl WasmVal for i32

Source§

impl WasmVal for i64

Source§

impl WasmVal for i128

Source§

impl WasmVal for u8

Source§

impl WasmVal for u16

Source§

impl WasmVal for u32

Implementors§

\ No newline at end of file diff --git a/wasmedge_sdk/trait.WasmValType.html b/wasmedge_sdk/trait.WasmValType.html new file mode 100644 index 000000000..101beaded --- /dev/null +++ b/wasmedge_sdk/trait.WasmValType.html @@ -0,0 +1,9 @@ +WasmValType in wasmedge_sdk - Rust
wasmedge_sdk

Trait WasmValType

Source
pub trait WasmValType {
+    const WASM_TYPE: ValType;
+}
Expand description

Describes the mapping of Rust type to Wasm type.

+ +
use wasmedge_sdk::{WasmValType, ValType};
+
+assert_eq!(i32::WASM_TYPE, ValType::I32);
+

Required Associated Constants§

Source

const WASM_TYPE: ValType

The Wasm type.

+

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl WasmValType for f32

Source§

const WASM_TYPE: ValType = ValType::F32

Source§

impl WasmValType for f64

Source§

const WASM_TYPE: ValType = ValType::F64

Source§

impl WasmValType for i8

Source§

const WASM_TYPE: ValType = ValType::I32

Source§

impl WasmValType for i16

Source§

const WASM_TYPE: ValType = ValType::I32

Source§

impl WasmValType for i32

Source§

const WASM_TYPE: ValType = ValType::I32

Source§

impl WasmValType for i64

Source§

const WASM_TYPE: ValType = ValType::I64

Source§

impl WasmValType for i128

Source§

const WASM_TYPE: ValType = ValType::V128

Source§

impl WasmValType for u8

Source§

const WASM_TYPE: ValType = ValType::I32

Source§

impl WasmValType for u16

Source§

const WASM_TYPE: ValType = ValType::I32

Source§

impl WasmValType for u32

Source§

const WASM_TYPE: ValType = ValType::I64

Implementors§

Source§

impl WasmValType for ExternRef

Source§

const WASM_TYPE: ValType = ValType::ExternRef

\ No newline at end of file diff --git a/wasmedge_sdk/trait.WasmValTypeList.html b/wasmedge_sdk/trait.WasmValTypeList.html new file mode 100644 index 000000000..1f9fbc7de --- /dev/null +++ b/wasmedge_sdk/trait.WasmValTypeList.html @@ -0,0 +1,547 @@ +WasmValTypeList in wasmedge_sdk - Rust
wasmedge_sdk

Trait WasmValTypeList

Source
pub trait WasmValTypeList
where + Self: Sized,
{ + type Array: AsMut<[i128]>; + + // Required method + fn wasm_types() -> &'static [ValType]; +}
Expand description

Describes the mapping of a tuple of Rust types to Wasm types.

+ +
use wasmedge_sdk::{types::ExternRef, ValType, WasmValTypeList};
+
+assert_eq!(
+     <(i32, i64, f32, f64, ExternRef)>::wasm_types(),
+     [ValType::I32, ValType::I64, ValType::F32, ValType::F64, ValType::ExternRef]
+);
+

Required Associated Types§

Source

type Array: AsMut<[i128]>

The array type that can hold all the represented values.

+

Note that all values are stored in their binary form.

+

Required Methods§

Source

fn wasm_types() -> &'static [ValType]

Get the Wasm types for the tuple (list) of currently +represented values.

+

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl WasmValTypeList for ()

Source§

type Array = [i128; 0]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2> WasmValTypeList for (A1, A2)
where + A1: WasmValType, + A2: WasmValType,

Source§

type Array = [i128; 2]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3> WasmValTypeList for (A1, A2, A3)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType,

Source§

type Array = [i128; 3]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4> WasmValTypeList for (A1, A2, A3, A4)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType,

Source§

type Array = [i128; 4]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5> WasmValTypeList for (A1, A2, A3, A4, A5)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType,

Source§

type Array = [i128; 5]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6> WasmValTypeList for (A1, A2, A3, A4, A5, A6)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType,

Source§

type Array = [i128; 6]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType,

Source§

type Array = [i128; 7]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType,

Source§

type Array = [i128; 8]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType,

Source§

type Array = [i128; 9]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType,

Source§

type Array = [i128; 10]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType,

Source§

type Array = [i128; 11]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType,

Source§

type Array = [i128; 12]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType,

Source§

type Array = [i128; 13]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType,

Source§

type Array = [i128; 14]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType,

Source§

type Array = [i128; 15]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType,

Source§

type Array = [i128; 16]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType,

Source§

type Array = [i128; 17]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType,

Source§

type Array = [i128; 18]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType,

Source§

type Array = [i128; 19]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType, + A20: WasmValType,

Source§

type Array = [i128; 20]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType, + A20: WasmValType, + A21: WasmValType,

Source§

type Array = [i128; 21]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType, + A20: WasmValType, + A21: WasmValType, + A22: WasmValType,

Source§

type Array = [i128; 22]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType, + A20: WasmValType, + A21: WasmValType, + A22: WasmValType, + A23: WasmValType,

Source§

type Array = [i128; 23]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType, + A20: WasmValType, + A21: WasmValType, + A22: WasmValType, + A23: WasmValType, + A24: WasmValType,

Source§

type Array = [i128; 24]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType, + A20: WasmValType, + A21: WasmValType, + A22: WasmValType, + A23: WasmValType, + A24: WasmValType, + A25: WasmValType,

Source§

type Array = [i128; 25]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType, + A20: WasmValType, + A21: WasmValType, + A22: WasmValType, + A23: WasmValType, + A24: WasmValType, + A25: WasmValType, + A26: WasmValType,

Source§

type Array = [i128; 26]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType, + A20: WasmValType, + A21: WasmValType, + A22: WasmValType, + A23: WasmValType, + A24: WasmValType, + A25: WasmValType, + A26: WasmValType, + A27: WasmValType,

Source§

type Array = [i128; 27]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27, A28> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27, A28)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType, + A20: WasmValType, + A21: WasmValType, + A22: WasmValType, + A23: WasmValType, + A24: WasmValType, + A25: WasmValType, + A26: WasmValType, + A27: WasmValType, + A28: WasmValType,

Source§

type Array = [i128; 28]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27, A28, A29> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27, A28, A29)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType, + A20: WasmValType, + A21: WasmValType, + A22: WasmValType, + A23: WasmValType, + A24: WasmValType, + A25: WasmValType, + A26: WasmValType, + A27: WasmValType, + A28: WasmValType, + A29: WasmValType,

Source§

type Array = [i128; 29]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27, A28, A29, A30> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27, A28, A29, A30)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType, + A20: WasmValType, + A21: WasmValType, + A22: WasmValType, + A23: WasmValType, + A24: WasmValType, + A25: WasmValType, + A26: WasmValType, + A27: WasmValType, + A28: WasmValType, + A29: WasmValType, + A30: WasmValType,

Source§

type Array = [i128; 30]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27, A28, A29, A30, A31> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27, A28, A29, A30, A31)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType, + A20: WasmValType, + A21: WasmValType, + A22: WasmValType, + A23: WasmValType, + A24: WasmValType, + A25: WasmValType, + A26: WasmValType, + A27: WasmValType, + A28: WasmValType, + A29: WasmValType, + A30: WasmValType, + A31: WasmValType,

Source§

type Array = [i128; 31]

Source§

fn wasm_types() -> &'static [ValType]

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27, A28, A29, A30, A31, A32> WasmValTypeList for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27, A28, A29, A30, A31, A32)
where + A1: WasmValType, + A2: WasmValType, + A3: WasmValType, + A4: WasmValType, + A5: WasmValType, + A6: WasmValType, + A7: WasmValType, + A8: WasmValType, + A9: WasmValType, + A10: WasmValType, + A11: WasmValType, + A12: WasmValType, + A13: WasmValType, + A14: WasmValType, + A15: WasmValType, + A16: WasmValType, + A17: WasmValType, + A18: WasmValType, + A19: WasmValType, + A20: WasmValType, + A21: WasmValType, + A22: WasmValType, + A23: WasmValType, + A24: WasmValType, + A25: WasmValType, + A26: WasmValType, + A27: WasmValType, + A28: WasmValType, + A29: WasmValType, + A30: WasmValType, + A31: WasmValType, + A32: WasmValType,

Source§

type Array = [i128; 32]

Source§

fn wasm_types() -> &'static [ValType]

Implementors§

Source§

impl<A1> WasmValTypeList for A1
where + A1: WasmValType,

Source§

type Array = [i128; 1]

\ No newline at end of file diff --git a/wasmedge_sdk/type.ImportObject.html b/wasmedge_sdk/type.ImportObject.html new file mode 100644 index 000000000..52313dec8 --- /dev/null +++ b/wasmedge_sdk/type.ImportObject.html @@ -0,0 +1,3 @@ +ImportObject in wasmedge_sdk - Rust
wasmedge_sdk

Type Alias ImportObject

Source
pub type ImportObject<T> = ImportModule<T>;
Expand description

Defines an import object that contains the required import data used when instantiating a module.

+

An ImportObject instance is created with ImportObjectBuilder.

+

Aliased Type§

struct ImportObject<T> { /* private fields */ }
\ No newline at end of file diff --git a/wasmedge_sdk/type.Instance.html b/wasmedge_sdk/type.Instance.html new file mode 100644 index 000000000..2de3e1cb0 --- /dev/null +++ b/wasmedge_sdk/type.Instance.html @@ -0,0 +1,3 @@ +Instance in wasmedge_sdk - Rust
wasmedge_sdk

Type Alias Instance

Source
pub type Instance = Instance;
Expand description

Represents an instantiated module.

+

An Instance represents an instantiated module. In the instantiation process, A module instance is created based on a compiled module. From a [module instance] the exported host function, table, memory, and global instances can be fetched.

+

Aliased Type§

struct Instance { /* private fields */ }
\ No newline at end of file diff --git a/wasmedge_sdk/type.NeverType.html b/wasmedge_sdk/type.NeverType.html new file mode 100644 index 000000000..57a175c66 --- /dev/null +++ b/wasmedge_sdk/type.NeverType.html @@ -0,0 +1,2 @@ +NeverType in wasmedge_sdk - Rust
wasmedge_sdk

Type Alias NeverType

Source
pub type NeverType = NeverType;
Expand description

This is a workaround solution to the never type in Rust. It will be replaced by ! once it is stable.

+

Aliased Type§

enum NeverType {}

Variants§

\ No newline at end of file diff --git a/wasmedge_sdk/type.WasmEdgeResult.html b/wasmedge_sdk/type.WasmEdgeResult.html new file mode 100644 index 000000000..a44f334b4 --- /dev/null +++ b/wasmedge_sdk/type.WasmEdgeResult.html @@ -0,0 +1,7 @@ +WasmEdgeResult in wasmedge_sdk - Rust
wasmedge_sdk

Type Alias WasmEdgeResult

Source
pub type WasmEdgeResult<T> = Result<T, Box<WasmEdgeError>>;
Expand description

The WasmEdge result type.

+

Aliased Type§

enum WasmEdgeResult<T> {
+    Ok(T),
+    Err(Box<WasmEdgeError>),
+}

Variants§

§1.0.0

Ok(T)

Contains the success value

+
§1.0.0

Err(Box<WasmEdgeError>)

Contains the error value

+
\ No newline at end of file diff --git a/wasmedge_sdk/type.WasmValue.html b/wasmedge_sdk/type.WasmValue.html new file mode 100644 index 000000000..d19ae11cd --- /dev/null +++ b/wasmedge_sdk/type.WasmValue.html @@ -0,0 +1,2 @@ +WasmValue in wasmedge_sdk - Rust
wasmedge_sdk

Type Alias WasmValue

Source
pub type WasmValue = WasmValue;
Expand description

WebAssembly value type.

+

Aliased Type§

struct WasmValue { /* private fields */ }
\ No newline at end of file diff --git a/wasmedge_sdk/types/enum.Val.html b/wasmedge_sdk/types/enum.Val.html new file mode 100644 index 000000000..1524fbf17 --- /dev/null +++ b/wasmedge_sdk/types/enum.Val.html @@ -0,0 +1,34 @@ +Val in wasmedge_sdk::types - Rust
wasmedge_sdk::types

Enum Val

Source
pub enum Val {
+    I32(i32),
+    I64(i64),
+    F32(f32),
+    F64(f64),
+    V128(i128),
+    ExternRef(Option<ExternRef>),
+}
Expand description

Defines runtime values that a WebAssembly module can either consume or produce.

+

Variants§

§

I32(i32)

32-bit integer.

+

Integers are not inherently signed or unsigned, their interpretation is determined by individual operations.

+
§

I64(i64)

64-bit integer.

+

Integers are not inherently signed or unsigned, their interpretation is determined by individual operations.

+
§

F32(f32)

32-bit floating-point data as defined by the IEEE 754-2019.

+
§

F64(f64)

64-bit floating-point data as defined by the IEEE 754-2019.

+
§

V128(i128)

128-bit vector of packed integer or floating-point data.

+

The packed data can be interpreted as signed or unsigned integers, single or double precision floating-point +values, or a single 128 bit type. The interpretation is determined by individual operations.

+
§

ExternRef(Option<ExternRef>)

A reference to a host function.

+

FuncRef(None) is the null function reference, created by ref.null func in Wasm. +A reference to opaque data in the wasm instance.

+

ExternRef(None) is the null external reference, created by ref.null extern in Wasm.

+

Trait Implementations§

Source§

impl Clone for Val

Source§

fn clone(&self) -> Val

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Val

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Val> for WasmValue

Source§

fn from(val: Val) -> Self

Converts to this type from the input type.
Source§

impl From<WasmValue> for Val

Source§

fn from(value: WasmValue) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Val

§

impl RefUnwindSafe for Val

§

impl Send for Val

§

impl Sync for Val

§

impl Unpin for Val

§

impl UnwindSafe for Val

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/types/index.html b/wasmedge_sdk/types/index.html new file mode 100644 index 000000000..5c07b364f --- /dev/null +++ b/wasmedge_sdk/types/index.html @@ -0,0 +1,2 @@ +wasmedge_sdk::types - Rust
wasmedge_sdk

Module types

Source
Expand description

Defines the general types.

+

Structs§

  • A reference to opaque data in the wasm instance.

Enums§

  • Defines runtime values that a WebAssembly module can either consume or produce.
\ No newline at end of file diff --git a/wasmedge_sdk/types/sidebar-items.js b/wasmedge_sdk/types/sidebar-items.js new file mode 100644 index 000000000..f3bc8c6d5 --- /dev/null +++ b/wasmedge_sdk/types/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Val"],"struct":["ExternRef"]}; \ No newline at end of file diff --git a/wasmedge_sdk/types/struct.ExternRef.html b/wasmedge_sdk/types/struct.ExternRef.html new file mode 100644 index 000000000..3e0074cc9 --- /dev/null +++ b/wasmedge_sdk/types/struct.ExternRef.html @@ -0,0 +1,18 @@ +ExternRef in wasmedge_sdk::types - Rust
wasmedge_sdk::types

Struct ExternRef

Source
pub struct ExternRef { /* private fields */ }
Expand description

A reference to opaque data in the wasm instance.

+

Implementations§

Source§

impl ExternRef

Source

pub fn new<T>(extern_obj: &mut T) -> Self
where + T: 'static + Send + Sync,

Creates a new instance of ExternRef wrapping the given value.

+

Trait Implementations§

Source§

impl Clone for ExternRef

Source§

fn clone(&self) -> ExternRef

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExternRef

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl WasmVal for ExternRef

Source§

impl WasmValType for ExternRef

Source§

const WASM_TYPE: ValType = ValType::ExternRef

The Wasm type.
Source§

impl Copy for ExternRef

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<A1> WasmValTypeList for A1
where + A1: WasmValType,

Source§

type Array = [i128; 1]

The array type that can hold all the represented values. Read more
Source§

fn wasm_types() -> &'static [ValType]

Get the Wasm types for the tuple (list) of currently +represented values.
\ No newline at end of file diff --git a/wasmedge_sdk/utils/index.html b/wasmedge_sdk/utils/index.html new file mode 100644 index 000000000..2022e6d2e --- /dev/null +++ b/wasmedge_sdk/utils/index.html @@ -0,0 +1,2 @@ +wasmedge_sdk::utils - Rust
wasmedge_sdk

Module utils

Source
Expand description

Defines WasmEdge Driver and CoreVersion types

+

Structs§

\ No newline at end of file diff --git a/wasmedge_sdk/utils/sidebar-items.js b/wasmedge_sdk/utils/sidebar-items.js new file mode 100644 index 000000000..007d3d237 --- /dev/null +++ b/wasmedge_sdk/utils/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["CoreVersion","Driver"]}; \ No newline at end of file diff --git a/wasmedge_sdk/utils/struct.CoreVersion.html b/wasmedge_sdk/utils/struct.CoreVersion.html new file mode 100644 index 000000000..75d189c4b --- /dev/null +++ b/wasmedge_sdk/utils/struct.CoreVersion.html @@ -0,0 +1,16 @@ +CoreVersion in wasmedge_sdk::utils - Rust
wasmedge_sdk::utils

Struct CoreVersion

Source
pub struct CoreVersion {}
Expand description

The version info of WasmEdge core

+

Implementations§

Source§

impl CoreVersion

Source

pub fn major() -> u32

Returns the major version value of WasmEdge core.

+
Source

pub fn minor() -> u32

Returns the minor version value of WasmEdge core.

+
Source

pub fn patch() -> u32

Returns the patch version value of WasmEdge core.

+
Source

pub fn version_string() -> String

Returns the version string of WasmEdge core.

+

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/utils/struct.Driver.html b/wasmedge_sdk/utils/struct.Driver.html new file mode 100644 index 000000000..bf54c58aa --- /dev/null +++ b/wasmedge_sdk/utils/struct.Driver.html @@ -0,0 +1,21 @@ +Driver in wasmedge_sdk::utils - Rust
wasmedge_sdk::utils

Struct Driver

Source
pub struct Driver {}
Expand description

Defines WasmEdge Driver functions

+

Implementations§

Source§

impl Driver

Source

pub fn aot_compiler<I, V>(args: I) -> i32
where + I: IntoIterator<Item = V>, + V: AsRef<str>,

Triggers the WasmEdge AOT compiler tool

+
Source

pub fn runtime_tool<I, V>(args: I) -> i32
where + I: IntoIterator<Item = V>, + V: AsRef<str>,

Triggers the WasmEdge runtime tool

+
Source

pub fn unified_tool<I, V>(args: I) -> i32
where + I: IntoIterator<Item = V>, + V: AsRef<str>,

Triggers the WasmEdge unified tool

+

Trait Implementations§

Source§

impl Debug for Driver

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Driver

§

impl RefUnwindSafe for Driver

§

impl Send for Driver

§

impl Sync for Driver

§

impl Unpin for Driver

§

impl UnwindSafe for Driver

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sdk/vm/struct.Vm.html b/wasmedge_sdk/vm/struct.Vm.html new file mode 100644 index 000000000..5feed5116 --- /dev/null +++ b/wasmedge_sdk/vm/struct.Vm.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sdk/struct.Vm.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sdk/wasi/index.html b/wasmedge_sdk/wasi/index.html new file mode 100644 index 000000000..48ac42343 --- /dev/null +++ b/wasmedge_sdk/wasi/index.html @@ -0,0 +1 @@ +wasmedge_sdk::wasi - Rust
wasmedge_sdk

Module wasi

Source

Structs§

\ No newline at end of file diff --git a/wasmedge_sdk/wasi/sidebar-items.js b/wasmedge_sdk/wasi/sidebar-items.js new file mode 100644 index 000000000..f25504bb5 --- /dev/null +++ b/wasmedge_sdk/wasi/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["WasiModule"]}; \ No newline at end of file diff --git a/wasmedge_sdk/wasi/struct.WasiModule.html b/wasmedge_sdk/wasi/struct.WasiModule.html new file mode 100644 index 000000000..a2259d44a --- /dev/null +++ b/wasmedge_sdk/wasi/struct.WasiModule.html @@ -0,0 +1,86 @@ +WasiModule in wasmedge_sdk::wasi - Rust
wasmedge_sdk::wasi

Struct WasiModule

Source
pub struct WasiModule(/* private fields */);
Expand description

A WasiModule is a module instance for the WASI specification.

+

Implementations§

Source§

impl WasiModule

Source

pub fn create( + args: Option<Vec<&str>>, + envs: Option<Vec<&str>>, + preopens: Option<Vec<&str>>, +) -> Result<WasiModule, Box<WasmEdgeError>>

Creates a WASI host module which contains the WASI host functions, and initializes it with the given parameters.

+
§Arguments
+
    +
  • +

    args - The commandline arguments. The first argument is the program name.

    +
  • +
  • +

    envs - The environment variables in the format ENV_VAR_NAME=VALUE.

    +
  • +
  • +

    preopens - The directories to pre-open. The required format is GUEST_PATH:HOST_PATH.

    +
  • +
+
§Error
+

If fail to create a host module, then an error is returned.

+
Source

pub fn name(&self) -> &str

Returns the name of the module instance.

+
Source

pub fn init_wasi( + &mut self, + args: Option<Vec<&str>>, + envs: Option<Vec<&str>>, + preopens: Option<Vec<&str>>, +)

Initializes the WASI host module with the given parameters.

+
§Arguments
+
    +
  • +

    args - The commandline arguments. The first argument is the program name.

    +
  • +
  • +

    envs - The environment variables in the format ENV_VAR_NAME=VALUE.

    +
  • +
  • +

    preopens - The directories to pre-open. The required format is GUEST_PATH:HOST_PATH.

    +
  • +
+
Source

pub fn exit_code(&self) -> u32

Returns the WASI exit code.

+

The WASI exit code can be accessed after running the “_start” function of a wasm32-wasi program.

+
Source

pub fn get_native_handler(&self, fd: i32) -> Result<u64, Box<WasmEdgeError>>

Returns the native handler from the mapped FD/Handler.

+
§Argument
+
    +
  • fd - The WASI mapped Fd.
  • +
+
§Error
+

If fail to get the native handler, then an error is returned.

+

Trait Implementations§

Source§

impl AsMut<Instance> for WasiModule

Source§

fn as_mut(&mut self) -> &mut Instance

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Instance> for WasiModule

Source§

fn as_ref(&self) -> &Instance

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for WasiModule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<Inst> AsInstance for Inst
where + Inst: AsMut<Instance> + AsRef<Instance>,

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table( + &self, + name: impl AsRef<str>, +) -> Result<InnerRef<Table, &Self>, Box<WasmEdgeError>>
where + Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref( + &self, + name: impl AsRef<str>, +) -> Result<InnerRef<Memory, &Self>, Box<WasmEdgeError>>
where + Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut( + &mut self, + name: impl AsRef<str>, +) -> Result<InnerRef<Memory, &mut Self>, Box<WasmEdgeError>>
where + Self: Sized,

Source§

fn get_global( + &self, + name: impl AsRef<str>, +) -> Result<InnerRef<Global, &Self>, Box<WasmEdgeError>>
where + Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut( + &mut self, + name: impl AsRef<str>, +) -> Result<InnerRef<Global, &mut Self>, Box<WasmEdgeError>>
where + Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func( + &self, + name: &str, +) -> Result<InnerRef<Function, &Instance>, Box<WasmEdgeError>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut( + &mut self, + name: &str, +) -> Result<InnerRef<Function, &mut Instance>, Box<WasmEdgeError>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/all.html b/wasmedge_sys/all.html new file mode 100644 index 000000000..2fe8bd78d --- /dev/null +++ b/wasmedge_sys/all.html @@ -0,0 +1 @@ +List of all items in this crate

List of all items

Structs

Enums

Traits

Functions

Type Aliases

Constants

\ No newline at end of file diff --git a/wasmedge_sys/ast_module/struct.ExportType.html b/wasmedge_sys/ast_module/struct.ExportType.html new file mode 100644 index 000000000..ec5ff89e8 --- /dev/null +++ b/wasmedge_sys/ast_module/struct.ExportType.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sys/struct.ExportType.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sys/ast_module/struct.ImportType.html b/wasmedge_sys/ast_module/struct.ImportType.html new file mode 100644 index 000000000..321fca31b --- /dev/null +++ b/wasmedge_sys/ast_module/struct.ImportType.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sys/struct.ImportType.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sys/ast_module/struct.Module.html b/wasmedge_sys/ast_module/struct.Module.html new file mode 100644 index 000000000..66bc92cef --- /dev/null +++ b/wasmedge_sys/ast_module/struct.Module.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sys/struct.Module.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sys/async/fiber/index.html b/wasmedge_sys/async/fiber/index.html new file mode 100644 index 000000000..74f2525c6 --- /dev/null +++ b/wasmedge_sys/async/fiber/index.html @@ -0,0 +1,2 @@ +wasmedge_sys::async::fiber - Rust
wasmedge_sys::async

Module fiber

Source
Available on crate feature async and Linux only.
Expand description

Defines data structure for WasmEdge async mechanism.

+

Structs§

  • Defines an async execution context.
  • Defines a async state that contains the pointer to current poll context and current suspend.
\ No newline at end of file diff --git a/wasmedge_sys/async/fiber/sidebar-items.js b/wasmedge_sys/async/fiber/sidebar-items.js new file mode 100644 index 000000000..0714e2f9b --- /dev/null +++ b/wasmedge_sys/async/fiber/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AsyncCx","AsyncState"]}; \ No newline at end of file diff --git a/wasmedge_sys/async/fiber/struct.AsyncCx.html b/wasmedge_sys/async/fiber/struct.AsyncCx.html new file mode 100644 index 000000000..0004cf707 --- /dev/null +++ b/wasmedge_sys/async/fiber/struct.AsyncCx.html @@ -0,0 +1,15 @@ +AsyncCx in wasmedge_sys::async::fiber - Rust
wasmedge_sys::async::fiber

Struct AsyncCx

Source
pub struct AsyncCx { /* private fields */ }
Available on crate feature async and Linux only.
Expand description

Defines an async execution context.

+

Implementations§

Source§

impl AsyncCx

Source

pub fn new() -> Self

Creates a new async execution context.

+

Trait Implementations§

Source§

impl Clone for AsyncCx

Source§

fn clone(&self) -> AsyncCx

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AsyncCx

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AsyncCx

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for AsyncCx

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/async/fiber/struct.AsyncState.html b/wasmedge_sys/async/fiber/struct.AsyncState.html new file mode 100644 index 000000000..9b6852224 --- /dev/null +++ b/wasmedge_sys/async/fiber/struct.AsyncState.html @@ -0,0 +1,15 @@ +AsyncState in wasmedge_sys::async::fiber - Rust
wasmedge_sys::async::fiber

Struct AsyncState

Source
pub struct AsyncState { /* private fields */ }
Available on crate feature async and Linux only.
Expand description

Defines a async state that contains the pointer to current poll context and current suspend.

+

Implementations§

Source§

impl AsyncState

Source

pub fn new() -> Self

Creates a new async state.

+
Source

pub fn async_cx(&self) -> Option<AsyncCx>

Returns an async execution context.

+

If the pointer of poll context is null, then None is returned.

+

Trait Implementations§

Source§

impl Debug for AsyncState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AsyncState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Send for AsyncState

Source§

impl Sync for AsyncState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/async/function/index.html b/wasmedge_sys/async/function/index.html new file mode 100644 index 000000000..7877295e5 --- /dev/null +++ b/wasmedge_sys/async/function/index.html @@ -0,0 +1 @@ +wasmedge_sys::async::function - Rust
wasmedge_sys::async

Module function

Source
Available on crate feature async and Linux only.

Structs§

Type Aliases§

\ No newline at end of file diff --git a/wasmedge_sys/async/function/sidebar-items.js b/wasmedge_sys/async/function/sidebar-items.js new file mode 100644 index 000000000..ed98398b7 --- /dev/null +++ b/wasmedge_sys/async/function/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AsyncFunction"],"type":["AsyncFn"]}; \ No newline at end of file diff --git a/wasmedge_sys/async/function/struct.AsyncFunction.html b/wasmedge_sys/async/function/struct.AsyncFunction.html new file mode 100644 index 000000000..02dec7cf8 --- /dev/null +++ b/wasmedge_sys/async/function/struct.AsyncFunction.html @@ -0,0 +1,41 @@ +AsyncFunction in wasmedge_sys::async::function - Rust
wasmedge_sys::async::function

Struct AsyncFunction

Source
pub struct AsyncFunction(/* private fields */);
Available on crate feature async and Linux only.

Implementations§

Source§

impl AsyncFunction

Source

pub fn create_async_func<'data, 'inst, 'frame, 'fut, T: Send>( + ty: &FuncType, + real_fn: AsyncFn<'data, 'inst, 'frame, 'fut, T>, + data: *mut T, + cost: u64, +) -> WasmEdgeResult<Self>
where + 'data: 'fut, + 'inst: 'fut, + 'frame: 'fut,

Creates an async host function with the given function type.

+
§Arguments
+
    +
  • +

    ty - The types of the arguments and returns of the target function.

    +
  • +
  • +

    real_fn - The pointer to the target function.

    +
  • +
  • +

    data - The host context data used in this function.

    +
  • +
  • +

    cost - The function cost in the Statistics. Pass 0 if the calculation is not needed.

    +
  • +
+
§Error
+ +

Trait Implementations§

Source§

impl AsMut<Function> for AsyncFunction

Source§

fn as_mut(&mut self) -> &mut Function

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Function> for AsyncFunction

Source§

fn as_ref(&self) -> &Function

Converts this type into a shared reference of the (usually inferred) input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<F> AsFunc for F
where + F: AsRef<Function>,

Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/async/function/type.AsyncFn.html b/wasmedge_sys/async/function/type.AsyncFn.html new file mode 100644 index 000000000..e26a343ed --- /dev/null +++ b/wasmedge_sys/async/function/type.AsyncFn.html @@ -0,0 +1 @@ +AsyncFn in wasmedge_sys::async::function - Rust
wasmedge_sys::async::function

Type Alias AsyncFn

Source
pub type AsyncFn<'data, 'inst, 'frame, 'fut, Data> = fn(_: &'data mut Data, _: &'inst mut AsyncInstance, _: &'frame mut CallingFrame, _: Vec<WasmValue>) -> Box<dyn Future<Output = Result<Vec<WasmValue>, CoreError>> + Send + 'fut>;
Available on crate feature async and Linux only.
\ No newline at end of file diff --git a/wasmedge_sys/async/index.html b/wasmedge_sys/async/index.html new file mode 100644 index 000000000..8004c523b --- /dev/null +++ b/wasmedge_sys/async/index.html @@ -0,0 +1,2 @@ +wasmedge_sys::async - Rust
wasmedge_sys

Module async

Source
Available on crate feature async and Linux only.
Expand description

Defines async related types.

+

Re-exports§

Modules§

\ No newline at end of file diff --git a/wasmedge_sys/async/module/index.html b/wasmedge_sys/async/module/index.html new file mode 100644 index 000000000..4dfda6707 --- /dev/null +++ b/wasmedge_sys/async/module/index.html @@ -0,0 +1 @@ +wasmedge_sys::async::module - Rust
wasmedge_sys::async

Module module

Source
Available on crate feature async and Linux only.

Structs§

\ No newline at end of file diff --git a/wasmedge_sys/async/module/sidebar-items.js b/wasmedge_sys/async/module/sidebar-items.js new file mode 100644 index 000000000..7e9fd50be --- /dev/null +++ b/wasmedge_sys/async/module/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AsyncImportObject","AsyncInstance","AsyncWasiModule"]}; \ No newline at end of file diff --git a/wasmedge_sys/async/module/struct.AsyncImportObject.html b/wasmedge_sys/async/module/struct.AsyncImportObject.html new file mode 100644 index 000000000..9d6862fc0 --- /dev/null +++ b/wasmedge_sys/async/module/struct.AsyncImportObject.html @@ -0,0 +1,40 @@ +AsyncImportObject in wasmedge_sys::async::module - Rust
wasmedge_sys::async::module

Struct AsyncImportObject

Source
pub struct AsyncImportObject<T: Send>(/* private fields */);
Available on crate feature async and Linux only.

Implementations§

Source§

impl<T: Send> AsyncImportObject<T>

Source

pub fn create(name: impl AsRef<str>, data: Box<T>) -> WasmEdgeResult<Self>

Source

pub fn add_async_func(&mut self, name: impl AsRef<str>, func: AsyncFunction)

Methods from Deref<Target = ImportModule<T>>§

Source

pub unsafe fn as_raw(&self) -> *mut WasmEdge_ModuleInstanceContext

§Safety
+

Provides a raw pointer to the inner module instance context. +The lifetime of the returned pointer must not exceed that of the object itself.

+
Source

pub fn get_host_data(&self) -> &T

Source

pub fn get_host_data_mut(&mut self) -> &mut T

Source

pub fn add_func(&mut self, name: impl AsRef<str>, func: Function)

Source

pub fn add_table(&mut self, name: impl AsRef<str>, table: Table)

Source

pub fn add_memory(&mut self, name: impl AsRef<str>, memory: Memory)

Source

pub fn add_global(&mut self, name: impl AsRef<str>, global: Global)

Trait Implementations§

Source§

impl<T: Send> AsInstance for AsyncImportObject<T>

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Table, &Self>>
where + Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &Self>>
where + Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &mut Self>>
where + Self: Sized,

Source§

fn get_global( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &Self>>
where + Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &mut Self>>
where + Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut(&mut self, name: &str) -> WasmEdgeResult<FuncRef<&mut Instance>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
Source§

impl AsMut<AsyncImportObject<WasiCtx>> for AsyncWasiModule

Source§

fn as_mut(&mut self) -> &mut AsyncImportObject<WasiCtx>

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<T: Send> AsMut<ImportModule<T>> for AsyncImportObject<T>

Source§

fn as_mut(&mut self) -> &mut ImportModule<T>

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<AsyncImportObject<WasiCtx>> for AsyncWasiModule

Source§

fn as_ref(&self) -> &AsyncImportObject<WasiCtx>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T: Send> AsRef<ImportModule<T>> for AsyncImportObject<T>

Source§

fn as_ref(&self) -> &ImportModule<T>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T: Debug + Send> Debug for AsyncImportObject<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Send> Deref for AsyncImportObject<T>

Source§

type Target = ImportModule<T>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T: Send> DerefMut for AsyncImportObject<T>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<T> Freeze for AsyncImportObject<T>

§

impl<T> RefUnwindSafe for AsyncImportObject<T>
where + T: RefUnwindSafe,

§

impl<T> Send for AsyncImportObject<T>

§

impl<T> Sync for AsyncImportObject<T>
where + T: Sync,

§

impl<T> Unpin for AsyncImportObject<T>
where + T: Unpin,

§

impl<T> UnwindSafe for AsyncImportObject<T>
where + T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<P, T> Receiver for P
where + P: Deref<Target = T> + ?Sized, + T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/async/module/struct.AsyncInstance.html b/wasmedge_sys/async/module/struct.AsyncInstance.html new file mode 100644 index 000000000..9a35956c9 --- /dev/null +++ b/wasmedge_sys/async/module/struct.AsyncInstance.html @@ -0,0 +1,32 @@ +AsyncInstance in wasmedge_sys::async::module - Rust
wasmedge_sys::async::module

Struct AsyncInstance

Source
pub struct AsyncInstance(/* private fields */);
Available on crate feature async and Linux only.

Trait Implementations§

Source§

impl AsMut<Instance> for AsyncInstance

Source§

fn as_mut(&mut self) -> &mut Instance

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Instance> for AsyncInstance

Source§

fn as_ref(&self) -> &Instance

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for AsyncInstance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<Inst> AsInstance for Inst
where + Inst: AsMut<Instance> + AsRef<Instance>,

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Table, &Self>>
where + Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &Self>>
where + Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &mut Self>>
where + Self: Sized,

Source§

fn get_global( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &Self>>
where + Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &mut Self>>
where + Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut(&mut self, name: &str) -> WasmEdgeResult<FuncRef<&mut Instance>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/async/module/struct.AsyncWasiModule.html b/wasmedge_sys/async/module/struct.AsyncWasiModule.html new file mode 100644 index 000000000..dee732a64 --- /dev/null +++ b/wasmedge_sys/async/module/struct.AsyncWasiModule.html @@ -0,0 +1,37 @@ +AsyncWasiModule in wasmedge_sys::async::module - Rust
wasmedge_sys::async::module

Struct AsyncWasiModule

Source
pub struct AsyncWasiModule(/* private fields */);
Available on crate feature async and Linux only.
Expand description

A AsyncWasiModule is a module instance for the WASI specification and used in the async scenario.

+

Implementations§

Source§

impl AsyncWasiModule

Source

pub fn create( + args: Option<Vec<impl AsRef<str>>>, + envs: Option<Vec<(impl AsRef<str>, impl AsRef<str>)>>, +) -> WasmEdgeResult<Self>

Creates a AsyncWasiModule instance.

+
§Arguments
+
    +
  • +

    args - The commandline arguments. The first argument is the program name.

    +
  • +
  • +

    envs - The environment variables.

    +
  • +
+
§Error
+

If fail to create a AsyncWasiModule instance, then an error is returned.

+
Source

pub fn create_from_wasi_context(wasi_ctx: WasiCtx) -> WasmEdgeResult<Self>

Creates a AsyncWasiModule instance with the given wasi context.

+
§Arguments
+
    +
  • wasi_ctx - The WasiCtx instance.
  • +
+
§Error
+

If fail to create AsyncWasiModule instance, then an error is returned.

+
Source

pub fn name(&self) -> &str

Returns the name of the module instance.

+
Source

pub fn exit_code(&self) -> u32

Returns the WASI exit code.

+

The WASI exit code can be accessed after running the “_start” function of a wasm32-wasi program.

+

Trait Implementations§

Source§

impl AsMut<AsyncImportObject<WasiCtx>> for AsyncWasiModule

Source§

fn as_mut(&mut self) -> &mut AsyncImportObject<WasiCtx>

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<AsyncImportObject<WasiCtx>> for AsyncWasiModule

Source§

fn as_ref(&self) -> &AsyncImportObject<WasiCtx>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for AsyncWasiModule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/async/sidebar-items.js b/wasmedge_sys/async/sidebar-items.js new file mode 100644 index 000000000..be7ec7a7d --- /dev/null +++ b/wasmedge_sys/async/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["fiber","function","module"]}; \ No newline at end of file diff --git a/wasmedge_sys/compiler/struct.Compiler.html b/wasmedge_sys/compiler/struct.Compiler.html new file mode 100644 index 000000000..a919de076 --- /dev/null +++ b/wasmedge_sys/compiler/struct.Compiler.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sys/struct.Compiler.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sys/config/struct.Config.html b/wasmedge_sys/config/struct.Config.html new file mode 100644 index 000000000..d2bbdb7fc --- /dev/null +++ b/wasmedge_sys/config/struct.Config.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sys/struct.Config.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sys/executor/struct.Executor.html b/wasmedge_sys/executor/struct.Executor.html new file mode 100644 index 000000000..4e5c0b3f3 --- /dev/null +++ b/wasmedge_sys/executor/struct.Executor.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sys/struct.Executor.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_O0.html b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_O0.html new file mode 100644 index 000000000..79a840772 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_O0.html @@ -0,0 +1 @@ +WasmEdge_CompilerOptimizationLevel_O0 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_CompilerOptimizationLevel_O0

Source
pub const WasmEdge_CompilerOptimizationLevel_O0: WasmEdge_CompilerOptimizationLevel = 0;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_O1.html b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_O1.html new file mode 100644 index 000000000..5c77f468c --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_O1.html @@ -0,0 +1 @@ +WasmEdge_CompilerOptimizationLevel_O1 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_CompilerOptimizationLevel_O1

Source
pub const WasmEdge_CompilerOptimizationLevel_O1: WasmEdge_CompilerOptimizationLevel = 1;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_O2.html b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_O2.html new file mode 100644 index 000000000..c406fa796 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_O2.html @@ -0,0 +1 @@ +WasmEdge_CompilerOptimizationLevel_O2 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_CompilerOptimizationLevel_O2

Source
pub const WasmEdge_CompilerOptimizationLevel_O2: WasmEdge_CompilerOptimizationLevel = 2;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_O3.html b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_O3.html new file mode 100644 index 000000000..879d517f0 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_O3.html @@ -0,0 +1 @@ +WasmEdge_CompilerOptimizationLevel_O3 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_CompilerOptimizationLevel_O3

Source
pub const WasmEdge_CompilerOptimizationLevel_O3: WasmEdge_CompilerOptimizationLevel = 3;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_Os.html b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_Os.html new file mode 100644 index 000000000..03a5e3d2f --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_Os.html @@ -0,0 +1 @@ +WasmEdge_CompilerOptimizationLevel_Os in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_CompilerOptimizationLevel_Os

Source
pub const WasmEdge_CompilerOptimizationLevel_Os: WasmEdge_CompilerOptimizationLevel = 4;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_Oz.html b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_Oz.html new file mode 100644 index 000000000..f6b3eda3b --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOptimizationLevel_Oz.html @@ -0,0 +1 @@ +WasmEdge_CompilerOptimizationLevel_Oz in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_CompilerOptimizationLevel_Oz

Source
pub const WasmEdge_CompilerOptimizationLevel_Oz: WasmEdge_CompilerOptimizationLevel = 5;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_CompilerOutputFormat_Native.html b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOutputFormat_Native.html new file mode 100644 index 000000000..e5243f7bd --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOutputFormat_Native.html @@ -0,0 +1 @@ +WasmEdge_CompilerOutputFormat_Native in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_CompilerOutputFormat_Native

Source
pub const WasmEdge_CompilerOutputFormat_Native: WasmEdge_CompilerOutputFormat = 0;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_CompilerOutputFormat_Wasm.html b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOutputFormat_Wasm.html new file mode 100644 index 000000000..48505000b --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_CompilerOutputFormat_Wasm.html @@ -0,0 +1 @@ +WasmEdge_CompilerOutputFormat_Wasm in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_CompilerOutputFormat_Wasm

Source
pub const WasmEdge_CompilerOutputFormat_Wasm: WasmEdge_CompilerOutputFormat = 1;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCategory_UserLevelError.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCategory_UserLevelError.html new file mode 100644 index 000000000..481f7011c --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCategory_UserLevelError.html @@ -0,0 +1 @@ +WasmEdge_ErrCategory_UserLevelError in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCategory_UserLevelError

Source
pub const WasmEdge_ErrCategory_UserLevelError: WasmEdge_ErrCategory = 1;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCategory_WASM.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCategory_WASM.html new file mode 100644 index 000000000..232faaaff --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCategory_WASM.html @@ -0,0 +1 @@ +WasmEdge_ErrCategory_WASM in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCategory_WASM

Source
pub const WasmEdge_ErrCategory_WASM: WasmEdge_ErrCategory = 0;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AOTDisabled.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AOTDisabled.html new file mode 100644 index 000000000..df4cda511 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AOTDisabled.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_AOTDisabled in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_AOTDisabled

Source
pub const WasmEdge_ErrCode_AOTDisabled: WasmEdge_ErrCode = 6;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullArray.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullArray.html new file mode 100644 index 000000000..7327bae3b --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullArray.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_AccessNullArray in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_AccessNullArray

Source
pub const WasmEdge_ErrCode_AccessNullArray: WasmEdge_ErrCode = 1045;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullException.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullException.html new file mode 100644 index 000000000..3ee474b34 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullException.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_AccessNullException in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_AccessNullException

Source
pub const WasmEdge_ErrCode_AccessNullException: WasmEdge_ErrCode = 1047;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullFunc.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullFunc.html new file mode 100644 index 000000000..88fd375fc --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullFunc.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_AccessNullFunc in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_AccessNullFunc

Source
pub const WasmEdge_ErrCode_AccessNullFunc: WasmEdge_ErrCode = 1043;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullI31.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullI31.html new file mode 100644 index 000000000..185e898dd --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullI31.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_AccessNullI31 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_AccessNullI31

Source
pub const WasmEdge_ErrCode_AccessNullI31: WasmEdge_ErrCode = 1046;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullStruct.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullStruct.html new file mode 100644 index 000000000..6e073e8e7 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_AccessNullStruct.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_AccessNullStruct in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_AccessNullStruct

Source
pub const WasmEdge_ErrCode_AccessNullStruct: WasmEdge_ErrCode = 1044;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ArrayOutOfBounds.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ArrayOutOfBounds.html new file mode 100644 index 000000000..80dbe0b37 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ArrayOutOfBounds.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_ArrayOutOfBounds in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_ArrayOutOfBounds

Source
pub const WasmEdge_ErrCode_ArrayOutOfBounds: WasmEdge_ErrCode = 1033;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ArrayTypesMismatch.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ArrayTypesMismatch.html new file mode 100644 index 000000000..a2ea5620a --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ArrayTypesMismatch.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_ArrayTypesMismatch in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_ArrayTypesMismatch

Source
pub const WasmEdge_ErrCode_ArrayTypesMismatch: WasmEdge_ErrCode = 546;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ArrayTypesNumtypeRequired.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ArrayTypesNumtypeRequired.html new file mode 100644 index 000000000..90d2a3857 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ArrayTypesNumtypeRequired.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_ArrayTypesNumtypeRequired in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_ArrayTypesNumtypeRequired

Source
pub const WasmEdge_ErrCode_ArrayTypesNumtypeRequired: WasmEdge_ErrCode = 547;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_CastFailed.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_CastFailed.html new file mode 100644 index 000000000..2c201f9a8 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_CastFailed.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_CastFailed in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_CastFailed

Source
pub const WasmEdge_ErrCode_CastFailed: WasmEdge_ErrCode = 1048;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_CastNullToNonNull.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_CastNullToNonNull.html new file mode 100644 index 000000000..45e92dbc4 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_CastNullToNonNull.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_CastNullToNonNull in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_CastNullToNonNull

Source
pub const WasmEdge_ErrCode_CastNullToNonNull: WasmEdge_ErrCode = 1042;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ConstExprRequired.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ConstExprRequired.html new file mode 100644 index 000000000..1e0880b16 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ConstExprRequired.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_ConstExprRequired in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_ConstExprRequired

Source
pub const WasmEdge_ErrCode_ConstExprRequired: WasmEdge_ErrCode = 526;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_CoreInvalidExport.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_CoreInvalidExport.html new file mode 100644 index 000000000..f94845703 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_CoreInvalidExport.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_CoreInvalidExport in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_CoreInvalidExport

Source
pub const WasmEdge_ErrCode_CoreInvalidExport: WasmEdge_ErrCode = 1536;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_CostLimitExceeded.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_CostLimitExceeded.html new file mode 100644 index 000000000..52c8f4b71 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_CostLimitExceeded.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_CostLimitExceeded in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_CostLimitExceeded

Source
pub const WasmEdge_ErrCode_CostLimitExceeded: WasmEdge_ErrCode = 3;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_DataCountRequired.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_DataCountRequired.html new file mode 100644 index 000000000..cf320772e --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_DataCountRequired.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_DataCountRequired in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_DataCountRequired

Source
pub const WasmEdge_ErrCode_DataCountRequired: WasmEdge_ErrCode = 267;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_DataSegDoesNotFit.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_DataSegDoesNotFit.html new file mode 100644 index 000000000..54824b84c --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_DataSegDoesNotFit.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_DataSegDoesNotFit in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_DataSegDoesNotFit

Source
pub const WasmEdge_ErrCode_DataSegDoesNotFit: WasmEdge_ErrCode = 771;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_DivideByZero.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_DivideByZero.html new file mode 100644 index 000000000..fbdc9717e --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_DivideByZero.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_DivideByZero in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_DivideByZero

Source
pub const WasmEdge_ErrCode_DivideByZero: WasmEdge_ErrCode = 1028;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_DupExportName.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_DupExportName.html new file mode 100644 index 000000000..dff33dca2 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_DupExportName.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_DupExportName in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_DupExportName

Source
pub const WasmEdge_ErrCode_DupExportName: WasmEdge_ErrCode = 527;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ENDCodeExpected.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ENDCodeExpected.html new file mode 100644 index 000000000..2fa343d18 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ENDCodeExpected.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_ENDCodeExpected in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_ENDCodeExpected

Source
pub const WasmEdge_ErrCode_ENDCodeExpected: WasmEdge_ErrCode = 280;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ElemSegDoesNotFit.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ElemSegDoesNotFit.html new file mode 100644 index 000000000..644e654e0 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ElemSegDoesNotFit.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_ElemSegDoesNotFit in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_ElemSegDoesNotFit

Source
pub const WasmEdge_ErrCode_ElemSegDoesNotFit: WasmEdge_ErrCode = 772;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ExpectSharedMemory.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ExpectSharedMemory.html new file mode 100644 index 000000000..55824cce4 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ExpectSharedMemory.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_ExpectSharedMemory in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_ExpectSharedMemory

Source
pub const WasmEdge_ErrCode_ExpectSharedMemory: WasmEdge_ErrCode = 1041;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ExpectedZeroByte.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ExpectedZeroByte.html new file mode 100644 index 000000000..e00c45ca5 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ExpectedZeroByte.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_ExpectedZeroByte in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_ExpectedZeroByte

Source
pub const WasmEdge_ErrCode_ExpectedZeroByte: WasmEdge_ErrCode = 270;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_FuncNotFound.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_FuncNotFound.html new file mode 100644 index 000000000..a89790ba1 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_FuncNotFound.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_FuncNotFound in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_FuncNotFound

Source
pub const WasmEdge_ErrCode_FuncNotFound: WasmEdge_ErrCode = 5;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_FuncSigMismatch.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_FuncSigMismatch.html new file mode 100644 index 000000000..dd1090950 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_FuncSigMismatch.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_FuncSigMismatch in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_FuncSigMismatch

Source
pub const WasmEdge_ErrCode_FuncSigMismatch: WasmEdge_ErrCode = 1027;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_HostFuncError.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_HostFuncError.html new file mode 100644 index 000000000..10baab770 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_HostFuncError.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_HostFuncError in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_HostFuncError

Source
pub const WasmEdge_ErrCode_HostFuncError: WasmEdge_ErrCode = 1038;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IllegalGrammar.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IllegalGrammar.html new file mode 100644 index 000000000..628ffc0d4 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IllegalGrammar.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_IllegalGrammar in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_IllegalGrammar

Source
pub const WasmEdge_ErrCode_IllegalGrammar: WasmEdge_ErrCode = 281;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IllegalOpCode.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IllegalOpCode.html new file mode 100644 index 000000000..cb65a01bd --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IllegalOpCode.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_IllegalOpCode in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_IllegalOpCode

Source
pub const WasmEdge_ErrCode_IllegalOpCode: WasmEdge_ErrCode = 279;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IllegalPath.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IllegalPath.html new file mode 100644 index 000000000..62aa196f5 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IllegalPath.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_IllegalPath in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_IllegalPath

Source
pub const WasmEdge_ErrCode_IllegalPath: WasmEdge_ErrCode = 256;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ImmutableArray.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ImmutableArray.html new file mode 100644 index 000000000..bce185eaf --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ImmutableArray.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_ImmutableArray in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_ImmutableArray

Source
pub const WasmEdge_ErrCode_ImmutableArray: WasmEdge_ErrCode = 530;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ImmutableField.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ImmutableField.html new file mode 100644 index 000000000..b33551308 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ImmutableField.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_ImmutableField in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_ImmutableField

Source
pub const WasmEdge_ErrCode_ImmutableField: WasmEdge_ErrCode = 529;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ImmutableGlobal.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ImmutableGlobal.html new file mode 100644 index 000000000..9748baffb --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ImmutableGlobal.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_ImmutableGlobal in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_ImmutableGlobal

Source
pub const WasmEdge_ErrCode_ImmutableGlobal: WasmEdge_ErrCode = 528;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IncompatibleDataCount.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IncompatibleDataCount.html new file mode 100644 index 000000000..bfab5feef --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IncompatibleDataCount.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_IncompatibleDataCount in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_IncompatibleDataCount

Source
pub const WasmEdge_ErrCode_IncompatibleDataCount: WasmEdge_ErrCode = 266;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IncompatibleFuncCode.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IncompatibleFuncCode.html new file mode 100644 index 000000000..e75628f85 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IncompatibleFuncCode.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_IncompatibleFuncCode in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_IncompatibleFuncCode

Source
pub const WasmEdge_ErrCode_IncompatibleFuncCode: WasmEdge_ErrCode = 265;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IncompatibleImportType.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IncompatibleImportType.html new file mode 100644 index 000000000..c51bd821a --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IncompatibleImportType.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_IncompatibleImportType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_IncompatibleImportType

Source
pub const WasmEdge_ErrCode_IncompatibleImportType: WasmEdge_ErrCode = 769;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IndirectCallTypeMismatch.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IndirectCallTypeMismatch.html new file mode 100644 index 000000000..2508a8107 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IndirectCallTypeMismatch.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_IndirectCallTypeMismatch in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_IndirectCallTypeMismatch

Source
pub const WasmEdge_ErrCode_IndirectCallTypeMismatch: WasmEdge_ErrCode = 1037;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InstrTypeMismatch.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InstrTypeMismatch.html new file mode 100644 index 000000000..ca9dcb6e2 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InstrTypeMismatch.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InstrTypeMismatch in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InstrTypeMismatch

Source
pub const WasmEdge_ErrCode_InstrTypeMismatch: WasmEdge_ErrCode = 1026;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IntegerOverflow.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IntegerOverflow.html new file mode 100644 index 000000000..9c56153ed --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IntegerOverflow.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_IntegerOverflow in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_IntegerOverflow

Source
pub const WasmEdge_ErrCode_IntegerOverflow: WasmEdge_ErrCode = 1029;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IntegerTooLarge.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IntegerTooLarge.html new file mode 100644 index 000000000..f847201dd --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IntegerTooLarge.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_IntegerTooLarge in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_IntegerTooLarge

Source
pub const WasmEdge_ErrCode_IntegerTooLarge: WasmEdge_ErrCode = 277;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IntegerTooLong.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IntegerTooLong.html new file mode 100644 index 000000000..d25c15a17 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IntegerTooLong.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_IntegerTooLong in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_IntegerTooLong

Source
pub const WasmEdge_ErrCode_IntegerTooLong: WasmEdge_ErrCode = 278;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_Interrupted.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_Interrupted.html new file mode 100644 index 000000000..c0edd756d --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_Interrupted.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_Interrupted in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_Interrupted

Source
pub const WasmEdge_ErrCode_Interrupted: WasmEdge_ErrCode = 7;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IntrinsicsTableNotFound.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IntrinsicsTableNotFound.html new file mode 100644 index 000000000..31908502a --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_IntrinsicsTableNotFound.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_IntrinsicsTableNotFound in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_IntrinsicsTableNotFound

Source
pub const WasmEdge_ErrCode_IntrinsicsTableNotFound: WasmEdge_ErrCode = 283;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidAlignment.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidAlignment.html new file mode 100644 index 000000000..7cf956bee --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidAlignment.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidAlignment in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidAlignment

Source
pub const WasmEdge_ErrCode_InvalidAlignment: WasmEdge_ErrCode = 512;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidBrRefType.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidBrRefType.html new file mode 100644 index 000000000..c7526bbb3 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidBrRefType.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidBrRefType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidBrRefType

Source
pub const WasmEdge_ErrCode_InvalidBrRefType: WasmEdge_ErrCode = 545;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidCanonOption.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidCanonOption.html new file mode 100644 index 000000000..f15f8cfea --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidCanonOption.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidCanonOption in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidCanonOption

Source
pub const WasmEdge_ErrCode_InvalidCanonOption: WasmEdge_ErrCode = 774;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidConvToInt.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidConvToInt.html new file mode 100644 index 000000000..60c05670b --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidConvToInt.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidConvToInt in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidConvToInt

Source
pub const WasmEdge_ErrCode_InvalidConvToInt: WasmEdge_ErrCode = 1030;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidCoreSort.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidCoreSort.html new file mode 100644 index 000000000..b14394b34 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidCoreSort.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidCoreSort in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidCoreSort

Source
pub const WasmEdge_ErrCode_InvalidCoreSort: WasmEdge_ErrCode = 773;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidDataIdx.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidDataIdx.html new file mode 100644 index 000000000..8e36d86f2 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidDataIdx.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidDataIdx in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidDataIdx

Source
pub const WasmEdge_ErrCode_InvalidDataIdx: WasmEdge_ErrCode = 524;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidElemIdx.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidElemIdx.html new file mode 100644 index 000000000..0c9a2b76a --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidElemIdx.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidElemIdx in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidElemIdx

Source
pub const WasmEdge_ErrCode_InvalidElemIdx: WasmEdge_ErrCode = 523;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidFieldIdx.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidFieldIdx.html new file mode 100644 index 000000000..9ae5c88cf --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidFieldIdx.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidFieldIdx in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidFieldIdx

Source
pub const WasmEdge_ErrCode_InvalidFieldIdx: WasmEdge_ErrCode = 516;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidFuncIdx.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidFuncIdx.html new file mode 100644 index 000000000..d4c5aab74 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidFuncIdx.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidFuncIdx in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidFuncIdx

Source
pub const WasmEdge_ErrCode_InvalidFuncIdx: WasmEdge_ErrCode = 518;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidFuncTypeIdx.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidFuncTypeIdx.html new file mode 100644 index 000000000..6a1381bde --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidFuncTypeIdx.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidFuncTypeIdx in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidFuncTypeIdx

Source
pub const WasmEdge_ErrCode_InvalidFuncTypeIdx: WasmEdge_ErrCode = 517;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidGlobalIdx.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidGlobalIdx.html new file mode 100644 index 000000000..faa9322c5 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidGlobalIdx.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidGlobalIdx in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidGlobalIdx

Source
pub const WasmEdge_ErrCode_InvalidGlobalIdx: WasmEdge_ErrCode = 521;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidLabelIdx.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidLabelIdx.html new file mode 100644 index 000000000..292f3d40e --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidLabelIdx.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidLabelIdx in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidLabelIdx

Source
pub const WasmEdge_ErrCode_InvalidLabelIdx: WasmEdge_ErrCode = 514;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidLaneIdx.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidLaneIdx.html new file mode 100644 index 000000000..58c4b3047 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidLaneIdx.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidLaneIdx in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidLaneIdx

Source
pub const WasmEdge_ErrCode_InvalidLaneIdx: WasmEdge_ErrCode = 537;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidLimit.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidLimit.html new file mode 100644 index 000000000..dc18522a6 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidLimit.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidLimit in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidLimit

Source
pub const WasmEdge_ErrCode_InvalidLimit: WasmEdge_ErrCode = 534;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidLocalIdx.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidLocalIdx.html new file mode 100644 index 000000000..a9e21ed23 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidLocalIdx.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidLocalIdx in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidLocalIdx

Source
pub const WasmEdge_ErrCode_InvalidLocalIdx: WasmEdge_ErrCode = 515;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidMemPages.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidMemPages.html new file mode 100644 index 000000000..a0793865d --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidMemPages.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidMemPages in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidMemPages

Source
pub const WasmEdge_ErrCode_InvalidMemPages: WasmEdge_ErrCode = 535;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidMemoryIdx.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidMemoryIdx.html new file mode 100644 index 000000000..869753b4a --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidMemoryIdx.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidMemoryIdx in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidMemoryIdx

Source
pub const WasmEdge_ErrCode_InvalidMemoryIdx: WasmEdge_ErrCode = 520;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidMut.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidMut.html new file mode 100644 index 000000000..7ccf0897c --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidMut.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidMut in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidMut

Source
pub const WasmEdge_ErrCode_InvalidMut: WasmEdge_ErrCode = 271;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidNotDefaultableArray.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidNotDefaultableArray.html new file mode 100644 index 000000000..58d5c32c0 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidNotDefaultableArray.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidNotDefaultableArray in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidNotDefaultableArray

Source
pub const WasmEdge_ErrCode_InvalidNotDefaultableArray: WasmEdge_ErrCode = 540;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidNotDefaultableField.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidNotDefaultableField.html new file mode 100644 index 000000000..625b43b02 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidNotDefaultableField.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidNotDefaultableField in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidNotDefaultableField

Source
pub const WasmEdge_ErrCode_InvalidNotDefaultableField: WasmEdge_ErrCode = 539;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidPackedArray.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidPackedArray.html new file mode 100644 index 000000000..af3611768 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidPackedArray.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidPackedArray in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidPackedArray

Source
pub const WasmEdge_ErrCode_InvalidPackedArray: WasmEdge_ErrCode = 542;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidPackedField.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidPackedField.html new file mode 100644 index 000000000..7982ca364 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidPackedField.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidPackedField in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidPackedField

Source
pub const WasmEdge_ErrCode_InvalidPackedField: WasmEdge_ErrCode = 541;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidRefIdx.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidRefIdx.html new file mode 100644 index 000000000..4f7327edf --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidRefIdx.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidRefIdx in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidRefIdx

Source
pub const WasmEdge_ErrCode_InvalidRefIdx: WasmEdge_ErrCode = 525;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidResultArity.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidResultArity.html new file mode 100644 index 000000000..5ff5ad106 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidResultArity.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidResultArity in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidResultArity

Source
pub const WasmEdge_ErrCode_InvalidResultArity: WasmEdge_ErrCode = 531;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidStartFunc.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidStartFunc.html new file mode 100644 index 000000000..f5a7af094 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidStartFunc.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidStartFunc in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidStartFunc

Source
pub const WasmEdge_ErrCode_InvalidStartFunc: WasmEdge_ErrCode = 536;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidStoreAlignment.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidStoreAlignment.html new file mode 100644 index 000000000..183e2bf45 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidStoreAlignment.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidStoreAlignment in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidStoreAlignment

Source
pub const WasmEdge_ErrCode_InvalidStoreAlignment: WasmEdge_ErrCode = 285;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidSubType.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidSubType.html new file mode 100644 index 000000000..fcb8925db --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidSubType.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidSubType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidSubType

Source
pub const WasmEdge_ErrCode_InvalidSubType: WasmEdge_ErrCode = 548;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidTableIdx.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidTableIdx.html new file mode 100644 index 000000000..f22dbd139 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidTableIdx.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidTableIdx in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidTableIdx

Source
pub const WasmEdge_ErrCode_InvalidTableIdx: WasmEdge_ErrCode = 519;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidTagIdx.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidTagIdx.html new file mode 100644 index 000000000..bb3555023 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidTagIdx.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidTagIdx in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidTagIdx

Source
pub const WasmEdge_ErrCode_InvalidTagIdx: WasmEdge_ErrCode = 522;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidTagResultType.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidTagResultType.html new file mode 100644 index 000000000..70e288229 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidTagResultType.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidTagResultType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidTagResultType

Source
pub const WasmEdge_ErrCode_InvalidTagResultType: WasmEdge_ErrCode = 549;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidUninitLocal.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidUninitLocal.html new file mode 100644 index 000000000..5243bde08 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidUninitLocal.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidUninitLocal in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidUninitLocal

Source
pub const WasmEdge_ErrCode_InvalidUninitLocal: WasmEdge_ErrCode = 538;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidUnpackedArray.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidUnpackedArray.html new file mode 100644 index 000000000..ac8373cb8 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidUnpackedArray.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidUnpackedArray in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidUnpackedArray

Source
pub const WasmEdge_ErrCode_InvalidUnpackedArray: WasmEdge_ErrCode = 544;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidUnpackedField.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidUnpackedField.html new file mode 100644 index 000000000..ba906b5d0 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_InvalidUnpackedField.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_InvalidUnpackedField in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_InvalidUnpackedField

Source
pub const WasmEdge_ErrCode_InvalidUnpackedField: WasmEdge_ErrCode = 543;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_JunkSection.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_JunkSection.html new file mode 100644 index 000000000..bce844198 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_JunkSection.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_JunkSection in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_JunkSection

Source
pub const WasmEdge_ErrCode_JunkSection: WasmEdge_ErrCode = 264;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_LengthOutOfBounds.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_LengthOutOfBounds.html new file mode 100644 index 000000000..92ab40d91 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_LengthOutOfBounds.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_LengthOutOfBounds in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_LengthOutOfBounds

Source
pub const WasmEdge_ErrCode_LengthOutOfBounds: WasmEdge_ErrCode = 263;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedAliasTarget.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedAliasTarget.html new file mode 100644 index 000000000..941484713 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedAliasTarget.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedAliasTarget in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedAliasTarget

Source
pub const WasmEdge_ErrCode_MalformedAliasTarget: WasmEdge_ErrCode = 1281;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedCanonical.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedCanonical.html new file mode 100644 index 000000000..840301786 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedCanonical.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedCanonical in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedCanonical

Source
pub const WasmEdge_ErrCode_MalformedCanonical: WasmEdge_ErrCode = 1289;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedCoreInstance.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedCoreInstance.html new file mode 100644 index 000000000..b931aa5ab --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedCoreInstance.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedCoreInstance in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedCoreInstance

Source
pub const WasmEdge_ErrCode_MalformedCoreInstance: WasmEdge_ErrCode = 1282;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedDefType.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedDefType.html new file mode 100644 index 000000000..39f3b4f47 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedDefType.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedDefType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedDefType

Source
pub const WasmEdge_ErrCode_MalformedDefType: WasmEdge_ErrCode = 1284;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedElemType.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedElemType.html new file mode 100644 index 000000000..63dcc353d --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedElemType.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedElemType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedElemType

Source
pub const WasmEdge_ErrCode_MalformedElemType: WasmEdge_ErrCode = 274;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedExportKind.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedExportKind.html new file mode 100644 index 000000000..ab53bd869 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedExportKind.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedExportKind in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedExportKind

Source
pub const WasmEdge_ErrCode_MalformedExportKind: WasmEdge_ErrCode = 269;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedFlagsType.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedFlagsType.html new file mode 100644 index 000000000..3864b7807 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedFlagsType.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedFlagsType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedFlagsType

Source
pub const WasmEdge_ErrCode_MalformedFlagsType: WasmEdge_ErrCode = 1288;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedImportKind.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedImportKind.html new file mode 100644 index 000000000..fdd04b64f --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedImportKind.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedImportKind in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedImportKind

Source
pub const WasmEdge_ErrCode_MalformedImportKind: WasmEdge_ErrCode = 268;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedInstance.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedInstance.html new file mode 100644 index 000000000..997a020da --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedInstance.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedInstance in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedInstance

Source
pub const WasmEdge_ErrCode_MalformedInstance: WasmEdge_ErrCode = 1283;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedMagic.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedMagic.html new file mode 100644 index 000000000..f8b02dca0 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedMagic.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedMagic in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedMagic

Source
pub const WasmEdge_ErrCode_MalformedMagic: WasmEdge_ErrCode = 259;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedName.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedName.html new file mode 100644 index 000000000..7ac081276 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedName.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedName in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedName

Source
pub const WasmEdge_ErrCode_MalformedName: WasmEdge_ErrCode = 1291;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedRecordType.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedRecordType.html new file mode 100644 index 000000000..987c53265 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedRecordType.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedRecordType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedRecordType

Source
pub const WasmEdge_ErrCode_MalformedRecordType: WasmEdge_ErrCode = 1285;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedRefType.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedRefType.html new file mode 100644 index 000000000..e952e0a71 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedRefType.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedRefType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedRefType

Source
pub const WasmEdge_ErrCode_MalformedRefType: WasmEdge_ErrCode = 275;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedSection.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedSection.html new file mode 100644 index 000000000..005edd399 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedSection.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedSection in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedSection

Source
pub const WasmEdge_ErrCode_MalformedSection: WasmEdge_ErrCode = 261;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedSort.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedSort.html new file mode 100644 index 000000000..30e167c28 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedSort.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedSort in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedSort

Source
pub const WasmEdge_ErrCode_MalformedSort: WasmEdge_ErrCode = 1280;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedTable.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedTable.html new file mode 100644 index 000000000..4f6996d59 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedTable.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedTable in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedTable

Source
pub const WasmEdge_ErrCode_MalformedTable: WasmEdge_ErrCode = 284;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedTupleType.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedTupleType.html new file mode 100644 index 000000000..67acec7bd --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedTupleType.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedTupleType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedTupleType

Source
pub const WasmEdge_ErrCode_MalformedTupleType: WasmEdge_ErrCode = 1287;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedUTF8.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedUTF8.html new file mode 100644 index 000000000..403d0ec0d --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedUTF8.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedUTF8 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedUTF8

Source
pub const WasmEdge_ErrCode_MalformedUTF8: WasmEdge_ErrCode = 276;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedValType.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedValType.html new file mode 100644 index 000000000..6c94bc2a6 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedValType.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedValType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedValType

Source
pub const WasmEdge_ErrCode_MalformedValType: WasmEdge_ErrCode = 273;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedVariantType.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedVariantType.html new file mode 100644 index 000000000..7522bbf8c --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedVariantType.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedVariantType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedVariantType

Source
pub const WasmEdge_ErrCode_MalformedVariantType: WasmEdge_ErrCode = 1286;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedVersion.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedVersion.html new file mode 100644 index 000000000..64736b965 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MalformedVersion.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MalformedVersion in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MalformedVersion

Source
pub const WasmEdge_ErrCode_MalformedVersion: WasmEdge_ErrCode = 260;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MemoryOutOfBounds.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MemoryOutOfBounds.html new file mode 100644 index 000000000..4e16485e6 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MemoryOutOfBounds.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MemoryOutOfBounds in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MemoryOutOfBounds

Source
pub const WasmEdge_ErrCode_MemoryOutOfBounds: WasmEdge_ErrCode = 1032;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ModuleNameConflict.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ModuleNameConflict.html new file mode 100644 index 000000000..e1349ff7d --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ModuleNameConflict.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_ModuleNameConflict in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_ModuleNameConflict

Source
pub const WasmEdge_ErrCode_ModuleNameConflict: WasmEdge_ErrCode = 768;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MultiMemories.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MultiMemories.html new file mode 100644 index 000000000..23f6c0889 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MultiMemories.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MultiMemories in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MultiMemories

Source
pub const WasmEdge_ErrCode_MultiMemories: WasmEdge_ErrCode = 533;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MultiTables.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MultiTables.html new file mode 100644 index 000000000..432b4df20 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_MultiTables.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_MultiTables in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_MultiTables

Source
pub const WasmEdge_ErrCode_MultiTables: WasmEdge_ErrCode = 532;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_NonNullRequired.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_NonNullRequired.html new file mode 100644 index 000000000..70e18446d --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_NonNullRequired.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_NonNullRequired in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_NonNullRequired

Source
pub const WasmEdge_ErrCode_NonNullRequired: WasmEdge_ErrCode = 9;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_NotValidated.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_NotValidated.html new file mode 100644 index 000000000..6f7a083aa --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_NotValidated.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_NotValidated in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_NotValidated

Source
pub const WasmEdge_ErrCode_NotValidated: WasmEdge_ErrCode = 8;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ReadError.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ReadError.html new file mode 100644 index 000000000..e58f60090 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_ReadError.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_ReadError in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_ReadError

Source
pub const WasmEdge_ErrCode_ReadError: WasmEdge_ErrCode = 257;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_RefTypeMismatch.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_RefTypeMismatch.html new file mode 100644 index 000000000..35bc40659 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_RefTypeMismatch.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_RefTypeMismatch in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_RefTypeMismatch

Source
pub const WasmEdge_ErrCode_RefTypeMismatch: WasmEdge_ErrCode = 1039;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_RuntimeError.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_RuntimeError.html new file mode 100644 index 000000000..8478a9ed4 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_RuntimeError.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_RuntimeError in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_RuntimeError

Source
pub const WasmEdge_ErrCode_RuntimeError: WasmEdge_ErrCode = 2;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_SectionSizeMismatch.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_SectionSizeMismatch.html new file mode 100644 index 000000000..78c2a4770 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_SectionSizeMismatch.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_SectionSizeMismatch in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_SectionSizeMismatch

Source
pub const WasmEdge_ErrCode_SectionSizeMismatch: WasmEdge_ErrCode = 262;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_SetValueErrorType.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_SetValueErrorType.html new file mode 100644 index 000000000..3d20bad4d --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_SetValueErrorType.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_SetValueErrorType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_SetValueErrorType

Source
pub const WasmEdge_ErrCode_SetValueErrorType: WasmEdge_ErrCode = 11;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_SetValueToConst.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_SetValueToConst.html new file mode 100644 index 000000000..91ecafc51 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_SetValueToConst.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_SetValueToConst in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_SetValueToConst

Source
pub const WasmEdge_ErrCode_SetValueToConst: WasmEdge_ErrCode = 10;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_SharedMemoryNoMax.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_SharedMemoryNoMax.html new file mode 100644 index 000000000..2a67684e3 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_SharedMemoryNoMax.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_SharedMemoryNoMax in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_SharedMemoryNoMax

Source
pub const WasmEdge_ErrCode_SharedMemoryNoMax: WasmEdge_ErrCode = 282;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_Success.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_Success.html new file mode 100644 index 000000000..fb5f530ca --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_Success.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_Success in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_Success

Source
pub const WasmEdge_ErrCode_Success: WasmEdge_ErrCode = 0;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_TableOutOfBounds.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_TableOutOfBounds.html new file mode 100644 index 000000000..3b4f52d89 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_TableOutOfBounds.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_TableOutOfBounds in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_TableOutOfBounds

Source
pub const WasmEdge_ErrCode_TableOutOfBounds: WasmEdge_ErrCode = 1031;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_Terminated.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_Terminated.html new file mode 100644 index 000000000..5d877385e --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_Terminated.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_Terminated in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_Terminated

Source
pub const WasmEdge_ErrCode_Terminated: WasmEdge_ErrCode = 1;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_TooManyLocals.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_TooManyLocals.html new file mode 100644 index 000000000..965aef3ea --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_TooManyLocals.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_TooManyLocals in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_TooManyLocals

Source
pub const WasmEdge_ErrCode_TooManyLocals: WasmEdge_ErrCode = 272;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_TypeCheckFailed.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_TypeCheckFailed.html new file mode 100644 index 000000000..ec75ee50c --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_TypeCheckFailed.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_TypeCheckFailed in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_TypeCheckFailed

Source
pub const WasmEdge_ErrCode_TypeCheckFailed: WasmEdge_ErrCode = 513;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UnalignedAtomicAccess.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UnalignedAtomicAccess.html new file mode 100644 index 000000000..ffd0b691f --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UnalignedAtomicAccess.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_UnalignedAtomicAccess in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_UnalignedAtomicAccess

Source
pub const WasmEdge_ErrCode_UnalignedAtomicAccess: WasmEdge_ErrCode = 1040;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UncaughtException.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UncaughtException.html new file mode 100644 index 000000000..09ca6b9af --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UncaughtException.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_UncaughtException in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_UncaughtException

Source
pub const WasmEdge_ErrCode_UncaughtException: WasmEdge_ErrCode = 1049;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UndefinedElement.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UndefinedElement.html new file mode 100644 index 000000000..fe34d0e37 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UndefinedElement.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_UndefinedElement in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_UndefinedElement

Source
pub const WasmEdge_ErrCode_UndefinedElement: WasmEdge_ErrCode = 1036;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UnexpectedEnd.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UnexpectedEnd.html new file mode 100644 index 000000000..15bab639f --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UnexpectedEnd.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_UnexpectedEnd in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_UnexpectedEnd

Source
pub const WasmEdge_ErrCode_UnexpectedEnd: WasmEdge_ErrCode = 258;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UninitializedElement.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UninitializedElement.html new file mode 100644 index 000000000..2bca55787 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UninitializedElement.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_UninitializedElement in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_UninitializedElement

Source
pub const WasmEdge_ErrCode_UninitializedElement: WasmEdge_ErrCode = 1035;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UnknownCanonicalOption.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UnknownCanonicalOption.html new file mode 100644 index 000000000..b1889bcde --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UnknownCanonicalOption.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_UnknownCanonicalOption in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_UnknownCanonicalOption

Source
pub const WasmEdge_ErrCode_UnknownCanonicalOption: WasmEdge_ErrCode = 1290;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UnknownImport.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UnknownImport.html new file mode 100644 index 000000000..efc904ebf --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UnknownImport.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_UnknownImport in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_UnknownImport

Source
pub const WasmEdge_ErrCode_UnknownImport: WasmEdge_ErrCode = 770;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_Unreachable.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_Unreachable.html new file mode 100644 index 000000000..effbcc319 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_Unreachable.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_Unreachable in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_Unreachable

Source
pub const WasmEdge_ErrCode_Unreachable: WasmEdge_ErrCode = 1034;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UserDefError.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UserDefError.html new file mode 100644 index 000000000..1dfc1942b --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_UserDefError.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_UserDefError in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_UserDefError

Source
pub const WasmEdge_ErrCode_UserDefError: WasmEdge_ErrCode = 12;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_WrongInstanceAddress.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_WrongInstanceAddress.html new file mode 100644 index 000000000..b5e7b501c --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_WrongInstanceAddress.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_WrongInstanceAddress in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_WrongInstanceAddress

Source
pub const WasmEdge_ErrCode_WrongInstanceAddress: WasmEdge_ErrCode = 1024;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_WrongInstanceIndex.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_WrongInstanceIndex.html new file mode 100644 index 000000000..fdfe89cf3 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_WrongInstanceIndex.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_WrongInstanceIndex in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_WrongInstanceIndex

Source
pub const WasmEdge_ErrCode_WrongInstanceIndex: WasmEdge_ErrCode = 1025;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_WrongVMWorkflow.html b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_WrongVMWorkflow.html new file mode 100644 index 000000000..805547159 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ErrCode_WrongVMWorkflow.html @@ -0,0 +1 @@ +WasmEdge_ErrCode_WrongVMWorkflow in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ErrCode_WrongVMWorkflow

Source
pub const WasmEdge_ErrCode_WrongVMWorkflow: WasmEdge_ErrCode = 4;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Function.html b/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Function.html new file mode 100644 index 000000000..ae58212ce --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Function.html @@ -0,0 +1 @@ +WasmEdge_ExternalType_Function in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ExternalType_Function

Source
pub const WasmEdge_ExternalType_Function: WasmEdge_ExternalType = 0;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Global.html b/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Global.html new file mode 100644 index 000000000..6cf9ad25b --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Global.html @@ -0,0 +1 @@ +WasmEdge_ExternalType_Global in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ExternalType_Global

Source
pub const WasmEdge_ExternalType_Global: WasmEdge_ExternalType = 3;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Memory.html b/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Memory.html new file mode 100644 index 000000000..1db11d529 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Memory.html @@ -0,0 +1 @@ +WasmEdge_ExternalType_Memory in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ExternalType_Memory

Source
pub const WasmEdge_ExternalType_Memory: WasmEdge_ExternalType = 2;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Table.html b/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Table.html new file mode 100644 index 000000000..4a326880d --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Table.html @@ -0,0 +1 @@ +WasmEdge_ExternalType_Table in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ExternalType_Table

Source
pub const WasmEdge_ExternalType_Table: WasmEdge_ExternalType = 1;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Tag.html b/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Tag.html new file mode 100644 index 000000000..1ae3d7689 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ExternalType_Tag.html @@ -0,0 +1 @@ +WasmEdge_ExternalType_Tag in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ExternalType_Tag

Source
pub const WasmEdge_ExternalType_Tag: WasmEdge_ExternalType = 4;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_HostRegistration_Wasi.html b/wasmedge_sys/ffi/constant.WasmEdge_HostRegistration_Wasi.html new file mode 100644 index 000000000..8af12428b --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_HostRegistration_Wasi.html @@ -0,0 +1 @@ +WasmEdge_HostRegistration_Wasi in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_HostRegistration_Wasi

Source
pub const WasmEdge_HostRegistration_Wasi: WasmEdge_HostRegistration = 0;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Mutability_Const.html b/wasmedge_sys/ffi/constant.WasmEdge_Mutability_Const.html new file mode 100644 index 000000000..424fca6a3 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Mutability_Const.html @@ -0,0 +1 @@ +WasmEdge_Mutability_Const in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Mutability_Const

Source
pub const WasmEdge_Mutability_Const: WasmEdge_Mutability = 0;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Mutability_Var.html b/wasmedge_sys/ffi/constant.WasmEdge_Mutability_Var.html new file mode 100644 index 000000000..cb31a54bf --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Mutability_Var.html @@ -0,0 +1 @@ +WasmEdge_Mutability_Var in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Mutability_Var

Source
pub const WasmEdge_Mutability_Var: WasmEdge_Mutability = 1;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Plugin_CurrentAPIVersion.html b/wasmedge_sys/ffi/constant.WasmEdge_Plugin_CurrentAPIVersion.html new file mode 100644 index 000000000..068d0b45f --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Plugin_CurrentAPIVersion.html @@ -0,0 +1 @@ +WasmEdge_Plugin_CurrentAPIVersion in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Plugin_CurrentAPIVersion

Source
pub const WasmEdge_Plugin_CurrentAPIVersion: u32 = 4;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Double.html b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Double.html new file mode 100644 index 000000000..592b5e700 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Double.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType_Double in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ProgramOptionType_Double

Source
pub const WasmEdge_ProgramOptionType_Double: WasmEdge_ProgramOptionType = 11;
Expand description

Boolean value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Float.html b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Float.html new file mode 100644 index 000000000..536928c12 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Float.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType_Float in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ProgramOptionType_Float

Source
pub const WasmEdge_ProgramOptionType_Float: WasmEdge_ProgramOptionType = 10;
Expand description

Boolean value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Int16.html b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Int16.html new file mode 100644 index 000000000..3604d4992 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Int16.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType_Int16 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ProgramOptionType_Int16

Source
pub const WasmEdge_ProgramOptionType_Int16: WasmEdge_ProgramOptionType = 3;
Expand description

Boolean value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Int32.html b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Int32.html new file mode 100644 index 000000000..5eff70746 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Int32.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType_Int32 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ProgramOptionType_Int32

Source
pub const WasmEdge_ProgramOptionType_Int32: WasmEdge_ProgramOptionType = 4;
Expand description

Boolean value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Int64.html b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Int64.html new file mode 100644 index 000000000..893709598 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Int64.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType_Int64 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ProgramOptionType_Int64

Source
pub const WasmEdge_ProgramOptionType_Int64: WasmEdge_ProgramOptionType = 5;
Expand description

Boolean value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Int8.html b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Int8.html new file mode 100644 index 000000000..6eadbe481 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Int8.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType_Int8 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ProgramOptionType_Int8

Source
pub const WasmEdge_ProgramOptionType_Int8: WasmEdge_ProgramOptionType = 2;
Expand description

Boolean value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_None.html b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_None.html new file mode 100644 index 000000000..619bf57de --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_None.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType_None in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ProgramOptionType_None

Source
pub const WasmEdge_ProgramOptionType_None: WasmEdge_ProgramOptionType = 0;
Expand description

No option value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_String.html b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_String.html new file mode 100644 index 000000000..163c7f598 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_String.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType_String in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ProgramOptionType_String

Source
pub const WasmEdge_ProgramOptionType_String: WasmEdge_ProgramOptionType = 12;
Expand description

WasmEdge_String.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Toggle.html b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Toggle.html new file mode 100644 index 000000000..125c452d1 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_Toggle.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType_Toggle in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ProgramOptionType_Toggle

Source
pub const WasmEdge_ProgramOptionType_Toggle: WasmEdge_ProgramOptionType = 1;
Expand description

Boolean value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_UInt16.html b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_UInt16.html new file mode 100644 index 000000000..4561712e9 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_UInt16.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType_UInt16 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ProgramOptionType_UInt16

Source
pub const WasmEdge_ProgramOptionType_UInt16: WasmEdge_ProgramOptionType = 7;
Expand description

Boolean value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_UInt32.html b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_UInt32.html new file mode 100644 index 000000000..f7ece8d4d --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_UInt32.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType_UInt32 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ProgramOptionType_UInt32

Source
pub const WasmEdge_ProgramOptionType_UInt32: WasmEdge_ProgramOptionType = 8;
Expand description

Boolean value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_UInt64.html b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_UInt64.html new file mode 100644 index 000000000..89684eb11 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_UInt64.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType_UInt64 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ProgramOptionType_UInt64

Source
pub const WasmEdge_ProgramOptionType_UInt64: WasmEdge_ProgramOptionType = 9;
Expand description

Boolean value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_UInt8.html b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_UInt8.html new file mode 100644 index 000000000..85e26380c --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_ProgramOptionType_UInt8.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType_UInt8 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_ProgramOptionType_UInt8

Source
pub const WasmEdge_ProgramOptionType_UInt8: WasmEdge_ProgramOptionType = 6;
Expand description

Boolean value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_Annotations.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_Annotations.html new file mode 100644 index 000000000..7cfcd9239 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_Annotations.html @@ -0,0 +1 @@ +WasmEdge_Proposal_Annotations in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_Annotations

Source
pub const WasmEdge_Proposal_Annotations: WasmEdge_Proposal = 14;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_BulkMemoryOperations.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_BulkMemoryOperations.html new file mode 100644 index 000000000..4ff5119ba --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_BulkMemoryOperations.html @@ -0,0 +1 @@ +WasmEdge_Proposal_BulkMemoryOperations in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_BulkMemoryOperations

Source
pub const WasmEdge_Proposal_BulkMemoryOperations: WasmEdge_Proposal = 4;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_Component.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_Component.html new file mode 100644 index 000000000..54be9d7ec --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_Component.html @@ -0,0 +1 @@ +WasmEdge_Proposal_Component in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_Component

Source
pub const WasmEdge_Proposal_Component: WasmEdge_Proposal = 17;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_ExceptionHandling.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_ExceptionHandling.html new file mode 100644 index 000000000..eebaf6ce7 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_ExceptionHandling.html @@ -0,0 +1 @@ +WasmEdge_Proposal_ExceptionHandling in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_ExceptionHandling

Source
pub const WasmEdge_Proposal_ExceptionHandling: WasmEdge_Proposal = 16;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_ExtendedConst.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_ExtendedConst.html new file mode 100644 index 000000000..7f94237b9 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_ExtendedConst.html @@ -0,0 +1 @@ +WasmEdge_Proposal_ExtendedConst in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_ExtendedConst

Source
pub const WasmEdge_Proposal_ExtendedConst: WasmEdge_Proposal = 8;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_FunctionReferences.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_FunctionReferences.html new file mode 100644 index 000000000..f1bd663c8 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_FunctionReferences.html @@ -0,0 +1 @@ +WasmEdge_Proposal_FunctionReferences in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_FunctionReferences

Source
pub const WasmEdge_Proposal_FunctionReferences: WasmEdge_Proposal = 9;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_GC.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_GC.html new file mode 100644 index 000000000..9afba7535 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_GC.html @@ -0,0 +1 @@ +WasmEdge_Proposal_GC in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_GC

Source
pub const WasmEdge_Proposal_GC: WasmEdge_Proposal = 10;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_ImportExportMutGlobals.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_ImportExportMutGlobals.html new file mode 100644 index 000000000..e2d3f4f60 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_ImportExportMutGlobals.html @@ -0,0 +1 @@ +WasmEdge_Proposal_ImportExportMutGlobals in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_ImportExportMutGlobals

Source
pub const WasmEdge_Proposal_ImportExportMutGlobals: WasmEdge_Proposal = 0;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_Memory64.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_Memory64.html new file mode 100644 index 000000000..ff92fb018 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_Memory64.html @@ -0,0 +1 @@ +WasmEdge_Proposal_Memory64 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_Memory64

Source
pub const WasmEdge_Proposal_Memory64: WasmEdge_Proposal = 15;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_MultiMemories.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_MultiMemories.html new file mode 100644 index 000000000..11f9014f0 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_MultiMemories.html @@ -0,0 +1 @@ +WasmEdge_Proposal_MultiMemories in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_MultiMemories

Source
pub const WasmEdge_Proposal_MultiMemories: WasmEdge_Proposal = 11;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_MultiValue.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_MultiValue.html new file mode 100644 index 000000000..3288adc9d --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_MultiValue.html @@ -0,0 +1 @@ +WasmEdge_Proposal_MultiValue in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_MultiValue

Source
pub const WasmEdge_Proposal_MultiValue: WasmEdge_Proposal = 3;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_NonTrapFloatToIntConversions.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_NonTrapFloatToIntConversions.html new file mode 100644 index 000000000..3182c85c8 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_NonTrapFloatToIntConversions.html @@ -0,0 +1 @@ +WasmEdge_Proposal_NonTrapFloatToIntConversions in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_NonTrapFloatToIntConversions

Source
pub const WasmEdge_Proposal_NonTrapFloatToIntConversions: WasmEdge_Proposal = 1;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_ReferenceTypes.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_ReferenceTypes.html new file mode 100644 index 000000000..0f4606f16 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_ReferenceTypes.html @@ -0,0 +1 @@ +WasmEdge_Proposal_ReferenceTypes in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_ReferenceTypes

Source
pub const WasmEdge_Proposal_ReferenceTypes: WasmEdge_Proposal = 5;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_RelaxSIMD.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_RelaxSIMD.html new file mode 100644 index 000000000..034a3f21c --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_RelaxSIMD.html @@ -0,0 +1 @@ +WasmEdge_Proposal_RelaxSIMD in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_RelaxSIMD

Source
pub const WasmEdge_Proposal_RelaxSIMD: WasmEdge_Proposal = 13;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_SIMD.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_SIMD.html new file mode 100644 index 000000000..7e1151332 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_SIMD.html @@ -0,0 +1 @@ +WasmEdge_Proposal_SIMD in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_SIMD

Source
pub const WasmEdge_Proposal_SIMD: WasmEdge_Proposal = 6;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_SignExtensionOperators.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_SignExtensionOperators.html new file mode 100644 index 000000000..693142be7 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_SignExtensionOperators.html @@ -0,0 +1 @@ +WasmEdge_Proposal_SignExtensionOperators in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_SignExtensionOperators

Source
pub const WasmEdge_Proposal_SignExtensionOperators: WasmEdge_Proposal = 2;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_TailCall.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_TailCall.html new file mode 100644 index 000000000..747f50714 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_TailCall.html @@ -0,0 +1 @@ +WasmEdge_Proposal_TailCall in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_TailCall

Source
pub const WasmEdge_Proposal_TailCall: WasmEdge_Proposal = 7;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_Proposal_Threads.html b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_Threads.html new file mode 100644 index 000000000..144e8674d --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_Proposal_Threads.html @@ -0,0 +1 @@ +WasmEdge_Proposal_Threads in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_Proposal_Threads

Source
pub const WasmEdge_Proposal_Threads: WasmEdge_Proposal = 12;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_AnyRef.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_AnyRef.html new file mode 100644 index 000000000..fd5bb01a9 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_AnyRef.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_AnyRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_AnyRef

Source
pub const WasmEdge_TypeCode_AnyRef: WasmEdge_TypeCode = 110;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Array.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Array.html new file mode 100644 index 000000000..18714d85f --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Array.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_Array in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_Array

Source
pub const WasmEdge_TypeCode_Array: WasmEdge_TypeCode = 94;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_ArrayRef.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_ArrayRef.html new file mode 100644 index 000000000..c7dc45322 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_ArrayRef.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_ArrayRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_ArrayRef

Source
pub const WasmEdge_TypeCode_ArrayRef: WasmEdge_TypeCode = 106;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Epsilon.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Epsilon.html new file mode 100644 index 000000000..045240801 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Epsilon.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_Epsilon in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_Epsilon

Source
pub const WasmEdge_TypeCode_Epsilon: WasmEdge_TypeCode = 64;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_EqRef.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_EqRef.html new file mode 100644 index 000000000..2b1714244 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_EqRef.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_EqRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_EqRef

Source
pub const WasmEdge_TypeCode_EqRef: WasmEdge_TypeCode = 109;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_ExnRef.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_ExnRef.html new file mode 100644 index 000000000..e52218150 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_ExnRef.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_ExnRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_ExnRef

Source
pub const WasmEdge_TypeCode_ExnRef: WasmEdge_TypeCode = 105;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_ExternRef.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_ExternRef.html new file mode 100644 index 000000000..883e8334a --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_ExternRef.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_ExternRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_ExternRef

Source
pub const WasmEdge_TypeCode_ExternRef: WasmEdge_TypeCode = 111;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_F32.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_F32.html new file mode 100644 index 000000000..e08773d2a --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_F32.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_F32 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_F32

Source
pub const WasmEdge_TypeCode_F32: WasmEdge_TypeCode = 125;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_F64.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_F64.html new file mode 100644 index 000000000..a5e165e57 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_F64.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_F64 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_F64

Source
pub const WasmEdge_TypeCode_F64: WasmEdge_TypeCode = 124;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Func.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Func.html new file mode 100644 index 000000000..526166792 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Func.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_Func in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_Func

Source
pub const WasmEdge_TypeCode_Func: WasmEdge_TypeCode = 96;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_FuncRef.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_FuncRef.html new file mode 100644 index 000000000..e06be12fc --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_FuncRef.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_FuncRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_FuncRef

Source
pub const WasmEdge_TypeCode_FuncRef: WasmEdge_TypeCode = 112;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I16.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I16.html new file mode 100644 index 000000000..c01d0eaed --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I16.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_I16 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_I16

Source
pub const WasmEdge_TypeCode_I16: WasmEdge_TypeCode = 119;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I31Ref.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I31Ref.html new file mode 100644 index 000000000..a91db5657 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I31Ref.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_I31Ref in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_I31Ref

Source
pub const WasmEdge_TypeCode_I31Ref: WasmEdge_TypeCode = 108;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I32.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I32.html new file mode 100644 index 000000000..a2973667d --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I32.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_I32 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_I32

Source
pub const WasmEdge_TypeCode_I32: WasmEdge_TypeCode = 127;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I64.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I64.html new file mode 100644 index 000000000..0bb198ef4 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I64.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_I64 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_I64

Source
pub const WasmEdge_TypeCode_I64: WasmEdge_TypeCode = 126;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I8.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I8.html new file mode 100644 index 000000000..e60cf91c3 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_I8.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_I8 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_I8

Source
pub const WasmEdge_TypeCode_I8: WasmEdge_TypeCode = 120;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_NullExternRef.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_NullExternRef.html new file mode 100644 index 000000000..eb8b6969d --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_NullExternRef.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_NullExternRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_NullExternRef

Source
pub const WasmEdge_TypeCode_NullExternRef: WasmEdge_TypeCode = 114;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_NullFuncRef.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_NullFuncRef.html new file mode 100644 index 000000000..83ea5da42 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_NullFuncRef.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_NullFuncRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_NullFuncRef

Source
pub const WasmEdge_TypeCode_NullFuncRef: WasmEdge_TypeCode = 115;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_NullRef.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_NullRef.html new file mode 100644 index 000000000..5761a06c2 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_NullRef.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_NullRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_NullRef

Source
pub const WasmEdge_TypeCode_NullRef: WasmEdge_TypeCode = 113;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Rec.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Rec.html new file mode 100644 index 000000000..555a40f72 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Rec.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_Rec in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_Rec

Source
pub const WasmEdge_TypeCode_Rec: WasmEdge_TypeCode = 78;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Ref.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Ref.html new file mode 100644 index 000000000..fb5f67563 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Ref.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_Ref in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_Ref

Source
pub const WasmEdge_TypeCode_Ref: WasmEdge_TypeCode = 100;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_RefNull.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_RefNull.html new file mode 100644 index 000000000..9e18d4459 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_RefNull.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_RefNull in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_RefNull

Source
pub const WasmEdge_TypeCode_RefNull: WasmEdge_TypeCode = 99;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_String.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_String.html new file mode 100644 index 000000000..4f862f161 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_String.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_String in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_String

Source
pub const WasmEdge_TypeCode_String: WasmEdge_TypeCode = 128;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Struct.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Struct.html new file mode 100644 index 000000000..705da22fc --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Struct.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_Struct in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_Struct

Source
pub const WasmEdge_TypeCode_Struct: WasmEdge_TypeCode = 95;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_StructRef.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_StructRef.html new file mode 100644 index 000000000..1f67fbeff --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_StructRef.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_StructRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_StructRef

Source
pub const WasmEdge_TypeCode_StructRef: WasmEdge_TypeCode = 107;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Sub.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Sub.html new file mode 100644 index 000000000..a31a5e213 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_Sub.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_Sub in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_Sub

Source
pub const WasmEdge_TypeCode_Sub: WasmEdge_TypeCode = 80;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_SubFinal.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_SubFinal.html new file mode 100644 index 000000000..f28da5403 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_SubFinal.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_SubFinal in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_SubFinal

Source
pub const WasmEdge_TypeCode_SubFinal: WasmEdge_TypeCode = 79;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_TypeIndex.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_TypeIndex.html new file mode 100644 index 000000000..6d3f42fb4 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_TypeIndex.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_TypeIndex in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_TypeIndex

Source
pub const WasmEdge_TypeCode_TypeIndex: WasmEdge_TypeCode = 0;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_V128.html b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_V128.html new file mode 100644 index 000000000..37647eb67 --- /dev/null +++ b/wasmedge_sys/ffi/constant.WasmEdge_TypeCode_V128.html @@ -0,0 +1 @@ +WasmEdge_TypeCode_V128 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Constant WasmEdge_TypeCode_V128

Source
pub const WasmEdge_TypeCode_V128: WasmEdge_TypeCode = 123;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleDelete.html new file mode 100644 index 000000000..096ccdd9f --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleDelete.html @@ -0,0 +1,7 @@ +WasmEdge_ASTModuleDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ASTModuleDelete

Source
pub unsafe extern "C" fn WasmEdge_ASTModuleDelete(
+    Cxt: *mut WasmEdge_ASTModuleContext,
+)
Expand description

Deletion of the WasmEdge_ASTModuleContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_ASTModuleContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleListExports.html b/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleListExports.html new file mode 100644 index 000000000..f0f15873f --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleListExports.html @@ -0,0 +1,13 @@ +WasmEdge_ASTModuleListExports in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ASTModuleListExports

Source
pub unsafe extern "C" fn WasmEdge_ASTModuleListExports(
+    Cxt: *const WasmEdge_ASTModuleContext,
+    Exports: *mut *const WasmEdge_ExportTypeContext,
+    Len: u32,
+) -> u32
Expand description

List the exports of the AST module.

+

If the Exports buffer length is smaller than the result of the exports +list size, the overflowed return values will be discarded.

+

\param Cxt the WasmEdge_ASTModuleContext. +\param [out] Exports the export type contexts buffer. Can be NULL if export +types are not needed. +\param Len the buffer length.

+

\returns actual exported function list size.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleListExportsLength.html b/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleListExportsLength.html new file mode 100644 index 000000000..7e50a408e --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleListExportsLength.html @@ -0,0 +1,6 @@ +WasmEdge_ASTModuleListExportsLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ASTModuleListExportsLength

Source
pub unsafe extern "C" fn WasmEdge_ASTModuleListExportsLength(
+    Cxt: *const WasmEdge_ASTModuleContext,
+) -> u32
Expand description

Get the length of exports list of the AST module.

+

\param Cxt the WasmEdge_ASTModuleContext.

+

\returns length of the exports list.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleListImports.html b/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleListImports.html new file mode 100644 index 000000000..1ca58ad84 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleListImports.html @@ -0,0 +1,13 @@ +WasmEdge_ASTModuleListImports in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ASTModuleListImports

Source
pub unsafe extern "C" fn WasmEdge_ASTModuleListImports(
+    Cxt: *const WasmEdge_ASTModuleContext,
+    Imports: *mut *const WasmEdge_ImportTypeContext,
+    Len: u32,
+) -> u32
Expand description

List the imports of the AST module.

+

If the Imports buffer length is smaller than the result of the imports +list size, the overflowed return values will be discarded.

+

\param Cxt the WasmEdge_ASTModuleContext. +\param [out] Imports the import type contexts buffer. Can be NULL if import +types are not needed. +\param Len the buffer length.

+

\returns actual exported function list size.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleListImportsLength.html b/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleListImportsLength.html new file mode 100644 index 000000000..e2476eee6 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ASTModuleListImportsLength.html @@ -0,0 +1,6 @@ +WasmEdge_ASTModuleListImportsLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ASTModuleListImportsLength

Source
pub unsafe extern "C" fn WasmEdge_ASTModuleListImportsLength(
+    Cxt: *const WasmEdge_ASTModuleContext,
+) -> u32
Expand description

Get the length of imports list of the AST module.

+

\param Cxt the WasmEdge_ASTModuleContext.

+

\returns length of the imports list.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_AsyncCancel.html b/wasmedge_sys/ffi/fn.WasmEdge_AsyncCancel.html new file mode 100644 index 000000000..0d514344b --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_AsyncCancel.html @@ -0,0 +1,5 @@ +WasmEdge_AsyncCancel in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_AsyncCancel

Source
pub unsafe extern "C" fn WasmEdge_AsyncCancel(
+    Cxt: *mut WasmEdge_Async,
+)
Expand description

Cancel a WasmEdge_Async execution.

+

\param Cxt the WasmEdge_ASync.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_AsyncDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_AsyncDelete.html new file mode 100644 index 000000000..92598d6a9 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_AsyncDelete.html @@ -0,0 +1,7 @@ +WasmEdge_AsyncDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_AsyncDelete

Source
pub unsafe extern "C" fn WasmEdge_AsyncDelete(
+    Cxt: *mut WasmEdge_Async,
+)
Expand description

Deletion of the WasmEdge_Async.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_ASync to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_AsyncGet.html b/wasmedge_sys/ffi/fn.WasmEdge_AsyncGet.html new file mode 100644 index 000000000..21532d76c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_AsyncGet.html @@ -0,0 +1,15 @@ +WasmEdge_AsyncGet in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_AsyncGet

Source
pub unsafe extern "C" fn WasmEdge_AsyncGet(
+    Cxt: *const WasmEdge_Async,
+    Returns: *mut WasmEdge_Value,
+    ReturnLen: u32,
+) -> WasmEdge_Result
Expand description

Wait and get the result of WasmEdge_Async execution.

+

This function will wait until the execution finished and return the +execution status and the return values. +If the Returns buffer length is smaller than the arity of the function, +the overflowed return values will be discarded.

+

\param Cxt the WasmEdge_ASync. +\param [out] Returns the WasmEdge_Value buffer to fill the return values. +\param ReturnLen the return buffer length.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_AsyncGetReturnsLength.html b/wasmedge_sys/ffi/fn.WasmEdge_AsyncGetReturnsLength.html new file mode 100644 index 000000000..50ddba527 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_AsyncGetReturnsLength.html @@ -0,0 +1,11 @@ +WasmEdge_AsyncGetReturnsLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_AsyncGetReturnsLength

Source
pub unsafe extern "C" fn WasmEdge_AsyncGetReturnsLength(
+    Cxt: *const WasmEdge_Async,
+) -> u32
Expand description

Wait and get the return list length of the WasmEdge_Async execution.

+

This function will wait until the execution finished and return the return +value list length of the executed function. This function will return 0 if +the Cxt is NULL, the execution was failed, or the execution was canceled. +Developers can call the WasmEdge_AsyncGet to get the execution status and +the return values.

+

\param Cxt the WasmEdge_ASync.

+

\returns the return list length of the executed function.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_AsyncWait.html b/wasmedge_sys/ffi/fn.WasmEdge_AsyncWait.html new file mode 100644 index 000000000..46690114f --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_AsyncWait.html @@ -0,0 +1,5 @@ +WasmEdge_AsyncWait in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_AsyncWait

Source
pub unsafe extern "C" fn WasmEdge_AsyncWait(
+    Cxt: *const WasmEdge_Async,
+)
Expand description

Wait a WasmEdge_Async execution.

+

\param Cxt the WasmEdge_ASync.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_AsyncWaitFor.html b/wasmedge_sys/ffi/fn.WasmEdge_AsyncWaitFor.html new file mode 100644 index 000000000..8b317436a --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_AsyncWaitFor.html @@ -0,0 +1,9 @@ +WasmEdge_AsyncWaitFor in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_AsyncWaitFor

Source
pub unsafe extern "C" fn WasmEdge_AsyncWaitFor(
+    Cxt: *const WasmEdge_Async,
+    Milliseconds: u64,
+) -> bool
Expand description

Wait a WasmEdge_Async execution with timeout.

+

\param Cxt the WasmEdge_ASync. +\param Milliseconds times to wait.

+

\returns Result of waiting, true for execution ended, false for timeout +occurred.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_BytesCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_BytesCreate.html new file mode 100644 index 000000000..933b6fca6 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_BytesCreate.html @@ -0,0 +1,11 @@ +WasmEdge_BytesCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_BytesCreate

Source
pub unsafe extern "C" fn WasmEdge_BytesCreate(
+    Buf: *const u8,
+    Len: u32,
+) -> WasmEdge_Bytes
Expand description

Creation of the WasmEdge_Bytes with the buffer and its length.

+

The caller owns the object and should call WasmEdge_BytesDelete to destroy +it.

+

\param Buf the buffer to copy into the WasmEdge_Bytes object. +\param Len the buffer length.

+

\returns bytes object. Length will be 0 and Buf will be NULL if failed or +the input buffer is a NULL.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_BytesDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_BytesDelete.html new file mode 100644 index 000000000..1e188cf50 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_BytesDelete.html @@ -0,0 +1,5 @@ +WasmEdge_BytesDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_BytesDelete

Source
pub unsafe extern "C" fn WasmEdge_BytesDelete(Bytes: WasmEdge_Bytes)
Expand description

Deletion of the WasmEdge_Bytes.

+

After calling this function, the resources in the WasmEdge_Bytes object +will be released and the object should NOT be used.

+

\param Bytes the WasmEdge_Bytes object to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_BytesWrap.html b/wasmedge_sys/ffi/fn.WasmEdge_BytesWrap.html new file mode 100644 index 000000000..47f06ec9a --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_BytesWrap.html @@ -0,0 +1,11 @@ +WasmEdge_BytesWrap in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_BytesWrap

Source
pub unsafe extern "C" fn WasmEdge_BytesWrap(
+    Buf: *const u8,
+    Len: u32,
+) -> WasmEdge_Bytes
Expand description

Create the WasmEdge_Bytes wraps to the buffer.

+

This function creates a WasmEdge_Bytes object which wraps to the input +buffer. The caller should guarantee the life cycle of the input buffer, and +should NOT call the WasmEdge_BytesDelete.

+

\param Buf the buffer to wrap to the WasmEdge_Bytes object. +\param Len the buffer length.

+

\returns bytes object refer to the input buffer with its length.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_CallingFrameGetExecutor.html b/wasmedge_sys/ffi/fn.WasmEdge_CallingFrameGetExecutor.html new file mode 100644 index 000000000..df2083111 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_CallingFrameGetExecutor.html @@ -0,0 +1,6 @@ +WasmEdge_CallingFrameGetExecutor in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_CallingFrameGetExecutor

Source
pub unsafe extern "C" fn WasmEdge_CallingFrameGetExecutor(
+    Cxt: *const WasmEdge_CallingFrameContext,
+) -> *mut WasmEdge_ExecutorContext
Expand description

Get the executor context from the current calling frame.

+

\param Cxt the WasmEdge_CallingFrameContext.

+

\returns the executor context, NULL if the Cxt is NULL.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_CallingFrameGetMemoryInstance.html b/wasmedge_sys/ffi/fn.WasmEdge_CallingFrameGetMemoryInstance.html new file mode 100644 index 000000000..91330393e --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_CallingFrameGetMemoryInstance.html @@ -0,0 +1,17 @@ +WasmEdge_CallingFrameGetMemoryInstance in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_CallingFrameGetMemoryInstance

Source
pub unsafe extern "C" fn WasmEdge_CallingFrameGetMemoryInstance(
+    Cxt: *const WasmEdge_CallingFrameContext,
+    Idx: u32,
+) -> *mut WasmEdge_MemoryInstanceContext
Expand description

Get the memory instance by index from the module instance of the current +calling frame.

+

By default, a WASM module only have one memory instance after instantiation. +Therefore, developers can use: +WasmEdge_CallingFrameGetMemoryInstance(Cxt, 0) +to get the memory instance in host function body. +This extension is for the WASM multiple memories proposal. After enabling +the proposal, there may be greater than 1 memory instances in a WASM module. +So developers can use this function to access the memory instances which are +not in 0 index.

+

\param Cxt the WasmEdge_CallingFrameContext. +\param Idx the index of memory instance in the module instance.

+

\returns the memory instance, NULL if not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_CallingFrameGetModuleInstance.html b/wasmedge_sys/ffi/fn.WasmEdge_CallingFrameGetModuleInstance.html new file mode 100644 index 000000000..110ecc2bb --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_CallingFrameGetModuleInstance.html @@ -0,0 +1,13 @@ +WasmEdge_CallingFrameGetModuleInstance in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_CallingFrameGetModuleInstance

Source
pub unsafe extern "C" fn WasmEdge_CallingFrameGetModuleInstance(
+    Cxt: *const WasmEdge_CallingFrameContext,
+) -> *const WasmEdge_ModuleInstanceContext
Expand description

Get the module instance of the current calling frame.

+

When a WASM function is executing and start to call a host function, a frame +with the module instance which the WASM function belongs to will be pushed +onto the stack. And therefore the calling frame context will record that +module instance. +So in one case that the module instance will be NULL: developers execute +the function instance which is a host function and not added into a module +instance.

+

\param Cxt the WasmEdge_CallingFrameContext.

+

\returns the module instance of the current calling frame.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_CompilerCompile.html b/wasmedge_sys/ffi/fn.WasmEdge_CompilerCompile.html new file mode 100644 index 000000000..6b8b87efc --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_CompilerCompile.html @@ -0,0 +1,13 @@ +WasmEdge_CompilerCompile in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_CompilerCompile

Source
pub unsafe extern "C" fn WasmEdge_CompilerCompile(
+    Cxt: *mut WasmEdge_CompilerContext,
+    InPath: *const c_char,
+    OutPath: *const c_char,
+) -> WasmEdge_Result
Expand description

Compile the input WASM from the file path.

+

The compiler compiles the WASM from file path for the ahead-of-time mode and +store the result to the output file path.

+

\param Cxt the WasmEdge_CompilerContext. +\param InPath the input WASM file path. +\param OutPath the output WASM file path.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_CompilerCompileFromBuffer.html b/wasmedge_sys/ffi/fn.WasmEdge_CompilerCompileFromBuffer.html new file mode 100644 index 000000000..8207786ee --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_CompilerCompileFromBuffer.html @@ -0,0 +1,17 @@ +WasmEdge_CompilerCompileFromBuffer in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_CompilerCompileFromBuffer

Source
pub unsafe extern "C" fn WasmEdge_CompilerCompileFromBuffer(
+    Cxt: *mut WasmEdge_CompilerContext,
+    InBuffer: *const u8,
+    InBufferLen: u64,
+    OutPath: *const c_char,
+) -> WasmEdge_Result
Expand description

Compile the input WASM from the given buffer.

+

CAUTION: This function will be deprecated and replaced by +WasmEdge_CompilerCompileFromBytes() API in the future.

+

The compiler compiles the WASM from the given buffer for the +ahead-of-time mode and store the result to the output file path.

+

\param Cxt the WasmEdge_CompilerContext. +\param InBuffer the input WASM binary buffer. +\param InBufferLen the length of the input WASM binary buffer. +\param OutPath the output WASM file path.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_CompilerCompileFromBytes.html b/wasmedge_sys/ffi/fn.WasmEdge_CompilerCompileFromBytes.html new file mode 100644 index 000000000..e367baa64 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_CompilerCompileFromBytes.html @@ -0,0 +1,13 @@ +WasmEdge_CompilerCompileFromBytes in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_CompilerCompileFromBytes

Source
pub unsafe extern "C" fn WasmEdge_CompilerCompileFromBytes(
+    Cxt: *mut WasmEdge_CompilerContext,
+    Bytes: WasmEdge_Bytes,
+    OutPath: *const c_char,
+) -> WasmEdge_Result
Expand description

Compile the input WASM from a WasmEdge_Bytes.

+

The compiler compiles the WASM from the WasmEdge_Bytes for the +ahead-of-time mode and store the result to the output file path.

+

\param Cxt the WasmEdge_CompilerContext. +\param Bytes the WasmEdge_Bytes of WASM binary. +\param OutPath the output WASM file path.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_CompilerCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_CompilerCreate.html new file mode 100644 index 000000000..ee3e72779 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_CompilerCreate.html @@ -0,0 +1,7 @@ +WasmEdge_CompilerCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_CompilerCreate

Source
pub unsafe extern "C" fn WasmEdge_CompilerCreate(
+    ConfCxt: *const WasmEdge_ConfigureContext,
+) -> *mut WasmEdge_CompilerContext
Expand description

Creation of the WasmEdge_CompilerContext.

+

The caller owns the object and should call WasmEdge_CompilerDelete to +delete it.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_CompilerDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_CompilerDelete.html new file mode 100644 index 000000000..f5131b36b --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_CompilerDelete.html @@ -0,0 +1,7 @@ +WasmEdge_CompilerDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_CompilerDelete

Source
pub unsafe extern "C" fn WasmEdge_CompilerDelete(
+    Cxt: *mut WasmEdge_CompilerContext,
+)
Expand description

Deletion of the WasmEdge_CompilerContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_CompilerContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureAddHostRegistration.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureAddHostRegistration.html new file mode 100644 index 000000000..807ce8167 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureAddHostRegistration.html @@ -0,0 +1,14 @@ +WasmEdge_ConfigureAddHostRegistration in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureAddHostRegistration

Source
pub unsafe extern "C" fn WasmEdge_ConfigureAddHostRegistration(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    Host: WasmEdge_HostRegistration,
+)
Expand description

Add a built-in host registration setting into WasmEdge_ConfigureContext.

+

For turning on the Wasi support in WasmEdge_VMContext, you can set the +built-in host registration value into the WasmEdge_ConfigureContext and +create VM with this context.

+
WasmEdge_ConfigureContext *Conf = WasmEdge_ConfigureCreate();
+WasmEdge_ConfigureAddHostRegistration(Conf, WasmEdge_HostRegistration_Wasi);
+WasmEdge_VMContext *VM = WasmEdge_VMCreate(Conf, NULL);
+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to add built-in host registration. +\param Host the built-in host registration value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureAddProposal.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureAddProposal.html new file mode 100644 index 000000000..6991f7b23 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureAddProposal.html @@ -0,0 +1,16 @@ +WasmEdge_ConfigureAddProposal in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureAddProposal

Source
pub unsafe extern "C" fn WasmEdge_ConfigureAddProposal(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    Prop: WasmEdge_Proposal,
+)
Expand description

Add a proposal setting into the WasmEdge_ConfigureContext.

+

For turning on a specific WASM proposal in VM, loader, or compiler contexts, +etc., you can set the proposal value into the WasmEdge_ConfigureContext and +create the VM, loader, or compiler contexts, etc. with this context.

+
WasmEdge_ConfigureContext *Conf = WasmEdge_ConfigureCreate();
+WasmEdge_ConfigureAddProposal(Conf, WasmEdge_Proposal_BulkMemoryOperations);
+WasmEdge_ConfigureAddProposal(Conf, WasmEdge_Proposal_ReferenceTypes);
+WasmEdge_ConfigureAddProposal(Conf, WasmEdge_Proposal_SIMD);
+WasmEdge_VMContext *VM = WasmEdge_VMCreate(Conf, NULL);
+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to add the proposal value. +\param Prop the proposal value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerGetOptimizationLevel.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerGetOptimizationLevel.html new file mode 100644 index 000000000..acc8b4897 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerGetOptimizationLevel.html @@ -0,0 +1,7 @@ +WasmEdge_ConfigureCompilerGetOptimizationLevel in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureCompilerGetOptimizationLevel

Source
pub unsafe extern "C" fn WasmEdge_ConfigureCompilerGetOptimizationLevel(
+    Cxt: *const WasmEdge_ConfigureContext,
+) -> WasmEdge_CompilerOptimizationLevel
Expand description

Get the optimization level of the AOT compiler.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to get the optimization level.

+

\returns the AOT compiler optimization level.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerGetOutputFormat.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerGetOutputFormat.html new file mode 100644 index 000000000..6ac4ca784 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerGetOutputFormat.html @@ -0,0 +1,7 @@ +WasmEdge_ConfigureCompilerGetOutputFormat in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureCompilerGetOutputFormat

Source
pub unsafe extern "C" fn WasmEdge_ConfigureCompilerGetOutputFormat(
+    Cxt: *const WasmEdge_ConfigureContext,
+) -> WasmEdge_CompilerOutputFormat
Expand description

Get the output binary format of the AOT compiler.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to get the output binary format.

+

\returns the AOT compiler output binary format.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerIsDumpIR.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerIsDumpIR.html new file mode 100644 index 000000000..c5b965453 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerIsDumpIR.html @@ -0,0 +1,8 @@ +WasmEdge_ConfigureCompilerIsDumpIR in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureCompilerIsDumpIR

Source
pub unsafe extern "C" fn WasmEdge_ConfigureCompilerIsDumpIR(
+    Cxt: *const WasmEdge_ConfigureContext,
+) -> bool
Expand description

Get the dump IR option of the AOT compiler.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to get the boolean value.

+

\returns the boolean value to determine to dump IR or not when compilation +in AOT compiler.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerIsGenericBinary.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerIsGenericBinary.html new file mode 100644 index 000000000..e9912a994 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerIsGenericBinary.html @@ -0,0 +1,8 @@ +WasmEdge_ConfigureCompilerIsGenericBinary in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureCompilerIsGenericBinary

Source
pub unsafe extern "C" fn WasmEdge_ConfigureCompilerIsGenericBinary(
+    Cxt: *const WasmEdge_ConfigureContext,
+) -> bool
Expand description

Get the generic binary option of the AOT compiler.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to get the boolean value.

+

\returns the boolean value to determine to generate the generic binary or +not when compilation in AOT compiler.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerIsInterruptible.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerIsInterruptible.html new file mode 100644 index 000000000..fb5491483 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerIsInterruptible.html @@ -0,0 +1,8 @@ +WasmEdge_ConfigureCompilerIsInterruptible in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureCompilerIsInterruptible

Source
pub unsafe extern "C" fn WasmEdge_ConfigureCompilerIsInterruptible(
+    Cxt: *const WasmEdge_ConfigureContext,
+) -> bool
Expand description

Get the interruptible option of the AOT compiler.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to get the boolean value.

+

\returns the boolean value to determine to generate interruptible binary or +not when compilation in AOT compiler.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetDumpIR.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetDumpIR.html new file mode 100644 index 000000000..43ec0dfe7 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetDumpIR.html @@ -0,0 +1,9 @@ +WasmEdge_ConfigureCompilerSetDumpIR in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureCompilerSetDumpIR

Source
pub unsafe extern "C" fn WasmEdge_ConfigureCompilerSetDumpIR(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    IsDump: bool,
+)
Expand description

Set the dump IR option of the AOT compiler.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to set the boolean value. +\param IsDump the boolean value to determine to dump IR or not when +compilation in AOT compiler.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetGenericBinary.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetGenericBinary.html new file mode 100644 index 000000000..257996e08 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetGenericBinary.html @@ -0,0 +1,9 @@ +WasmEdge_ConfigureCompilerSetGenericBinary in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureCompilerSetGenericBinary

Source
pub unsafe extern "C" fn WasmEdge_ConfigureCompilerSetGenericBinary(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    IsGeneric: bool,
+)
Expand description

Set the generic binary option of the AOT compiler.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to set the boolean value. +\param IsGeneric the boolean value to determine to generate the generic +binary or not when compilation in AOT compiler.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetInterruptible.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetInterruptible.html new file mode 100644 index 000000000..1d083992b --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetInterruptible.html @@ -0,0 +1,9 @@ +WasmEdge_ConfigureCompilerSetInterruptible in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureCompilerSetInterruptible

Source
pub unsafe extern "C" fn WasmEdge_ConfigureCompilerSetInterruptible(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    IsInterruptible: bool,
+)
Expand description

Set the interruptible option of the AOT compiler.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to set the boolean value. +\param IsInterruptible the boolean value to determine to generate +interruptible binary or not when compilation in AOT compiler.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetOptimizationLevel.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetOptimizationLevel.html new file mode 100644 index 000000000..7d09b5322 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetOptimizationLevel.html @@ -0,0 +1,8 @@ +WasmEdge_ConfigureCompilerSetOptimizationLevel in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureCompilerSetOptimizationLevel

Source
pub unsafe extern "C" fn WasmEdge_ConfigureCompilerSetOptimizationLevel(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    Level: WasmEdge_CompilerOptimizationLevel,
+)
Expand description

Set the optimization level of the AOT compiler.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to set the optimization level. +\param Level the AOT compiler optimization level.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetOutputFormat.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetOutputFormat.html new file mode 100644 index 000000000..91ac21ae0 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCompilerSetOutputFormat.html @@ -0,0 +1,8 @@ +WasmEdge_ConfigureCompilerSetOutputFormat in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureCompilerSetOutputFormat

Source
pub unsafe extern "C" fn WasmEdge_ConfigureCompilerSetOutputFormat(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    Format: WasmEdge_CompilerOutputFormat,
+)
Expand description

Set the output binary format of the AOT compiler.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to set the output binary format. +\param Format the AOT compiler output binary format.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCreate.html new file mode 100644 index 000000000..a2666c630 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureCreate.html @@ -0,0 +1,5 @@ +WasmEdge_ConfigureCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureCreate

Source
pub unsafe extern "C" fn WasmEdge_ConfigureCreate() -> *mut WasmEdge_ConfigureContext
Expand description

Creation of the WasmEdge_ConfigureContext.

+

The caller owns the object and should call WasmEdge_ConfigureDelete to +destroy it.

+

\returns pointer to the context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureDelete.html new file mode 100644 index 000000000..cba2f0134 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureDelete.html @@ -0,0 +1,8 @@ +WasmEdge_ConfigureDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureDelete

Source
pub unsafe extern "C" fn WasmEdge_ConfigureDelete(
+    Cxt: *mut WasmEdge_ConfigureContext,
+)
Expand description

Deletion of the WasmEdge_ConfigureContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureGetMaxMemoryPage.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureGetMaxMemoryPage.html new file mode 100644 index 000000000..56fec8f96 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureGetMaxMemoryPage.html @@ -0,0 +1,8 @@ +WasmEdge_ConfigureGetMaxMemoryPage in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureGetMaxMemoryPage

Source
pub unsafe extern "C" fn WasmEdge_ConfigureGetMaxMemoryPage(
+    Cxt: *const WasmEdge_ConfigureContext,
+) -> u32
Expand description

Get the setting of the page limit of memory instances.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to get the maximum page count +setting.

+

\returns the page count limitation value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureHasHostRegistration.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureHasHostRegistration.html new file mode 100644 index 000000000..6b28265fa --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureHasHostRegistration.html @@ -0,0 +1,11 @@ +WasmEdge_ConfigureHasHostRegistration in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureHasHostRegistration

Source
pub unsafe extern "C" fn WasmEdge_ConfigureHasHostRegistration(
+    Cxt: *const WasmEdge_ConfigureContext,
+    Host: WasmEdge_HostRegistration,
+) -> bool
Expand description

Check if a built-in host registration setting exists in the +WasmEdge_ConfigureContext or not.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to check the host pre-registration. +\param Host the built-in host registration value.

+

\returns true if the built-in host registration setting exists, false if +not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureHasProposal.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureHasProposal.html new file mode 100644 index 000000000..18a8ac9ad --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureHasProposal.html @@ -0,0 +1,9 @@ +WasmEdge_ConfigureHasProposal in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureHasProposal

Source
pub unsafe extern "C" fn WasmEdge_ConfigureHasProposal(
+    Cxt: *const WasmEdge_ConfigureContext,
+    Prop: WasmEdge_Proposal,
+) -> bool
Expand description

Check if a proposal setting exists in the WasmEdge_ConfigureContext or not.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to check the proposal value. +\param Prop the proposal value.

+

\returns true if the proposal setting exists, false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureIsAllowAFUNIX.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureIsAllowAFUNIX.html new file mode 100644 index 000000000..617830524 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureIsAllowAFUNIX.html @@ -0,0 +1,8 @@ +WasmEdge_ConfigureIsAllowAFUNIX in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureIsAllowAFUNIX

Source
pub unsafe extern "C" fn WasmEdge_ConfigureIsAllowAFUNIX(
+    Cxt: *const WasmEdge_ConfigureContext,
+) -> bool
Expand description

Get the AllowAFUNIX option.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to get the boolean value.

+

\returns the boolean value to determine to enable AF_UNIX support in the +WASI socket or not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureIsForceInterpreter.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureIsForceInterpreter.html new file mode 100644 index 000000000..bf4164aea --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureIsForceInterpreter.html @@ -0,0 +1,8 @@ +WasmEdge_ConfigureIsForceInterpreter in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureIsForceInterpreter

Source
pub unsafe extern "C" fn WasmEdge_ConfigureIsForceInterpreter(
+    Cxt: *const WasmEdge_ConfigureContext,
+) -> bool
Expand description

Get the force interpreter mode execution option.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to get the boolean value.

+

\returns the boolean value to determine to forcibly run WASM in interpreter +mode or not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureRemoveHostRegistration.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureRemoveHostRegistration.html new file mode 100644 index 000000000..cebe8e0ad --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureRemoveHostRegistration.html @@ -0,0 +1,10 @@ +WasmEdge_ConfigureRemoveHostRegistration in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureRemoveHostRegistration

Source
pub unsafe extern "C" fn WasmEdge_ConfigureRemoveHostRegistration(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    Host: WasmEdge_HostRegistration,
+)
Expand description

Remove a built-in host registration setting in the +WasmEdge_ConfigureContext.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to remove the host +pre-registration. +\param Host the built-in host registration value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureRemoveProposal.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureRemoveProposal.html new file mode 100644 index 000000000..e96f20658 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureRemoveProposal.html @@ -0,0 +1,8 @@ +WasmEdge_ConfigureRemoveProposal in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureRemoveProposal

Source
pub unsafe extern "C" fn WasmEdge_ConfigureRemoveProposal(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    Prop: WasmEdge_Proposal,
+)
Expand description

Remove a proposal setting in the WasmEdge_ConfigureContext.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to remove the proposal. +\param Prop the proposal value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureSetAllowAFUNIX.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureSetAllowAFUNIX.html new file mode 100644 index 000000000..896b394ea --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureSetAllowAFUNIX.html @@ -0,0 +1,9 @@ +WasmEdge_ConfigureSetAllowAFUNIX in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureSetAllowAFUNIX

Source
pub unsafe extern "C" fn WasmEdge_ConfigureSetAllowAFUNIX(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    EnableAFUNIX: bool,
+)
Expand description

Set the option of enabling/disabling AF_UNIX support in the WASI socket.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to set the boolean value. +\param EnableAFUNIX the boolean value to determine to enable +the AF_UNIX support in the WASI socket or not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureSetForceInterpreter.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureSetForceInterpreter.html new file mode 100644 index 000000000..0549a3845 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureSetForceInterpreter.html @@ -0,0 +1,9 @@ +WasmEdge_ConfigureSetForceInterpreter in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureSetForceInterpreter

Source
pub unsafe extern "C" fn WasmEdge_ConfigureSetForceInterpreter(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    IsForceInterpreter: bool,
+)
Expand description

Set the force interpreter mode execution option.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to set the boolean value. +\param IsForceInterpreter the boolean value to determine to forcibly run +WASM in interpreter mode or not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureSetMaxMemoryPage.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureSetMaxMemoryPage.html new file mode 100644 index 000000000..eac9b39e7 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureSetMaxMemoryPage.html @@ -0,0 +1,9 @@ +WasmEdge_ConfigureSetMaxMemoryPage in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureSetMaxMemoryPage

Source
pub unsafe extern "C" fn WasmEdge_ConfigureSetMaxMemoryPage(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    Page: u32,
+)
Expand description

Set the page limit of memory instances.

+

Limit the page count (64KiB per page) in memory instances.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to set the maximum page count. +\param Page the maximum page count.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsIsCostMeasuring.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsIsCostMeasuring.html new file mode 100644 index 000000000..20e91cdf2 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsIsCostMeasuring.html @@ -0,0 +1,8 @@ +WasmEdge_ConfigureStatisticsIsCostMeasuring in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureStatisticsIsCostMeasuring

Source
pub unsafe extern "C" fn WasmEdge_ConfigureStatisticsIsCostMeasuring(
+    Cxt: *const WasmEdge_ConfigureContext,
+) -> bool
Expand description

Get the cost measuring option for the statistics.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to get the boolean value.

+

\returns the boolean value to determine to support cost measuring when +execution or not after compilation by the AOT compiler.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsIsInstructionCounting.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsIsInstructionCounting.html new file mode 100644 index 000000000..0bcb437ec --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsIsInstructionCounting.html @@ -0,0 +1,8 @@ +WasmEdge_ConfigureStatisticsIsInstructionCounting in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureStatisticsIsInstructionCounting

Source
pub unsafe extern "C" fn WasmEdge_ConfigureStatisticsIsInstructionCounting(
+    Cxt: *const WasmEdge_ConfigureContext,
+) -> bool
Expand description

Get the instruction counting option for the statistics.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to get the boolean value.

+

\returns the boolean value to determine to support instruction counting when +execution or not after compilation by the AOT compiler.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsIsTimeMeasuring.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsIsTimeMeasuring.html new file mode 100644 index 000000000..996586ec1 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsIsTimeMeasuring.html @@ -0,0 +1,8 @@ +WasmEdge_ConfigureStatisticsIsTimeMeasuring in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureStatisticsIsTimeMeasuring

Source
pub unsafe extern "C" fn WasmEdge_ConfigureStatisticsIsTimeMeasuring(
+    Cxt: *const WasmEdge_ConfigureContext,
+) -> bool
Expand description

Get the time measuring option for the statistics.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to get the boolean value.

+

\returns the boolean value to determine to support time measuring when +execution or not after compilation by the AOT compiler.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsSetCostMeasuring.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsSetCostMeasuring.html new file mode 100644 index 000000000..011a84f8c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsSetCostMeasuring.html @@ -0,0 +1,9 @@ +WasmEdge_ConfigureStatisticsSetCostMeasuring in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureStatisticsSetCostMeasuring

Source
pub unsafe extern "C" fn WasmEdge_ConfigureStatisticsSetCostMeasuring(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    IsMeasure: bool,
+)
Expand description

Set the cost measuring option for the statistics.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to set the boolean value. +\param IsMeasure the boolean value to determine to support cost measuring +when execution or not after compilation by the AOT compiler.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsSetInstructionCounting.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsSetInstructionCounting.html new file mode 100644 index 000000000..338ac81a6 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsSetInstructionCounting.html @@ -0,0 +1,9 @@ +WasmEdge_ConfigureStatisticsSetInstructionCounting in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureStatisticsSetInstructionCounting

Source
pub unsafe extern "C" fn WasmEdge_ConfigureStatisticsSetInstructionCounting(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    IsCount: bool,
+)
Expand description

Set the instruction counting option for the statistics.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to set the boolean value. +\param IsCount the boolean value to determine to support instruction +counting when execution or not after compilation by the AOT compiler.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsSetTimeMeasuring.html b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsSetTimeMeasuring.html new file mode 100644 index 000000000..c41651a97 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ConfigureStatisticsSetTimeMeasuring.html @@ -0,0 +1,9 @@ +WasmEdge_ConfigureStatisticsSetTimeMeasuring in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ConfigureStatisticsSetTimeMeasuring

Source
pub unsafe extern "C" fn WasmEdge_ConfigureStatisticsSetTimeMeasuring(
+    Cxt: *mut WasmEdge_ConfigureContext,
+    IsMeasure: bool,
+)
Expand description

Set the time measuring option for the statistics.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ConfigureContext to set the boolean value. +\param IsMeasure the boolean value to determine to support time when +execution or not after compilation by the AOT compiler.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_Driver_Compiler.html b/wasmedge_sys/ffi/fn.WasmEdge_Driver_Compiler.html new file mode 100644 index 000000000..355a2f640 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_Driver_Compiler.html @@ -0,0 +1,10 @@ +WasmEdge_Driver_Compiler in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_Driver_Compiler

Source
pub unsafe extern "C" fn WasmEdge_Driver_Compiler(
+    Argc: c_int,
+    Argv: *mut *const c_char,
+) -> c_int
Expand description

Entrypoint for the compiler tool.

+

This function provides an entrypoint to the WasmEdge AOT compiler tool with +the command line arguments.

+

\param Argc the argument count. +\param Argv the argument vector.

+

\returns the execution status.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_Driver_Tool.html b/wasmedge_sys/ffi/fn.WasmEdge_Driver_Tool.html new file mode 100644 index 000000000..6010de646 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_Driver_Tool.html @@ -0,0 +1,10 @@ +WasmEdge_Driver_Tool in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_Driver_Tool

Source
pub unsafe extern "C" fn WasmEdge_Driver_Tool(
+    Argc: c_int,
+    Argv: *mut *const c_char,
+) -> c_int
Expand description

Entrypoint for the runtime tool.

+

This function provides an entrypoint to the WasmEdge runtime tool with the +command line arguments.

+

\param Argc the argument count. +\param Argv the argument vector.

+

\returns the execution status.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_Driver_UniTool.html b/wasmedge_sys/ffi/fn.WasmEdge_Driver_UniTool.html new file mode 100644 index 000000000..9baec67dd --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_Driver_UniTool.html @@ -0,0 +1,10 @@ +WasmEdge_Driver_UniTool in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_Driver_UniTool

Source
pub unsafe extern "C" fn WasmEdge_Driver_UniTool(
+    Argc: c_int,
+    Argv: *mut *const c_char,
+) -> c_int
Expand description

Entrypoint for the unified tool.

+

This function provides an entrypoint to the WasmEdge unified tool with the +command line arguments.

+

\param Argc the argument count. +\param Argv the argument vector.

+

\returns the execution status.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExecutorAsyncInvoke.html b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorAsyncInvoke.html new file mode 100644 index 000000000..d918c426c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorAsyncInvoke.html @@ -0,0 +1,16 @@ +WasmEdge_ExecutorAsyncInvoke in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExecutorAsyncInvoke

Source
pub unsafe extern "C" fn WasmEdge_ExecutorAsyncInvoke(
+    Cxt: *mut WasmEdge_ExecutorContext,
+    FuncCxt: *const WasmEdge_FunctionInstanceContext,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+) -> *mut WasmEdge_Async
Expand description

Asynchronous invoke a WASM function by the function instance.

+

After instantiating a WASM module, developers can get the function instance +context from the module instance. Then developers can invoke the function +asynchronously through this API.

+

\param Cxt the WasmEdge_ExecutorContext. +\param FuncCxt the function instance context to invoke. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length.

+

\returns WasmEdge_Async. Call WasmEdge_AsyncGet for the result, and call +WasmEdge_AsyncDelete to destroy this object.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExecutorCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorCreate.html new file mode 100644 index 000000000..40738c24e --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorCreate.html @@ -0,0 +1,14 @@ +WasmEdge_ExecutorCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExecutorCreate

Source
pub unsafe extern "C" fn WasmEdge_ExecutorCreate(
+    ConfCxt: *const WasmEdge_ConfigureContext,
+    StatCxt: *mut WasmEdge_StatisticsContext,
+) -> *mut WasmEdge_ExecutorContext
Expand description

Creation of the WasmEdge_ExecutorContext.

+

The caller owns the object and should call WasmEdge_ExecutorDelete to +delete it.

+

\param ConfCxt the WasmEdge_ConfigureContext as the configuration of +Executor. NULL for the default configuration. +\param StatCxt the WasmEdge_StatisticsContext as the statistics object set +into Executor. The statistics will refer to this context, and the life cycle +should be guaranteed until the executor context is deleted. NULL for not +doing the statistics.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExecutorDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorDelete.html new file mode 100644 index 000000000..f3d9ec907 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorDelete.html @@ -0,0 +1,7 @@ +WasmEdge_ExecutorDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExecutorDelete

Source
pub unsafe extern "C" fn WasmEdge_ExecutorDelete(
+    Cxt: *mut WasmEdge_ExecutorContext,
+)
Expand description

Deletion of the WasmEdge_ExecutorContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_ExecutorContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExecutorExperimentalRegisterPostHostFunction.html b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorExperimentalRegisterPostHostFunction.html new file mode 100644 index 000000000..5d36f73b4 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorExperimentalRegisterPostHostFunction.html @@ -0,0 +1,16 @@ +WasmEdge_ExecutorExperimentalRegisterPostHostFunction in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExecutorExperimentalRegisterPostHostFunction

Source
pub unsafe extern "C" fn WasmEdge_ExecutorExperimentalRegisterPostHostFunction(
+    Cxt: *mut WasmEdge_ExecutorContext,
+    Data: *mut c_void,
+    Func: Option<unsafe extern "C" fn(arg1: *mut c_void)>,
+)
Expand description

Register a host function that will be invoked after executing any host +functions.

+

There is only one post-host-function. After calling this function, the +previous registered host function will be replaced. This is a experimental +feature. Use it at your own risk.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param Data the host data to set into the given host function. When calling +the Func, this pointer will be the argument of the Func function. +\param Func the function to be invoked after executing any other host +functions.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExecutorExperimentalRegisterPreHostFunction.html b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorExperimentalRegisterPreHostFunction.html new file mode 100644 index 000000000..73556bd4a --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorExperimentalRegisterPreHostFunction.html @@ -0,0 +1,16 @@ +WasmEdge_ExecutorExperimentalRegisterPreHostFunction in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExecutorExperimentalRegisterPreHostFunction

Source
pub unsafe extern "C" fn WasmEdge_ExecutorExperimentalRegisterPreHostFunction(
+    Cxt: *mut WasmEdge_ExecutorContext,
+    Data: *mut c_void,
+    Func: Option<unsafe extern "C" fn(arg1: *mut c_void)>,
+)
Expand description

Register a host function that will be invoked before executing any host +functions.

+

There is only one pre-host-function. After calling this function, the +previous registered host function will be replaced. This is a experimental +feature. Use it at your own risk.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ExecutorContext. +\param Data the host data to set into the given host function. When calling +the Func, this pointer will be the argument of the Func function. +\param Func the function to be invoked before executing any other host +functions.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExecutorInstantiate.html b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorInstantiate.html new file mode 100644 index 000000000..6d78e6268 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorInstantiate.html @@ -0,0 +1,21 @@ +WasmEdge_ExecutorInstantiate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExecutorInstantiate

Source
pub unsafe extern "C" fn WasmEdge_ExecutorInstantiate(
+    Cxt: *mut WasmEdge_ExecutorContext,
+    ModuleCxt: *mut *mut WasmEdge_ModuleInstanceContext,
+    StoreCxt: *mut WasmEdge_StoreContext,
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+) -> WasmEdge_Result
Expand description

Instantiate an AST Module into a module instance.

+

Instantiate an AST Module, and return an instantiated module instance +context as the result. The caller owns the object and should call +WasmEdge_ModuleInstanceDelete to destroy it. Developers can use the +WasmEdge_ModuleInstanceListFunction, +WasmEdge_ModuleInstanceFindFunction, etc. APIs to retrieve the exported +instances from the result module instance.

+

\param Cxt the WasmEdge_ExecutorContext to instantiate the module. +\param [out] ModuleCxt the output WasmEdge_ModuleInstanceContext if +succeeded. +\param StoreCxt the WasmEdge_StoreContext to link the imports. +\param ASTCxt the WasmEdge AST Module context generated by loader or +compiler.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExecutorInvoke.html b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorInvoke.html new file mode 100644 index 000000000..c3a0b7e70 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorInvoke.html @@ -0,0 +1,20 @@ +WasmEdge_ExecutorInvoke in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExecutorInvoke

Source
pub unsafe extern "C" fn WasmEdge_ExecutorInvoke(
+    Cxt: *mut WasmEdge_ExecutorContext,
+    FuncCxt: *const WasmEdge_FunctionInstanceContext,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+    Returns: *mut WasmEdge_Value,
+    ReturnLen: u32,
+) -> WasmEdge_Result
Expand description

Invoke a WASM function by the function instance.

+

After instantiating a WASM module, developers can get the function instance +context from the module instance. Then developers can invoke the function +through this API.

+

\param Cxt the WasmEdge_ExecutorContext. +\param FuncCxt the function instance context to invoke. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length. +\param [out] Returns the WasmEdge_Value buffer to fill the return values. +\param ReturnLen the return buffer length.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExecutorRegister.html b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorRegister.html new file mode 100644 index 000000000..8d3ea04d4 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorRegister.html @@ -0,0 +1,34 @@ +WasmEdge_ExecutorRegister in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExecutorRegister

Source
pub unsafe extern "C" fn WasmEdge_ExecutorRegister(
+    Cxt: *mut WasmEdge_ExecutorContext,
+    ModuleCxt: *mut *mut WasmEdge_ModuleInstanceContext,
+    StoreCxt: *mut WasmEdge_StoreContext,
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    ModuleName: WasmEdge_String,
+) -> WasmEdge_Result
Expand description

Instantiate an AST Module into a named module instance and link into store.

+

Instantiate an AST Module with the module name, return the instantiated +module instance context as the result, and also register the module instance +to the store. The caller owns the object and should call +WasmEdge_ModuleInstanceDelete to destroy it. +Developers can use the WasmEdge_ModuleInstanceListFunction, +WasmEdge_ModuleInstanceFindFunction, etc. APIs to retrieve the exported +instances from the result module instance. +After calling this function, the output module instance will also be +registered into the store, and the other modules can import the exported +instances for linking when instantiation. Developers SHOULD guarantee the +life cycle of this output module instance, or the error will occur when in +execution after the module instance being destroyed if it has been imported +by other modules. That is, developers have the responsibility to delete the +output module instance even though the store being destroyed. When the +module instance is deleted, it will be unregistered to the store +automatically.

+

\param Cxt the WasmEdge_ExecutorContext to instantiate the module. +\param [out] ModuleCxt the output WasmEdge_ModuleInstanceContext if +succeeded. +\param StoreCxt the WasmEdge_StoreContext to link the imports. +\param ASTCxt the WasmEdge AST Module context generated by loader or +compiler. +\param ModuleName the module name WasmEdge_String for all exported +instances.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExecutorRegisterImport.html b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorRegisterImport.html new file mode 100644 index 000000000..ea1fb621b --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExecutorRegisterImport.html @@ -0,0 +1,19 @@ +WasmEdge_ExecutorRegisterImport in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExecutorRegisterImport

Source
pub unsafe extern "C" fn WasmEdge_ExecutorRegisterImport(
+    Cxt: *mut WasmEdge_ExecutorContext,
+    StoreCxt: *mut WasmEdge_StoreContext,
+    ImportCxt: *const WasmEdge_ModuleInstanceContext,
+) -> WasmEdge_Result
Expand description

Register a module instance into a store with exporting its module name.

+

Register an existing module into the store with its module name. +After calling this function, the existing module instance will be registered +into the store, and the other modules can import the exported instances for +linking when instantiation. Developers SHOULD guarantee the life cycle of +this existing module instance, or the error will occur when in execution +after the module instance being destroyed if it has been imported by other +modules. When the module instance is deleted, it will be unregistered to the +store automatically.

+

\param Cxt the WasmEdge_ExecutorContext to instantiate the module. +\param StoreCxt the WasmEdge_StoreContext to store the instantiated module. +\param ImportCxt the WasmEdge_ModuleInstanceContext to register.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetExternalName.html b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetExternalName.html new file mode 100644 index 000000000..e7f043f36 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetExternalName.html @@ -0,0 +1,8 @@ +WasmEdge_ExportTypeGetExternalName in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExportTypeGetExternalName

Source
pub unsafe extern "C" fn WasmEdge_ExportTypeGetExternalName(
+    Cxt: *const WasmEdge_ExportTypeContext,
+) -> WasmEdge_String
Expand description

Get the external name from an export type.

+

The returned string object is linked to the external name of the export +type, and the caller should NOT call the WasmEdge_StringDelete.

+

\param Cxt the WasmEdge_ExportTypeContext.

+

\returns string object. Length will be 0 and Buf will be NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetExternalType.html b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetExternalType.html new file mode 100644 index 000000000..d3f2a6c0d --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetExternalType.html @@ -0,0 +1,6 @@ +WasmEdge_ExportTypeGetExternalType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExportTypeGetExternalType

Source
pub unsafe extern "C" fn WasmEdge_ExportTypeGetExternalType(
+    Cxt: *const WasmEdge_ExportTypeContext,
+) -> WasmEdge_ExternalType
Expand description

Get the external type from an export type.

+

\param Cxt the WasmEdge_ExportTypeContext.

+

\returns the external type of the export type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetFunctionType.html b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetFunctionType.html new file mode 100644 index 000000000..c735079d4 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetFunctionType.html @@ -0,0 +1,14 @@ +WasmEdge_ExportTypeGetFunctionType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExportTypeGetFunctionType

Source
pub unsafe extern "C" fn WasmEdge_ExportTypeGetFunctionType(
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    Cxt: *const WasmEdge_ExportTypeContext,
+) -> *const WasmEdge_FunctionTypeContext
Expand description

Get the external value (which is function type) from an export type.

+

The export type context should be the one queried from the AST module +context, or this function will cause unexpected error. +The function type context links to the function type in the export type +context and the AST module context. The caller should NOT call the +WasmEdge_FunctionTypeDelete.

+

\param ASTCxt the WasmEdge_ASTModuleContext. +\param Cxt the WasmEdge_ExportTypeContext which queried from the ASTCxt.

+

\returns the function type. NULL if failed or the external type of the +export type is not WasmEdge_ExternalType_Function.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetGlobalType.html b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetGlobalType.html new file mode 100644 index 000000000..7f339fae6 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetGlobalType.html @@ -0,0 +1,14 @@ +WasmEdge_ExportTypeGetGlobalType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExportTypeGetGlobalType

Source
pub unsafe extern "C" fn WasmEdge_ExportTypeGetGlobalType(
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    Cxt: *const WasmEdge_ExportTypeContext,
+) -> *const WasmEdge_GlobalTypeContext
Expand description

Get the external value (which is global type) from an export type.

+

The export type context should be the one queried from the AST module +context, or this function will cause unexpected error. +The global type context links to the global type in the export type context +and the AST module context. The caller should NOT call the +WasmEdge_GlobalTypeDelete.

+

\param ASTCxt the WasmEdge_ASTModuleContext. +\param Cxt the WasmEdge_ExportTypeContext which queried from the ASTCxt.

+

\returns the global type. NULL if failed or the external type of the export +type is not WasmEdge_ExternalType_Global.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetMemoryType.html b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetMemoryType.html new file mode 100644 index 000000000..bf8ec2b46 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetMemoryType.html @@ -0,0 +1,14 @@ +WasmEdge_ExportTypeGetMemoryType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExportTypeGetMemoryType

Source
pub unsafe extern "C" fn WasmEdge_ExportTypeGetMemoryType(
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    Cxt: *const WasmEdge_ExportTypeContext,
+) -> *const WasmEdge_MemoryTypeContext
Expand description

Get the external value (which is memory type) from an export type.

+

The export type context should be the one queried from the AST module +context, or this function will cause unexpected error. +The memory type context links to the memory type in the export type context +and the AST module context. The caller should NOT call the +WasmEdge_MemoryTypeDelete.

+

\param ASTCxt the WasmEdge_ASTModuleContext. +\param Cxt the WasmEdge_ExportTypeContext which queried from the ASTCxt.

+

\returns the memory type. NULL if failed or the external type of the export +type is not WasmEdge_ExternalType_Memory.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetTableType.html b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetTableType.html new file mode 100644 index 000000000..4c3121be8 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetTableType.html @@ -0,0 +1,14 @@ +WasmEdge_ExportTypeGetTableType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExportTypeGetTableType

Source
pub unsafe extern "C" fn WasmEdge_ExportTypeGetTableType(
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    Cxt: *const WasmEdge_ExportTypeContext,
+) -> *const WasmEdge_TableTypeContext
Expand description

Get the external value (which is table type) from an export type.

+

The export type context should be the one queried from the AST module +context, or this function will cause unexpected error. +The table type context links to the table type in the export type context +and the AST module context. The caller should NOT call the +WasmEdge_TableTypeDelete.

+

\param ASTCxt the WasmEdge_ASTModuleContext. +\param Cxt the WasmEdge_ExportTypeContext which queried from the ASTCxt.

+

\returns the table type. NULL if failed or the external type of the export +type is not WasmEdge_ExternalType_Table.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetTagType.html b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetTagType.html new file mode 100644 index 000000000..d48dd8d54 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ExportTypeGetTagType.html @@ -0,0 +1,13 @@ +WasmEdge_ExportTypeGetTagType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ExportTypeGetTagType

Source
pub unsafe extern "C" fn WasmEdge_ExportTypeGetTagType(
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    Cxt: *const WasmEdge_ExportTypeContext,
+) -> *const WasmEdge_TagTypeContext
Expand description

Get the external value (which is tag type) from an export type.

+

The export type context should be the one queried from the AST module +context, or this function will cause unexpected error. +The tag type context links to the tag type in the export type context +and the AST module context.

+

\param ASTCxt the WasmEdge_ASTModuleContext. +\param Cxt the WasmEdge_ExportTypeContext which queried from the ASTCxt.

+

\returns the tag type. NULL if failed or the external type of the export +type is not WasmEdge_ExternalType_Tag.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceCreate.html new file mode 100644 index 000000000..3a625b6eb --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceCreate.html @@ -0,0 +1,50 @@ +WasmEdge_FunctionInstanceCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_FunctionInstanceCreate

Source
pub unsafe extern "C" fn WasmEdge_FunctionInstanceCreate(
+    Type: *const WasmEdge_FunctionTypeContext,
+    HostFunc: WasmEdge_HostFunc_t,
+    Data: *mut c_void,
+    Cost: u64,
+) -> *mut WasmEdge_FunctionInstanceContext
Expand description

Creation of the WasmEdge_FunctionInstanceContext for host functions.

+

The caller owns the object and should call WasmEdge_FunctionInstanceDelete +to destroy it if the returned object is not added into a +WasmEdge_ModuleInstanceContext. The following is an example to create a +host function context.

+
WasmEdge_Result FuncAdd(void *Data,
+                        const WasmEdge_CallingFrameContext *CallFrameCxt,
+                        const WasmEdge_Value *In, WasmEdge_Value *Out) {
+  // Function to return A + B.
+  int32_t A = WasmEdge_ValueGetI32(In[0]);
+  int32_t B = WasmEdge_ValueGetI32(In[1]);
+  Out[0] = WasmEdge_ValueGenI32(A + B);
+  // Return execution status
+  return WasmEdge_Result_Success;
+}
+
+WasmEdge_ValType Params[2] = {WasmEdge_ValTypeGenI32(),
+                              WasmEdge_ValTypeGenI32()};
+WasmEdge_ValType Returns[1] = {WasmEdge_ValTypeGenI32()};
+WasmEdge_FunctionTypeContext *FuncType =
+    WasmEdge_FunctionTypeCreate(Params, 2, Returns, 1);
+WasmEdge_FunctionInstanceContext *HostFunc =
+    WasmEdge_FunctionInstanceCreate(FuncType, FuncAdd, NULL, 0);
+WasmEdge_FunctionTypeDelete(FuncType);
+...
+

\param Type the function type context to describe the host function +signature. +\param HostFunc the host function pointer. The host function signature must +be as following:

+
typedef WasmEdge_Result (*WasmEdge_HostFunc_t)(
+    void *Data,
+    const WasmEdge_CallingFrameContext *CallFrameCxt,
+    const WasmEdge_Value *Params,
+    WasmEdge_Value *Returns);
+

The Params is the input parameters array with length guaranteed to be the +same as the parameter types in the Type. The Returns is the output +results array with length guaranteed to be the same as the result types in +the Type. The return value is WasmEdge_Result for the execution status. +\param Data the additional object, such as the pointer to a data structure, +to set to this host function context. The caller should guarantee the life +cycle of the object. NULL if the additional data object is not needed. +\param Cost the function cost in statistics. Pass 0 if the calculation is +not needed.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceCreateBinding.html b/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceCreateBinding.html new file mode 100644 index 000000000..e2a7b453e --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceCreateBinding.html @@ -0,0 +1,74 @@ +WasmEdge_FunctionInstanceCreateBinding in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_FunctionInstanceCreateBinding

Source
pub unsafe extern "C" fn WasmEdge_FunctionInstanceCreateBinding(
+    Type: *const WasmEdge_FunctionTypeContext,
+    WrapFunc: WasmEdge_WrapFunc_t,
+    Binding: *mut c_void,
+    Data: *mut c_void,
+    Cost: u64,
+) -> *mut WasmEdge_FunctionInstanceContext
Expand description

Creation of the WasmEdge_FunctionInstanceContext for host functions.

+

This function is for the languages which cannot pass the function pointer of +the host function into this shared library directly. The caller owns the +object and should call WasmEdge_FunctionInstanceDelete to destroy it if +the returned object is not added into a WasmEdge_ModuleInstanceContext. +The following is an example to create a host function context for other +languages.

+
// `RealFunc` is the pointer to the function in other languages.
+
+WasmEdge_Result FuncAddWrap(
+    void *This, void *Data,
+    const WasmEdge_CallingFrameContext *CallFrameCxt,
+    const WasmEdge_Value *In, const uint32_t InLen, WasmEdge_Value *Out,
+    const uint32_t OutLen) {
+  // Wrapper function of host function to return A + B.
+
+  // `This` is the same as `RealFunc`.
+  int32_t A = WasmEdge_ValueGetI32(In[0]);
+  int32_t B = WasmEdge_ValueGetI32(In[1]);
+
+  // Call the function of `This` in the host language ...
+  int32_t Result = ...;
+
+  Out[0] = Result;
+  // Return the execution status.
+  return WasmEdge_Result_Success;
+}
+
+WasmEdge_ValType Params[2] = {WasmEdge_ValTypeGenI32(),
+                              WasmEdge_ValTypeGenI32()};
+WasmEdge_ValType Returns[1] = {WasmEdge_ValTypeGenI32()};
+WasmEdge_FunctionTypeContext *FuncType =
+    WasmEdge_FunctionTypeCreate(Params, 2, Returns, 1);
+WasmEdge_FunctionInstanceContext *HostFunc =
+    WasmEdge_FunctionInstanceCreateBinding(
+        FuncType, FuncAddWrap, RealFunc, NULL, 0);
+WasmEdge_FunctionTypeDelete(FuncType);
+...
+

\param Type the function type context to describe the host function +signature. +\param WrapFunc the wrapper function pointer. The wrapper function signature +must be as following:

+
typedef WasmEdge_Result (*WasmEdge_WrapFunc_t)(
+    void *This,
+    void *Data,
+    WasmEdge_CallingFrameContext *FrameCxt,
+    const WasmEdge_Value *Params,
+    const uint32_t ParamLen,
+    WasmEdge_Value *Returns,
+    const uint32_t ReturnLen);
+

The This is the pointer the same as the Binding parameter of this +function. The Params is the input parameters array with length guaranteed +to be the same as the parameter types in the Type, and the ParamLen is +the length of the array. The Returns is the output results array with +length guaranteed to be the same as the result types in the Type, and the +ReturnLen is the length of the array. The return value is +WasmEdge_Result for the execution status. +\param Binding the this pointer of the host function target or the +function indexing maintained by the caller which can specify the host +function. When invoking the host function, this pointer will be the first +argument of the wrapper function. +\param Data the additional object, such as the pointer to a data structure, +to set to this host function context. The caller should guarantee the life +cycle of the object. NULL if the additional data object is not needed. +\param Cost the function cost in statistics. Pass 0 if the calculation is +not needed.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceDelete.html new file mode 100644 index 000000000..cfd65d60f --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceDelete.html @@ -0,0 +1,7 @@ +WasmEdge_FunctionInstanceDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_FunctionInstanceDelete

Source
pub unsafe extern "C" fn WasmEdge_FunctionInstanceDelete(
+    Cxt: *mut WasmEdge_FunctionInstanceContext,
+)
Expand description

Deletion of the WasmEdge_FunctionInstanceContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_FunctionInstanceContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceGetData.html b/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceGetData.html new file mode 100644 index 000000000..afa3f71aa --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceGetData.html @@ -0,0 +1,7 @@ +WasmEdge_FunctionInstanceGetData in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_FunctionInstanceGetData

Source
pub unsafe extern "C" fn WasmEdge_FunctionInstanceGetData(
+    Cxt: *const WasmEdge_FunctionInstanceContext,
+) -> *const c_void
Expand description

Get the function data field of the function instance.

+

The function data is passed when creating the FunctionInstance.

+

\param Cxt the WasmEdge_FunctionInstanceContext.

+

\returns pointer to Data, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceGetFunctionType.html b/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceGetFunctionType.html new file mode 100644 index 000000000..6cc2bf9f2 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_FunctionInstanceGetFunctionType.html @@ -0,0 +1,9 @@ +WasmEdge_FunctionInstanceGetFunctionType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_FunctionInstanceGetFunctionType

Source
pub unsafe extern "C" fn WasmEdge_FunctionInstanceGetFunctionType(
+    Cxt: *const WasmEdge_FunctionInstanceContext,
+) -> *const WasmEdge_FunctionTypeContext
Expand description

Get the function type context of the function instance.

+

The function type context links to the function type in the function +instance context and owned by the context. The caller should NOT call +the WasmEdge_FunctionTypeDelete.

+

\param Cxt the WasmEdge_FunctionInstanceContext.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeCreate.html new file mode 100644 index 000000000..b379681c6 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeCreate.html @@ -0,0 +1,15 @@ +WasmEdge_FunctionTypeCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_FunctionTypeCreate

Source
pub unsafe extern "C" fn WasmEdge_FunctionTypeCreate(
+    ParamList: *const WasmEdge_ValType,
+    ParamLen: u32,
+    ReturnList: *const WasmEdge_ValType,
+    ReturnLen: u32,
+) -> *mut WasmEdge_FunctionTypeContext
Expand description

Creation of the WasmEdge_FunctionTypeContext.

+

The caller owns the object and should call WasmEdge_FunctionTypeDelete to +destroy it.

+

\param ParamList the value types list of parameters. NULL if the length is +0. +\param ParamLen the ParamList buffer length. +\param ReturnList the value types list of returns. NULL if the length is 0. +\param ReturnLen the ReturnList buffer length.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeDelete.html new file mode 100644 index 000000000..57700a58b --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeDelete.html @@ -0,0 +1,7 @@ +WasmEdge_FunctionTypeDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_FunctionTypeDelete

Source
pub unsafe extern "C" fn WasmEdge_FunctionTypeDelete(
+    Cxt: *mut WasmEdge_FunctionTypeContext,
+)
Expand description

Deletion of the WasmEdge_FunctionTypeContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_FunctionTypeContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeGetParameters.html b/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeGetParameters.html new file mode 100644 index 000000000..90f451b0b --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeGetParameters.html @@ -0,0 +1,13 @@ +WasmEdge_FunctionTypeGetParameters in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_FunctionTypeGetParameters

Source
pub unsafe extern "C" fn WasmEdge_FunctionTypeGetParameters(
+    Cxt: *const WasmEdge_FunctionTypeContext,
+    List: *mut WasmEdge_ValType,
+    Len: u32,
+) -> u32
Expand description

Get the parameter types list from the WasmEdge_FunctionTypeContext.

+

If the List buffer length is smaller than the length of the parameter type +list, the overflowed values will be discarded.

+

\param Cxt the WasmEdge_FunctionTypeContext. +\param [out] List the WasmEdge_ValType buffer to fill the parameter value +types. +\param Len the value type buffer length.

+

\returns the actual parameter types list length.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeGetParametersLength.html b/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeGetParametersLength.html new file mode 100644 index 000000000..bcada0e10 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeGetParametersLength.html @@ -0,0 +1,6 @@ +WasmEdge_FunctionTypeGetParametersLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_FunctionTypeGetParametersLength

Source
pub unsafe extern "C" fn WasmEdge_FunctionTypeGetParametersLength(
+    Cxt: *const WasmEdge_FunctionTypeContext,
+) -> u32
Expand description

Get the parameter types list length from the WasmEdge_FunctionTypeContext.

+

\param Cxt the WasmEdge_FunctionTypeContext.

+

\returns the parameter types list length.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeGetReturns.html b/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeGetReturns.html new file mode 100644 index 000000000..b0d80732c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeGetReturns.html @@ -0,0 +1,13 @@ +WasmEdge_FunctionTypeGetReturns in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_FunctionTypeGetReturns

Source
pub unsafe extern "C" fn WasmEdge_FunctionTypeGetReturns(
+    Cxt: *const WasmEdge_FunctionTypeContext,
+    List: *mut WasmEdge_ValType,
+    Len: u32,
+) -> u32
Expand description

Get the return types list from the WasmEdge_FunctionTypeContext.

+

If the List buffer length is smaller than the length of the return type +list, the overflowed values will be discarded.

+

\param Cxt the WasmEdge_FunctionTypeContext. +\param [out] List the WasmEdge_ValType buffer to fill the return value +types. +\param Len the value type buffer length.

+

\returns the actual return types list length.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeGetReturnsLength.html b/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeGetReturnsLength.html new file mode 100644 index 000000000..dd5bcb996 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_FunctionTypeGetReturnsLength.html @@ -0,0 +1,6 @@ +WasmEdge_FunctionTypeGetReturnsLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_FunctionTypeGetReturnsLength

Source
pub unsafe extern "C" fn WasmEdge_FunctionTypeGetReturnsLength(
+    Cxt: *const WasmEdge_FunctionTypeContext,
+) -> u32
Expand description

Get the return types list length from the WasmEdge_FunctionTypeContext.

+

\param Cxt the WasmEdge_FunctionTypeContext.

+

\returns the return types list length.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceCreate.html new file mode 100644 index 000000000..070df1855 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceCreate.html @@ -0,0 +1,14 @@ +WasmEdge_GlobalInstanceCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_GlobalInstanceCreate

Source
pub unsafe extern "C" fn WasmEdge_GlobalInstanceCreate(
+    GlobType: *const WasmEdge_GlobalTypeContext,
+    Value: WasmEdge_Value,
+) -> *mut WasmEdge_GlobalInstanceContext
Expand description

Creation of the WasmEdge_GlobalInstanceContext.

+

The caller owns the object and should call WasmEdge_GlobalInstanceDelete +to destroy it if the returned object is not added into a +WasmEdge_ModuleInstanceContext.

+

\param GlobType the global type context to initialize the global instance +context. +\param Value the initial value with its value type of the global instance. +This function will fail if the value type of GlobType and Value are not +the same.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceDelete.html new file mode 100644 index 000000000..8e8baf87c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceDelete.html @@ -0,0 +1,7 @@ +WasmEdge_GlobalInstanceDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_GlobalInstanceDelete

Source
pub unsafe extern "C" fn WasmEdge_GlobalInstanceDelete(
+    Cxt: *mut WasmEdge_GlobalInstanceContext,
+)
Expand description

Deletion of the WasmEdge_GlobalInstanceContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_GlobalInstanceContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceGetGlobalType.html b/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceGetGlobalType.html new file mode 100644 index 000000000..23feb2cd6 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceGetGlobalType.html @@ -0,0 +1,9 @@ +WasmEdge_GlobalInstanceGetGlobalType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_GlobalInstanceGetGlobalType

Source
pub unsafe extern "C" fn WasmEdge_GlobalInstanceGetGlobalType(
+    Cxt: *const WasmEdge_GlobalInstanceContext,
+) -> *const WasmEdge_GlobalTypeContext
Expand description

Get the global type context from a global instance.

+

The global type context links to the global type in the global instance +context and owned by the context. The caller should NOT call the +WasmEdge_GlobalTypeDelete.

+

\param Cxt the WasmEdge_GlobalInstanceContext.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceGetValue.html b/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceGetValue.html new file mode 100644 index 000000000..11d1f40e0 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceGetValue.html @@ -0,0 +1,6 @@ +WasmEdge_GlobalInstanceGetValue in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_GlobalInstanceGetValue

Source
pub unsafe extern "C" fn WasmEdge_GlobalInstanceGetValue(
+    Cxt: *const WasmEdge_GlobalInstanceContext,
+) -> WasmEdge_Value
Expand description

Get the value from a global instance.

+

\param Cxt the WasmEdge_GlobalInstanceContext.

+

\returns the current value of the global instance.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceSetValue.html b/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceSetValue.html new file mode 100644 index 000000000..05367c088 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_GlobalInstanceSetValue.html @@ -0,0 +1,11 @@ +WasmEdge_GlobalInstanceSetValue in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_GlobalInstanceSetValue

Source
pub unsafe extern "C" fn WasmEdge_GlobalInstanceSetValue(
+    Cxt: *mut WasmEdge_GlobalInstanceContext,
+    Value: WasmEdge_Value,
+) -> WasmEdge_Result
Expand description

Set the value into a global instance.

+

This function will return error if the global context is set as the Const +mutation or the value type not matched.

+

\param Cxt the WasmEdge_GlobalInstanceContext. +\param Value the value to set into the global context.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_GlobalTypeCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_GlobalTypeCreate.html new file mode 100644 index 000000000..ea8d8d82e --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_GlobalTypeCreate.html @@ -0,0 +1,10 @@ +WasmEdge_GlobalTypeCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_GlobalTypeCreate

Source
pub unsafe extern "C" fn WasmEdge_GlobalTypeCreate(
+    ValType: WasmEdge_ValType,
+    Mut: WasmEdge_Mutability,
+) -> *mut WasmEdge_GlobalTypeContext
Expand description

Creation of the WasmEdge_GlobalTypeContext.

+

The caller owns the object and should call WasmEdge_GlobalTypeDelete to +destroy it.

+

\param ValType the value type of the global type. +\param Mut the mutation of the global type.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_GlobalTypeDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_GlobalTypeDelete.html new file mode 100644 index 000000000..bb71981e0 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_GlobalTypeDelete.html @@ -0,0 +1,7 @@ +WasmEdge_GlobalTypeDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_GlobalTypeDelete

Source
pub unsafe extern "C" fn WasmEdge_GlobalTypeDelete(
+    Cxt: *mut WasmEdge_GlobalTypeContext,
+)
Expand description

Deletion of the WasmEdge_GlobalTypeContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_GlobalTypeContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_GlobalTypeGetMutability.html b/wasmedge_sys/ffi/fn.WasmEdge_GlobalTypeGetMutability.html new file mode 100644 index 000000000..116cc7c1f --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_GlobalTypeGetMutability.html @@ -0,0 +1,6 @@ +WasmEdge_GlobalTypeGetMutability in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_GlobalTypeGetMutability

Source
pub unsafe extern "C" fn WasmEdge_GlobalTypeGetMutability(
+    Cxt: *const WasmEdge_GlobalTypeContext,
+) -> WasmEdge_Mutability
Expand description

Get the mutability from a global type.

+

\param Cxt the WasmEdge_GlobalTypeContext.

+

\returns the mutability of the global type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_GlobalTypeGetValType.html b/wasmedge_sys/ffi/fn.WasmEdge_GlobalTypeGetValType.html new file mode 100644 index 000000000..2d4dfe8bc --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_GlobalTypeGetValType.html @@ -0,0 +1,6 @@ +WasmEdge_GlobalTypeGetValType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_GlobalTypeGetValType

Source
pub unsafe extern "C" fn WasmEdge_GlobalTypeGetValType(
+    Cxt: *const WasmEdge_GlobalTypeContext,
+) -> WasmEdge_ValType
Expand description

Get the value type from a global type.

+

\param Cxt the WasmEdge_GlobalTypeContext.

+

\returns the value type of the global type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetExternalName.html b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetExternalName.html new file mode 100644 index 000000000..3453f93bb --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetExternalName.html @@ -0,0 +1,8 @@ +WasmEdge_ImportTypeGetExternalName in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ImportTypeGetExternalName

Source
pub unsafe extern "C" fn WasmEdge_ImportTypeGetExternalName(
+    Cxt: *const WasmEdge_ImportTypeContext,
+) -> WasmEdge_String
Expand description

Get the external name from an import type.

+

The returned string object is linked to the external name of the import +type, and the caller should NOT call the WasmEdge_StringDelete.

+

\param Cxt the WasmEdge_ImportTypeContext.

+

\returns string object. Length will be 0 and Buf will be NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetExternalType.html b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetExternalType.html new file mode 100644 index 000000000..0a63b5da3 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetExternalType.html @@ -0,0 +1,6 @@ +WasmEdge_ImportTypeGetExternalType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ImportTypeGetExternalType

Source
pub unsafe extern "C" fn WasmEdge_ImportTypeGetExternalType(
+    Cxt: *const WasmEdge_ImportTypeContext,
+) -> WasmEdge_ExternalType
Expand description

Get the external type from an import type.

+

\param Cxt the WasmEdge_ImportTypeContext.

+

\returns the external type of the import type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetFunctionType.html b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetFunctionType.html new file mode 100644 index 000000000..14e9135f6 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetFunctionType.html @@ -0,0 +1,14 @@ +WasmEdge_ImportTypeGetFunctionType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ImportTypeGetFunctionType

Source
pub unsafe extern "C" fn WasmEdge_ImportTypeGetFunctionType(
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    Cxt: *const WasmEdge_ImportTypeContext,
+) -> *const WasmEdge_FunctionTypeContext
Expand description

Get the external value (which is function type) from an import type.

+

The import type context should be the one queried from the AST module +context, or this function will cause unexpected error. +The function type context links to the function type in the import type +context and the AST module context. The caller should NOT call the +WasmEdge_FunctionTypeDelete.

+

\param ASTCxt the WasmEdge_ASTModuleContext. +\param Cxt the WasmEdge_ImportTypeContext which queried from the ASTCxt.

+

\returns the function type. NULL if failed or the external type of the +import type is not WasmEdge_ExternalType_Function.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetGlobalType.html b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetGlobalType.html new file mode 100644 index 000000000..b36ed3ada --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetGlobalType.html @@ -0,0 +1,14 @@ +WasmEdge_ImportTypeGetGlobalType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ImportTypeGetGlobalType

Source
pub unsafe extern "C" fn WasmEdge_ImportTypeGetGlobalType(
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    Cxt: *const WasmEdge_ImportTypeContext,
+) -> *const WasmEdge_GlobalTypeContext
Expand description

Get the external value (which is global type) from an import type.

+

The import type context should be the one queried from the AST module +context, or this function will cause unexpected error. +The global type context links to the global type in the import type context +and the AST module context. The caller should NOT call the +WasmEdge_GlobalTypeDelete.

+

\param ASTCxt the WasmEdge_ASTModuleContext. +\param Cxt the WasmEdge_ImportTypeContext which queried from the ASTCxt.

+

\returns the global type. NULL if failed or the external type of the import +type is not WasmEdge_ExternalType_Global.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetMemoryType.html b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetMemoryType.html new file mode 100644 index 000000000..9220eb6c4 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetMemoryType.html @@ -0,0 +1,14 @@ +WasmEdge_ImportTypeGetMemoryType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ImportTypeGetMemoryType

Source
pub unsafe extern "C" fn WasmEdge_ImportTypeGetMemoryType(
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    Cxt: *const WasmEdge_ImportTypeContext,
+) -> *const WasmEdge_MemoryTypeContext
Expand description

Get the external value (which is memory type) from an import type.

+

The import type context should be the one queried from the AST module +context, or this function will cause unexpected error. +The memory type context links to the memory type in the import type context +and the AST module context. The caller should NOT call the +WasmEdge_MemoryTypeDelete.

+

\param ASTCxt the WasmEdge_ASTModuleContext. +\param Cxt the WasmEdge_ImportTypeContext which queried from the ASTCxt.

+

\returns the memory type. NULL if failed or the external type of the import +type is not WasmEdge_ExternalType_Memory.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetModuleName.html b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetModuleName.html new file mode 100644 index 000000000..76c6b4dde --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetModuleName.html @@ -0,0 +1,8 @@ +WasmEdge_ImportTypeGetModuleName in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ImportTypeGetModuleName

Source
pub unsafe extern "C" fn WasmEdge_ImportTypeGetModuleName(
+    Cxt: *const WasmEdge_ImportTypeContext,
+) -> WasmEdge_String
Expand description

Get the module name from an import type.

+

The returned string object is linked to the module name of the import type, +and the caller should NOT call the WasmEdge_StringDelete.

+

\param Cxt the WasmEdge_ImportTypeContext.

+

\returns string object. Length will be 0 and Buf will be NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetTableType.html b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetTableType.html new file mode 100644 index 000000000..5e87d3f36 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetTableType.html @@ -0,0 +1,14 @@ +WasmEdge_ImportTypeGetTableType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ImportTypeGetTableType

Source
pub unsafe extern "C" fn WasmEdge_ImportTypeGetTableType(
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    Cxt: *const WasmEdge_ImportTypeContext,
+) -> *const WasmEdge_TableTypeContext
Expand description

Get the external value (which is table type) from an import type.

+

The import type context should be the one queried from the AST module +context, or this function will cause unexpected error. +The table type context links to the table type in the import type context +and the AST module context. The caller should NOT call the +WasmEdge_TableTypeDelete.

+

\param ASTCxt the WasmEdge_ASTModuleContext. +\param Cxt the WasmEdge_ImportTypeContext which queried from the ASTCxt.

+

\returns the table type. NULL if failed or the external type of the import +type is not WasmEdge_ExternalType_Table.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetTagType.html b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetTagType.html new file mode 100644 index 000000000..76b6d7e44 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ImportTypeGetTagType.html @@ -0,0 +1,13 @@ +WasmEdge_ImportTypeGetTagType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ImportTypeGetTagType

Source
pub unsafe extern "C" fn WasmEdge_ImportTypeGetTagType(
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    Cxt: *const WasmEdge_ImportTypeContext,
+) -> *const WasmEdge_TagTypeContext
Expand description

Get the external value (which is tag type) from an import type.

+

The import type context should be the one queried from the AST module +context, or this function will cause unexpected error. +The tag type context links to the tag type in the import type context +and the AST module context.

+

\param ASTCxt the WasmEdge_ASTModuleContext. +\param Cxt the WasmEdge_ImportTypeContext which queried from the ASTCxt.

+

\returns the tag type. NULL if failed or the external type of the import +type is not WasmEdge_ExternalType_TagType.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_LimitIsEqual.html b/wasmedge_sys/ffi/fn.WasmEdge_LimitIsEqual.html new file mode 100644 index 000000000..187093fc0 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_LimitIsEqual.html @@ -0,0 +1,9 @@ +WasmEdge_LimitIsEqual in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_LimitIsEqual

Source
pub unsafe extern "C" fn WasmEdge_LimitIsEqual(
+    Lim1: WasmEdge_Limit,
+    Lim2: WasmEdge_Limit,
+) -> bool
Expand description

Compare the two WasmEdge_Limit objects.

+

\param Lim1 the first WasmEdge_Limit object to compare. +\param Lim2 the second WasmEdge_Limit object to compare.

+

\returns true if the content of two WasmEdge_Limit objects are the same, +false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_LoaderCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_LoaderCreate.html new file mode 100644 index 000000000..fff611514 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_LoaderCreate.html @@ -0,0 +1,9 @@ +WasmEdge_LoaderCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_LoaderCreate

Source
pub unsafe extern "C" fn WasmEdge_LoaderCreate(
+    ConfCxt: *const WasmEdge_ConfigureContext,
+) -> *mut WasmEdge_LoaderContext
Expand description

Creation of the WasmEdge_LoaderContext.

+

The caller owns the object and should call WasmEdge_LoaderDelete to +destroy it.

+

\param ConfCxt the WasmEdge_ConfigureContext as the configuration of Loader. +NULL for the default configuration.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_LoaderDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_LoaderDelete.html new file mode 100644 index 000000000..8296bdcfc --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_LoaderDelete.html @@ -0,0 +1,7 @@ +WasmEdge_LoaderDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_LoaderDelete

Source
pub unsafe extern "C" fn WasmEdge_LoaderDelete(
+    Cxt: *mut WasmEdge_LoaderContext,
+)
Expand description

Deletion of the WasmEdge_LoaderContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_LoaderContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_LoaderParseFromBuffer.html b/wasmedge_sys/ffi/fn.WasmEdge_LoaderParseFromBuffer.html new file mode 100644 index 000000000..79f20a514 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_LoaderParseFromBuffer.html @@ -0,0 +1,19 @@ +WasmEdge_LoaderParseFromBuffer in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_LoaderParseFromBuffer

Source
pub unsafe extern "C" fn WasmEdge_LoaderParseFromBuffer(
+    Cxt: *mut WasmEdge_LoaderContext,
+    Module: *mut *mut WasmEdge_ASTModuleContext,
+    Buf: *const u8,
+    BufLen: u32,
+) -> WasmEdge_Result
Expand description

Load and parse the WASM module from a buffer into WasmEdge_ASTModuleContext.

+

CAUTION: This function will be deprecated and replaced by +WasmEdge_LoaderParseFromBytes() API in the future.

+

Load and parse the WASM module from a buffer, and return a +WasmEdge_ASTModuleContext as the result. The caller owns the +WasmEdge_ASTModuleContext object and should call WasmEdge_ASTModuleDelete +to destroy it.

+

\param Cxt the WasmEdge_LoaderContext. +\param [out] Module the output WasmEdge_ASTModuleContext if succeeded. +\param Buf the buffer of WASM binary. +\param BufLen the length of the buffer.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_LoaderParseFromBytes.html b/wasmedge_sys/ffi/fn.WasmEdge_LoaderParseFromBytes.html new file mode 100644 index 000000000..455534ee8 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_LoaderParseFromBytes.html @@ -0,0 +1,16 @@ +WasmEdge_LoaderParseFromBytes in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_LoaderParseFromBytes

Source
pub unsafe extern "C" fn WasmEdge_LoaderParseFromBytes(
+    Cxt: *mut WasmEdge_LoaderContext,
+    Module: *mut *mut WasmEdge_ASTModuleContext,
+    Bytes: WasmEdge_Bytes,
+) -> WasmEdge_Result
Expand description

Load and parse the WASM module from a WasmEdge_Bytes into +WasmEdge_ASTModuleContext.

+

Load and parse the WASM module from a buffer, and return a +WasmEdge_ASTModuleContext as the result. The caller owns the +WasmEdge_ASTModuleContext object and should call WasmEdge_ASTModuleDelete +to destroy it.

+

\param Cxt the WasmEdge_LoaderContext. +\param [out] Module the output WasmEdge_ASTModuleContext if succeeded. +\param Bytes the WasmEdge_Bytes of WASM binary.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_LoaderParseFromFile.html b/wasmedge_sys/ffi/fn.WasmEdge_LoaderParseFromFile.html new file mode 100644 index 000000000..e6c5a8a20 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_LoaderParseFromFile.html @@ -0,0 +1,16 @@ +WasmEdge_LoaderParseFromFile in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_LoaderParseFromFile

Source
pub unsafe extern "C" fn WasmEdge_LoaderParseFromFile(
+    Cxt: *mut WasmEdge_LoaderContext,
+    Module: *mut *mut WasmEdge_ASTModuleContext,
+    Path: *const c_char,
+) -> WasmEdge_Result
Expand description

Load and parse the WASM module from a WASM file into a +WasmEdge_ASTModuleContext.

+

Load and parse the WASM module from the file path, and return a +WasmEdge_ASTModuleContext as the result. The caller owns the +WasmEdge_ASTModuleContext object and should call +WasmEdge_ASTModuleDelete to destroy it.

+

\param Cxt the WasmEdge_LoaderContext. +\param [out] Module the output WasmEdge_ASTModuleContext if succeeded. +\param Path the NULL-terminated C string of the WASM file path.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_LoaderSerializeASTModule.html b/wasmedge_sys/ffi/fn.WasmEdge_LoaderSerializeASTModule.html new file mode 100644 index 000000000..3a38e438a --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_LoaderSerializeASTModule.html @@ -0,0 +1,16 @@ +WasmEdge_LoaderSerializeASTModule in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_LoaderSerializeASTModule

Source
pub unsafe extern "C" fn WasmEdge_LoaderSerializeASTModule(
+    Cxt: *mut WasmEdge_LoaderContext,
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    Buf: *mut WasmEdge_Bytes,
+) -> WasmEdge_Result
Expand description

Serialize the WasmEdge_ASTModuleContext into WASM binary.

+

Serialize the loaded WasmEdge_ASTModuleContext into the WASM binary format. +If the serialization succeeded, this API will allocate a new +WasmEdge_Bytes object and fill into the Buf. The caller owns the +WasmEdge_Bytes object and should call WasmEdge_BytesDelete to destroy +it.

+

\param Cxt the WasmEdge_LoaderContext. +\param ASTCxt the WasmEdge_ASTModuleContext to serialize. +\param [out] Buf the WasmEdge_Bytes to fill the serialized WASM binary.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_LogOff.html b/wasmedge_sys/ffi/fn.WasmEdge_LogOff.html new file mode 100644 index 000000000..e70e8da11 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_LogOff.html @@ -0,0 +1,2 @@ +WasmEdge_LogOff in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_LogOff

Source
pub unsafe extern "C" fn WasmEdge_LogOff()
Expand description

Set the logging system off.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_LogSetDebugLevel.html b/wasmedge_sys/ffi/fn.WasmEdge_LogSetDebugLevel.html new file mode 100644 index 000000000..db8f4439b --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_LogSetDebugLevel.html @@ -0,0 +1,2 @@ +WasmEdge_LogSetDebugLevel in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_LogSetDebugLevel

Source
pub unsafe extern "C" fn WasmEdge_LogSetDebugLevel()
Expand description

Set the logging system to filter to debug level.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_LogSetErrorLevel.html b/wasmedge_sys/ffi/fn.WasmEdge_LogSetErrorLevel.html new file mode 100644 index 000000000..0320ecf65 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_LogSetErrorLevel.html @@ -0,0 +1,2 @@ +WasmEdge_LogSetErrorLevel in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_LogSetErrorLevel

Source
pub unsafe extern "C" fn WasmEdge_LogSetErrorLevel()
Expand description

Set the logging system to filter to error level.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceCreate.html new file mode 100644 index 000000000..8c7c2992b --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceCreate.html @@ -0,0 +1,10 @@ +WasmEdge_MemoryInstanceCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_MemoryInstanceCreate

Source
pub unsafe extern "C" fn WasmEdge_MemoryInstanceCreate(
+    MemType: *const WasmEdge_MemoryTypeContext,
+) -> *mut WasmEdge_MemoryInstanceContext
Expand description

Creation of the WasmEdge_MemoryInstanceContext.

+

The caller owns the object and should call WasmEdge_MemoryInstanceDelete +to destroy it if the returned object is not added into a +WasmEdge_ModuleInstanceContext.

+

\param MemType the memory type context to initialize the memory instance +context.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceDelete.html new file mode 100644 index 000000000..c364a4fa1 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceDelete.html @@ -0,0 +1,7 @@ +WasmEdge_MemoryInstanceDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_MemoryInstanceDelete

Source
pub unsafe extern "C" fn WasmEdge_MemoryInstanceDelete(
+    Cxt: *mut WasmEdge_MemoryInstanceContext,
+)
Expand description

Deletion of the WasmEdge_MemoryInstanceContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_MemoryInstanceContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetData.html b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetData.html new file mode 100644 index 000000000..60c5f00c2 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetData.html @@ -0,0 +1,14 @@ +WasmEdge_MemoryInstanceGetData in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_MemoryInstanceGetData

Source
pub unsafe extern "C" fn WasmEdge_MemoryInstanceGetData(
+    Cxt: *const WasmEdge_MemoryInstanceContext,
+    Data: *mut u8,
+    Offset: u32,
+    Length: u32,
+) -> WasmEdge_Result
Expand description

Copy the data to the output buffer from a memory instance.

+

\param Cxt the WasmEdge_MemoryInstanceContext. +\param [out] Data the result data buffer of copying destination. +\param Offset the data start offset in the memory instance. +\param Length the requested data length. If the Offset + Length is larger +than the data size in the memory instance, this function will failed.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetMemoryType.html b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetMemoryType.html new file mode 100644 index 000000000..f851d8f3b --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetMemoryType.html @@ -0,0 +1,9 @@ +WasmEdge_MemoryInstanceGetMemoryType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_MemoryInstanceGetMemoryType

Source
pub unsafe extern "C" fn WasmEdge_MemoryInstanceGetMemoryType(
+    Cxt: *const WasmEdge_MemoryInstanceContext,
+) -> *const WasmEdge_MemoryTypeContext
Expand description

Get the memory type context from a memory instance.

+

The memory type context links to the memory type in the memory instance +context and owned by the context. The caller should NOT call the +WasmEdge_MemoryTypeDelete.

+

\param Cxt the WasmEdge_MemoryInstanceContext.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetPageSize.html b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetPageSize.html new file mode 100644 index 000000000..d5b7e7c4e --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetPageSize.html @@ -0,0 +1,6 @@ +WasmEdge_MemoryInstanceGetPageSize in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_MemoryInstanceGetPageSize

Source
pub unsafe extern "C" fn WasmEdge_MemoryInstanceGetPageSize(
+    Cxt: *const WasmEdge_MemoryInstanceContext,
+) -> u32
Expand description

Get the current page size (64 KiB of each page) of a memory instance.

+

\param Cxt the WasmEdge_MemoryInstanceContext.

+

\returns the page size of the memory instance.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetPointer.html b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetPointer.html new file mode 100644 index 000000000..a638b1aaa --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetPointer.html @@ -0,0 +1,11 @@ +WasmEdge_MemoryInstanceGetPointer in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_MemoryInstanceGetPointer

Source
pub unsafe extern "C" fn WasmEdge_MemoryInstanceGetPointer(
+    Cxt: *mut WasmEdge_MemoryInstanceContext,
+    Offset: u32,
+    Length: u32,
+) -> *mut u8
Expand description

Get the data pointer in a memory instance.

+

\param Cxt the WasmEdge_MemoryInstanceContext. +\param Offset the data start offset in the memory instance. +\param Length the requested data length. If the Offset + Length is larger +than the data size in the memory instance, this function will return NULL.

+

\returns the pointer to data with the start offset. NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetPointerConst.html b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetPointerConst.html new file mode 100644 index 000000000..88aeafbde --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGetPointerConst.html @@ -0,0 +1,11 @@ +WasmEdge_MemoryInstanceGetPointerConst in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_MemoryInstanceGetPointerConst

Source
pub unsafe extern "C" fn WasmEdge_MemoryInstanceGetPointerConst(
+    Cxt: *const WasmEdge_MemoryInstanceContext,
+    Offset: u32,
+    Length: u32,
+) -> *const u8
Expand description

Get the const data pointer in a const memory instance.

+

\param Cxt the WasmEdge_MemoryInstanceContext. +\param Offset the data start offset in the memory instance. +\param Length the requested data length. If the Offset + Length is larger +than the data size in the memory instance, this function will return NULL.

+

\returns the pointer to data with the start offset. NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGrowPage.html b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGrowPage.html new file mode 100644 index 000000000..1aeed37b0 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceGrowPage.html @@ -0,0 +1,9 @@ +WasmEdge_MemoryInstanceGrowPage in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_MemoryInstanceGrowPage

Source
pub unsafe extern "C" fn WasmEdge_MemoryInstanceGrowPage(
+    Cxt: *mut WasmEdge_MemoryInstanceContext,
+    Page: u32,
+) -> WasmEdge_Result
Expand description

Grow a memory instance with a page size.

+

\param Cxt the WasmEdge_MemoryInstanceContext. +\param Page the page count to grow in the memory instance.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceSetData.html b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceSetData.html new file mode 100644 index 000000000..7201b1f93 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_MemoryInstanceSetData.html @@ -0,0 +1,14 @@ +WasmEdge_MemoryInstanceSetData in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_MemoryInstanceSetData

Source
pub unsafe extern "C" fn WasmEdge_MemoryInstanceSetData(
+    Cxt: *mut WasmEdge_MemoryInstanceContext,
+    Data: *const u8,
+    Offset: u32,
+    Length: u32,
+) -> WasmEdge_Result
Expand description

Copy the data into a memory instance from the input buffer.

+

\param Cxt the WasmEdge_MemoryInstanceContext. +\param Data the data buffer to copy. +\param Offset the data start offset in the memory instance. +\param Length the data buffer length. If the Offset + Length is larger +than the data size in the memory instance, this function will failed.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_MemoryTypeCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_MemoryTypeCreate.html new file mode 100644 index 000000000..861b9fd10 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_MemoryTypeCreate.html @@ -0,0 +1,8 @@ +WasmEdge_MemoryTypeCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_MemoryTypeCreate

Source
pub unsafe extern "C" fn WasmEdge_MemoryTypeCreate(
+    Limit: WasmEdge_Limit,
+) -> *mut WasmEdge_MemoryTypeContext
Expand description

Creation of the WasmEdge_MemoryTypeContext.

+

The caller owns the object and should call WasmEdge_MemoryTypeDelete to +destroy it.

+

\param Limit the limit struct of the memory type.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_MemoryTypeDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_MemoryTypeDelete.html new file mode 100644 index 000000000..0d3e4fc93 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_MemoryTypeDelete.html @@ -0,0 +1,7 @@ +WasmEdge_MemoryTypeDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_MemoryTypeDelete

Source
pub unsafe extern "C" fn WasmEdge_MemoryTypeDelete(
+    Cxt: *mut WasmEdge_MemoryTypeContext,
+)
Expand description

Deletion of the WasmEdge_MemoryTypeContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_MemoryTypeContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_MemoryTypeGetLimit.html b/wasmedge_sys/ffi/fn.WasmEdge_MemoryTypeGetLimit.html new file mode 100644 index 000000000..3e4862280 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_MemoryTypeGetLimit.html @@ -0,0 +1,6 @@ +WasmEdge_MemoryTypeGetLimit in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_MemoryTypeGetLimit

Source
pub unsafe extern "C" fn WasmEdge_MemoryTypeGetLimit(
+    Cxt: *const WasmEdge_MemoryTypeContext,
+) -> WasmEdge_Limit
Expand description

Get the limit from a memory type.

+

\param Cxt the WasmEdge_MemoryTypeContext.

+

\returns the limit struct of the memory type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceAddFunction.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceAddFunction.html new file mode 100644 index 000000000..f172aeec6 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceAddFunction.html @@ -0,0 +1,13 @@ +WasmEdge_ModuleInstanceAddFunction in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceAddFunction

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceAddFunction(
+    Cxt: *mut WasmEdge_ModuleInstanceContext,
+    Name: WasmEdge_String,
+    FuncCxt: *mut WasmEdge_FunctionInstanceContext,
+)
Expand description

Add a function instance context into a WasmEdge_ModuleInstanceContext.

+

Export and move the ownership of the function instance into the module +instance. The caller should NOT access or destroy the function instance +context after calling this function.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext to add the function instance. +\param Name the export function name WasmEdge_String. +\param FuncCxt the WasmEdge_FunctionInstanceContext to add.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceAddGlobal.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceAddGlobal.html new file mode 100644 index 000000000..0e492de11 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceAddGlobal.html @@ -0,0 +1,13 @@ +WasmEdge_ModuleInstanceAddGlobal in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceAddGlobal

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceAddGlobal(
+    Cxt: *mut WasmEdge_ModuleInstanceContext,
+    Name: WasmEdge_String,
+    GlobalCxt: *mut WasmEdge_GlobalInstanceContext,
+)
Expand description

Add a global instance context into a WasmEdge_ModuleInstanceContext.

+

Export and move the ownership of the global instance into the module +instance. The caller should NOT access or destroy the global instance +context after calling this function.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext to add the global instance. +\param Name the export global name WasmEdge_String. +\param GlobalCxt the WasmEdge_GlobalInstanceContext to add.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceAddMemory.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceAddMemory.html new file mode 100644 index 000000000..4be586514 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceAddMemory.html @@ -0,0 +1,13 @@ +WasmEdge_ModuleInstanceAddMemory in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceAddMemory

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceAddMemory(
+    Cxt: *mut WasmEdge_ModuleInstanceContext,
+    Name: WasmEdge_String,
+    MemoryCxt: *mut WasmEdge_MemoryInstanceContext,
+)
Expand description

Add a memory instance context into a WasmEdge_ModuleInstanceContext.

+

Export and move the ownership of the memory instance into the module +instance. The caller should NOT access or destroy the memory instance +context after calling this function.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext to add the memory instance. +\param Name the export memory name WasmEdge_String. +\param MemoryCxt the WasmEdge_MemoryInstanceContext to add.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceAddTable.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceAddTable.html new file mode 100644 index 000000000..3568786ff --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceAddTable.html @@ -0,0 +1,13 @@ +WasmEdge_ModuleInstanceAddTable in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceAddTable

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceAddTable(
+    Cxt: *mut WasmEdge_ModuleInstanceContext,
+    Name: WasmEdge_String,
+    TableCxt: *mut WasmEdge_TableInstanceContext,
+)
Expand description

Add a table instance context into a WasmEdge_ModuleInstanceContext.

+

Export and move the ownership of the table instance into the module +instance. The caller should NOT access or destroy the table instance +context after calling this function.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext to add the table instance. +\param Name the export table name WasmEdge_String. +\param TableCxt the WasmEdge_TableInstanceContext to add.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceCreate.html new file mode 100644 index 000000000..1172e5191 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceCreate.html @@ -0,0 +1,12 @@ +WasmEdge_ModuleInstanceCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceCreate

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceCreate(
+    ModuleName: WasmEdge_String,
+) -> *mut WasmEdge_ModuleInstanceContext
Expand description

Creation of the WasmEdge_ModuleInstanceContext.

+

Create a module instance context with exported module name for host +instances. Developer can use this API to create a module instance for +collecting host functions, tables, memories, tags, and globals. +The caller owns the object and should call WasmEdge_ModuleInstanceDelete +to destroy it.

+

\param ModuleName the module name WasmEdge_String of this host module to +import.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceCreateWASI.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceCreateWASI.html new file mode 100644 index 000000000..d2e63a209 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceCreateWASI.html @@ -0,0 +1,23 @@ +WasmEdge_ModuleInstanceCreateWASI in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceCreateWASI

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceCreateWASI(
+    Args: *const *const c_char,
+    ArgLen: u32,
+    Envs: *const *const c_char,
+    EnvLen: u32,
+    Preopens: *const *const c_char,
+    PreopenLen: u32,
+) -> *mut WasmEdge_ModuleInstanceContext
Expand description

Creation of the WasmEdge_ModuleInstanceContext for the WASI specification.

+

This function will create a WASI host module that contains the WASI host +functions and initialize it. The caller owns the object and should call +WasmEdge_ModuleInstanceDelete to destroy it.

+

\param Args the command line arguments. The first argument suggests being +the program name. NULL if the length is 0. +\param ArgLen the length of the command line arguments. +\param Envs the environment variables in the format ENV=VALUE. NULL if the +length is 0. +\param EnvLen the length of the environment variables. +\param Preopens the directory paths to preopen. String format in +GUEST_PATH:HOST_PATH means the path mapping, or the same path will be +mapped. NULL if the length is 0. +\param PreopenLen the length of the directory paths to preopen.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceCreateWithData.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceCreateWithData.html new file mode 100644 index 000000000..b40cbf0c0 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceCreateWithData.html @@ -0,0 +1,19 @@ +WasmEdge_ModuleInstanceCreateWithData in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceCreateWithData

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceCreateWithData(
+    ModuleName: WasmEdge_String,
+    HostData: *mut c_void,
+    Finalizer: Option<unsafe extern "C" fn(arg1: *mut c_void)>,
+) -> *mut WasmEdge_ModuleInstanceContext
Expand description

Creation of the WasmEdge_ModuleInstanceContext with host data.

+

Create a module instance context with exported module name, host data, and +host data finalizer for host instances. Developer can use this API to create +a module instance for collecting host functions, tables, memories, and +globals. When this created module instance being destroyed, the host data +finalizer will be invoked. The caller owns the object and should call +WasmEdge_ModuleInstanceDelete to destroy it.

+

\param ModuleName the module name WasmEdge_String of this host module to +import. +\param HostData the host data to set into the module instance. When calling +the finalizer, this pointer will become the argument of the finalizer +function. +\param Finalizer the function to finalize the host data.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceDelete.html new file mode 100644 index 000000000..3db3a1b64 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceDelete.html @@ -0,0 +1,9 @@ +WasmEdge_ModuleInstanceDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceDelete

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceDelete(
+    Cxt: *mut WasmEdge_ModuleInstanceContext,
+)
Expand description

Deletion of the WasmEdge_ModuleInstanceContext.

+

After calling this function, the context will be destroyed and should +NOT be used. +If the module instance has been registered into one or more store contexts, +it will be automatically unregistered.

+

\param Cxt the WasmEdge_ModuleInstanceContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindFunction.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindFunction.html new file mode 100644 index 000000000..003af047b --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindFunction.html @@ -0,0 +1,12 @@ +WasmEdge_ModuleInstanceFindFunction in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceFindFunction

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceFindFunction(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+    Name: WasmEdge_String,
+) -> *mut WasmEdge_FunctionInstanceContext
Expand description

Get the exported function instance context of a module instance.

+

The result function instance context links to the function instance in the +module instance context and owned by the module instance context, and the +caller should NOT call the WasmEdge_FunctionInstanceDelete.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext. +\param Name the function name WasmEdge_String.

+

\returns pointer to the function instance context. NULL if not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindGlobal.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindGlobal.html new file mode 100644 index 000000000..b09ca8a58 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindGlobal.html @@ -0,0 +1,12 @@ +WasmEdge_ModuleInstanceFindGlobal in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceFindGlobal

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceFindGlobal(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+    Name: WasmEdge_String,
+) -> *mut WasmEdge_GlobalInstanceContext
Expand description

Get the exported global instance context of a module instance.

+

The result global instance context links to the global instance in the +module instance context and owned by the module instance context, and the +caller should NOT call the WasmEdge_GlobalInstanceDelete.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext. +\param Name the global name WasmEdge_String.

+

\returns pointer to the global instance context. NULL if not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindMemory.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindMemory.html new file mode 100644 index 000000000..f4f17c668 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindMemory.html @@ -0,0 +1,12 @@ +WasmEdge_ModuleInstanceFindMemory in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceFindMemory

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceFindMemory(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+    Name: WasmEdge_String,
+) -> *mut WasmEdge_MemoryInstanceContext
Expand description

Get the exported memory instance context of a module instance.

+

The result memory instance context links to the memory instance in the +module instance context and owned by the module instance context, and the +caller should NOT call the WasmEdge_MemoryInstanceDelete.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext. +\param Name the memory name WasmEdge_String.

+

\returns pointer to the memory instance context. NULL if not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindTable.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindTable.html new file mode 100644 index 000000000..d6cdf560c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindTable.html @@ -0,0 +1,12 @@ +WasmEdge_ModuleInstanceFindTable in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceFindTable

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceFindTable(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+    Name: WasmEdge_String,
+) -> *mut WasmEdge_TableInstanceContext
Expand description

Get the exported table instance context of a module instance.

+

The result table instance context links to the table instance in the module +instance context and owned by the module instance context, and the caller +should NOT call the WasmEdge_TableInstanceDelete.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext. +\param Name the table name WasmEdge_String.

+

\returns pointer to the table instance context. NULL if not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindTag.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindTag.html new file mode 100644 index 000000000..686f8aaa3 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceFindTag.html @@ -0,0 +1,11 @@ +WasmEdge_ModuleInstanceFindTag in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceFindTag

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceFindTag(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+    Name: WasmEdge_String,
+) -> *mut WasmEdge_TagInstanceContext
Expand description

Get the exported tag instance context of a module instance.

+

The result tag instance context links to the tag instance in the +module instance context and owned by the module instance context.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext. +\param Name the tag name WasmEdge_String.

+

\returns pointer to the tag instance context. NULL if not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceGetHostData.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceGetHostData.html new file mode 100644 index 000000000..d4f6f4a99 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceGetHostData.html @@ -0,0 +1,9 @@ +WasmEdge_ModuleInstanceGetHostData in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceGetHostData

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceGetHostData(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+) -> *mut c_void
Expand description

Get the host data set into the module instance when creating.

+

The returned data is owned by the module instance, and will be passed into +the finalizer when deleting this module instance.

+

\param Cxt the WasmEdge_ModuleInstanceContext.

+

\returns host data. NULL if the module instance context is NULL or no host +data set into the module instance.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceGetModuleName.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceGetModuleName.html new file mode 100644 index 000000000..881c35b10 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceGetModuleName.html @@ -0,0 +1,8 @@ +WasmEdge_ModuleInstanceGetModuleName in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceGetModuleName

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceGetModuleName(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+) -> WasmEdge_String
Expand description

Get the export module name of a module instance.

+

The returned string object is linked to the module name of the module +instance, and the caller should NOT call the WasmEdge_StringDelete.

+

\param Cxt the WasmEdge_ModuleInstanceContext.

+

\returns string object. Length will be 0 and Buf will be NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceInitWASI.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceInitWASI.html new file mode 100644 index 000000000..47096b7f0 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceInitWASI.html @@ -0,0 +1,22 @@ +WasmEdge_ModuleInstanceInitWASI in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceInitWASI

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceInitWASI(
+    Cxt: *mut WasmEdge_ModuleInstanceContext,
+    Args: *const *const c_char,
+    ArgLen: u32,
+    Envs: *const *const c_char,
+    EnvLen: u32,
+    Preopens: *const *const c_char,
+    PreopenLen: u32,
+)
Expand description

Initialize the WasmEdge_ModuleInstanceContext for the WASI specification.

+

This function will initialize the WASI host module with the parameters.

+

\param Cxt the WasmEdge_ModuleInstanceContext of WASI import object. +\param Args the command line arguments. The first argument suggests being +the program name. NULL if the length is 0. +\param ArgLen the length of the command line arguments. +\param Envs the environment variables in the format ENV=VALUE. NULL if the +length is 0. +\param EnvLen the length of the environment variables. +\param Preopens the directory paths to preopen. String format in +GUEST_PATH:HOST_PATH means the path mapping, or the same path will be +mapped. NULL if the length is 0. +\param PreopenLen the length of the directory paths to preopen.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceInitWasmEdgeProcess.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceInitWasmEdgeProcess.html new file mode 100644 index 000000000..48a85223f --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceInitWasmEdgeProcess.html @@ -0,0 +1,15 @@ +WasmEdge_ModuleInstanceInitWasmEdgeProcess in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceInitWasmEdgeProcess

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceInitWasmEdgeProcess(
+    AllowedCmds: *const *const c_char,
+    CmdsLen: u32,
+    AllowAll: bool,
+)
Expand description

Initialize the WasmEdge_ModuleInstanceContext for the wasmedge_process +specification.

+

This function will initialize the wasmedge_process host module with the +parameters.

+

\param AllowedCmds the allowed commands white list. NULL if the +length is 0. +\param CmdsLen the length of the allowed commands white list. +\param AllowAll the boolean value to allow all commands. false is +suggested. If this value is true, the allowed commands white list will not +be recorded and all commands can be executed by wasmedge_process.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListFunction.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListFunction.html new file mode 100644 index 000000000..4228870b6 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListFunction.html @@ -0,0 +1,16 @@ +WasmEdge_ModuleInstanceListFunction in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceListFunction

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceListFunction(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+    Names: *mut WasmEdge_String,
+    Len: u32,
+) -> u32
Expand description

List the exported function names of a module instance.

+

The returned function names filled into the Names array are linked to the +exported names of functions of the module instance context, and the caller +should NOT call the WasmEdge_StringDelete. +If the Names buffer length is smaller than the result of the exported +function list size, the overflowed return values will be discarded.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext. +\param [out] Names the output WasmEdge_String buffer of the function names. +\param Len the buffer length.

+

\returns actual exported function list size.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListFunctionLength.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListFunctionLength.html new file mode 100644 index 000000000..d40755a61 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListFunctionLength.html @@ -0,0 +1,7 @@ +WasmEdge_ModuleInstanceListFunctionLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceListFunctionLength

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceListFunctionLength(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+) -> u32
Expand description

Get the length of exported function list of a module instance.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext.

+

\returns length of the exported function list.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListGlobal.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListGlobal.html new file mode 100644 index 000000000..d904739f9 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListGlobal.html @@ -0,0 +1,16 @@ +WasmEdge_ModuleInstanceListGlobal in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceListGlobal

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceListGlobal(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+    Names: *mut WasmEdge_String,
+    Len: u32,
+) -> u32
Expand description

List the exported global names of a module instance.

+

The returned global names filled into the Names array are linked to the +exported names of globals of the module instance context, and the caller +should NOT call the WasmEdge_StringDelete. +If the Names buffer length is smaller than the result of the exported +global list size, the overflowed return values will be discarded.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext. +\param [out] Names the output WasmEdge_String buffer of the global names. +\param Len the buffer length.

+

\returns actual exported global list size.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListGlobalLength.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListGlobalLength.html new file mode 100644 index 000000000..71e06e499 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListGlobalLength.html @@ -0,0 +1,7 @@ +WasmEdge_ModuleInstanceListGlobalLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceListGlobalLength

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceListGlobalLength(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+) -> u32
Expand description

Get the length of exported global list of a module instance.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext.

+

\returns length of the exported global list.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListMemory.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListMemory.html new file mode 100644 index 000000000..28d09d9eb --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListMemory.html @@ -0,0 +1,16 @@ +WasmEdge_ModuleInstanceListMemory in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceListMemory

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceListMemory(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+    Names: *mut WasmEdge_String,
+    Len: u32,
+) -> u32
Expand description

List the exported memory names of a module instance.

+

The returned memory names filled into the Names array are linked to the +exported names of memories of the module instance context, and the caller +should NOT call the WasmEdge_StringDelete. +If the Names buffer length is smaller than the result of the exported +memory list size, the overflowed return values will be discarded.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext. +\param [out] Names the output WasmEdge_String buffer of the memory names. +\param Len the buffer length.

+

\returns actual exported memory list size.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListMemoryLength.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListMemoryLength.html new file mode 100644 index 000000000..9047c4eeb --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListMemoryLength.html @@ -0,0 +1,7 @@ +WasmEdge_ModuleInstanceListMemoryLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceListMemoryLength

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceListMemoryLength(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+) -> u32
Expand description

Get the length of exported memory list of a module instance.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext.

+

\returns length of the exported memory list.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListTable.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListTable.html new file mode 100644 index 000000000..09351fd56 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListTable.html @@ -0,0 +1,16 @@ +WasmEdge_ModuleInstanceListTable in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceListTable

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceListTable(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+    Names: *mut WasmEdge_String,
+    Len: u32,
+) -> u32
Expand description

List the exported table names of a module instance.

+

The returned table names filled into the Names array are linked to the +exported names of tables of the module instance context, and the caller +should NOT call the WasmEdge_StringDelete. +If the Names buffer length is smaller than the result of the exported +table list size, the overflowed return values will be discarded.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext. +\param [out] Names the output WasmEdge_String buffer of the table names. +\param Len the buffer length.

+

\returns actual exported table list size.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListTableLength.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListTableLength.html new file mode 100644 index 000000000..b80a29da3 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListTableLength.html @@ -0,0 +1,7 @@ +WasmEdge_ModuleInstanceListTableLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceListTableLength

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceListTableLength(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+) -> u32
Expand description

Get the length of exported table list of a module instance.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext.

+

\returns length of the exported table list.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListTag.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListTag.html new file mode 100644 index 000000000..c11940683 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListTag.html @@ -0,0 +1,16 @@ +WasmEdge_ModuleInstanceListTag in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceListTag

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceListTag(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+    Names: *mut WasmEdge_String,
+    Len: u32,
+) -> u32
Expand description

List the exported tag names of a module instance.

+

The returned tag names filled into the Names array are linked to the +exported names of tags of the module instance context, and the caller +should NOT call the WasmEdge_StringDelete. +If the Names buffer length is smaller than the result of the exported +tag list size, the overflowed return values will be discarded.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext. +\param [out] Names the output WasmEdge_String buffer of the tag names. +\param Len the buffer length.

+

\returns actual exported tag list size.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListTagLength.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListTagLength.html new file mode 100644 index 000000000..b2fa2448d --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceListTagLength.html @@ -0,0 +1,7 @@ +WasmEdge_ModuleInstanceListTagLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceListTagLength

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceListTagLength(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+) -> u32
Expand description

Get the length of exported tag list of a module instance.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_ModuleInstanceContext.

+

\returns length of the exported tag list.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceWASIGetExitCode.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceWASIGetExitCode.html new file mode 100644 index 000000000..de8d098fd --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceWASIGetExitCode.html @@ -0,0 +1,9 @@ +WasmEdge_ModuleInstanceWASIGetExitCode in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceWASIGetExitCode

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceWASIGetExitCode(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+) -> u32
Expand description

Get the WASI exit code.

+

This function will return the exit code after running the “_start” function +of a wasm32-wasi program.

+

\param Cxt the WasmEdge_ModuleInstanceContext of WASI import object.

+

\returns the exit code after executing the “_start” function. Return +EXIT_FAILURE if the Cxt is NULL or not a WASI host module.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceWASIGetNativeHandler.html b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceWASIGetNativeHandler.html new file mode 100644 index 000000000..b999e7f95 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ModuleInstanceWASIGetNativeHandler.html @@ -0,0 +1,14 @@ +WasmEdge_ModuleInstanceWASIGetNativeHandler in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceWASIGetNativeHandler

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceWASIGetNativeHandler(
+    Cxt: *const WasmEdge_ModuleInstanceContext,
+    Fd: i32,
+    NativeHandler: *mut u64,
+) -> u32
Expand description

Get the native handler from the WASI mapped FD/Handler.

+

This function will return the raw FD/Handler from a given mapped Fd +or Handler.

+

\param Cxt the WasmEdge_ModuleInstanceContext of WASI import object. +\param Fd the WASI mapped Fd. +\param [out] NativeHandler the raw Fd/Handler.

+

\returns the error code. Return 0 if the Native Handler is found. +Return 1 if the Cxt is NULL. +Return 2 if the given mapped Fd/handler is not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_PluginCreateModule.html b/wasmedge_sys/ffi/fn.WasmEdge_PluginCreateModule.html new file mode 100644 index 000000000..a235d2af4 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_PluginCreateModule.html @@ -0,0 +1,13 @@ +WasmEdge_PluginCreateModule in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_PluginCreateModule

Source
pub unsafe extern "C" fn WasmEdge_PluginCreateModule(
+    Cxt: *const WasmEdge_PluginContext,
+    ModuleName: WasmEdge_String,
+) -> *mut WasmEdge_ModuleInstanceContext
Expand description

Create the module instance in the plug-in by the module name.

+

By giving the module name, developers can retrieve the module in the plug-in +and create the module instance. +The caller owns the object and should call WasmEdge_ModuleInstanceDelete +to destroy it.

+

\param Cxt the WasmEdge_PluginContext to retrieve and create module. +\param ModuleName the module name to retrieve.

+

\returns pointer to the module instance context, NULL if the module name not +found in the plug-in or the plug-in is not valid.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_PluginFind.html b/wasmedge_sys/ffi/fn.WasmEdge_PluginFind.html new file mode 100644 index 000000000..c83b3072b --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_PluginFind.html @@ -0,0 +1,9 @@ +WasmEdge_PluginFind in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_PluginFind

Source
pub unsafe extern "C" fn WasmEdge_PluginFind(
+    Name: WasmEdge_String,
+) -> *const WasmEdge_PluginContext
Expand description

Find the loaded plug-in context by name.

+

After loading the plug-ins from default paths or the given path, developers +can use this API to retrieve the plug-in context by name. Then developers +can create the module instance from the plug-in contexts.

+

\param Name the plug-in name WasmEdge_String.

+

\returns pointer to the plug-in context. NULL if the plug-in not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_PluginGetPluginName.html b/wasmedge_sys/ffi/fn.WasmEdge_PluginGetPluginName.html new file mode 100644 index 000000000..8f2f9e6de --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_PluginGetPluginName.html @@ -0,0 +1,8 @@ +WasmEdge_PluginGetPluginName in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_PluginGetPluginName

Source
pub unsafe extern "C" fn WasmEdge_PluginGetPluginName(
+    Cxt: *const WasmEdge_PluginContext,
+) -> WasmEdge_String
Expand description

Get the plug-in name of the plug-in context.

+

The returned string object is linked to the plug-in name of the plug-in +context, and the caller should NOT call the WasmEdge_StringDelete.

+

\param Cxt the WasmEdge_PluginContext.

+

\returns string object. Length will be 0 and Buf will be NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_PluginInitWASINN.html b/wasmedge_sys/ffi/fn.WasmEdge_PluginInitWASINN.html new file mode 100644 index 000000000..f79571afb --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_PluginInitWASINN.html @@ -0,0 +1,10 @@ +WasmEdge_PluginInitWASINN in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_PluginInitWASINN

Source
pub unsafe extern "C" fn WasmEdge_PluginInitWASINN(
+    NNPreloads: *const *const c_char,
+    PreloadsLen: u32,
+)
Expand description

Initialize the wasi_nn plug-in.

+

This function will initialize the wasi_nn plug-in with the preloads string +list. Only available after loading the wasi_nn plug-in and before creating +the module instance from the plug-in.

+

\param NNPreloads the preload string list. NULL if the length is 0. +\param PreloadsLen the length of the preload list.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_PluginListModule.html b/wasmedge_sys/ffi/fn.WasmEdge_PluginListModule.html new file mode 100644 index 000000000..1372bc751 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_PluginListModule.html @@ -0,0 +1,15 @@ +WasmEdge_PluginListModule in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_PluginListModule

Source
pub unsafe extern "C" fn WasmEdge_PluginListModule(
+    Cxt: *const WasmEdge_PluginContext,
+    Names: *mut WasmEdge_String,
+    Len: u32,
+) -> u32
Expand description

List the modules in the plug-in context with their names.

+

The returned module names filled into the Names array are owned by the +internal WasmEdge plug-in storage, and the caller should NOT call the +WasmEdge_StringDelete. +If the Names buffer length is smaller than the result of the loaded +plug-in list size, the overflowed return values will be discarded.

+

\param Cxt the WasmEdge_PluginContext to list the modules. +\param [out] Names the output WasmEdge_String buffer of the function names. +\param Len the buffer length.

+

\returns actual module list size of the plug-in.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_PluginListModuleLength.html b/wasmedge_sys/ffi/fn.WasmEdge_PluginListModuleLength.html new file mode 100644 index 000000000..21b800022 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_PluginListModuleLength.html @@ -0,0 +1,8 @@ +WasmEdge_PluginListModuleLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_PluginListModuleLength

Source
pub unsafe extern "C" fn WasmEdge_PluginListModuleLength(
+    Cxt: *const WasmEdge_PluginContext,
+) -> u32
Expand description

Get the length of module list in the plug-in context.

+

There may be several modules in a plug-in. Developers can use this function +to get the length of the module list in a plug-in.

+

\param Cxt the WasmEdge_PluginContext to get the length of the module list.

+

\returns length of module list.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_PluginListPlugins.html b/wasmedge_sys/ffi/fn.WasmEdge_PluginListPlugins.html new file mode 100644 index 000000000..a7e56b770 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_PluginListPlugins.html @@ -0,0 +1,13 @@ +WasmEdge_PluginListPlugins in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_PluginListPlugins

Source
pub unsafe extern "C" fn WasmEdge_PluginListPlugins(
+    Names: *mut WasmEdge_String,
+    Len: u32,
+) -> u32
Expand description

List the loaded plug-ins with their names.

+

The returned plug-in names filled into the Names array are owned by the +internal WasmEdge plug-in storage, and the caller should NOT call the +WasmEdge_StringDelete. +If the Names buffer length is smaller than the result of the loaded +plug-in list size, the overflowed return values will be discarded.

+

\param [out] Names the output WasmEdge_String buffer of the function names. +\param Len the buffer length.

+

\returns actual loaded plug-in list size.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_PluginListPluginsLength.html b/wasmedge_sys/ffi/fn.WasmEdge_PluginListPluginsLength.html new file mode 100644 index 000000000..bf913ad60 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_PluginListPluginsLength.html @@ -0,0 +1,3 @@ +WasmEdge_PluginListPluginsLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_PluginListPluginsLength

Source
pub unsafe extern "C" fn WasmEdge_PluginListPluginsLength() -> u32
Expand description

Get the length of loaded plug-in list.

+

\returns length of loaded plug-in list.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_PluginLoadFromPath.html b/wasmedge_sys/ffi/fn.WasmEdge_PluginLoadFromPath.html new file mode 100644 index 000000000..8916e373e --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_PluginLoadFromPath.html @@ -0,0 +1,8 @@ +WasmEdge_PluginLoadFromPath in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_PluginLoadFromPath

Source
pub unsafe extern "C" fn WasmEdge_PluginLoadFromPath(
+    Path: *const c_char,
+)
Expand description

Load the plugin with the given file or directory.

+

For the given file path, this function will load the plug-in. +For the given directory path, this function will load the plug-ins under the +directory recursively.

+

\param Path the path to plug-in file or directory.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_PluginLoadWithDefaultPaths.html b/wasmedge_sys/ffi/fn.WasmEdge_PluginLoadWithDefaultPaths.html new file mode 100644 index 000000000..a140f5bb5 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_PluginLoadWithDefaultPaths.html @@ -0,0 +1,9 @@ +WasmEdge_PluginLoadWithDefaultPaths in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_PluginLoadWithDefaultPaths

Source
pub unsafe extern "C" fn WasmEdge_PluginLoadWithDefaultPaths()
Expand description

Load plugins with the default search paths.

+

The default paths are:

+
    +
  1. The environment variable “WASMEDGE_PLUGIN_PATH”.
  2. +
  3. The “../plugin/” directory related to the WasmEdge installation path.
  4. +
  5. The “wasmedge/” directory under the library path if the WasmEdge is +installed under the “/usr”.
  6. +
+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_Plugin_GetDescriptor.html b/wasmedge_sys/ffi/fn.WasmEdge_Plugin_GetDescriptor.html new file mode 100644 index 000000000..b2b12bdc7 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_Plugin_GetDescriptor.html @@ -0,0 +1,3 @@ +WasmEdge_Plugin_GetDescriptor in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_Plugin_GetDescriptor

Source
pub unsafe extern "C" fn WasmEdge_Plugin_GetDescriptor() -> *const WasmEdge_PluginDescriptor
Expand description

Implement by plugins for returning the plugin descriptor.

+

\returns the plugin descriptor.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ResultGen.html b/wasmedge_sys/ffi/fn.WasmEdge_ResultGen.html new file mode 100644 index 000000000..6bc7608d1 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ResultGen.html @@ -0,0 +1,9 @@ +WasmEdge_ResultGen in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ResultGen

Source
pub unsafe extern "C" fn WasmEdge_ResultGen(
+    Category: WasmEdge_ErrCategory,
+    Code: u32,
+) -> WasmEdge_Result
Expand description

Generate the result with code.

+

\param Category the WasmEdge_ErrCategory to specify the error category. +\param Code the 24-bit length error code. The data exceeds 24 bits will be +stripped.

+

\returns WasmEdge_Result struct with the given data.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ResultGetCategory.html b/wasmedge_sys/ffi/fn.WasmEdge_ResultGetCategory.html new file mode 100644 index 000000000..d8f603815 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ResultGetCategory.html @@ -0,0 +1,6 @@ +WasmEdge_ResultGetCategory in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ResultGetCategory

Source
pub unsafe extern "C" fn WasmEdge_ResultGetCategory(
+    Res: WasmEdge_Result,
+) -> WasmEdge_ErrCategory
Expand description

Get the error category.

+

\param Res the WasmEdge_Result struct.

+

\returns error category in the WasmEdge_Result struct.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ResultGetCode.html b/wasmedge_sys/ffi/fn.WasmEdge_ResultGetCode.html new file mode 100644 index 000000000..fba8b00ea --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ResultGetCode.html @@ -0,0 +1,6 @@ +WasmEdge_ResultGetCode in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ResultGetCode

Source
pub unsafe extern "C" fn WasmEdge_ResultGetCode(
+    Res: WasmEdge_Result,
+) -> u32
Expand description

Get the result code.

+

\param Res the WasmEdge_Result struct.

+

\returns result code (24-bit size data) in the WasmEdge_Result struct.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ResultGetMessage.html b/wasmedge_sys/ffi/fn.WasmEdge_ResultGetMessage.html new file mode 100644 index 000000000..52fd4b62e --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ResultGetMessage.html @@ -0,0 +1,9 @@ +WasmEdge_ResultGetMessage in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ResultGetMessage

Source
pub unsafe extern "C" fn WasmEdge_ResultGetMessage(
+    Res: WasmEdge_Result,
+) -> *const c_char
Expand description

Get the result message.

+

The returned string must NOT be destroyed. +If the error category of the result is NOT WasmEdge_ErrCategory_WASM, +the message will always be “user defined error code”.

+

\param Res the WasmEdge_Result struct.

+

\returns NULL-terminated C string of the corresponding error message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ResultOK.html b/wasmedge_sys/ffi/fn.WasmEdge_ResultOK.html new file mode 100644 index 000000000..d902eb9ac --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ResultOK.html @@ -0,0 +1,7 @@ +WasmEdge_ResultOK in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ResultOK

Source
pub unsafe extern "C" fn WasmEdge_ResultOK(
+    Res: WasmEdge_Result,
+) -> bool
Expand description

Check the result is a success or not.

+

\param Res the WasmEdge_Result struct.

+

\returns true if the error code is WasmEdge_Result_Success or +WasmEdge_Result_Terminate, false for others.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StatisticsClear.html b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsClear.html new file mode 100644 index 000000000..7b3900e26 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsClear.html @@ -0,0 +1,5 @@ +WasmEdge_StatisticsClear in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StatisticsClear

Source
pub unsafe extern "C" fn WasmEdge_StatisticsClear(
+    Cxt: *mut WasmEdge_StatisticsContext,
+)
Expand description

Clear all data in the WasmEdge_StatisticsContext.

+

\param Cxt the WasmEdge_StatisticsContext to clear.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StatisticsCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsCreate.html new file mode 100644 index 000000000..aa5fae0ed --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsCreate.html @@ -0,0 +1,5 @@ +WasmEdge_StatisticsCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StatisticsCreate

Source
pub unsafe extern "C" fn WasmEdge_StatisticsCreate() -> *mut WasmEdge_StatisticsContext
Expand description

Creation of the WasmEdge_StatisticsContext.

+

The caller owns the object and should call WasmEdge_StatisticsDelete to +destroy it.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StatisticsDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsDelete.html new file mode 100644 index 000000000..91ca524f4 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsDelete.html @@ -0,0 +1,7 @@ +WasmEdge_StatisticsDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StatisticsDelete

Source
pub unsafe extern "C" fn WasmEdge_StatisticsDelete(
+    Cxt: *mut WasmEdge_StatisticsContext,
+)
Expand description

Deletion of the WasmEdge_StatisticsContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_StatisticsContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StatisticsGetInstrCount.html b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsGetInstrCount.html new file mode 100644 index 000000000..533d413eb --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsGetInstrCount.html @@ -0,0 +1,6 @@ +WasmEdge_StatisticsGetInstrCount in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StatisticsGetInstrCount

Source
pub unsafe extern "C" fn WasmEdge_StatisticsGetInstrCount(
+    Cxt: *const WasmEdge_StatisticsContext,
+) -> u64
Expand description

Get the instruction count in execution.

+

\param Cxt the WasmEdge_StatisticsContext to get data.

+

\returns the instruction count in total execution.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StatisticsGetInstrPerSecond.html b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsGetInstrPerSecond.html new file mode 100644 index 000000000..193a2ef44 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsGetInstrPerSecond.html @@ -0,0 +1,6 @@ +WasmEdge_StatisticsGetInstrPerSecond in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StatisticsGetInstrPerSecond

Source
pub unsafe extern "C" fn WasmEdge_StatisticsGetInstrPerSecond(
+    Cxt: *const WasmEdge_StatisticsContext,
+) -> f64
Expand description

Get the instruction count per second in execution.

+

\param Cxt the WasmEdge_StatisticsContext to get data.

+

\returns the instruction count per second.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StatisticsGetTotalCost.html b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsGetTotalCost.html new file mode 100644 index 000000000..7a423bbe3 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsGetTotalCost.html @@ -0,0 +1,6 @@ +WasmEdge_StatisticsGetTotalCost in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StatisticsGetTotalCost

Source
pub unsafe extern "C" fn WasmEdge_StatisticsGetTotalCost(
+    Cxt: *const WasmEdge_StatisticsContext,
+) -> u64
Expand description

Get the total cost in execution.

+

\param Cxt the WasmEdge_StatisticsContext to get data.

+

\returns the total cost.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StatisticsSetCostLimit.html b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsSetCostLimit.html new file mode 100644 index 000000000..e9b5500a4 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsSetCostLimit.html @@ -0,0 +1,9 @@ +WasmEdge_StatisticsSetCostLimit in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StatisticsSetCostLimit

Source
pub unsafe extern "C" fn WasmEdge_StatisticsSetCostLimit(
+    Cxt: *mut WasmEdge_StatisticsContext,
+    Limit: u64,
+)
Expand description

Set the cost limit in execution.

+

The WASM execution will be aborted if the instruction costs exceeded the +limit and the ErrCode::Value::CostLimitExceeded will be returned.

+

\param Cxt the WasmEdge_StatisticsContext to set the cost table. +\param Limit the cost limit.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StatisticsSetCostTable.html b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsSetCostTable.html new file mode 100644 index 000000000..88d3b8e65 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StatisticsSetCostTable.html @@ -0,0 +1,9 @@ +WasmEdge_StatisticsSetCostTable in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StatisticsSetCostTable

Source
pub unsafe extern "C" fn WasmEdge_StatisticsSetCostTable(
+    Cxt: *mut WasmEdge_StatisticsContext,
+    CostArr: *mut u64,
+    Len: u32,
+)
Expand description

Set the costs of instructions.

+

\param Cxt the WasmEdge_StatisticsContext to set the cost table. +\param CostArr the cost table array. +\param Len the length of the cost table array.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StoreCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_StoreCreate.html new file mode 100644 index 000000000..b745bcd48 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StoreCreate.html @@ -0,0 +1,8 @@ +WasmEdge_StoreCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StoreCreate

Source
pub unsafe extern "C" fn WasmEdge_StoreCreate() -> *mut WasmEdge_StoreContext
Expand description

Creation of the WasmEdge_StoreContext.

+

The caller owns the object and should call WasmEdge_StoreDelete to destroy +it. +The store is the linker for multiple WASM module instances. The store will +not own any module instance registered into it, and the module instances +will automatically be unregistered if they are destroyed.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StoreDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_StoreDelete.html new file mode 100644 index 000000000..db414d790 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StoreDelete.html @@ -0,0 +1,9 @@ +WasmEdge_StoreDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StoreDelete

Source
pub unsafe extern "C" fn WasmEdge_StoreDelete(
+    Cxt: *mut WasmEdge_StoreContext,
+)
Expand description

Deletion of the WasmEdge_StoreContext.

+

After calling this function, the context will be destroyed and should +NOT be used. +If there are module instances registered into this store context, they will +be automatically un-link to this store context.

+

\param Cxt the WasmEdge_StoreContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StoreFindModule.html b/wasmedge_sys/ffi/fn.WasmEdge_StoreFindModule.html new file mode 100644 index 000000000..f5dc698f3 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StoreFindModule.html @@ -0,0 +1,11 @@ +WasmEdge_StoreFindModule in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StoreFindModule

Source
pub unsafe extern "C" fn WasmEdge_StoreFindModule(
+    Cxt: *const WasmEdge_StoreContext,
+    Name: WasmEdge_String,
+) -> *const WasmEdge_ModuleInstanceContext
Expand description

Get the module instance context by the module name.

+

After registering a WASM module, developers can call this function to find +and get the registered module instance context by the module name.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_StoreContext. +\param Name the module name WasmEdge_String.

+

\returns pointer to the module instance context. NULL if not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StoreListModule.html b/wasmedge_sys/ffi/fn.WasmEdge_StoreListModule.html new file mode 100644 index 000000000..3e99d142b --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StoreListModule.html @@ -0,0 +1,17 @@ +WasmEdge_StoreListModule in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StoreListModule

Source
pub unsafe extern "C" fn WasmEdge_StoreListModule(
+    Cxt: *const WasmEdge_StoreContext,
+    Names: *mut WasmEdge_String,
+    Len: u32,
+) -> u32
Expand description

List the registered module names.

+

This function will list all registered module names. +The returned module names filled into the Names array are linked to the +registered module names in the store context, and the caller should NOT +call the WasmEdge_StringDelete. +If the Names buffer length is smaller than the result of the registered +named module list size, the overflowed return values will be discarded.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_StoreContext. +\param [out] Names the output names WasmEdge_String buffer of named modules. +\param Len the buffer length.

+

\returns actual registered named module list size.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StoreListModuleLength.html b/wasmedge_sys/ffi/fn.WasmEdge_StoreListModuleLength.html new file mode 100644 index 000000000..268ed0f94 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StoreListModuleLength.html @@ -0,0 +1,7 @@ +WasmEdge_StoreListModuleLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StoreListModuleLength

Source
pub unsafe extern "C" fn WasmEdge_StoreListModuleLength(
+    Cxt: *const WasmEdge_StoreContext,
+) -> u32
Expand description

Get the length of registered module list in store.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_StoreContext.

+

\returns length of registered named module list.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StringCopy.html b/wasmedge_sys/ffi/fn.WasmEdge_StringCopy.html new file mode 100644 index 000000000..1748f25a1 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StringCopy.html @@ -0,0 +1,14 @@ +WasmEdge_StringCopy in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StringCopy

Source
pub unsafe extern "C" fn WasmEdge_StringCopy(
+    Str: WasmEdge_String,
+    Buf: *mut c_char,
+    Len: u32,
+) -> u32
Expand description

Copy the content of WasmEdge_String object to the buffer.

+

This function copy at most Len characters from the WasmEdge_String +object to the destination buffer. If the string length is less than Len +characters long, the remainder of the buffer is filled with `\0’ characters. +Otherwise, the destination is not terminated.

+

\param Str the source WasmEdge_String object to copy. +\param Buf the buffer to fill the string content. +\param Len the buffer length.

+

\returns the copied length of string.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StringCreateByBuffer.html b/wasmedge_sys/ffi/fn.WasmEdge_StringCreateByBuffer.html new file mode 100644 index 000000000..23c5ae6b9 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StringCreateByBuffer.html @@ -0,0 +1,11 @@ +WasmEdge_StringCreateByBuffer in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StringCreateByBuffer

Source
pub unsafe extern "C" fn WasmEdge_StringCreateByBuffer(
+    Buf: *const c_char,
+    Len: u32,
+) -> WasmEdge_String
Expand description

Creation of the WasmEdge_String with the buffer and its length.

+

The caller owns the object and should call WasmEdge_StringDelete to +destroy it.

+

\param Buf the buffer to wrap to the WasmEdge_String object. +\param Len the buffer length.

+

\returns string object. Length will be 0 and Buf will be NULL if failed or +the input buffer is a NULL.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StringCreateByCString.html b/wasmedge_sys/ffi/fn.WasmEdge_StringCreateByCString.html new file mode 100644 index 000000000..78910cca3 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StringCreateByCString.html @@ -0,0 +1,12 @@ +WasmEdge_StringCreateByCString in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StringCreateByCString

Source
pub unsafe extern "C" fn WasmEdge_StringCreateByCString(
+    Str: *const c_char,
+) -> WasmEdge_String
Expand description

Creation of the WasmEdge_String with the C string.

+

The caller owns the object and should call WasmEdge_StringDelete to +destroy it. This function only supports the C string with NULL termination. +If the input string may have \0 character, please use the +WasmEdge_StringCreateByBuffer instead.

+

\param Str the NULL-terminated C string to copy into the WasmEdge_String +object.

+

\returns string object. Length will be 0 and Buf will be NULL if failed or +the input string is a NULL.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StringDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_StringDelete.html new file mode 100644 index 000000000..d700f8cfa --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StringDelete.html @@ -0,0 +1,5 @@ +WasmEdge_StringDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StringDelete

Source
pub unsafe extern "C" fn WasmEdge_StringDelete(Str: WasmEdge_String)
Expand description

Deletion of the WasmEdge_String.

+

After calling this function, the resources in the WasmEdge_String object +will be released and the object should NOT be used.

+

\param Str the WasmEdge_String object to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StringIsEqual.html b/wasmedge_sys/ffi/fn.WasmEdge_StringIsEqual.html new file mode 100644 index 000000000..15255f7c6 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StringIsEqual.html @@ -0,0 +1,9 @@ +WasmEdge_StringIsEqual in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StringIsEqual

Source
pub unsafe extern "C" fn WasmEdge_StringIsEqual(
+    Str1: WasmEdge_String,
+    Str2: WasmEdge_String,
+) -> bool
Expand description

Compare the two WasmEdge_String objects.

+

\param Str1 the first WasmEdge_String object to compare. +\param Str2 the second WasmEdge_String object to compare.

+

\returns true if the content of two WasmEdge_String objects are the same, +false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_StringWrap.html b/wasmedge_sys/ffi/fn.WasmEdge_StringWrap.html new file mode 100644 index 000000000..9a206194c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_StringWrap.html @@ -0,0 +1,11 @@ +WasmEdge_StringWrap in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_StringWrap

Source
pub unsafe extern "C" fn WasmEdge_StringWrap(
+    Buf: *const c_char,
+    Len: u32,
+) -> WasmEdge_String
Expand description

Create the WasmEdge_String wraps to the buffer.

+

This function creates a WasmEdge_String object which wraps to the input +buffer. The caller should guarantee the life cycle of the input buffer, and +should NOT call the WasmEdge_StringDelete.

+

\param Buf the buffer to copy into the WasmEdge_String object. +\param Len the buffer length.

+

\returns string object refer to the input buffer with its length.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceCreate.html new file mode 100644 index 000000000..614f932a6 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceCreate.html @@ -0,0 +1,15 @@ +WasmEdge_TableInstanceCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TableInstanceCreate

Source
pub unsafe extern "C" fn WasmEdge_TableInstanceCreate(
+    TabType: *const WasmEdge_TableTypeContext,
+) -> *mut WasmEdge_TableInstanceContext
Expand description

Creation of the WasmEdge_TableInstanceContext.

+

The caller owns the object and should call WasmEdge_TableInstanceDelete to +destroy it if the returned object is not added into a +WasmEdge_ModuleInstanceContext. +The default value of the elements in the output table instance will be null +references with the same reference type in the table type when table grows. +If the reference type of the input table type is a non-nullable value type, +a non-null default init value is required. In this case, please use the +WasmEdge_TableInstanceCreateWithInit API instead.

+

\param TabType the table type context to initialize the table instance +context.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceCreateWithInit.html b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceCreateWithInit.html new file mode 100644 index 000000000..8fae1e4d0 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceCreateWithInit.html @@ -0,0 +1,17 @@ +WasmEdge_TableInstanceCreateWithInit in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TableInstanceCreateWithInit

Source
pub unsafe extern "C" fn WasmEdge_TableInstanceCreateWithInit(
+    TabType: *const WasmEdge_TableTypeContext,
+    Value: WasmEdge_Value,
+) -> *mut WasmEdge_TableInstanceContext
Expand description

Creation of the WasmEdge_TableInstanceContext with the default init value.

+

The caller owns the object and should call WasmEdge_TableInstanceDelete to +destroy it if the returned object is not added into a +WasmEdge_ModuleInstanceContext. +The value type of the default init value should compatible with the +reference type of the input table type, otherwise this function will fail. +If the reference type of the input table type is a non-nullable value type, +this function will fail if the default init value is a null reference.

+

\param TabType the table type context to initialize the table instance +context. +\param Value the default init value for the table element when table +grows.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceDelete.html new file mode 100644 index 000000000..6d16693d6 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceDelete.html @@ -0,0 +1,7 @@ +WasmEdge_TableInstanceDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TableInstanceDelete

Source
pub unsafe extern "C" fn WasmEdge_TableInstanceDelete(
+    Cxt: *mut WasmEdge_TableInstanceContext,
+)
Expand description

Deletion of the WasmEdge_TableInstanceContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_TableInstanceContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceGetData.html b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceGetData.html new file mode 100644 index 000000000..e0a45f381 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceGetData.html @@ -0,0 +1,11 @@ +WasmEdge_TableInstanceGetData in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TableInstanceGetData

Source
pub unsafe extern "C" fn WasmEdge_TableInstanceGetData(
+    Cxt: *const WasmEdge_TableInstanceContext,
+    Data: *mut WasmEdge_Value,
+    Offset: u32,
+) -> WasmEdge_Result
Expand description

Get the reference value in a table instance.

+

\param Cxt the WasmEdge_TableInstanceContext. +\param [out] Data the result reference value. +\param Offset the reference value offset (index) in the table instance.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceGetSize.html b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceGetSize.html new file mode 100644 index 000000000..014b6ab04 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceGetSize.html @@ -0,0 +1,6 @@ +WasmEdge_TableInstanceGetSize in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TableInstanceGetSize

Source
pub unsafe extern "C" fn WasmEdge_TableInstanceGetSize(
+    Cxt: *const WasmEdge_TableInstanceContext,
+) -> u32
Expand description

Get the size of a table instance.

+

\param Cxt the WasmEdge_TableInstanceContext.

+

\returns the size of the table instance.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceGetTableType.html b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceGetTableType.html new file mode 100644 index 000000000..d27f15562 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceGetTableType.html @@ -0,0 +1,9 @@ +WasmEdge_TableInstanceGetTableType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TableInstanceGetTableType

Source
pub unsafe extern "C" fn WasmEdge_TableInstanceGetTableType(
+    Cxt: *const WasmEdge_TableInstanceContext,
+) -> *const WasmEdge_TableTypeContext
Expand description

Get the table type context from a table instance.

+

The table type context links to the table type in the table instance context +and owned by the context. The caller should NOT call the +WasmEdge_TableTypeDelete.

+

\param Cxt the WasmEdge_TableInstanceContext.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceGrow.html b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceGrow.html new file mode 100644 index 000000000..613b10a8c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceGrow.html @@ -0,0 +1,9 @@ +WasmEdge_TableInstanceGrow in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TableInstanceGrow

Source
pub unsafe extern "C" fn WasmEdge_TableInstanceGrow(
+    Cxt: *mut WasmEdge_TableInstanceContext,
+    Size: u32,
+) -> WasmEdge_Result
Expand description

Grow a table instance with a size.

+

\param Cxt the WasmEdge_TableInstanceContext. +\param Size the count of reference values to grow in the table instance.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceSetData.html b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceSetData.html new file mode 100644 index 000000000..ba3229e1f --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TableInstanceSetData.html @@ -0,0 +1,11 @@ +WasmEdge_TableInstanceSetData in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TableInstanceSetData

Source
pub unsafe extern "C" fn WasmEdge_TableInstanceSetData(
+    Cxt: *mut WasmEdge_TableInstanceContext,
+    Data: WasmEdge_Value,
+    Offset: u32,
+) -> WasmEdge_Result
Expand description

Set the reference value into a table instance.

+

\param Cxt the WasmEdge_TableInstanceContext. +\param Data the reference value to set into the table instance. +\param Offset the reference value offset (index) in the table instance.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TableTypeCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_TableTypeCreate.html new file mode 100644 index 000000000..0aff666ed --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TableTypeCreate.html @@ -0,0 +1,11 @@ +WasmEdge_TableTypeCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TableTypeCreate

Source
pub unsafe extern "C" fn WasmEdge_TableTypeCreate(
+    RefType: WasmEdge_ValType,
+    Limit: WasmEdge_Limit,
+) -> *mut WasmEdge_TableTypeContext
Expand description

Creation of the WasmEdge_TableTypeContext.

+

The caller owns the object and should call WasmEdge_TableTypeDelete to +destroy it.

+

\param RefType the value type of the table type. This value type should be a +reference type, or this function will fail. +\param Limit the limit struct of the table type.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TableTypeDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_TableTypeDelete.html new file mode 100644 index 000000000..13ebb5d79 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TableTypeDelete.html @@ -0,0 +1,7 @@ +WasmEdge_TableTypeDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TableTypeDelete

Source
pub unsafe extern "C" fn WasmEdge_TableTypeDelete(
+    Cxt: *mut WasmEdge_TableTypeContext,
+)
Expand description

Deletion of the WasmEdge_TableTypeContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_TableTypeContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TableTypeGetLimit.html b/wasmedge_sys/ffi/fn.WasmEdge_TableTypeGetLimit.html new file mode 100644 index 000000000..1ab575753 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TableTypeGetLimit.html @@ -0,0 +1,6 @@ +WasmEdge_TableTypeGetLimit in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TableTypeGetLimit

Source
pub unsafe extern "C" fn WasmEdge_TableTypeGetLimit(
+    Cxt: *const WasmEdge_TableTypeContext,
+) -> WasmEdge_Limit
Expand description

Get the limit from a table type.

+

\param Cxt the WasmEdge_TableTypeContext.

+

\returns the limit struct of the table type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TableTypeGetRefType.html b/wasmedge_sys/ffi/fn.WasmEdge_TableTypeGetRefType.html new file mode 100644 index 000000000..838089918 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TableTypeGetRefType.html @@ -0,0 +1,7 @@ +WasmEdge_TableTypeGetRefType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TableTypeGetRefType

Source
pub unsafe extern "C" fn WasmEdge_TableTypeGetRefType(
+    Cxt: *const WasmEdge_TableTypeContext,
+) -> WasmEdge_ValType
Expand description

Get the reference type from a table type.

+

\param Cxt the WasmEdge_TableTypeContext.

+

\returns the value type of the table type. This value type will must be a +reference type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TagInstanceGetTagType.html b/wasmedge_sys/ffi/fn.WasmEdge_TagInstanceGetTagType.html new file mode 100644 index 000000000..1e93355da --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TagInstanceGetTagType.html @@ -0,0 +1,8 @@ +WasmEdge_TagInstanceGetTagType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TagInstanceGetTagType

Source
pub unsafe extern "C" fn WasmEdge_TagInstanceGetTagType(
+    Cxt: *const WasmEdge_TagInstanceContext,
+) -> *const WasmEdge_TagTypeContext
Expand description

Get the tag type context from a tag instance.

+

The tag type context links to the tag type in the tag instance +context and owned by the context.

+

\param Cxt the WasmEdge_TagInstanceContext.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_TagTypeGetFunctionType.html b/wasmedge_sys/ffi/fn.WasmEdge_TagTypeGetFunctionType.html new file mode 100644 index 000000000..35a1ed773 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_TagTypeGetFunctionType.html @@ -0,0 +1,6 @@ +WasmEdge_TagTypeGetFunctionType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_TagTypeGetFunctionType

Source
pub unsafe extern "C" fn WasmEdge_TagTypeGetFunctionType(
+    Cxt: *const WasmEdge_TagTypeContext,
+) -> *const WasmEdge_FunctionTypeContext
Expand description

Get the function type from a tag type.

+

\param Cxt the WasmEdge_TagTypeContext.

+

\returns pointer to function type context of the tag type, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncExecute.html b/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncExecute.html new file mode 100644 index 000000000..942474ad2 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncExecute.html @@ -0,0 +1,21 @@ +WasmEdge_VMAsyncExecute in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMAsyncExecute

Source
pub unsafe extern "C" fn WasmEdge_VMAsyncExecute(
+    Cxt: *mut WasmEdge_VMContext,
+    FuncName: WasmEdge_String,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+) -> *mut WasmEdge_Async
Expand description

Asynchronous invoke a WASM function by name.

+

This is the final step to invoke a WASM function step by step. +After instantiating a WASM module in the VM context, the WASM module is +registered into the store in the VM context as an anonymous module. Then you +can repeatedly call this function to invoke the exported WASM functions by +their names until the VM context is reset or a new WASM module is registered +or loaded. For calling the functions in registered WASM modules with module +names, please use WasmEdge_VMAsyncExecuteRegistered instead.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param FuncName the function name WasmEdge_String. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length.

+

\returns WasmEdge_Async. Call WasmEdge_AsyncGet for the result, and call +WasmEdge_AsyncDelete to destroy this object.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncExecuteRegistered.html b/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncExecuteRegistered.html new file mode 100644 index 000000000..44e4071a3 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncExecuteRegistered.html @@ -0,0 +1,19 @@ +WasmEdge_VMAsyncExecuteRegistered in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMAsyncExecuteRegistered

Source
pub unsafe extern "C" fn WasmEdge_VMAsyncExecuteRegistered(
+    Cxt: *mut WasmEdge_VMContext,
+    ModuleName: WasmEdge_String,
+    FuncName: WasmEdge_String,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+) -> *mut WasmEdge_Async
Expand description

Asynchronous invoke a WASM function by its module name and function name.

+

After registering a WASM module in the VM context, you can repeatedly call +this function to invoke exported WASM functions by their module names and +function names until the VM context is reset.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param ModuleName the module name WasmEdge_String. +\param FuncName the function name WasmEdge_String. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length.

+

\returns WasmEdge_Async. Call WasmEdge_AsyncGet for the result, and call +WasmEdge_AsyncDelete to destroy this object.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncRunWasmFromASTModule.html b/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncRunWasmFromASTModule.html new file mode 100644 index 000000000..a0d59fb1e --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncRunWasmFromASTModule.html @@ -0,0 +1,27 @@ +WasmEdge_VMAsyncRunWasmFromASTModule in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMAsyncRunWasmFromASTModule

Source
pub unsafe extern "C" fn WasmEdge_VMAsyncRunWasmFromASTModule(
+    Cxt: *mut WasmEdge_VMContext,
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    FuncName: WasmEdge_String,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+) -> *mut WasmEdge_Async
Expand description

Instantiate the WASM module from a WasmEdge AST Module and asynchronous +invoke a function by name.

+

This is the function to invoke a WASM function rapidly. +Load and instantiate the WASM module from the WasmEdge AST Module, and then +invoke the function by name and parameters. If the Returns buffer length +is smaller than the arity of the function, the overflowed return values will +be discarded. +After calling this function, a new anonymous module instance owned by VM is +instantiated, and the old one will be destroyed.

+

The caller owns the object and should call WasmEdge_AsyncDelete to destroy +it.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param ASTCxt the WasmEdge AST Module context generated by loader or +compiler. +\param FuncName the function name WasmEdge_String. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length.

+

\returns WasmEdge_Async. Call WasmEdge_AsyncGet for the result, and call +WasmEdge_AsyncDelete to destroy this object.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncRunWasmFromBuffer.html b/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncRunWasmFromBuffer.html new file mode 100644 index 000000000..824cdf080 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncRunWasmFromBuffer.html @@ -0,0 +1,30 @@ +WasmEdge_VMAsyncRunWasmFromBuffer in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMAsyncRunWasmFromBuffer

Source
pub unsafe extern "C" fn WasmEdge_VMAsyncRunWasmFromBuffer(
+    Cxt: *mut WasmEdge_VMContext,
+    Buf: *const u8,
+    BufLen: u32,
+    FuncName: WasmEdge_String,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+) -> *mut WasmEdge_Async
Expand description

Instantiate the WASM module from a buffer and asynchronous invoke a function +by name.

+

CAUTION: This function will be deprecated and replaced by +WasmEdge_VMAsyncRunWasmFromBytes() API in the future.

+

This is the function to invoke a WASM function rapidly. +Load and instantiate the WASM module from a buffer, and then invoke a +function by name and parameters. If the Returns buffer length is smaller +than the arity of the function, the overflowed return values will be +discarded. +After calling this function, a new anonymous module instance owned by VM is +instantiated, and the old one will be destroyed.

+

The caller owns the object and should call WasmEdge_AsyncDelete to destroy +it.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param Buf the buffer of WASM binary. +\param BufLen the length of the buffer. +\param FuncName the function name WasmEdge_String. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length.

+

\returns WasmEdge_Async. Call WasmEdge_AsyncGet for the result, and call +WasmEdge_AsyncDelete to destroy this object.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncRunWasmFromBytes.html b/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncRunWasmFromBytes.html new file mode 100644 index 000000000..f551f27a8 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncRunWasmFromBytes.html @@ -0,0 +1,26 @@ +WasmEdge_VMAsyncRunWasmFromBytes in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMAsyncRunWasmFromBytes

Source
pub unsafe extern "C" fn WasmEdge_VMAsyncRunWasmFromBytes(
+    Cxt: *mut WasmEdge_VMContext,
+    Bytes: WasmEdge_Bytes,
+    FuncName: WasmEdge_String,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+) -> *mut WasmEdge_Async
Expand description

Instantiate the WASM module from a WasmEdge_Bytes and asynchronous invoke a +function by name.

+

This is the function to invoke a WASM function rapidly. +Load and instantiate the WASM module from a WasmEdge_Bytes, and then invoke +a function by name and parameters. If the Returns buffer length is smaller +than the arity of the function, the overflowed return values will be +discarded. +After calling this function, a new anonymous module instance owned by VM is +instantiated, and the old one will be destroyed.

+

The caller owns the object and should call WasmEdge_AsyncDelete to destroy +it.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param Bytes the WasmEdge_Bytes of WASM binary. +\param FuncName the function name WasmEdge_String. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length.

+

\returns WasmEdge_Async. Call WasmEdge_AsyncGet for the result, and call +WasmEdge_AsyncDelete to destroy this object.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncRunWasmFromFile.html b/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncRunWasmFromFile.html new file mode 100644 index 000000000..8e7879e92 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMAsyncRunWasmFromFile.html @@ -0,0 +1,26 @@ +WasmEdge_VMAsyncRunWasmFromFile in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMAsyncRunWasmFromFile

Source
pub unsafe extern "C" fn WasmEdge_VMAsyncRunWasmFromFile(
+    Cxt: *mut WasmEdge_VMContext,
+    Path: *const c_char,
+    FuncName: WasmEdge_String,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+) -> *mut WasmEdge_Async
Expand description

Instantiate the WASM module from a WASM file and asynchronous invoke a +function by name.

+

This is the function to invoke a WASM function rapidly. +Load and instantiate the WASM module from the file path, and then invoke a +function by name and parameters. If the Returns buffer length is smaller +than the arity of the function, the overflowed return values will be +discarded. +After calling this function, a new anonymous module instance owned by VM is +instantiated, and the old one will be destroyed.

+

The caller owns the object and should call WasmEdge_AsyncDelete to destroy +it.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param Path the NULL-terminated C string of the WASM file path. +\param FuncName the function name WasmEdge_String. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length.

+

\returns WasmEdge_Async. Call WasmEdge_AsyncGet for the result, and call +WasmEdge_AsyncDelete to destroy this object.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMCleanup.html b/wasmedge_sys/ffi/fn.WasmEdge_VMCleanup.html new file mode 100644 index 000000000..e8bd8b81f --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMCleanup.html @@ -0,0 +1,9 @@ +WasmEdge_VMCleanup in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMCleanup

Source
pub unsafe extern "C" fn WasmEdge_VMCleanup(
+    Cxt: *mut WasmEdge_VMContext,
+)
Expand description

Reset of WasmEdge_VMContext.

+

After calling this function, the statistics, loaded module, the instantiated +instances, and the registered instances except the WASI and plug-ins will +all be cleared.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext to reset.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_VMCreate.html new file mode 100644 index 000000000..3ff4a0a28 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMCreate.html @@ -0,0 +1,14 @@ +WasmEdge_VMCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMCreate

Source
pub unsafe extern "C" fn WasmEdge_VMCreate(
+    ConfCxt: *const WasmEdge_ConfigureContext,
+    StoreCxt: *mut WasmEdge_StoreContext,
+) -> *mut WasmEdge_VMContext
Expand description

Creation of the WasmEdge_VMContext.

+

The caller owns the object and should call WasmEdge_VMDelete to destroy +it.

+

\param ConfCxt the WasmEdge_ConfigureContext as the configuration of VM. +NULL for the default configuration. +\param StoreCxt the WasmEdge_StoreContext as the external WASM store of VM. +The instantiation and execution will refer to this store context, and the +life cycle should be ensured until the VM context is deleted. NULL for the +default store owned by WasmEdge_VMContext.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_VMDelete.html new file mode 100644 index 000000000..67edb82cc --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMDelete.html @@ -0,0 +1,7 @@ +WasmEdge_VMDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMDelete

Source
pub unsafe extern "C" fn WasmEdge_VMDelete(
+    Cxt: *mut WasmEdge_VMContext,
+)
Expand description

Deletion of the WasmEdge_VMContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_VMContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMExecute.html b/wasmedge_sys/ffi/fn.WasmEdge_VMExecute.html new file mode 100644 index 000000000..1b14654e0 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMExecute.html @@ -0,0 +1,27 @@ +WasmEdge_VMExecute in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMExecute

Source
pub unsafe extern "C" fn WasmEdge_VMExecute(
+    Cxt: *mut WasmEdge_VMContext,
+    FuncName: WasmEdge_String,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+    Returns: *mut WasmEdge_Value,
+    ReturnLen: u32,
+) -> WasmEdge_Result
Expand description

Invoke a WASM function by name.

+

This is the final step to invoke a WASM function step by step. +After instantiating a WASM module in the VM context, the WASM module is +registered into the store in the VM context as an anonymous module. Then you +can repeatedly call this function to invoke the exported WASM functions by +their names until the VM context is reset or a new WASM module is registered +or loaded. For calling the functions in registered WASM modules with module +names, please use WasmEdge_VMExecuteRegistered instead. If the Returns +buffer length is smaller than the arity of the function, the overflowed +return values will be discarded.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param FuncName the function name WasmEdge_String. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length. +\param [out] Returns the WasmEdge_Value buffer to fill the return values. +\param ReturnLen the return buffer length.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMExecuteRegistered.html b/wasmedge_sys/ffi/fn.WasmEdge_VMExecuteRegistered.html new file mode 100644 index 000000000..c742ed866 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMExecuteRegistered.html @@ -0,0 +1,25 @@ +WasmEdge_VMExecuteRegistered in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMExecuteRegistered

Source
pub unsafe extern "C" fn WasmEdge_VMExecuteRegistered(
+    Cxt: *mut WasmEdge_VMContext,
+    ModuleName: WasmEdge_String,
+    FuncName: WasmEdge_String,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+    Returns: *mut WasmEdge_Value,
+    ReturnLen: u32,
+) -> WasmEdge_Result
Expand description

Invoke a WASM function by its module name and function name.

+

After registering a WASM module in the VM context, you can repeatedly call +this function to invoke exported WASM functions by their module names and +function names until the VM context is reset. If the Returns buffer length +is smaller than the arity of the function, the overflowed return values will +be discarded.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param ModuleName the module name WasmEdge_String. +\param FuncName the function name WasmEdge_String. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length. +\param [out] Returns the WasmEdge_Value buffer to fill the return values. +\param ReturnLen the return buffer length.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMGetActiveModule.html b/wasmedge_sys/ffi/fn.WasmEdge_VMGetActiveModule.html new file mode 100644 index 000000000..86b4ec761 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMGetActiveModule.html @@ -0,0 +1,11 @@ +WasmEdge_VMGetActiveModule in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMGetActiveModule

Source
pub unsafe extern "C" fn WasmEdge_VMGetActiveModule(
+    Cxt: *const WasmEdge_VMContext,
+) -> *const WasmEdge_ModuleInstanceContext
Expand description

Get the current instantiated module in VM.

+

After instantiating a module instance into the VM, developers can call this +API to get the active anonymous module instance to retrieve the exported +instances. The module instance context links to the context owned by the VM +context. The caller should NOT call the WasmEdge_ModuleInstanceDelete.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext.

+

\returns pointer to the module instance context. NULL if not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMGetExecutorContext.html b/wasmedge_sys/ffi/fn.WasmEdge_VMGetExecutorContext.html new file mode 100644 index 000000000..b4b44fd1d --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMGetExecutorContext.html @@ -0,0 +1,10 @@ +WasmEdge_VMGetExecutorContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMGetExecutorContext

Source
pub unsafe extern "C" fn WasmEdge_VMGetExecutorContext(
+    Cxt: *mut WasmEdge_VMContext,
+) -> *mut WasmEdge_ExecutorContext
Expand description

Get the executor context used in the WasmEdge_VMContext.

+

The returned executor context links to the executor in the VM context and +owned by the VM context. This function will return NULL if error occurs. The +caller should NOT call the WasmEdge_ExecutorDelete.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext.

+

\returns pointer to the executor context.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMGetFunctionList.html b/wasmedge_sys/ffi/fn.WasmEdge_VMGetFunctionList.html new file mode 100644 index 000000000..c4a258ddf --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMGetFunctionList.html @@ -0,0 +1,25 @@ +WasmEdge_VMGetFunctionList in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMGetFunctionList

Source
pub unsafe extern "C" fn WasmEdge_VMGetFunctionList(
+    Cxt: *const WasmEdge_VMContext,
+    Names: *mut WasmEdge_String,
+    FuncTypes: *mut *const WasmEdge_FunctionTypeContext,
+    Len: u32,
+) -> u32
Expand description

Get the exported function list.

+

The returned function names filled into the Names array link to the +exported names of functions owned by the vm context, and the caller should +NOT call the WasmEdge_StringDelete to destroy them. +The function type contexts filled into the FuncTypes array of the +corresponding function names link to the context owned by the VM context. +The caller should NOT call the WasmEdge_FunctionTypeDelete to destroy +them. +If the Names and FuncTypes buffer lengths are smaller than the result of +the exported function list size, the overflowed return values will be +discarded.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param [out] Names the output names WasmEdge_String buffer of exported +functions. Can be NULL if names are not needed. +\param [out] FuncTypes the function type contexts buffer. Can be NULL if +function types are not needed. +\param Len the buffer length.

+

\returns actual exported function list size.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMGetFunctionListLength.html b/wasmedge_sys/ffi/fn.WasmEdge_VMGetFunctionListLength.html new file mode 100644 index 000000000..f2b44630c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMGetFunctionListLength.html @@ -0,0 +1,7 @@ +WasmEdge_VMGetFunctionListLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMGetFunctionListLength

Source
pub unsafe extern "C" fn WasmEdge_VMGetFunctionListLength(
+    Cxt: *const WasmEdge_VMContext,
+) -> u32
Expand description

Get the length of exported function list.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext.

+

\returns length of exported function list.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMGetFunctionType.html b/wasmedge_sys/ffi/fn.WasmEdge_VMGetFunctionType.html new file mode 100644 index 000000000..ce33ce2eb --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMGetFunctionType.html @@ -0,0 +1,19 @@ +WasmEdge_VMGetFunctionType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMGetFunctionType

Source
pub unsafe extern "C" fn WasmEdge_VMGetFunctionType(
+    Cxt: *const WasmEdge_VMContext,
+    FuncName: WasmEdge_String,
+) -> *const WasmEdge_FunctionTypeContext
Expand description

Get the function type by function name.

+

After instantiating a WASM module in the VM context, the WASM module is +registered into the store in the VM context as an anonymous module. Then you +can call this function to get the function type by the exported function +name until the VM context is reset or a new WASM module is registered or +loaded. For getting the function type of functions in registered WASM +modules with module names, please use WasmEdge_VMGetFunctionTypeRegistered +instead. +The returned function type context are linked to the context owned by the VM +context, and the caller should NOT call the +WasmEdge_FunctionTypeDelete to destroy it.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param FuncName the function name WasmEdge_String.

+

\returns the function type. NULL if the function not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMGetFunctionTypeRegistered.html b/wasmedge_sys/ffi/fn.WasmEdge_VMGetFunctionTypeRegistered.html new file mode 100644 index 000000000..d1ee24aef --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMGetFunctionTypeRegistered.html @@ -0,0 +1,17 @@ +WasmEdge_VMGetFunctionTypeRegistered in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMGetFunctionTypeRegistered

Source
pub unsafe extern "C" fn WasmEdge_VMGetFunctionTypeRegistered(
+    Cxt: *const WasmEdge_VMContext,
+    ModuleName: WasmEdge_String,
+    FuncName: WasmEdge_String,
+) -> *const WasmEdge_FunctionTypeContext
Expand description

Get the function type by function name.

+

After registering a WASM module in the VM context, you can call this +function to get the function type by the functions’ exported module names +and function names until the VM context is reset. +The returned function type context are linked to the context owned by the VM +context, and the caller should NOT call the +WasmEdge_FunctionTypeDelete to destroy it.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param ModuleName the module name WasmEdge_String. +\param FuncName the function name WasmEdge_String.

+

\returns the function type. NULL if the function not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMGetImportModuleContext.html b/wasmedge_sys/ffi/fn.WasmEdge_VMGetImportModuleContext.html new file mode 100644 index 000000000..a1b8f1e7c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMGetImportModuleContext.html @@ -0,0 +1,21 @@ +WasmEdge_VMGetImportModuleContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMGetImportModuleContext

Source
pub unsafe extern "C" fn WasmEdge_VMGetImportModuleContext(
+    Cxt: *const WasmEdge_VMContext,
+    Reg: WasmEdge_HostRegistration,
+) -> *mut WasmEdge_ModuleInstanceContext
Expand description

Get the module instance corresponding to the WasmEdge_HostRegistration +settings.

+

When creating the VM context with a configuration, the built-in host module +will be registered according to the WasmEdge_HostRegistration settings +added into the WasmEdge_ConfigureContext. You can call this function to +get the WasmEdge_ModuleInstanceContext corresponding to the settings. The +module instance context links to the context owned by the VM context. The +caller should NOT call the WasmEdge_ModuleInstanceDelete.

+
WasmEdge_ConfigureContext *Conf = WasmEdge_ConfigureCreate();
+WasmEdge_ConfigureAddHostRegistration(Conf, WasmEdge_HostRegistration_Wasi);
+WasmEdge_VMContext *VM = WasmEdge_VMCreate(Conf, NULL);
+WasmEdge_ModuleInstanceContext *WasiMod =
+    WasmEdge_VMGetImportModuleContext(VM, WasmEdge_HostRegistration_Wasi);
+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param Reg the host registration value to get the import module.

+

\returns pointer to the module instance context. NULL if not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMGetLoaderContext.html b/wasmedge_sys/ffi/fn.WasmEdge_VMGetLoaderContext.html new file mode 100644 index 000000000..8cfe8f0d4 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMGetLoaderContext.html @@ -0,0 +1,10 @@ +WasmEdge_VMGetLoaderContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMGetLoaderContext

Source
pub unsafe extern "C" fn WasmEdge_VMGetLoaderContext(
+    Cxt: *mut WasmEdge_VMContext,
+) -> *mut WasmEdge_LoaderContext
Expand description

Get the loader context used in the WasmEdge_VMContext.

+

The returned loader context links to the loader in the VM context and owned +by the VM context. This function will return NULL if error occurs. The +caller should NOT call the WasmEdge_LoaderDelete.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext.

+

\returns pointer to the loader context.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMGetRegisteredModule.html b/wasmedge_sys/ffi/fn.WasmEdge_VMGetRegisteredModule.html new file mode 100644 index 000000000..7b2493de4 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMGetRegisteredModule.html @@ -0,0 +1,14 @@ +WasmEdge_VMGetRegisteredModule in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMGetRegisteredModule

Source
pub unsafe extern "C" fn WasmEdge_VMGetRegisteredModule(
+    Cxt: *const WasmEdge_VMContext,
+    ModuleName: WasmEdge_String,
+) -> *const WasmEdge_ModuleInstanceContext
Expand description

Get the registered module in VM by the module name.

+

After registering a WASM module into the VM context, developers can call +this function to get the module instance by the module name. The returned +module instance context links to the context owned by the VM context, and +the caller should NOT call the WasmEdge_ModuleInstanceDelete to +destroy it.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param ModuleName the module name WasmEdge_String.

+

\returns pointer to the module instance context. NULL if not found.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMGetStatisticsContext.html b/wasmedge_sys/ffi/fn.WasmEdge_VMGetStatisticsContext.html new file mode 100644 index 000000000..265eb8f27 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMGetStatisticsContext.html @@ -0,0 +1,10 @@ +WasmEdge_VMGetStatisticsContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMGetStatisticsContext

Source
pub unsafe extern "C" fn WasmEdge_VMGetStatisticsContext(
+    Cxt: *mut WasmEdge_VMContext,
+) -> *mut WasmEdge_StatisticsContext
Expand description

Get the statistics context used in the WasmEdge_VMContext.

+

The statistics context links to the statistics in the VM context and owned +by the VM context. The caller should NOT call the +WasmEdge_StatisticsDelete.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext.

+

\returns pointer to the statistics context.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMGetStoreContext.html b/wasmedge_sys/ffi/fn.WasmEdge_VMGetStoreContext.html new file mode 100644 index 000000000..2a042a2f2 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMGetStoreContext.html @@ -0,0 +1,10 @@ +WasmEdge_VMGetStoreContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMGetStoreContext

Source
pub unsafe extern "C" fn WasmEdge_VMGetStoreContext(
+    Cxt: *mut WasmEdge_VMContext,
+) -> *mut WasmEdge_StoreContext
Expand description

Get the store context used in the WasmEdge_VMContext.

+

The returned store context links to the store in the VM context and owned by +the VM context. This function will return NULL if error occurs. The caller +should NOT call the WasmEdge_StoreDelete.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext.

+

\returns pointer to the store context.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMGetValidatorContext.html b/wasmedge_sys/ffi/fn.WasmEdge_VMGetValidatorContext.html new file mode 100644 index 000000000..a8a834385 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMGetValidatorContext.html @@ -0,0 +1,10 @@ +WasmEdge_VMGetValidatorContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMGetValidatorContext

Source
pub unsafe extern "C" fn WasmEdge_VMGetValidatorContext(
+    Cxt: *mut WasmEdge_VMContext,
+) -> *mut WasmEdge_ValidatorContext
Expand description

Get the validator context used in the WasmEdge_VMContext.

+

The returned validator context links to the validator in the VM context and +owned by the VM context. This function will return NULL if error occurs. The +caller should NOT call the WasmEdge_ValidatorDelete.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext.

+

\returns pointer to the validator context.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMInstantiate.html b/wasmedge_sys/ffi/fn.WasmEdge_VMInstantiate.html new file mode 100644 index 000000000..84808855f --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMInstantiate.html @@ -0,0 +1,14 @@ +WasmEdge_VMInstantiate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMInstantiate

Source
pub unsafe extern "C" fn WasmEdge_VMInstantiate(
+    Cxt: *mut WasmEdge_VMContext,
+) -> WasmEdge_Result
Expand description

Instantiate the validated WASM module in the VM context.

+

This is the third step to invoke a WASM function step by step. +After validating a WASM module in the VM context, You can call this function +to instantiate it. And you can then call WasmEdge_VMExecute for invoking +the exported function in this WASM module. +After calling this function, a new anonymous module instance owned by VM is +instantiated, and the old one will be destroyed.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMListRegisteredModule.html b/wasmedge_sys/ffi/fn.WasmEdge_VMListRegisteredModule.html new file mode 100644 index 000000000..d6eaef119 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMListRegisteredModule.html @@ -0,0 +1,18 @@ +WasmEdge_VMListRegisteredModule in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMListRegisteredModule

Source
pub unsafe extern "C" fn WasmEdge_VMListRegisteredModule(
+    Cxt: *const WasmEdge_VMContext,
+    Names: *mut WasmEdge_String,
+    Len: u32,
+) -> u32
Expand description

List the registered module names in the WasmEdge_VMContext.

+

This function will list all registered module names. +The returned module names filled into the Names array are linked to the +registered module names in the VM context, and the caller should NOT +call the WasmEdge_StringDelete. +If the Names buffer length is smaller than the result of the registered +named module list size, the overflowed return values will be discarded.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param [out] Names the output names WasmEdge_String buffer of the registered +modules. +\param Len the buffer length.

+

\returns actual registered module list size.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMListRegisteredModuleLength.html b/wasmedge_sys/ffi/fn.WasmEdge_VMListRegisteredModuleLength.html new file mode 100644 index 000000000..5932ccf87 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMListRegisteredModuleLength.html @@ -0,0 +1,7 @@ +WasmEdge_VMListRegisteredModuleLength in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMListRegisteredModuleLength

Source
pub unsafe extern "C" fn WasmEdge_VMListRegisteredModuleLength(
+    Cxt: *const WasmEdge_VMContext,
+) -> u32
Expand description

Get the length of registered module list in the WasmEdge_VMContext.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext.

+

\returns length of registered module list.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMLoadWasmFromASTModule.html b/wasmedge_sys/ffi/fn.WasmEdge_VMLoadWasmFromASTModule.html new file mode 100644 index 000000000..4d2c9b1ae --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMLoadWasmFromASTModule.html @@ -0,0 +1,15 @@ +WasmEdge_VMLoadWasmFromASTModule in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMLoadWasmFromASTModule

Source
pub unsafe extern "C" fn WasmEdge_VMLoadWasmFromASTModule(
+    Cxt: *mut WasmEdge_VMContext,
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+) -> WasmEdge_Result
Expand description

Load the WASM module from loaded WasmEdge AST Module.

+

This is the first step to invoke a WASM function step by step. +Copy the loaded WasmEdge AST Module context into VM. The VM context has no +dependency on the input AST Module context. You can then call +WasmEdge_VMValidate for the next step.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param ASTCxt the WasmEdge AST Module context generated by loader or +compiler.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMLoadWasmFromBuffer.html b/wasmedge_sys/ffi/fn.WasmEdge_VMLoadWasmFromBuffer.html new file mode 100644 index 000000000..3ad146c93 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMLoadWasmFromBuffer.html @@ -0,0 +1,17 @@ +WasmEdge_VMLoadWasmFromBuffer in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMLoadWasmFromBuffer

Source
pub unsafe extern "C" fn WasmEdge_VMLoadWasmFromBuffer(
+    Cxt: *mut WasmEdge_VMContext,
+    Buf: *const u8,
+    BufLen: u32,
+) -> WasmEdge_Result
Expand description

Load the WASM module from a buffer.

+

CAUTION: This function will be deprecated and replaced by +WasmEdge_VMLoadWasmFromBytes() API in the future.

+

This is the first step to invoke a WASM function step by step. +Load and parse the WASM module from a buffer. You can then call +WasmEdge_VMValidate for the next step.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param Buf the buffer of WASM binary. +\param BufLen the length of the buffer.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMLoadWasmFromBytes.html b/wasmedge_sys/ffi/fn.WasmEdge_VMLoadWasmFromBytes.html new file mode 100644 index 000000000..e404b94f6 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMLoadWasmFromBytes.html @@ -0,0 +1,13 @@ +WasmEdge_VMLoadWasmFromBytes in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMLoadWasmFromBytes

Source
pub unsafe extern "C" fn WasmEdge_VMLoadWasmFromBytes(
+    Cxt: *mut WasmEdge_VMContext,
+    Bytes: WasmEdge_Bytes,
+) -> WasmEdge_Result
Expand description

Load the WASM module from a WasmEdge_Bytes.

+

This is the first step to invoke a WASM function step by step. +Load and parse the WASM module from a WasmEdge_Bytes. You can then call +WasmEdge_VMValidate for the next step.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param Bytes the WasmEdge_Bytes of WASM binary.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMLoadWasmFromFile.html b/wasmedge_sys/ffi/fn.WasmEdge_VMLoadWasmFromFile.html new file mode 100644 index 000000000..1bc098b75 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMLoadWasmFromFile.html @@ -0,0 +1,13 @@ +WasmEdge_VMLoadWasmFromFile in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMLoadWasmFromFile

Source
pub unsafe extern "C" fn WasmEdge_VMLoadWasmFromFile(
+    Cxt: *mut WasmEdge_VMContext,
+    Path: *const c_char,
+) -> WasmEdge_Result
Expand description

Load the WASM module from a WASM file.

+

This is the first step to invoke a WASM function step by step. +Load and parse the WASM module from the file path. You can then call +WasmEdge_VMValidate for the next step.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param Path the NULL-terminated C string of the WASM file path.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromASTModule.html b/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromASTModule.html new file mode 100644 index 000000000..c8f60fe84 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromASTModule.html @@ -0,0 +1,17 @@ +WasmEdge_VMRegisterModuleFromASTModule in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMRegisterModuleFromASTModule

Source
pub unsafe extern "C" fn WasmEdge_VMRegisterModuleFromASTModule(
+    Cxt: *mut WasmEdge_VMContext,
+    ModuleName: WasmEdge_String,
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+) -> WasmEdge_Result
Expand description

Instantiate and register an AST Module into a named module instance in VM.

+

Load from the AST Module, and register all exported instances and +instantiate them into the store in VM with their exported name and module +name.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext which contains the store. +\param ModuleName the WasmEdge_String of module name for all exported +instances. +\param ASTCxt the WasmEdge AST Module context generated by loader or +compiler.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromBuffer.html b/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromBuffer.html new file mode 100644 index 000000000..203d22b0a --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromBuffer.html @@ -0,0 +1,20 @@ +WasmEdge_VMRegisterModuleFromBuffer in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMRegisterModuleFromBuffer

Source
pub unsafe extern "C" fn WasmEdge_VMRegisterModuleFromBuffer(
+    Cxt: *mut WasmEdge_VMContext,
+    ModuleName: WasmEdge_String,
+    Buf: *const u8,
+    BufLen: u32,
+) -> WasmEdge_Result
Expand description

Register and instantiate WASM into the store in VM from a buffer.

+

CAUTION: This function will be deprecated and replaced by +WasmEdge_VMRegisterModuleFromBytes() API in the future.

+

Load a WASM module from a buffer, and register all exported instances and +instantiate them into the store into the VM with their exported name and +module name.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext which contains the store. +\param ModuleName the WasmEdge_String of module name for all exported +instances. +\param Buf the buffer of WASM binary. +\param BufLen the length of the buffer.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromBytes.html b/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromBytes.html new file mode 100644 index 000000000..7b438169c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromBytes.html @@ -0,0 +1,16 @@ +WasmEdge_VMRegisterModuleFromBytes in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMRegisterModuleFromBytes

Source
pub unsafe extern "C" fn WasmEdge_VMRegisterModuleFromBytes(
+    Cxt: *mut WasmEdge_VMContext,
+    ModuleName: WasmEdge_String,
+    Bytes: WasmEdge_Bytes,
+) -> WasmEdge_Result
Expand description

Register and instantiate WASM into the store in VM from a WasmEdge_Bytes.

+

Load a WASM module from a WasmEdge_Bytes, and register all exported +instances and instantiate them into the store into the VM with their +exported name and module name.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext which contains the store. +\param ModuleName the WasmEdge_String of module name for all exported +instances. +\param Bytes the WasmEdge_Bytes of WASM binary.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromFile.html b/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromFile.html new file mode 100644 index 000000000..a2d8cb44c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromFile.html @@ -0,0 +1,16 @@ +WasmEdge_VMRegisterModuleFromFile in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMRegisterModuleFromFile

Source
pub unsafe extern "C" fn WasmEdge_VMRegisterModuleFromFile(
+    Cxt: *mut WasmEdge_VMContext,
+    ModuleName: WasmEdge_String,
+    Path: *const c_char,
+) -> WasmEdge_Result
Expand description

Register and instantiate WASM into the store in VM from a WASM file.

+

Load a WASM file from the path, and register all exported instances and +instantiate them into the store into the VM with their exported name and +module name.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext which contains the store. +\param ModuleName the WasmEdge_String of module name for all exported +instances. +\param Path the NULL-terminated C string of the WASM file path.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromImport.html b/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromImport.html new file mode 100644 index 000000000..8ae2acbd0 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMRegisterModuleFromImport.html @@ -0,0 +1,21 @@ +WasmEdge_VMRegisterModuleFromImport in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMRegisterModuleFromImport

Source
pub unsafe extern "C" fn WasmEdge_VMRegisterModuleFromImport(
+    Cxt: *mut WasmEdge_VMContext,
+    ImportCxt: *const WasmEdge_ModuleInstanceContext,
+) -> WasmEdge_Result
Expand description

Register a module instance into the store in VM with exporting its module +name.

+

After calling this function, the existing module instance will be registered +into the store context in this VM, and the other modules can import the +exported instances for linking when instantiation. Developers SHOULD +guarantee the life cycle of this existing module instance, or the error will +occur when in execution after the module instance being destroyed if it has +been imported by other modules. That is, developers should call the +WasmEdge_ModuleInstanceDelete if this existing module instance will not be +used anymore or after the deletion of this VM. When the module instance is +deleted, it will be unregistered to the store context in this VM +automatically.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext which contains the store. +\param ImportCxt the WasmEdge_ModuleInstanceContext to register.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMRunWasmFromASTModule.html b/wasmedge_sys/ffi/fn.WasmEdge_VMRunWasmFromASTModule.html new file mode 100644 index 000000000..7ba0b20e2 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMRunWasmFromASTModule.html @@ -0,0 +1,29 @@ +WasmEdge_VMRunWasmFromASTModule in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMRunWasmFromASTModule

Source
pub unsafe extern "C" fn WasmEdge_VMRunWasmFromASTModule(
+    Cxt: *mut WasmEdge_VMContext,
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+    FuncName: WasmEdge_String,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+    Returns: *mut WasmEdge_Value,
+    ReturnLen: u32,
+) -> WasmEdge_Result
Expand description

Instantiate the WASM module from a WasmEdge AST Module and invoke a function +by name.

+

This is the function to invoke a WASM function rapidly. +Load and instantiate the WASM module from the WasmEdge AST Module, and then +invoke the function by name and parameters. If the Returns buffer length +is smaller than the arity of the function, the overflowed return values will +be discarded. +After calling this function, a new anonymous module instance owned by VM is +instantiated, and the old one will be destroyed.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param ASTCxt the WasmEdge AST Module context generated by loader or +compiler. +\param FuncName the function name WasmEdge_String. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length. +\param [out] Returns the WasmEdge_Value buffer to fill the return values. +\param ReturnLen the return buffer length.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMRunWasmFromBuffer.html b/wasmedge_sys/ffi/fn.WasmEdge_VMRunWasmFromBuffer.html new file mode 100644 index 000000000..65ba543e7 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMRunWasmFromBuffer.html @@ -0,0 +1,31 @@ +WasmEdge_VMRunWasmFromBuffer in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMRunWasmFromBuffer

Source
pub unsafe extern "C" fn WasmEdge_VMRunWasmFromBuffer(
+    Cxt: *mut WasmEdge_VMContext,
+    Buf: *const u8,
+    BufLen: u32,
+    FuncName: WasmEdge_String,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+    Returns: *mut WasmEdge_Value,
+    ReturnLen: u32,
+) -> WasmEdge_Result
Expand description

Instantiate the WASM module from a buffer and invoke a function by name.

+

CAUTION: This function will be deprecated and replaced by +WasmEdge_VMRunWasmFromBytes() API in the future.

+

This is the function to invoke a WASM function rapidly. +Load and instantiate the WASM module from a buffer, and then invoke a +function by name and parameters. If the Returns buffer length is smaller +than the arity of the function, the overflowed return values will be +discarded. +After calling this function, a new anonymous module instance owned by VM is +instantiated, and the old one will be destroyed.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param Buf the buffer of WASM binary. +\param BufLen the length of the buffer. +\param FuncName the function name WasmEdge_String. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length. +\param [out] Returns the WasmEdge_Value buffer to fill the return values. +\param ReturnLen the return buffer length.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMRunWasmFromBytes.html b/wasmedge_sys/ffi/fn.WasmEdge_VMRunWasmFromBytes.html new file mode 100644 index 000000000..612d1b931 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMRunWasmFromBytes.html @@ -0,0 +1,28 @@ +WasmEdge_VMRunWasmFromBytes in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMRunWasmFromBytes

Source
pub unsafe extern "C" fn WasmEdge_VMRunWasmFromBytes(
+    Cxt: *mut WasmEdge_VMContext,
+    Bytes: WasmEdge_Bytes,
+    FuncName: WasmEdge_String,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+    Returns: *mut WasmEdge_Value,
+    ReturnLen: u32,
+) -> WasmEdge_Result
Expand description

Instantiate the WASM module from a WasmEdge_Bytes and invoke a function by +name.

+

This is the function to invoke a WASM function rapidly. +Load and instantiate the WASM module from a WasmEdge_Bytes, and then invoke +a function by name and parameters. If the Returns buffer length is smaller +than the arity of the function, the overflowed return values will be +discarded. +After calling this function, a new anonymous module instance owned by VM is +instantiated, and the old one will be destroyed.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param Bytes the WasmEdge_Bytes of WASM binary. +\param FuncName the function name WasmEdge_String. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length. +\param [out] Returns the WasmEdge_Value buffer to fill the return values. +\param ReturnLen the return buffer length.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMRunWasmFromFile.html b/wasmedge_sys/ffi/fn.WasmEdge_VMRunWasmFromFile.html new file mode 100644 index 000000000..95d986388 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMRunWasmFromFile.html @@ -0,0 +1,27 @@ +WasmEdge_VMRunWasmFromFile in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMRunWasmFromFile

Source
pub unsafe extern "C" fn WasmEdge_VMRunWasmFromFile(
+    Cxt: *mut WasmEdge_VMContext,
+    Path: *const c_char,
+    FuncName: WasmEdge_String,
+    Params: *const WasmEdge_Value,
+    ParamLen: u32,
+    Returns: *mut WasmEdge_Value,
+    ReturnLen: u32,
+) -> WasmEdge_Result
Expand description

Instantiate the WASM module from a WASM file and invoke a function by name.

+

This is the function to invoke a WASM function rapidly. +Load and instantiate the WASM module from the file path, and then invoke a +function by name and parameters. If the Returns buffer length is smaller +than the arity of the function, the overflowed return values will be +discarded. +After calling this function, a new anonymous module instance owned by VM is +instantiated, and the old one will be destroyed.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext. +\param Path the NULL-terminated C string of the WASM file path. +\param FuncName the function name WasmEdge_String. +\param Params the WasmEdge_Value buffer with the parameter values. +\param ParamLen the parameter buffer length. +\param [out] Returns the WasmEdge_Value buffer to fill the return values. +\param ReturnLen the return buffer length.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VMValidate.html b/wasmedge_sys/ffi/fn.WasmEdge_VMValidate.html new file mode 100644 index 000000000..f70ea5ab4 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VMValidate.html @@ -0,0 +1,13 @@ +WasmEdge_VMValidate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VMValidate

Source
pub unsafe extern "C" fn WasmEdge_VMValidate(
+    Cxt: *mut WasmEdge_VMContext,
+) -> WasmEdge_Result
Expand description

Validate the WASM module loaded into the VM context.

+

This is the second step to invoke a WASM function step by step. +After loading a WASM module into VM context, You can call this function to +validate it. And you can then call WasmEdge_VMInstantiate for the next +step. Note that only validated WASM modules can be instantiated in the VM +context.

+

This function is thread-safe.

+

\param Cxt the WasmEdge_VMContext.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenExternRef.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenExternRef.html new file mode 100644 index 000000000..e9c851b24 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenExternRef.html @@ -0,0 +1,3 @@ +WasmEdge_ValTypeGenExternRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeGenExternRef

Source
pub unsafe extern "C" fn WasmEdge_ValTypeGenExternRef() -> WasmEdge_ValType
Expand description

Generate the ExternRef WASM value type.

+

\returns WasmEdge_ValType struct with the ExternRef value type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenF32.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenF32.html new file mode 100644 index 000000000..c03b89eaa --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenF32.html @@ -0,0 +1,3 @@ +WasmEdge_ValTypeGenF32 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeGenF32

Source
pub unsafe extern "C" fn WasmEdge_ValTypeGenF32() -> WasmEdge_ValType
Expand description

Generate the F32 WASM value type.

+

\returns WasmEdge_ValType struct with the F32 value type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenF64.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenF64.html new file mode 100644 index 000000000..24285e026 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenF64.html @@ -0,0 +1,3 @@ +WasmEdge_ValTypeGenF64 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeGenF64

Source
pub unsafe extern "C" fn WasmEdge_ValTypeGenF64() -> WasmEdge_ValType
Expand description

Generate the F64 WASM value type.

+

\returns WasmEdge_ValType struct with the F64 value type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenFuncRef.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenFuncRef.html new file mode 100644 index 000000000..701ad276f --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenFuncRef.html @@ -0,0 +1,3 @@ +WasmEdge_ValTypeGenFuncRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeGenFuncRef

Source
pub unsafe extern "C" fn WasmEdge_ValTypeGenFuncRef() -> WasmEdge_ValType
Expand description

Generate the FuncRef WASM value type.

+

\returns WasmEdge_ValType struct with the FuncRef value type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenI32.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenI32.html new file mode 100644 index 000000000..2733528bb --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenI32.html @@ -0,0 +1,3 @@ +WasmEdge_ValTypeGenI32 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeGenI32

Source
pub unsafe extern "C" fn WasmEdge_ValTypeGenI32() -> WasmEdge_ValType
Expand description

Generate the I32 WASM value type.

+

\returns WasmEdge_ValType struct with the I32 value type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenI64.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenI64.html new file mode 100644 index 000000000..66783c69b --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenI64.html @@ -0,0 +1,3 @@ +WasmEdge_ValTypeGenI64 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeGenI64

Source
pub unsafe extern "C" fn WasmEdge_ValTypeGenI64() -> WasmEdge_ValType
Expand description

Generate the I64 WASM value type.

+

\returns WasmEdge_ValType struct with the I64 value type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenV128.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenV128.html new file mode 100644 index 000000000..7a8780710 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeGenV128.html @@ -0,0 +1,3 @@ +WasmEdge_ValTypeGenV128 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeGenV128

Source
pub unsafe extern "C" fn WasmEdge_ValTypeGenV128() -> WasmEdge_ValType
Expand description

Generate the V128 WASM value type.

+

\returns WasmEdge_ValType struct with the V128 value type.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsEqual.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsEqual.html new file mode 100644 index 000000000..069fbdf75 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsEqual.html @@ -0,0 +1,9 @@ +WasmEdge_ValTypeIsEqual in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeIsEqual

Source
pub unsafe extern "C" fn WasmEdge_ValTypeIsEqual(
+    ValType1: WasmEdge_ValType,
+    ValType2: WasmEdge_ValType,
+) -> bool
Expand description

Compare the two WasmEdge_ValType objects.

+

\param ValType1 the first WasmEdge_ValType object to compare. +\param ValType2 the second WasmEdge_ValType object to compare.

+

\returns true if the content of two WasmEdge_ValType objects are the same, +false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsExternRef.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsExternRef.html new file mode 100644 index 000000000..c512737a1 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsExternRef.html @@ -0,0 +1,6 @@ +WasmEdge_ValTypeIsExternRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeIsExternRef

Source
pub unsafe extern "C" fn WasmEdge_ValTypeIsExternRef(
+    ValType: WasmEdge_ValType,
+) -> bool
Expand description

Specify the WASM value type is an ExternRef or not.

+

\param ValType the WasmEdge_ValType object to check.

+

\returns true if the value type is an ExternRef, false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsF32.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsF32.html new file mode 100644 index 000000000..07d7aad87 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsF32.html @@ -0,0 +1,6 @@ +WasmEdge_ValTypeIsF32 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeIsF32

Source
pub unsafe extern "C" fn WasmEdge_ValTypeIsF32(
+    ValType: WasmEdge_ValType,
+) -> bool
Expand description

Specify the WASM value type is a F32 or not.

+

\param ValType the WasmEdge_ValType object to check.

+

\returns true if the value type is a F32, false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsF64.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsF64.html new file mode 100644 index 000000000..9432c8efd --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsF64.html @@ -0,0 +1,6 @@ +WasmEdge_ValTypeIsF64 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeIsF64

Source
pub unsafe extern "C" fn WasmEdge_ValTypeIsF64(
+    ValType: WasmEdge_ValType,
+) -> bool
Expand description

Specify the WASM value type is a F64 or not.

+

\param ValType the WasmEdge_ValType object to check.

+

\returns true if the value type is a F64, false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsFuncRef.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsFuncRef.html new file mode 100644 index 000000000..e02567e46 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsFuncRef.html @@ -0,0 +1,6 @@ +WasmEdge_ValTypeIsFuncRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeIsFuncRef

Source
pub unsafe extern "C" fn WasmEdge_ValTypeIsFuncRef(
+    ValType: WasmEdge_ValType,
+) -> bool
Expand description

Specify the WASM value type is a FuncRef or not.

+

\param ValType the WasmEdge_ValType object to check.

+

\returns true if the value type is a FuncRef, false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsI32.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsI32.html new file mode 100644 index 000000000..6699ae164 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsI32.html @@ -0,0 +1,6 @@ +WasmEdge_ValTypeIsI32 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeIsI32

Source
pub unsafe extern "C" fn WasmEdge_ValTypeIsI32(
+    ValType: WasmEdge_ValType,
+) -> bool
Expand description

Specify the WASM value type is an I32 or not.

+

\param ValType the WasmEdge_ValType object to check.

+

\returns true if the value type is an I32, false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsI64.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsI64.html new file mode 100644 index 000000000..e34d58a6e --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsI64.html @@ -0,0 +1,6 @@ +WasmEdge_ValTypeIsI64 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeIsI64

Source
pub unsafe extern "C" fn WasmEdge_ValTypeIsI64(
+    ValType: WasmEdge_ValType,
+) -> bool
Expand description

Specify the WASM value type is an I64 or not.

+

\param ValType the WasmEdge_ValType object to check.

+

\returns true if the value type is an I64, false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsRef.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsRef.html new file mode 100644 index 000000000..53a7b76cb --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsRef.html @@ -0,0 +1,7 @@ +WasmEdge_ValTypeIsRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeIsRef

Source
pub unsafe extern "C" fn WasmEdge_ValTypeIsRef(
+    ValType: WasmEdge_ValType,
+) -> bool
Expand description

Specify the WASM value type is a Ref (includes nullable and non-nullable) or +not.

+

\param ValType the WasmEdge_ValType object to check.

+

\returns true if the value type is a Ref, false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsRefNull.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsRefNull.html new file mode 100644 index 000000000..3d3ad6f0f --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsRefNull.html @@ -0,0 +1,6 @@ +WasmEdge_ValTypeIsRefNull in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeIsRefNull

Source
pub unsafe extern "C" fn WasmEdge_ValTypeIsRefNull(
+    ValType: WasmEdge_ValType,
+) -> bool
Expand description

Specify the WASM value type is a nullable Ref or not.

+

\param ValType the WasmEdge_ValType object to check.

+

\returns true if the value type is a nullable Ref, false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsV128.html b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsV128.html new file mode 100644 index 000000000..b0b7ae920 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValTypeIsV128.html @@ -0,0 +1,6 @@ +WasmEdge_ValTypeIsV128 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValTypeIsV128

Source
pub unsafe extern "C" fn WasmEdge_ValTypeIsV128(
+    ValType: WasmEdge_ValType,
+) -> bool
Expand description

Specify the WASM value type is a V128 or not.

+

\param ValType the WasmEdge_ValType object to check.

+

\returns true if the value type is a V128, false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValidatorCreate.html b/wasmedge_sys/ffi/fn.WasmEdge_ValidatorCreate.html new file mode 100644 index 000000000..782bb5d6a --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValidatorCreate.html @@ -0,0 +1,9 @@ +WasmEdge_ValidatorCreate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValidatorCreate

Source
pub unsafe extern "C" fn WasmEdge_ValidatorCreate(
+    ConfCxt: *const WasmEdge_ConfigureContext,
+) -> *mut WasmEdge_ValidatorContext
Expand description

Creation of the WasmEdge_ValidatorContext.

+

The caller owns the object and should call WasmEdge_ValidatorDelete to +destroy it.

+

\param ConfCxt the WasmEdge_ConfigureContext as the configuration of +Validator. NULL for the default configuration.

+

\returns pointer to context, NULL if failed.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValidatorDelete.html b/wasmedge_sys/ffi/fn.WasmEdge_ValidatorDelete.html new file mode 100644 index 000000000..44b011e22 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValidatorDelete.html @@ -0,0 +1,7 @@ +WasmEdge_ValidatorDelete in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValidatorDelete

Source
pub unsafe extern "C" fn WasmEdge_ValidatorDelete(
+    Cxt: *mut WasmEdge_ValidatorContext,
+)
Expand description

Deletion of the WasmEdge_ValidatorContext.

+

After calling this function, the context will be destroyed and should +NOT be used.

+

\param Cxt the WasmEdge_ValidatorContext to destroy.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValidatorValidate.html b/wasmedge_sys/ffi/fn.WasmEdge_ValidatorValidate.html new file mode 100644 index 000000000..66ea38ce7 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValidatorValidate.html @@ -0,0 +1,9 @@ +WasmEdge_ValidatorValidate in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValidatorValidate

Source
pub unsafe extern "C" fn WasmEdge_ValidatorValidate(
+    Cxt: *mut WasmEdge_ValidatorContext,
+    ASTCxt: *const WasmEdge_ASTModuleContext,
+) -> WasmEdge_Result
Expand description

Validate the WasmEdge AST Module.

+

\param Cxt the WasmEdge_ValidatorContext. +\param ASTCxt the WasmEdge_ASTModuleContext to validate.

+

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error +message.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGenExternRef.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenExternRef.html new file mode 100644 index 000000000..54defc8b4 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenExternRef.html @@ -0,0 +1,8 @@ +WasmEdge_ValueGenExternRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGenExternRef

Source
pub unsafe extern "C" fn WasmEdge_ValueGenExternRef(
+    Ref: *mut c_void,
+) -> WasmEdge_Value
Expand description

Generate the function reference WASM value.

+

The values generated by this function are only meaningful when the +WasmEdge_Proposal_ReferenceTypes turns on in configuration.

+

\param Ref the reference to the external object.

+

\returns WasmEdge_Value struct with the external reference.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGenF32.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenF32.html new file mode 100644 index 000000000..5650a20ff --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenF32.html @@ -0,0 +1,6 @@ +WasmEdge_ValueGenF32 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGenF32

Source
pub unsafe extern "C" fn WasmEdge_ValueGenF32(
+    Val: f32,
+) -> WasmEdge_Value
Expand description

Generate the F32 WASM value.

+

\param Val the F32 value.

+

\returns WasmEdge_Value struct with the F32 value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGenF64.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenF64.html new file mode 100644 index 000000000..8be4785ee --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenF64.html @@ -0,0 +1,6 @@ +WasmEdge_ValueGenF64 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGenF64

Source
pub unsafe extern "C" fn WasmEdge_ValueGenF64(
+    Val: f64,
+) -> WasmEdge_Value
Expand description

Generate the F64 WASM value.

+

\param Val the F64 value.

+

\returns WasmEdge_Value struct with the F64 value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGenFuncRef.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenFuncRef.html new file mode 100644 index 000000000..46f607e4f --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenFuncRef.html @@ -0,0 +1,9 @@ +WasmEdge_ValueGenFuncRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGenFuncRef

Source
pub unsafe extern "C" fn WasmEdge_ValueGenFuncRef(
+    Cxt: *const WasmEdge_FunctionInstanceContext,
+) -> WasmEdge_Value
Expand description

Generate the function reference WASM value.

+

The values generated by this function are only meaningful when the +WasmEdge_Proposal_BulkMemoryOperations or the +WasmEdge_Proposal_ReferenceTypes turns on in configuration.

+

\param Cxt the function instance context to convert to the reference.

+

\returns WasmEdge_Value struct with the function reference.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGenI32.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenI32.html new file mode 100644 index 000000000..7314d31ee --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenI32.html @@ -0,0 +1,6 @@ +WasmEdge_ValueGenI32 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGenI32

Source
pub unsafe extern "C" fn WasmEdge_ValueGenI32(
+    Val: i32,
+) -> WasmEdge_Value
Expand description

Generate the I32 WASM value.

+

\param Val the I32 value.

+

\returns WasmEdge_Value struct with the I32 value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGenI64.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenI64.html new file mode 100644 index 000000000..f07ab0d30 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenI64.html @@ -0,0 +1,6 @@ +WasmEdge_ValueGenI64 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGenI64

Source
pub unsafe extern "C" fn WasmEdge_ValueGenI64(
+    Val: i64,
+) -> WasmEdge_Value
Expand description

Generate the I64 WASM value.

+

\param Val the I64 value.

+

\returns WasmEdge_Value struct with the I64 value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGenV128.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenV128.html new file mode 100644 index 000000000..b7d68c565 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGenV128.html @@ -0,0 +1,6 @@ +WasmEdge_ValueGenV128 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGenV128

Source
pub unsafe extern "C" fn WasmEdge_ValueGenV128(
+    Val: int128_t,
+) -> WasmEdge_Value
Expand description

Generate the V128 WASM value.

+

\param Val the V128 value.

+

\returns WasmEdge_Value struct with the V128 value.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGetExternRef.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetExternRef.html new file mode 100644 index 000000000..914621dfa --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetExternRef.html @@ -0,0 +1,6 @@ +WasmEdge_ValueGetExternRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGetExternRef

Source
pub unsafe extern "C" fn WasmEdge_ValueGetExternRef(
+    Val: WasmEdge_Value,
+) -> *mut c_void
Expand description

Retrieve the external reference from the WASM value.

+

\param Val the WasmEdge_Value struct.

+

\returns external reference in the input struct.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGetF32.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetF32.html new file mode 100644 index 000000000..0256240a1 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetF32.html @@ -0,0 +1,6 @@ +WasmEdge_ValueGetF32 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGetF32

Source
pub unsafe extern "C" fn WasmEdge_ValueGetF32(
+    Val: WasmEdge_Value,
+) -> f32
Expand description

Retrieve the F32 value from the WASM value.

+

\param Val the WasmEdge_Value struct.

+

\returns F32 value in the input struct.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGetF64.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetF64.html new file mode 100644 index 000000000..445c0f03c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetF64.html @@ -0,0 +1,6 @@ +WasmEdge_ValueGetF64 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGetF64

Source
pub unsafe extern "C" fn WasmEdge_ValueGetF64(
+    Val: WasmEdge_Value,
+) -> f64
Expand description

Retrieve the F64 value from the WASM value.

+

\param Val the WasmEdge_Value struct.

+

\returns F64 value in the input struct.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGetFuncRef.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetFuncRef.html new file mode 100644 index 000000000..9c28b4260 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetFuncRef.html @@ -0,0 +1,6 @@ +WasmEdge_ValueGetFuncRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGetFuncRef

Source
pub unsafe extern "C" fn WasmEdge_ValueGetFuncRef(
+    Val: WasmEdge_Value,
+) -> *const WasmEdge_FunctionInstanceContext
Expand description

Retrieve the function instance context from the WASM value.

+

\param Val the WasmEdge_Value struct.

+

\returns pointer to function instance context in the input struct.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGetI32.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetI32.html new file mode 100644 index 000000000..e449fde6c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetI32.html @@ -0,0 +1,6 @@ +WasmEdge_ValueGetI32 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGetI32

Source
pub unsafe extern "C" fn WasmEdge_ValueGetI32(
+    Val: WasmEdge_Value,
+) -> i32
Expand description

Retrieve the I32 value from the WASM value.

+

\param Val the WasmEdge_Value struct.

+

\returns I32 value in the input struct.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGetI64.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetI64.html new file mode 100644 index 000000000..0265b0633 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetI64.html @@ -0,0 +1,6 @@ +WasmEdge_ValueGetI64 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGetI64

Source
pub unsafe extern "C" fn WasmEdge_ValueGetI64(
+    Val: WasmEdge_Value,
+) -> i64
Expand description

Retrieve the I64 value from the WASM value.

+

\param Val the WasmEdge_Value struct.

+

\returns I64 value in the input struct.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueGetV128.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetV128.html new file mode 100644 index 000000000..88605777c --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueGetV128.html @@ -0,0 +1,6 @@ +WasmEdge_ValueGetV128 in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueGetV128

Source
pub unsafe extern "C" fn WasmEdge_ValueGetV128(
+    Val: WasmEdge_Value,
+) -> int128_t
Expand description

Retrieve the V128 value from the WASM value.

+

\param Val the WasmEdge_Value struct.

+

\returns V128 value in the input struct.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_ValueIsNullRef.html b/wasmedge_sys/ffi/fn.WasmEdge_ValueIsNullRef.html new file mode 100644 index 000000000..465d71475 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_ValueIsNullRef.html @@ -0,0 +1,6 @@ +WasmEdge_ValueIsNullRef in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_ValueIsNullRef

Source
pub unsafe extern "C" fn WasmEdge_ValueIsNullRef(
+    Val: WasmEdge_Value,
+) -> bool
Expand description

Specify the WASM value is a null reference or not.

+

\param Val the WasmEdge_Value struct.

+

\returns true if the value is a null reference, false if not.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VersionGet.html b/wasmedge_sys/ffi/fn.WasmEdge_VersionGet.html new file mode 100644 index 000000000..a64a4e508 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VersionGet.html @@ -0,0 +1,4 @@ +WasmEdge_VersionGet in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VersionGet

Source
pub unsafe extern "C" fn WasmEdge_VersionGet() -> *const c_char
Expand description

Get the version string of the WasmEdge C API.

+

The returned string must NOT be destroyed.

+

\returns NULL-terminated C string of version.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VersionGetMajor.html b/wasmedge_sys/ffi/fn.WasmEdge_VersionGetMajor.html new file mode 100644 index 000000000..1789df479 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VersionGetMajor.html @@ -0,0 +1,3 @@ +WasmEdge_VersionGetMajor in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VersionGetMajor

Source
pub unsafe extern "C" fn WasmEdge_VersionGetMajor() -> u32
Expand description

Get the major version value of the WasmEdge C API.

+

\returns Value of the major version.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VersionGetMinor.html b/wasmedge_sys/ffi/fn.WasmEdge_VersionGetMinor.html new file mode 100644 index 000000000..ce22503fb --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VersionGetMinor.html @@ -0,0 +1,3 @@ +WasmEdge_VersionGetMinor in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VersionGetMinor

Source
pub unsafe extern "C" fn WasmEdge_VersionGetMinor() -> u32
Expand description

Get the minor version value of the WasmEdge C API.

+

\returns Value of the minor version.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/fn.WasmEdge_VersionGetPatch.html b/wasmedge_sys/ffi/fn.WasmEdge_VersionGetPatch.html new file mode 100644 index 000000000..bf2699822 --- /dev/null +++ b/wasmedge_sys/ffi/fn.WasmEdge_VersionGetPatch.html @@ -0,0 +1,3 @@ +WasmEdge_VersionGetPatch in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Function WasmEdge_VersionGetPatch

Source
pub unsafe extern "C" fn WasmEdge_VersionGetPatch() -> u32
Expand description

Get the patch version value of the WasmEdge C API.

+

\returns Value of the patch version.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/index.html b/wasmedge_sys/ffi/index.html new file mode 100644 index 000000000..d9aeaedce --- /dev/null +++ b/wasmedge_sys/ffi/index.html @@ -0,0 +1,19 @@ +wasmedge_sys::ffi - Rust
wasmedge_sys

Module ffi

Source
Expand description

Foreign function interfaces generated from WasmEdge C-API.

+

Structs§

Constants§

Functions§

Type Aliases§

\ No newline at end of file diff --git a/wasmedge_sys/ffi/sidebar-items.js b/wasmedge_sys/ffi/sidebar-items.js new file mode 100644 index 000000000..4ea4e2770 --- /dev/null +++ b/wasmedge_sys/ffi/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["WasmEdge_CompilerOptimizationLevel_O0","WasmEdge_CompilerOptimizationLevel_O1","WasmEdge_CompilerOptimizationLevel_O2","WasmEdge_CompilerOptimizationLevel_O3","WasmEdge_CompilerOptimizationLevel_Os","WasmEdge_CompilerOptimizationLevel_Oz","WasmEdge_CompilerOutputFormat_Native","WasmEdge_CompilerOutputFormat_Wasm","WasmEdge_ErrCategory_UserLevelError","WasmEdge_ErrCategory_WASM","WasmEdge_ErrCode_AOTDisabled","WasmEdge_ErrCode_AccessNullArray","WasmEdge_ErrCode_AccessNullException","WasmEdge_ErrCode_AccessNullFunc","WasmEdge_ErrCode_AccessNullI31","WasmEdge_ErrCode_AccessNullStruct","WasmEdge_ErrCode_ArrayOutOfBounds","WasmEdge_ErrCode_ArrayTypesMismatch","WasmEdge_ErrCode_ArrayTypesNumtypeRequired","WasmEdge_ErrCode_CastFailed","WasmEdge_ErrCode_CastNullToNonNull","WasmEdge_ErrCode_ConstExprRequired","WasmEdge_ErrCode_CoreInvalidExport","WasmEdge_ErrCode_CostLimitExceeded","WasmEdge_ErrCode_DataCountRequired","WasmEdge_ErrCode_DataSegDoesNotFit","WasmEdge_ErrCode_DivideByZero","WasmEdge_ErrCode_DupExportName","WasmEdge_ErrCode_ENDCodeExpected","WasmEdge_ErrCode_ElemSegDoesNotFit","WasmEdge_ErrCode_ExpectSharedMemory","WasmEdge_ErrCode_ExpectedZeroByte","WasmEdge_ErrCode_FuncNotFound","WasmEdge_ErrCode_FuncSigMismatch","WasmEdge_ErrCode_HostFuncError","WasmEdge_ErrCode_IllegalGrammar","WasmEdge_ErrCode_IllegalOpCode","WasmEdge_ErrCode_IllegalPath","WasmEdge_ErrCode_ImmutableArray","WasmEdge_ErrCode_ImmutableField","WasmEdge_ErrCode_ImmutableGlobal","WasmEdge_ErrCode_IncompatibleDataCount","WasmEdge_ErrCode_IncompatibleFuncCode","WasmEdge_ErrCode_IncompatibleImportType","WasmEdge_ErrCode_IndirectCallTypeMismatch","WasmEdge_ErrCode_InstrTypeMismatch","WasmEdge_ErrCode_IntegerOverflow","WasmEdge_ErrCode_IntegerTooLarge","WasmEdge_ErrCode_IntegerTooLong","WasmEdge_ErrCode_Interrupted","WasmEdge_ErrCode_IntrinsicsTableNotFound","WasmEdge_ErrCode_InvalidAlignment","WasmEdge_ErrCode_InvalidBrRefType","WasmEdge_ErrCode_InvalidCanonOption","WasmEdge_ErrCode_InvalidConvToInt","WasmEdge_ErrCode_InvalidCoreSort","WasmEdge_ErrCode_InvalidDataIdx","WasmEdge_ErrCode_InvalidElemIdx","WasmEdge_ErrCode_InvalidFieldIdx","WasmEdge_ErrCode_InvalidFuncIdx","WasmEdge_ErrCode_InvalidFuncTypeIdx","WasmEdge_ErrCode_InvalidGlobalIdx","WasmEdge_ErrCode_InvalidLabelIdx","WasmEdge_ErrCode_InvalidLaneIdx","WasmEdge_ErrCode_InvalidLimit","WasmEdge_ErrCode_InvalidLocalIdx","WasmEdge_ErrCode_InvalidMemPages","WasmEdge_ErrCode_InvalidMemoryIdx","WasmEdge_ErrCode_InvalidMut","WasmEdge_ErrCode_InvalidNotDefaultableArray","WasmEdge_ErrCode_InvalidNotDefaultableField","WasmEdge_ErrCode_InvalidPackedArray","WasmEdge_ErrCode_InvalidPackedField","WasmEdge_ErrCode_InvalidRefIdx","WasmEdge_ErrCode_InvalidResultArity","WasmEdge_ErrCode_InvalidStartFunc","WasmEdge_ErrCode_InvalidStoreAlignment","WasmEdge_ErrCode_InvalidSubType","WasmEdge_ErrCode_InvalidTableIdx","WasmEdge_ErrCode_InvalidTagIdx","WasmEdge_ErrCode_InvalidTagResultType","WasmEdge_ErrCode_InvalidUninitLocal","WasmEdge_ErrCode_InvalidUnpackedArray","WasmEdge_ErrCode_InvalidUnpackedField","WasmEdge_ErrCode_JunkSection","WasmEdge_ErrCode_LengthOutOfBounds","WasmEdge_ErrCode_MalformedAliasTarget","WasmEdge_ErrCode_MalformedCanonical","WasmEdge_ErrCode_MalformedCoreInstance","WasmEdge_ErrCode_MalformedDefType","WasmEdge_ErrCode_MalformedElemType","WasmEdge_ErrCode_MalformedExportKind","WasmEdge_ErrCode_MalformedFlagsType","WasmEdge_ErrCode_MalformedImportKind","WasmEdge_ErrCode_MalformedInstance","WasmEdge_ErrCode_MalformedMagic","WasmEdge_ErrCode_MalformedName","WasmEdge_ErrCode_MalformedRecordType","WasmEdge_ErrCode_MalformedRefType","WasmEdge_ErrCode_MalformedSection","WasmEdge_ErrCode_MalformedSort","WasmEdge_ErrCode_MalformedTable","WasmEdge_ErrCode_MalformedTupleType","WasmEdge_ErrCode_MalformedUTF8","WasmEdge_ErrCode_MalformedValType","WasmEdge_ErrCode_MalformedVariantType","WasmEdge_ErrCode_MalformedVersion","WasmEdge_ErrCode_MemoryOutOfBounds","WasmEdge_ErrCode_ModuleNameConflict","WasmEdge_ErrCode_MultiMemories","WasmEdge_ErrCode_MultiTables","WasmEdge_ErrCode_NonNullRequired","WasmEdge_ErrCode_NotValidated","WasmEdge_ErrCode_ReadError","WasmEdge_ErrCode_RefTypeMismatch","WasmEdge_ErrCode_RuntimeError","WasmEdge_ErrCode_SectionSizeMismatch","WasmEdge_ErrCode_SetValueErrorType","WasmEdge_ErrCode_SetValueToConst","WasmEdge_ErrCode_SharedMemoryNoMax","WasmEdge_ErrCode_Success","WasmEdge_ErrCode_TableOutOfBounds","WasmEdge_ErrCode_Terminated","WasmEdge_ErrCode_TooManyLocals","WasmEdge_ErrCode_TypeCheckFailed","WasmEdge_ErrCode_UnalignedAtomicAccess","WasmEdge_ErrCode_UncaughtException","WasmEdge_ErrCode_UndefinedElement","WasmEdge_ErrCode_UnexpectedEnd","WasmEdge_ErrCode_UninitializedElement","WasmEdge_ErrCode_UnknownCanonicalOption","WasmEdge_ErrCode_UnknownImport","WasmEdge_ErrCode_Unreachable","WasmEdge_ErrCode_UserDefError","WasmEdge_ErrCode_WrongInstanceAddress","WasmEdge_ErrCode_WrongInstanceIndex","WasmEdge_ErrCode_WrongVMWorkflow","WasmEdge_ExternalType_Function","WasmEdge_ExternalType_Global","WasmEdge_ExternalType_Memory","WasmEdge_ExternalType_Table","WasmEdge_ExternalType_Tag","WasmEdge_HostRegistration_Wasi","WasmEdge_Mutability_Const","WasmEdge_Mutability_Var","WasmEdge_Plugin_CurrentAPIVersion","WasmEdge_ProgramOptionType_Double","WasmEdge_ProgramOptionType_Float","WasmEdge_ProgramOptionType_Int16","WasmEdge_ProgramOptionType_Int32","WasmEdge_ProgramOptionType_Int64","WasmEdge_ProgramOptionType_Int8","WasmEdge_ProgramOptionType_None","WasmEdge_ProgramOptionType_String","WasmEdge_ProgramOptionType_Toggle","WasmEdge_ProgramOptionType_UInt16","WasmEdge_ProgramOptionType_UInt32","WasmEdge_ProgramOptionType_UInt64","WasmEdge_ProgramOptionType_UInt8","WasmEdge_Proposal_Annotations","WasmEdge_Proposal_BulkMemoryOperations","WasmEdge_Proposal_Component","WasmEdge_Proposal_ExceptionHandling","WasmEdge_Proposal_ExtendedConst","WasmEdge_Proposal_FunctionReferences","WasmEdge_Proposal_GC","WasmEdge_Proposal_ImportExportMutGlobals","WasmEdge_Proposal_Memory64","WasmEdge_Proposal_MultiMemories","WasmEdge_Proposal_MultiValue","WasmEdge_Proposal_NonTrapFloatToIntConversions","WasmEdge_Proposal_ReferenceTypes","WasmEdge_Proposal_RelaxSIMD","WasmEdge_Proposal_SIMD","WasmEdge_Proposal_SignExtensionOperators","WasmEdge_Proposal_TailCall","WasmEdge_Proposal_Threads","WasmEdge_TypeCode_AnyRef","WasmEdge_TypeCode_Array","WasmEdge_TypeCode_ArrayRef","WasmEdge_TypeCode_Epsilon","WasmEdge_TypeCode_EqRef","WasmEdge_TypeCode_ExnRef","WasmEdge_TypeCode_ExternRef","WasmEdge_TypeCode_F32","WasmEdge_TypeCode_F64","WasmEdge_TypeCode_Func","WasmEdge_TypeCode_FuncRef","WasmEdge_TypeCode_I16","WasmEdge_TypeCode_I31Ref","WasmEdge_TypeCode_I32","WasmEdge_TypeCode_I64","WasmEdge_TypeCode_I8","WasmEdge_TypeCode_NullExternRef","WasmEdge_TypeCode_NullFuncRef","WasmEdge_TypeCode_NullRef","WasmEdge_TypeCode_Rec","WasmEdge_TypeCode_Ref","WasmEdge_TypeCode_RefNull","WasmEdge_TypeCode_String","WasmEdge_TypeCode_Struct","WasmEdge_TypeCode_StructRef","WasmEdge_TypeCode_Sub","WasmEdge_TypeCode_SubFinal","WasmEdge_TypeCode_TypeIndex","WasmEdge_TypeCode_V128"],"fn":["WasmEdge_ASTModuleDelete","WasmEdge_ASTModuleListExports","WasmEdge_ASTModuleListExportsLength","WasmEdge_ASTModuleListImports","WasmEdge_ASTModuleListImportsLength","WasmEdge_AsyncCancel","WasmEdge_AsyncDelete","WasmEdge_AsyncGet","WasmEdge_AsyncGetReturnsLength","WasmEdge_AsyncWait","WasmEdge_AsyncWaitFor","WasmEdge_BytesCreate","WasmEdge_BytesDelete","WasmEdge_BytesWrap","WasmEdge_CallingFrameGetExecutor","WasmEdge_CallingFrameGetMemoryInstance","WasmEdge_CallingFrameGetModuleInstance","WasmEdge_CompilerCompile","WasmEdge_CompilerCompileFromBuffer","WasmEdge_CompilerCompileFromBytes","WasmEdge_CompilerCreate","WasmEdge_CompilerDelete","WasmEdge_ConfigureAddHostRegistration","WasmEdge_ConfigureAddProposal","WasmEdge_ConfigureCompilerGetOptimizationLevel","WasmEdge_ConfigureCompilerGetOutputFormat","WasmEdge_ConfigureCompilerIsDumpIR","WasmEdge_ConfigureCompilerIsGenericBinary","WasmEdge_ConfigureCompilerIsInterruptible","WasmEdge_ConfigureCompilerSetDumpIR","WasmEdge_ConfigureCompilerSetGenericBinary","WasmEdge_ConfigureCompilerSetInterruptible","WasmEdge_ConfigureCompilerSetOptimizationLevel","WasmEdge_ConfigureCompilerSetOutputFormat","WasmEdge_ConfigureCreate","WasmEdge_ConfigureDelete","WasmEdge_ConfigureGetMaxMemoryPage","WasmEdge_ConfigureHasHostRegistration","WasmEdge_ConfigureHasProposal","WasmEdge_ConfigureIsAllowAFUNIX","WasmEdge_ConfigureIsForceInterpreter","WasmEdge_ConfigureRemoveHostRegistration","WasmEdge_ConfigureRemoveProposal","WasmEdge_ConfigureSetAllowAFUNIX","WasmEdge_ConfigureSetForceInterpreter","WasmEdge_ConfigureSetMaxMemoryPage","WasmEdge_ConfigureStatisticsIsCostMeasuring","WasmEdge_ConfigureStatisticsIsInstructionCounting","WasmEdge_ConfigureStatisticsIsTimeMeasuring","WasmEdge_ConfigureStatisticsSetCostMeasuring","WasmEdge_ConfigureStatisticsSetInstructionCounting","WasmEdge_ConfigureStatisticsSetTimeMeasuring","WasmEdge_Driver_Compiler","WasmEdge_Driver_Tool","WasmEdge_Driver_UniTool","WasmEdge_ExecutorAsyncInvoke","WasmEdge_ExecutorCreate","WasmEdge_ExecutorDelete","WasmEdge_ExecutorExperimentalRegisterPostHostFunction","WasmEdge_ExecutorExperimentalRegisterPreHostFunction","WasmEdge_ExecutorInstantiate","WasmEdge_ExecutorInvoke","WasmEdge_ExecutorRegister","WasmEdge_ExecutorRegisterImport","WasmEdge_ExportTypeGetExternalName","WasmEdge_ExportTypeGetExternalType","WasmEdge_ExportTypeGetFunctionType","WasmEdge_ExportTypeGetGlobalType","WasmEdge_ExportTypeGetMemoryType","WasmEdge_ExportTypeGetTableType","WasmEdge_ExportTypeGetTagType","WasmEdge_FunctionInstanceCreate","WasmEdge_FunctionInstanceCreateBinding","WasmEdge_FunctionInstanceDelete","WasmEdge_FunctionInstanceGetData","WasmEdge_FunctionInstanceGetFunctionType","WasmEdge_FunctionTypeCreate","WasmEdge_FunctionTypeDelete","WasmEdge_FunctionTypeGetParameters","WasmEdge_FunctionTypeGetParametersLength","WasmEdge_FunctionTypeGetReturns","WasmEdge_FunctionTypeGetReturnsLength","WasmEdge_GlobalInstanceCreate","WasmEdge_GlobalInstanceDelete","WasmEdge_GlobalInstanceGetGlobalType","WasmEdge_GlobalInstanceGetValue","WasmEdge_GlobalInstanceSetValue","WasmEdge_GlobalTypeCreate","WasmEdge_GlobalTypeDelete","WasmEdge_GlobalTypeGetMutability","WasmEdge_GlobalTypeGetValType","WasmEdge_ImportTypeGetExternalName","WasmEdge_ImportTypeGetExternalType","WasmEdge_ImportTypeGetFunctionType","WasmEdge_ImportTypeGetGlobalType","WasmEdge_ImportTypeGetMemoryType","WasmEdge_ImportTypeGetModuleName","WasmEdge_ImportTypeGetTableType","WasmEdge_ImportTypeGetTagType","WasmEdge_LimitIsEqual","WasmEdge_LoaderCreate","WasmEdge_LoaderDelete","WasmEdge_LoaderParseFromBuffer","WasmEdge_LoaderParseFromBytes","WasmEdge_LoaderParseFromFile","WasmEdge_LoaderSerializeASTModule","WasmEdge_LogOff","WasmEdge_LogSetDebugLevel","WasmEdge_LogSetErrorLevel","WasmEdge_MemoryInstanceCreate","WasmEdge_MemoryInstanceDelete","WasmEdge_MemoryInstanceGetData","WasmEdge_MemoryInstanceGetMemoryType","WasmEdge_MemoryInstanceGetPageSize","WasmEdge_MemoryInstanceGetPointer","WasmEdge_MemoryInstanceGetPointerConst","WasmEdge_MemoryInstanceGrowPage","WasmEdge_MemoryInstanceSetData","WasmEdge_MemoryTypeCreate","WasmEdge_MemoryTypeDelete","WasmEdge_MemoryTypeGetLimit","WasmEdge_ModuleInstanceAddFunction","WasmEdge_ModuleInstanceAddGlobal","WasmEdge_ModuleInstanceAddMemory","WasmEdge_ModuleInstanceAddTable","WasmEdge_ModuleInstanceCreate","WasmEdge_ModuleInstanceCreateWASI","WasmEdge_ModuleInstanceCreateWithData","WasmEdge_ModuleInstanceDelete","WasmEdge_ModuleInstanceFindFunction","WasmEdge_ModuleInstanceFindGlobal","WasmEdge_ModuleInstanceFindMemory","WasmEdge_ModuleInstanceFindTable","WasmEdge_ModuleInstanceFindTag","WasmEdge_ModuleInstanceGetHostData","WasmEdge_ModuleInstanceGetModuleName","WasmEdge_ModuleInstanceInitWASI","WasmEdge_ModuleInstanceInitWasmEdgeProcess","WasmEdge_ModuleInstanceListFunction","WasmEdge_ModuleInstanceListFunctionLength","WasmEdge_ModuleInstanceListGlobal","WasmEdge_ModuleInstanceListGlobalLength","WasmEdge_ModuleInstanceListMemory","WasmEdge_ModuleInstanceListMemoryLength","WasmEdge_ModuleInstanceListTable","WasmEdge_ModuleInstanceListTableLength","WasmEdge_ModuleInstanceListTag","WasmEdge_ModuleInstanceListTagLength","WasmEdge_ModuleInstanceWASIGetExitCode","WasmEdge_ModuleInstanceWASIGetNativeHandler","WasmEdge_PluginCreateModule","WasmEdge_PluginFind","WasmEdge_PluginGetPluginName","WasmEdge_PluginInitWASINN","WasmEdge_PluginListModule","WasmEdge_PluginListModuleLength","WasmEdge_PluginListPlugins","WasmEdge_PluginListPluginsLength","WasmEdge_PluginLoadFromPath","WasmEdge_PluginLoadWithDefaultPaths","WasmEdge_Plugin_GetDescriptor","WasmEdge_ResultGen","WasmEdge_ResultGetCategory","WasmEdge_ResultGetCode","WasmEdge_ResultGetMessage","WasmEdge_ResultOK","WasmEdge_StatisticsClear","WasmEdge_StatisticsCreate","WasmEdge_StatisticsDelete","WasmEdge_StatisticsGetInstrCount","WasmEdge_StatisticsGetInstrPerSecond","WasmEdge_StatisticsGetTotalCost","WasmEdge_StatisticsSetCostLimit","WasmEdge_StatisticsSetCostTable","WasmEdge_StoreCreate","WasmEdge_StoreDelete","WasmEdge_StoreFindModule","WasmEdge_StoreListModule","WasmEdge_StoreListModuleLength","WasmEdge_StringCopy","WasmEdge_StringCreateByBuffer","WasmEdge_StringCreateByCString","WasmEdge_StringDelete","WasmEdge_StringIsEqual","WasmEdge_StringWrap","WasmEdge_TableInstanceCreate","WasmEdge_TableInstanceCreateWithInit","WasmEdge_TableInstanceDelete","WasmEdge_TableInstanceGetData","WasmEdge_TableInstanceGetSize","WasmEdge_TableInstanceGetTableType","WasmEdge_TableInstanceGrow","WasmEdge_TableInstanceSetData","WasmEdge_TableTypeCreate","WasmEdge_TableTypeDelete","WasmEdge_TableTypeGetLimit","WasmEdge_TableTypeGetRefType","WasmEdge_TagInstanceGetTagType","WasmEdge_TagTypeGetFunctionType","WasmEdge_VMAsyncExecute","WasmEdge_VMAsyncExecuteRegistered","WasmEdge_VMAsyncRunWasmFromASTModule","WasmEdge_VMAsyncRunWasmFromBuffer","WasmEdge_VMAsyncRunWasmFromBytes","WasmEdge_VMAsyncRunWasmFromFile","WasmEdge_VMCleanup","WasmEdge_VMCreate","WasmEdge_VMDelete","WasmEdge_VMExecute","WasmEdge_VMExecuteRegistered","WasmEdge_VMGetActiveModule","WasmEdge_VMGetExecutorContext","WasmEdge_VMGetFunctionList","WasmEdge_VMGetFunctionListLength","WasmEdge_VMGetFunctionType","WasmEdge_VMGetFunctionTypeRegistered","WasmEdge_VMGetImportModuleContext","WasmEdge_VMGetLoaderContext","WasmEdge_VMGetRegisteredModule","WasmEdge_VMGetStatisticsContext","WasmEdge_VMGetStoreContext","WasmEdge_VMGetValidatorContext","WasmEdge_VMInstantiate","WasmEdge_VMListRegisteredModule","WasmEdge_VMListRegisteredModuleLength","WasmEdge_VMLoadWasmFromASTModule","WasmEdge_VMLoadWasmFromBuffer","WasmEdge_VMLoadWasmFromBytes","WasmEdge_VMLoadWasmFromFile","WasmEdge_VMRegisterModuleFromASTModule","WasmEdge_VMRegisterModuleFromBuffer","WasmEdge_VMRegisterModuleFromBytes","WasmEdge_VMRegisterModuleFromFile","WasmEdge_VMRegisterModuleFromImport","WasmEdge_VMRunWasmFromASTModule","WasmEdge_VMRunWasmFromBuffer","WasmEdge_VMRunWasmFromBytes","WasmEdge_VMRunWasmFromFile","WasmEdge_VMValidate","WasmEdge_ValTypeGenExternRef","WasmEdge_ValTypeGenF32","WasmEdge_ValTypeGenF64","WasmEdge_ValTypeGenFuncRef","WasmEdge_ValTypeGenI32","WasmEdge_ValTypeGenI64","WasmEdge_ValTypeGenV128","WasmEdge_ValTypeIsEqual","WasmEdge_ValTypeIsExternRef","WasmEdge_ValTypeIsF32","WasmEdge_ValTypeIsF64","WasmEdge_ValTypeIsFuncRef","WasmEdge_ValTypeIsI32","WasmEdge_ValTypeIsI64","WasmEdge_ValTypeIsRef","WasmEdge_ValTypeIsRefNull","WasmEdge_ValTypeIsV128","WasmEdge_ValidatorCreate","WasmEdge_ValidatorDelete","WasmEdge_ValidatorValidate","WasmEdge_ValueGenExternRef","WasmEdge_ValueGenF32","WasmEdge_ValueGenF64","WasmEdge_ValueGenFuncRef","WasmEdge_ValueGenI32","WasmEdge_ValueGenI64","WasmEdge_ValueGenV128","WasmEdge_ValueGetExternRef","WasmEdge_ValueGetF32","WasmEdge_ValueGetF64","WasmEdge_ValueGetFuncRef","WasmEdge_ValueGetI32","WasmEdge_ValueGetI64","WasmEdge_ValueGetV128","WasmEdge_ValueIsNullRef","WasmEdge_VersionGet","WasmEdge_VersionGetMajor","WasmEdge_VersionGetMinor","WasmEdge_VersionGetPatch"],"struct":["WasmEdge_ASTModuleContext","WasmEdge_Async","WasmEdge_Bytes","WasmEdge_CallingFrameContext","WasmEdge_CompilerContext","WasmEdge_ConfigureContext","WasmEdge_ExecutorContext","WasmEdge_ExportTypeContext","WasmEdge_FunctionInstanceContext","WasmEdge_FunctionTypeContext","WasmEdge_GlobalInstanceContext","WasmEdge_GlobalTypeContext","WasmEdge_ImportTypeContext","WasmEdge_Limit","WasmEdge_LoaderContext","WasmEdge_MemoryInstanceContext","WasmEdge_MemoryTypeContext","WasmEdge_ModuleDescriptor","WasmEdge_ModuleInstanceContext","WasmEdge_PluginContext","WasmEdge_PluginDescriptor","WasmEdge_PluginVersionData","WasmEdge_ProgramOption","WasmEdge_Result","WasmEdge_StatisticsContext","WasmEdge_StoreContext","WasmEdge_String","WasmEdge_TableInstanceContext","WasmEdge_TableTypeContext","WasmEdge_TagInstanceContext","WasmEdge_TagTypeContext","WasmEdge_VMContext","WasmEdge_ValType","WasmEdge_ValidatorContext","WasmEdge_Value"],"type":["WasmEdge_CompilerOptimizationLevel","WasmEdge_CompilerOutputFormat","WasmEdge_ErrCategory","WasmEdge_ErrCode","WasmEdge_ExternalType","WasmEdge_HostFunc_t","WasmEdge_HostRegistration","WasmEdge_Mutability","WasmEdge_ProgramOptionType","WasmEdge_Proposal","WasmEdge_TypeCode","WasmEdge_WrapFunc_t","int128_t","uint128_t"]}; \ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_ASTModuleContext.html b/wasmedge_sys/ffi/struct.WasmEdge_ASTModuleContext.html new file mode 100644 index 000000000..ae75c4b29 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_ASTModuleContext.html @@ -0,0 +1,13 @@ +WasmEdge_ASTModuleContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_ASTModuleContext

Source
#[repr(C)]
pub struct WasmEdge_ASTModuleContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_ASTModuleContext

Source§

fn clone(&self) -> WasmEdge_ASTModuleContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_ASTModuleContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_ASTModuleContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_Async.html b/wasmedge_sys/ffi/struct.WasmEdge_Async.html new file mode 100644 index 000000000..4cf748c4a --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_Async.html @@ -0,0 +1,13 @@ +WasmEdge_Async in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_Async

Source
#[repr(C)]
pub struct WasmEdge_Async { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_Async

Source§

fn clone(&self) -> WasmEdge_Async

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_Async

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_Async

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_Bytes.html b/wasmedge_sys/ffi/struct.WasmEdge_Bytes.html new file mode 100644 index 000000000..125c8355d --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_Bytes.html @@ -0,0 +1,17 @@ +WasmEdge_Bytes in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_Bytes

Source
#[repr(C)]
pub struct WasmEdge_Bytes { + pub Length: u32, + pub Buf: *const u8, +}
Expand description

WasmEdge bytes struct.

+

Fields§

§Length: u32§Buf: *const u8

Trait Implementations§

Source§

impl Clone for WasmEdge_Bytes

Source§

fn clone(&self) -> WasmEdge_Bytes

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_Bytes

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_Bytes

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_CallingFrameContext.html b/wasmedge_sys/ffi/struct.WasmEdge_CallingFrameContext.html new file mode 100644 index 000000000..aeea95c12 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_CallingFrameContext.html @@ -0,0 +1,13 @@ +WasmEdge_CallingFrameContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_CallingFrameContext

Source
#[repr(C)]
pub struct WasmEdge_CallingFrameContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_CallingFrameContext

Source§

fn clone(&self) -> WasmEdge_CallingFrameContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_CallingFrameContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_CallingFrameContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_CompilerContext.html b/wasmedge_sys/ffi/struct.WasmEdge_CompilerContext.html new file mode 100644 index 000000000..b799ecf39 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_CompilerContext.html @@ -0,0 +1,13 @@ +WasmEdge_CompilerContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_CompilerContext

Source
#[repr(C)]
pub struct WasmEdge_CompilerContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_CompilerContext

Source§

fn clone(&self) -> WasmEdge_CompilerContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_CompilerContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_CompilerContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_ConfigureContext.html b/wasmedge_sys/ffi/struct.WasmEdge_ConfigureContext.html new file mode 100644 index 000000000..b7d08f19f --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_ConfigureContext.html @@ -0,0 +1,13 @@ +WasmEdge_ConfigureContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_ConfigureContext

Source
#[repr(C)]
pub struct WasmEdge_ConfigureContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_ConfigureContext

Source§

fn clone(&self) -> WasmEdge_ConfigureContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_ConfigureContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_ConfigureContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_ExecutorContext.html b/wasmedge_sys/ffi/struct.WasmEdge_ExecutorContext.html new file mode 100644 index 000000000..59ec55f5e --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_ExecutorContext.html @@ -0,0 +1,13 @@ +WasmEdge_ExecutorContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_ExecutorContext

Source
#[repr(C)]
pub struct WasmEdge_ExecutorContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_ExecutorContext

Source§

fn clone(&self) -> WasmEdge_ExecutorContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_ExecutorContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_ExecutorContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_ExportTypeContext.html b/wasmedge_sys/ffi/struct.WasmEdge_ExportTypeContext.html new file mode 100644 index 000000000..7b778559c --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_ExportTypeContext.html @@ -0,0 +1,13 @@ +WasmEdge_ExportTypeContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_ExportTypeContext

Source
#[repr(C)]
pub struct WasmEdge_ExportTypeContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_ExportTypeContext

Source§

fn clone(&self) -> WasmEdge_ExportTypeContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_ExportTypeContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_ExportTypeContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_FunctionInstanceContext.html b/wasmedge_sys/ffi/struct.WasmEdge_FunctionInstanceContext.html new file mode 100644 index 000000000..10cbd97ac --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_FunctionInstanceContext.html @@ -0,0 +1,13 @@ +WasmEdge_FunctionInstanceContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_FunctionInstanceContext

Source
#[repr(C)]
pub struct WasmEdge_FunctionInstanceContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_FunctionInstanceContext

Source§

fn clone(&self) -> WasmEdge_FunctionInstanceContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_FunctionInstanceContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_FunctionInstanceContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_FunctionTypeContext.html b/wasmedge_sys/ffi/struct.WasmEdge_FunctionTypeContext.html new file mode 100644 index 000000000..3c2357c9b --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_FunctionTypeContext.html @@ -0,0 +1,13 @@ +WasmEdge_FunctionTypeContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_FunctionTypeContext

Source
#[repr(C)]
pub struct WasmEdge_FunctionTypeContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_FunctionTypeContext

Source§

fn clone(&self) -> WasmEdge_FunctionTypeContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_FunctionTypeContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_FunctionTypeContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_GlobalInstanceContext.html b/wasmedge_sys/ffi/struct.WasmEdge_GlobalInstanceContext.html new file mode 100644 index 000000000..47940c937 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_GlobalInstanceContext.html @@ -0,0 +1,13 @@ +WasmEdge_GlobalInstanceContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_GlobalInstanceContext

Source
#[repr(C)]
pub struct WasmEdge_GlobalInstanceContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_GlobalInstanceContext

Source§

fn clone(&self) -> WasmEdge_GlobalInstanceContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_GlobalInstanceContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_GlobalInstanceContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_GlobalTypeContext.html b/wasmedge_sys/ffi/struct.WasmEdge_GlobalTypeContext.html new file mode 100644 index 000000000..5af9ec7c5 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_GlobalTypeContext.html @@ -0,0 +1,13 @@ +WasmEdge_GlobalTypeContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_GlobalTypeContext

Source
#[repr(C)]
pub struct WasmEdge_GlobalTypeContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_GlobalTypeContext

Source§

fn clone(&self) -> WasmEdge_GlobalTypeContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_GlobalTypeContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_GlobalTypeContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_ImportTypeContext.html b/wasmedge_sys/ffi/struct.WasmEdge_ImportTypeContext.html new file mode 100644 index 000000000..1c1927c32 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_ImportTypeContext.html @@ -0,0 +1,13 @@ +WasmEdge_ImportTypeContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_ImportTypeContext

Source
#[repr(C)]
pub struct WasmEdge_ImportTypeContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_ImportTypeContext

Source§

fn clone(&self) -> WasmEdge_ImportTypeContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_ImportTypeContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_ImportTypeContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_Limit.html b/wasmedge_sys/ffi/struct.WasmEdge_Limit.html new file mode 100644 index 000000000..e655dffd6 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_Limit.html @@ -0,0 +1,23 @@ +WasmEdge_Limit in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_Limit

Source
#[repr(C)]
pub struct WasmEdge_Limit { + pub HasMax: bool, + pub Shared: bool, + pub Min: u32, + pub Max: u32, +}
Expand description

Struct of WASM limit.

+

Fields§

§HasMax: bool

Boolean to describe has max value or not.

+
§Shared: bool

Boolean to describe is shared memory or not.

+
§Min: u32

Minimum value.

+
§Max: u32

Maximum value. Will be ignored if the HasMax is false.

+

Trait Implementations§

Source§

impl Clone for WasmEdge_Limit

Source§

fn clone(&self) -> WasmEdge_Limit

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_Limit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_Limit

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_LoaderContext.html b/wasmedge_sys/ffi/struct.WasmEdge_LoaderContext.html new file mode 100644 index 000000000..17d3f03f3 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_LoaderContext.html @@ -0,0 +1,13 @@ +WasmEdge_LoaderContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_LoaderContext

Source
#[repr(C)]
pub struct WasmEdge_LoaderContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_LoaderContext

Source§

fn clone(&self) -> WasmEdge_LoaderContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_LoaderContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_LoaderContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_MemoryInstanceContext.html b/wasmedge_sys/ffi/struct.WasmEdge_MemoryInstanceContext.html new file mode 100644 index 000000000..1d0fa3b46 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_MemoryInstanceContext.html @@ -0,0 +1,13 @@ +WasmEdge_MemoryInstanceContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_MemoryInstanceContext

Source
#[repr(C)]
pub struct WasmEdge_MemoryInstanceContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_MemoryInstanceContext

Source§

fn clone(&self) -> WasmEdge_MemoryInstanceContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_MemoryInstanceContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_MemoryInstanceContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_MemoryTypeContext.html b/wasmedge_sys/ffi/struct.WasmEdge_MemoryTypeContext.html new file mode 100644 index 000000000..aed002fd1 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_MemoryTypeContext.html @@ -0,0 +1,13 @@ +WasmEdge_MemoryTypeContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_MemoryTypeContext

Source
#[repr(C)]
pub struct WasmEdge_MemoryTypeContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_MemoryTypeContext

Source§

fn clone(&self) -> WasmEdge_MemoryTypeContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_MemoryTypeContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_MemoryTypeContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_ModuleDescriptor.html b/wasmedge_sys/ffi/struct.WasmEdge_ModuleDescriptor.html new file mode 100644 index 000000000..e85b0f166 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_ModuleDescriptor.html @@ -0,0 +1,18 @@ +WasmEdge_ModuleDescriptor in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_ModuleDescriptor

Source
#[repr(C)]
pub struct WasmEdge_ModuleDescriptor { + pub Name: *const c_char, + pub Description: *const c_char, + pub Create: Option<unsafe extern "C" fn(arg1: *const WasmEdge_ModuleDescriptor) -> *mut WasmEdge_ModuleInstanceContext>, +}
Expand description

Module descriptor for plugins.

+

Fields§

§Name: *const c_char§Description: *const c_char§Create: Option<unsafe extern "C" fn(arg1: *const WasmEdge_ModuleDescriptor) -> *mut WasmEdge_ModuleInstanceContext>

Trait Implementations§

Source§

impl Clone for WasmEdge_ModuleDescriptor

Source§

fn clone(&self) -> WasmEdge_ModuleDescriptor

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_ModuleDescriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_ModuleDescriptor

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_ModuleInstanceContext.html b/wasmedge_sys/ffi/struct.WasmEdge_ModuleInstanceContext.html new file mode 100644 index 000000000..361efe44f --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_ModuleInstanceContext.html @@ -0,0 +1,13 @@ +WasmEdge_ModuleInstanceContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_ModuleInstanceContext

Source
#[repr(C)]
pub struct WasmEdge_ModuleInstanceContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_ModuleInstanceContext

Source§

fn clone(&self) -> WasmEdge_ModuleInstanceContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_ModuleInstanceContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_ModuleInstanceContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_PluginContext.html b/wasmedge_sys/ffi/struct.WasmEdge_PluginContext.html new file mode 100644 index 000000000..2b51b6ada --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_PluginContext.html @@ -0,0 +1,13 @@ +WasmEdge_PluginContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_PluginContext

Source
#[repr(C)]
pub struct WasmEdge_PluginContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_PluginContext

Source§

fn clone(&self) -> WasmEdge_PluginContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_PluginContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_PluginContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_PluginDescriptor.html b/wasmedge_sys/ffi/struct.WasmEdge_PluginDescriptor.html new file mode 100644 index 000000000..01f58b929 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_PluginDescriptor.html @@ -0,0 +1,23 @@ +WasmEdge_PluginDescriptor in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_PluginDescriptor

Source
#[repr(C)]
pub struct WasmEdge_PluginDescriptor { + pub Name: *const c_char, + pub Description: *const c_char, + pub APIVersion: u32, + pub Version: WasmEdge_PluginVersionData, + pub ModuleCount: u32, + pub ProgramOptionCount: u32, + pub ModuleDescriptions: *mut WasmEdge_ModuleDescriptor, + pub ProgramOptions: *mut WasmEdge_ProgramOption, +}
Expand description

Plugin descriptor for plugins.

+

Fields§

§Name: *const c_char§Description: *const c_char§APIVersion: u32§Version: WasmEdge_PluginVersionData§ModuleCount: u32§ProgramOptionCount: u32§ModuleDescriptions: *mut WasmEdge_ModuleDescriptor§ProgramOptions: *mut WasmEdge_ProgramOption

Trait Implementations§

Source§

impl Clone for WasmEdge_PluginDescriptor

Source§

fn clone(&self) -> WasmEdge_PluginDescriptor

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_PluginDescriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_PluginDescriptor

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_PluginVersionData.html b/wasmedge_sys/ffi/struct.WasmEdge_PluginVersionData.html new file mode 100644 index 000000000..7a9ddca47 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_PluginVersionData.html @@ -0,0 +1,19 @@ +WasmEdge_PluginVersionData in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_PluginVersionData

Source
#[repr(C)]
pub struct WasmEdge_PluginVersionData { + pub Major: u32, + pub Minor: u32, + pub Patch: u32, + pub Build: u32, +}
Expand description

Version data for plugins.

+

Fields§

§Major: u32§Minor: u32§Patch: u32§Build: u32

Trait Implementations§

Source§

impl Clone for WasmEdge_PluginVersionData

Source§

fn clone(&self) -> WasmEdge_PluginVersionData

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_PluginVersionData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<PluginVersion> for WasmEdge_PluginVersionData

Source§

fn from(value: PluginVersion) -> Self

Converts to this type from the input type.
Source§

impl Copy for WasmEdge_PluginVersionData

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_ProgramOption.html b/wasmedge_sys/ffi/struct.WasmEdge_ProgramOption.html new file mode 100644 index 000000000..e35ce7556 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_ProgramOption.html @@ -0,0 +1,20 @@ +WasmEdge_ProgramOption in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_ProgramOption

Source
#[repr(C)]
pub struct WasmEdge_ProgramOption { + pub Name: *const c_char, + pub Description: *const c_char, + pub Type: WasmEdge_ProgramOptionType, + pub Storage: *mut c_void, + pub DefaultValue: *const c_void, +}
Expand description

Program option for plugins.

+

Fields§

§Name: *const c_char§Description: *const c_char§Type: WasmEdge_ProgramOptionType§Storage: *mut c_void§DefaultValue: *const c_void

Trait Implementations§

Source§

impl Clone for WasmEdge_ProgramOption

Source§

fn clone(&self) -> WasmEdge_ProgramOption

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_ProgramOption

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_ProgramOption

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_Result.html b/wasmedge_sys/ffi/struct.WasmEdge_Result.html new file mode 100644 index 000000000..9032f64ac --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_Result.html @@ -0,0 +1,16 @@ +WasmEdge_Result in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_Result

Source
#[repr(C)]
pub struct WasmEdge_Result { + pub Code: u32, +}
Expand description

WasmEdge result struct.

+

Fields§

§Code: u32

Trait Implementations§

Source§

impl Clone for WasmEdge_Result

Source§

fn clone(&self) -> WasmEdge_Result

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_Result

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<CoreError> for WasmEdge_Result

Source§

fn from(val: CoreError) -> WasmEdge_Result

Converts to this type from the input type.
Source§

impl Copy for WasmEdge_Result

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_StatisticsContext.html b/wasmedge_sys/ffi/struct.WasmEdge_StatisticsContext.html new file mode 100644 index 000000000..5e991aecd --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_StatisticsContext.html @@ -0,0 +1,13 @@ +WasmEdge_StatisticsContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_StatisticsContext

Source
#[repr(C)]
pub struct WasmEdge_StatisticsContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_StatisticsContext

Source§

fn clone(&self) -> WasmEdge_StatisticsContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_StatisticsContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_StatisticsContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_StoreContext.html b/wasmedge_sys/ffi/struct.WasmEdge_StoreContext.html new file mode 100644 index 000000000..bffd00af2 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_StoreContext.html @@ -0,0 +1,13 @@ +WasmEdge_StoreContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_StoreContext

Source
#[repr(C)]
pub struct WasmEdge_StoreContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_StoreContext

Source§

fn clone(&self) -> WasmEdge_StoreContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_StoreContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_StoreContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_String.html b/wasmedge_sys/ffi/struct.WasmEdge_String.html new file mode 100644 index 000000000..85f56f0bd --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_String.html @@ -0,0 +1,17 @@ +WasmEdge_String in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_String

Source
#[repr(C)]
pub struct WasmEdge_String { + pub Length: u32, + pub Buf: *const c_char, +}
Expand description

WasmEdge string struct.

+

Fields§

§Length: u32§Buf: *const c_char

Trait Implementations§

Source§

impl AsMut<WasmEdge_String> for WasmEdgeString

Source§

fn as_mut(&mut self) -> &mut WasmEdge_String

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<WasmEdge_String> for WasmEdgeString

Source§

fn as_ref(&self) -> &WasmEdge_String

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for WasmEdge_String

Source§

fn clone(&self) -> WasmEdge_String

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_String

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&WasmEdge_String> for &CStr

Source§

fn from(s: &WasmEdge_String) -> Self

Converts to this type from the input type.
Source§

impl From<&WasmEdge_String> for String

Source§

fn from(s: &WasmEdge_String) -> Self

Converts to this type from the input type.
Source§

impl From<WasmEdge_String> for &CStr

Source§

fn from(s: WasmEdge_String) -> Self

Converts to this type from the input type.
Source§

impl From<WasmEdge_String> for String

Source§

fn from(s: WasmEdge_String) -> Self

Converts to this type from the input type.
Source§

impl Copy for WasmEdge_String

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_TableInstanceContext.html b/wasmedge_sys/ffi/struct.WasmEdge_TableInstanceContext.html new file mode 100644 index 000000000..d2bac1509 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_TableInstanceContext.html @@ -0,0 +1,13 @@ +WasmEdge_TableInstanceContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_TableInstanceContext

Source
#[repr(C)]
pub struct WasmEdge_TableInstanceContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_TableInstanceContext

Source§

fn clone(&self) -> WasmEdge_TableInstanceContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_TableInstanceContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_TableInstanceContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_TableTypeContext.html b/wasmedge_sys/ffi/struct.WasmEdge_TableTypeContext.html new file mode 100644 index 000000000..00f115f5b --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_TableTypeContext.html @@ -0,0 +1,13 @@ +WasmEdge_TableTypeContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_TableTypeContext

Source
#[repr(C)]
pub struct WasmEdge_TableTypeContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_TableTypeContext

Source§

fn clone(&self) -> WasmEdge_TableTypeContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_TableTypeContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_TableTypeContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_TagInstanceContext.html b/wasmedge_sys/ffi/struct.WasmEdge_TagInstanceContext.html new file mode 100644 index 000000000..72348db2c --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_TagInstanceContext.html @@ -0,0 +1,13 @@ +WasmEdge_TagInstanceContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_TagInstanceContext

Source
#[repr(C)]
pub struct WasmEdge_TagInstanceContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_TagInstanceContext

Source§

fn clone(&self) -> WasmEdge_TagInstanceContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_TagInstanceContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_TagInstanceContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_TagTypeContext.html b/wasmedge_sys/ffi/struct.WasmEdge_TagTypeContext.html new file mode 100644 index 000000000..a52650923 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_TagTypeContext.html @@ -0,0 +1,13 @@ +WasmEdge_TagTypeContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_TagTypeContext

Source
#[repr(C)]
pub struct WasmEdge_TagTypeContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_TagTypeContext

Source§

fn clone(&self) -> WasmEdge_TagTypeContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_TagTypeContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_TagTypeContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_VMContext.html b/wasmedge_sys/ffi/struct.WasmEdge_VMContext.html new file mode 100644 index 000000000..970a73412 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_VMContext.html @@ -0,0 +1,13 @@ +WasmEdge_VMContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_VMContext

Source
#[repr(C)]
pub struct WasmEdge_VMContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_VMContext

Source§

fn clone(&self) -> WasmEdge_VMContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_VMContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_VMContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_ValType.html b/wasmedge_sys/ffi/struct.WasmEdge_ValType.html new file mode 100644 index 000000000..ac14210c7 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_ValType.html @@ -0,0 +1,16 @@ +WasmEdge_ValType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_ValType

Source
#[repr(C)]
pub struct WasmEdge_ValType { + pub Data: [u8; 8], +}
Expand description

WasmEdge WASM value type struct.

+

Fields§

§Data: [u8; 8]

Trait Implementations§

Source§

impl Clone for WasmEdge_ValType

Source§

fn clone(&self) -> WasmEdge_ValType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_ValType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<ValType> for WasmEdge_ValType

Source§

fn from(value: ValType) -> Self

Converts to this type from the input type.
Source§

impl From<WasmEdge_ValType> for ValType

Source§

fn from(value: WasmEdge_ValType) -> Self

Converts to this type from the input type.
Source§

impl Copy for WasmEdge_ValType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_ValidatorContext.html b/wasmedge_sys/ffi/struct.WasmEdge_ValidatorContext.html new file mode 100644 index 000000000..f97dc1dba --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_ValidatorContext.html @@ -0,0 +1,13 @@ +WasmEdge_ValidatorContext in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_ValidatorContext

Source
#[repr(C)]
pub struct WasmEdge_ValidatorContext { /* private fields */ }

Trait Implementations§

Source§

impl Clone for WasmEdge_ValidatorContext

Source§

fn clone(&self) -> WasmEdge_ValidatorContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_ValidatorContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for WasmEdge_ValidatorContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/struct.WasmEdge_Value.html b/wasmedge_sys/ffi/struct.WasmEdge_Value.html new file mode 100644 index 000000000..e90a76cc3 --- /dev/null +++ b/wasmedge_sys/ffi/struct.WasmEdge_Value.html @@ -0,0 +1,17 @@ +WasmEdge_Value in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Struct WasmEdge_Value

Source
#[repr(C, align(16))]
pub struct WasmEdge_Value { + pub Value: uint128_t, + pub Type: WasmEdge_ValType, +}
Expand description

WasmEdge WASM value struct.

+

Fields§

§Value: uint128_t§Type: WasmEdge_ValType

Trait Implementations§

Source§

impl Clone for WasmEdge_Value

Source§

fn clone(&self) -> WasmEdge_Value

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdge_Value

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<WasmEdge_Value> for WasmValue

Source§

fn from(raw_val: WasmEdge_Value) -> Self

Converts to this type from the input type.
Source§

impl Copy for WasmEdge_Value

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.WasmEdge_CompilerOptimizationLevel.html b/wasmedge_sys/ffi/type.WasmEdge_CompilerOptimizationLevel.html new file mode 100644 index 000000000..fd051d07c --- /dev/null +++ b/wasmedge_sys/ffi/type.WasmEdge_CompilerOptimizationLevel.html @@ -0,0 +1 @@ +WasmEdge_CompilerOptimizationLevel in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias WasmEdge_CompilerOptimizationLevel

Source
pub type WasmEdge_CompilerOptimizationLevel = c_uint;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.WasmEdge_CompilerOutputFormat.html b/wasmedge_sys/ffi/type.WasmEdge_CompilerOutputFormat.html new file mode 100644 index 000000000..66526e7cc --- /dev/null +++ b/wasmedge_sys/ffi/type.WasmEdge_CompilerOutputFormat.html @@ -0,0 +1 @@ +WasmEdge_CompilerOutputFormat in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias WasmEdge_CompilerOutputFormat

Source
pub type WasmEdge_CompilerOutputFormat = c_uint;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.WasmEdge_ErrCategory.html b/wasmedge_sys/ffi/type.WasmEdge_ErrCategory.html new file mode 100644 index 000000000..76f0379ef --- /dev/null +++ b/wasmedge_sys/ffi/type.WasmEdge_ErrCategory.html @@ -0,0 +1 @@ +WasmEdge_ErrCategory in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias WasmEdge_ErrCategory

Source
pub type WasmEdge_ErrCategory = c_uint;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.WasmEdge_ErrCode.html b/wasmedge_sys/ffi/type.WasmEdge_ErrCode.html new file mode 100644 index 000000000..9ea240840 --- /dev/null +++ b/wasmedge_sys/ffi/type.WasmEdge_ErrCode.html @@ -0,0 +1 @@ +WasmEdge_ErrCode in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias WasmEdge_ErrCode

Source
pub type WasmEdge_ErrCode = c_uint;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.WasmEdge_ExternalType.html b/wasmedge_sys/ffi/type.WasmEdge_ExternalType.html new file mode 100644 index 000000000..c2a36fd9a --- /dev/null +++ b/wasmedge_sys/ffi/type.WasmEdge_ExternalType.html @@ -0,0 +1 @@ +WasmEdge_ExternalType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias WasmEdge_ExternalType

Source
pub type WasmEdge_ExternalType = c_uint;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.WasmEdge_HostFunc_t.html b/wasmedge_sys/ffi/type.WasmEdge_HostFunc_t.html new file mode 100644 index 000000000..6bad0de49 --- /dev/null +++ b/wasmedge_sys/ffi/type.WasmEdge_HostFunc_t.html @@ -0,0 +1,6 @@ +WasmEdge_HostFunc_t in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias WasmEdge_HostFunc_t

Source
pub type WasmEdge_HostFunc_t = Option<unsafe extern "C" fn(Data: *mut c_void, CallFrameCxt: *const WasmEdge_CallingFrameContext, Params: *const WasmEdge_Value, Returns: *mut WasmEdge_Value) -> WasmEdge_Result>;

Aliased Type§

enum WasmEdge_HostFunc_t {
+    None,
+    Some(unsafe extern "C" fn(_: *mut c_void, _: *const WasmEdge_CallingFrameContext, _: *const WasmEdge_Value, _: *mut WasmEdge_Value) -> WasmEdge_Result),
+}

Variants§

§1.0.0

None

No value.

+
§1.0.0

Some(unsafe extern "C" fn(_: *mut c_void, _: *const WasmEdge_CallingFrameContext, _: *const WasmEdge_Value, _: *mut WasmEdge_Value) -> WasmEdge_Result)

Some value of type T.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.WasmEdge_HostRegistration.html b/wasmedge_sys/ffi/type.WasmEdge_HostRegistration.html new file mode 100644 index 000000000..a9dbf667f --- /dev/null +++ b/wasmedge_sys/ffi/type.WasmEdge_HostRegistration.html @@ -0,0 +1 @@ +WasmEdge_HostRegistration in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias WasmEdge_HostRegistration

Source
pub type WasmEdge_HostRegistration = c_uint;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.WasmEdge_Mutability.html b/wasmedge_sys/ffi/type.WasmEdge_Mutability.html new file mode 100644 index 000000000..fbaada935 --- /dev/null +++ b/wasmedge_sys/ffi/type.WasmEdge_Mutability.html @@ -0,0 +1 @@ +WasmEdge_Mutability in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias WasmEdge_Mutability

Source
pub type WasmEdge_Mutability = c_uint;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.WasmEdge_ProgramOptionType.html b/wasmedge_sys/ffi/type.WasmEdge_ProgramOptionType.html new file mode 100644 index 000000000..b478d45f3 --- /dev/null +++ b/wasmedge_sys/ffi/type.WasmEdge_ProgramOptionType.html @@ -0,0 +1,2 @@ +WasmEdge_ProgramOptionType in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias WasmEdge_ProgramOptionType

Source
pub type WasmEdge_ProgramOptionType = c_uint;
Expand description

Type of option value.

+

Trait Implementations§

Source§

impl From<ProgramOptionType> for WasmEdge_ProgramOptionType

Source§

fn from(value: ProgramOptionType) -> Self

Converts to this type from the input type.
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.WasmEdge_Proposal.html b/wasmedge_sys/ffi/type.WasmEdge_Proposal.html new file mode 100644 index 000000000..92ec9d876 --- /dev/null +++ b/wasmedge_sys/ffi/type.WasmEdge_Proposal.html @@ -0,0 +1 @@ +WasmEdge_Proposal in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias WasmEdge_Proposal

Source
pub type WasmEdge_Proposal = c_uint;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.WasmEdge_TypeCode.html b/wasmedge_sys/ffi/type.WasmEdge_TypeCode.html new file mode 100644 index 000000000..a1c04d18b --- /dev/null +++ b/wasmedge_sys/ffi/type.WasmEdge_TypeCode.html @@ -0,0 +1 @@ +WasmEdge_TypeCode in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias WasmEdge_TypeCode

Source
pub type WasmEdge_TypeCode = c_uint;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.WasmEdge_WrapFunc_t.html b/wasmedge_sys/ffi/type.WasmEdge_WrapFunc_t.html new file mode 100644 index 000000000..8b0ff61fe --- /dev/null +++ b/wasmedge_sys/ffi/type.WasmEdge_WrapFunc_t.html @@ -0,0 +1,6 @@ +WasmEdge_WrapFunc_t in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias WasmEdge_WrapFunc_t

Source
pub type WasmEdge_WrapFunc_t = Option<unsafe extern "C" fn(This: *mut c_void, Data: *mut c_void, CallFrameCxt: *const WasmEdge_CallingFrameContext, Params: *const WasmEdge_Value, ParamLen: u32, Returns: *mut WasmEdge_Value, ReturnLen: u32) -> WasmEdge_Result>;

Aliased Type§

enum WasmEdge_WrapFunc_t {
+    None,
+    Some(unsafe extern "C" fn(_: *mut c_void, _: *mut c_void, _: *const WasmEdge_CallingFrameContext, _: *const WasmEdge_Value, _: u32, _: *mut WasmEdge_Value, _: u32) -> WasmEdge_Result),
+}

Variants§

§1.0.0

None

No value.

+
§1.0.0

Some(unsafe extern "C" fn(_: *mut c_void, _: *mut c_void, _: *const WasmEdge_CallingFrameContext, _: *const WasmEdge_Value, _: u32, _: *mut WasmEdge_Value, _: u32) -> WasmEdge_Result)

Some value of type T.

+
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.int128_t.html b/wasmedge_sys/ffi/type.int128_t.html new file mode 100644 index 000000000..946dd7304 --- /dev/null +++ b/wasmedge_sys/ffi/type.int128_t.html @@ -0,0 +1 @@ +int128_t in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias int128_t

Source
pub type int128_t = i128;
\ No newline at end of file diff --git a/wasmedge_sys/ffi/type.uint128_t.html b/wasmedge_sys/ffi/type.uint128_t.html new file mode 100644 index 000000000..f6b7a79c9 --- /dev/null +++ b/wasmedge_sys/ffi/type.uint128_t.html @@ -0,0 +1 @@ +uint128_t in wasmedge_sys::ffi - Rust
wasmedge_sys::ffi

Type Alias uint128_t

Source
pub type uint128_t = u128;
\ No newline at end of file diff --git a/wasmedge_sys/frame/index.html b/wasmedge_sys/frame/index.html new file mode 100644 index 000000000..12147febf --- /dev/null +++ b/wasmedge_sys/frame/index.html @@ -0,0 +1,2 @@ +wasmedge_sys::frame - Rust
wasmedge_sys

Module frame

Source
Expand description

Defines WasmEdge CallingFrame.

+

Structs§

\ No newline at end of file diff --git a/wasmedge_sys/frame/sidebar-items.js b/wasmedge_sys/frame/sidebar-items.js new file mode 100644 index 000000000..ebd1da183 --- /dev/null +++ b/wasmedge_sys/frame/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["CallingFrame"]}; \ No newline at end of file diff --git a/wasmedge_sys/frame/struct.CallingFrame.html b/wasmedge_sys/frame/struct.CallingFrame.html new file mode 100644 index 000000000..c7ac2d4f0 --- /dev/null +++ b/wasmedge_sys/frame/struct.CallingFrame.html @@ -0,0 +1,32 @@ +CallingFrame in wasmedge_sys::frame - Rust
wasmedge_sys::frame

Struct CallingFrame

Source
pub struct CallingFrame { /* private fields */ }
Expand description

Represents a calling frame on top of stack.

+

Implementations§

Source§

impl CallingFrame

Source

pub fn memory_ref(&self, idx: u32) -> Option<InnerRef<Memory, &Self>>

Returns an immutable smart pointer borrowing the memory instance by the given index from the module instance of the current +calling frame. If the memory instance is not found, returns None.

+

By default, a WASM module has only one memory instance after instantiation. Therefore, users can pass in 0 as +the index to get the memory instance in host function body. When the MultiMemories +config option is enabled, there would be more than one memory instances in the wasm module. Users can retrieve +the target memory instance by specifying the index of the memory instance in the wasm module instance.

+
§Arguments
+
    +
  • idx - The index of the memory instance.
  • +
+
Source

pub fn memory_mut(&mut self, idx: u32) -> Option<InnerRef<Memory, &mut Self>>

Returns an mutable smart pointer borrowing the memory instance by the given index from the module instance of the current +calling frame. If the memory instance is not found, returns None.

+

By default, a WASM module has only one memory instance after instantiation. Therefore, users can pass in 0 as +the index to get the memory instance in host function body. When the MultiMemories +config option is enabled, there would be more than one memory instances in the wasm module. Users can retrieve +the target memory instance by specifying the index of the memory instance in the wasm module instance.

+
§Arguments
+
    +
  • idx - The index of the memory instance.
  • +
+

Trait Implementations§

Source§

impl Debug for CallingFrame

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/index.html b/wasmedge_sys/index.html new file mode 100644 index 000000000..0b18c8a85 --- /dev/null +++ b/wasmedge_sys/index.html @@ -0,0 +1,50 @@ +wasmedge_sys - Rust

Crate wasmedge_sys

Source
Expand description

§Overview

+

The wasmedge-sys crate defines a group of low-level Rust APIs for WasmEdge, a light-weight, high-performance, and extensible WebAssembly runtime for cloud-native, edge, and decentralized applications.

+

For developers, it is strongly recommended that the APIs in wasmedge-sys are used to construct high-level libraries, while wasmedge-sdk is for building up business applications.

+
    +
  • Notice that wasmedge-sys requires Rust v1.71 or above in the stable channel.
  • +
+

§Build

+

To use or build the wasmedge-sys crate, the WasmEdge library is required. Please refer to WasmEdge Installation and Uninstallation to install the WasmEdge library.

+
    +
  • +

    The following table provides the versioning information about each crate of WasmEdge Rust bindings.

    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    wasmedge-sdkWasmEdge libwasmedge-syswasmedge-typeswasmedge-macroasync-wasi
    0.14.0+0.14.10.19.30.6.00.6.10.2.1
    0.14.0+0.14.00.19.20.6.00.6.10.2.1
    0.13.20.13.50.17.50.4.40.6.10.1.0
    0.13.10.13.50.17.40.4.40.6.10.1.0
    0.13.00.13.50.17.30.4.40.6.10.1.0
    0.12.20.13.40.17.20.4.40.6.10.1.0
    0.12.10.13.40.17.10.4.40.6.10.1.0
    0.12.00.13.40.17.00.4.40.6.10.1.0
    0.11.20.13.30.16.20.4.30.6.10.1.0
    0.11.00.13.30.16.00.4.30.6.00.0.3
    0.10.10.13.30.15.10.4.20.5.00.0.2
    0.10.00.13.20.15.00.4.20.5.00.0.2
    0.9.00.13.10.14.00.4.20.4.00.0.1
    0.9.00.13.00.14.00.4.20.4.00.0.1
    0.8.10.12.10.13.10.4.10.3.0-
    0.8.00.12.00.13.00.4.10.3.0-
    0.7.10.11.20.12.20.3.10.3.0-
    0.7.00.11.20.120.3.10.3.0-
    0.6.00.11.20.110.3.00.2.0-
    0.5.00.11.10.100.3.00.1.0-
    0.4.00.11.00.90.2.1--
    0.3.00.10.10.80.2--
    0.1.00.10.00.70.1--
    +
  • +
+

§API Reference

+ +

§See also

+ +

Modules§

  • asyncasync and Linux
    Defines async related types.
  • Foreign function interfaces generated from WasmEdge C-API.
  • Defines WasmEdge CallingFrame.
  • Defines WasmEdge instance structs, including Function, Global, Memory, Table, and etc.
  • Defines PluginManager and Plugin structs.
  • Defines the WebAssembly primitive types.
  • Defines the versioning and logging functions.

Structs§

  • Represents a calling frame on top of stack.
  • Defines WasmEdge ahead-of-time(AOT) compiler and the relevant APIs.
  • Defines Config struct used to check/set the configuration options.
  • Defines an execution environment for both pure WASM and compiled WASM.
  • Defines the types of the exported wasm values.
  • Struct of WasmEdge FuncType.
  • Defines a host function.
  • Defines a WebAssembly global variable, which stores a single value of the given type and a flag indicating whether it is mutable or not.
  • Struct of WasmEdge GlobalType.
  • An ImportModule represents a host module with a name. A host module consists of one or more host function, table, memory, and global instances, which are defined outside wasm modules and fed into wasm modules as imports.
  • Defines the types of the imported wasm value.
  • An Instance represents an instantiated module. In the instantiation process, An Instance is created from alModule. From an Instance the exported functions, tables, memories, and globals can be fetched.
  • Loader is used to load WASM modules from the given WASM files or buffers.
  • Defines a WebAssembly memory instance, which is a linear memory described by its type. Each memory instance consists of a vector of bytes and an optional maximum size, and its size is a multiple of the WebAssembly page size (64KiB of each page).
  • Struct of WasmEdge MemoryType.
  • Defines compiled in-memory representation of an input WASM binary.
  • Struct of WasmEdge Statistics.
  • The Store is a collection of registered modules and assists wasm modules in finding the import modules they need.
  • A WasmEdge Table defines a WebAssembly table instance described by its type. A table is an array-like structure and stores function references.
  • Struct of WasmEdge TableType.
  • Struct of WasmEdge Validator.
  • A WasiModule is a module instance for the WASI specification.
  • Defines a WebAssembly value.

Traits§

  • The object as an module instance is required to implement this trait.

Type Aliases§

\ No newline at end of file diff --git a/wasmedge_sys/instance/function/index.html b/wasmedge_sys/instance/function/index.html new file mode 100644 index 000000000..2d56fd22f --- /dev/null +++ b/wasmedge_sys/instance/function/index.html @@ -0,0 +1,2 @@ +wasmedge_sys::instance::function - Rust
wasmedge_sys::instance

Module function

Source
Expand description

Defines WasmEdge Function and FuncType structs.

+

Structs§

Traits§

Type Aliases§

\ No newline at end of file diff --git a/wasmedge_sys/instance/function/sidebar-items.js b/wasmedge_sys/instance/function/sidebar-items.js new file mode 100644 index 000000000..26f9c8639 --- /dev/null +++ b/wasmedge_sys/instance/function/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Function"],"trait":["AsFunc"],"type":["CustomFnWrapper","FuncRef","SyncFn"]}; \ No newline at end of file diff --git a/wasmedge_sys/instance/function/struct.Function.html b/wasmedge_sys/instance/function/struct.Function.html new file mode 100644 index 000000000..bebf16dc1 --- /dev/null +++ b/wasmedge_sys/instance/function/struct.Function.html @@ -0,0 +1,77 @@ +Function in wasmedge_sys::instance::function - Rust
wasmedge_sys::instance::function

Struct Function

Source
pub struct Function { /* private fields */ }
Expand description

Defines a host function.

+

A WasmEdge Function defines a WebAssembly host function described by its type. A host function is a closure of the original function defined in either the host or the WebAssembly module.

+

Implementations§

Source§

impl Function

Source

pub unsafe fn create_sync_func<T>( + ty: &FuncType, + real_fn: SyncFn<T>, + data: *mut T, + cost: u64, +) -> WasmEdgeResult<Self>

Creates a host function with the given function type.

+

N.B. that this function is used for thread-safe scenarios.

+
§Arguments
+
    +
  • +

    ty - The types of the arguments and returns of the target function.

    +
  • +
  • +

    real_fn - The pointer to the target function.

    +
  • +
  • +

    data - The host context data used in this function.

    +
  • +
  • +

    cost - The function cost in the Statistics. Pass 0 if the calculation is not needed.

    +
  • +
+
§Error
+ +
§Safety
+

The lifetime of data must be greater than that of Function itself.

+
Source

pub unsafe fn create_with_custom_wrapper( + ty: &FuncType, + fn_wrapper: CustomFnWrapper, + real_fn: *mut c_void, + data: *mut c_void, + cost: u64, +) -> WasmEdgeResult<Self>

Creates a host function with the given function type and the custom function wrapper.

+
§Arguments
+
    +
  • +

    ty - The types of the arguments and returns of the target function.

    +
  • +
  • +

    fn_wrapper - The custom function wrapper.

    +
  • +
  • +

    real_fn - The pointer to the target function.

    +
  • +
  • +

    data - The pointer to the host context data used in this function.

    +
  • +
  • +

    cost - The function cost in the Statistics. Pass 0 if the calculation is not needed.

    +
  • +
+
§Error
+ +
§Safety
+

Notice that the caller should guarantee the life cycle of both the real_fn and the data object.

+
Source

pub unsafe fn as_ptr(&self) -> *mut WasmEdge_FunctionInstanceContext

§Safety
+

The lifetime of the returned pointer must not exceed that of the object itself.

+
Source

pub unsafe fn from_raw(ctx: *mut WasmEdge_FunctionInstanceContext) -> Self

§Safety
+

This function will take over the lifetime management of ctx, so do not call ffi::WasmEdge_FunctionInstanceDelete on ctx after this.

+

Trait Implementations§

Source§

impl AsFunc for Function

Source§

impl AsMut<Function> for AsyncFunction

Available on crate feature async and Linux only.
Source§

fn as_mut(&mut self) -> &mut Function

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Function> for AsyncFunction

Available on crate feature async and Linux only.
Source§

fn as_ref(&self) -> &Function

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for Function

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Function

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/instance/function/trait.AsFunc.html b/wasmedge_sys/instance/function/trait.AsFunc.html new file mode 100644 index 000000000..5e7e71a20 --- /dev/null +++ b/wasmedge_sys/instance/function/trait.AsFunc.html @@ -0,0 +1,11 @@ +AsFunc in wasmedge_sys::instance::function - Rust
wasmedge_sys::instance::function

Trait AsFunc

Source
pub trait AsFunc {
+    // Required method
+    unsafe fn get_func_raw(&self) -> *mut WasmEdge_FunctionInstanceContext;
+
+    // Provided method
+    fn ty(&self) -> Option<FuncType>
+       where Self: Sized { ... }
+}

Required Methods§

Source

unsafe fn get_func_raw(&self) -> *mut WasmEdge_FunctionInstanceContext

§Safety
+

The lifetime of the returned pointer must not exceed that of the object itself.

+

Provided Methods§

Source

fn ty(&self) -> Option<FuncType>
where + Self: Sized,

Implementors§

\ No newline at end of file diff --git a/wasmedge_sys/instance/function/type.CustomFnWrapper.html b/wasmedge_sys/instance/function/type.CustomFnWrapper.html new file mode 100644 index 000000000..32fe7cc37 --- /dev/null +++ b/wasmedge_sys/instance/function/type.CustomFnWrapper.html @@ -0,0 +1 @@ +CustomFnWrapper in wasmedge_sys::instance::function - Rust
wasmedge_sys::instance::function

Type Alias CustomFnWrapper

Source
pub type CustomFnWrapper = unsafe extern "C" fn(key_ptr: *mut c_void, data_ptr: *mut c_void, calling_frame_ctx: *const WasmEdge_CallingFrameContext, params: *const WasmEdge_Value, param_len: u32, returns: *mut WasmEdge_Value, return_len: u32) -> WasmEdge_Result;
\ No newline at end of file diff --git a/wasmedge_sys/instance/function/type.FuncRef.html b/wasmedge_sys/instance/function/type.FuncRef.html new file mode 100644 index 000000000..235bc0f1f --- /dev/null +++ b/wasmedge_sys/instance/function/type.FuncRef.html @@ -0,0 +1,2 @@ +FuncRef in wasmedge_sys::instance::function - Rust
wasmedge_sys::instance::function

Type Alias FuncRef

Source
pub type FuncRef<Ref> = InnerRef<Function, Ref>;
Expand description

Defines a reference to a host function.

+

Aliased Type§

struct FuncRef<Ref> { /* private fields */ }
\ No newline at end of file diff --git a/wasmedge_sys/instance/function/type.SyncFn.html b/wasmedge_sys/instance/function/type.SyncFn.html new file mode 100644 index 000000000..6274ca426 --- /dev/null +++ b/wasmedge_sys/instance/function/type.SyncFn.html @@ -0,0 +1 @@ +SyncFn in wasmedge_sys::instance::function - Rust
wasmedge_sys::instance::function

Type Alias SyncFn

Source
pub type SyncFn<Data> = for<'a, 'b, 'c> fn(_: &'a mut Data, _: &'b mut Instance, _: &'c mut CallingFrame, _: Vec<WasmValue>) -> Result<Vec<WasmValue>, CoreError>;
\ No newline at end of file diff --git a/wasmedge_sys/instance/global/index.html b/wasmedge_sys/instance/global/index.html new file mode 100644 index 000000000..e0b0fa460 --- /dev/null +++ b/wasmedge_sys/instance/global/index.html @@ -0,0 +1,4 @@ +wasmedge_sys::instance::global - Rust
wasmedge_sys::instance

Module global

Source
Expand description

Defines WasmEdge Global and GlobalType structs.

+

A WasmEdge Global defines a global variable, which stores a single value of the given GlobalType. +GlobalType specifies whether a global variable is immutable or mutable.

+

Structs§

  • Defines a WebAssembly global variable, which stores a single value of the given type and a flag indicating whether it is mutable or not.
\ No newline at end of file diff --git a/wasmedge_sys/instance/global/sidebar-items.js b/wasmedge_sys/instance/global/sidebar-items.js new file mode 100644 index 000000000..bc78978bd --- /dev/null +++ b/wasmedge_sys/instance/global/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Global"]}; \ No newline at end of file diff --git a/wasmedge_sys/instance/global/struct.Global.html b/wasmedge_sys/instance/global/struct.Global.html new file mode 100644 index 000000000..687cf7c87 --- /dev/null +++ b/wasmedge_sys/instance/global/struct.Global.html @@ -0,0 +1,34 @@ +Global in wasmedge_sys::instance::global - Rust
wasmedge_sys::instance::global

Struct Global

Source
pub struct Global { /* private fields */ }
Expand description

Defines a WebAssembly global variable, which stores a single value of the given type and a flag indicating whether it is mutable or not.

+

Implementations§

Source§

impl Global

Source

pub fn create(ty: &GlobalType, val: WasmValue) -> WasmEdgeResult<Self>

Creates a new Global instance to be associated with the given [GlobalType] and WasmValue.

+

The type of the given WasmValue must be matched with [GlobalType]; otherwise, it causes a failure. For example, WasmValue::I32(520) conflicts with a [GlobalType] with a value type defined as ValType::F32.

+
§Errors
+
    +
  • If fail to create the Global instance, then WasmEdgeError::Global(GlobalError::Create)(crate::error::GlobalError) is returned.
  • +
+
Source

pub fn ty(&self) -> WasmEdgeResult<GlobalType>

Returns the underlying wasm type of a Global instance.

+
§Errors
+

If fail to get the type, then an error is returned.

+
Source

pub fn get_value(&self) -> WasmValue

Returns the value of the Global instance.

+
Source

pub fn set_value(&mut self, val: WasmValue) -> WasmEdgeResult<()>

Sets the value of the Global instance.

+

Notice that only the Global instance of Mutability::Var type can be set a new value. Setting a new value for a Global of Mutability::Const causes a failure.

+
§Argument
+
    +
  • val - The new wasm value to be set.
  • +
+
§Errors
+

If fail to set value, then an error is returned.

+
Source

pub unsafe fn as_ptr(&self) -> *const WasmEdge_GlobalInstanceContext

§Safety
+

The lifetime of the returned pointer must not exceed that of the object itself.

+
Source

pub unsafe fn from_raw(ptr: *mut WasmEdge_GlobalInstanceContext) -> Self

§Safety
+

This function takes ownership of ptr, so do not call ffi::WasmEdge_GlobalInstanceDelete on ptr after this.

+

Trait Implementations§

Source§

impl Debug for Global

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Global

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Global

§

impl RefUnwindSafe for Global

§

impl Send for Global

§

impl Sync for Global

§

impl Unpin for Global

§

impl UnwindSafe for Global

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/instance/index.html b/wasmedge_sys/instance/index.html new file mode 100644 index 000000000..513f0d5f7 --- /dev/null +++ b/wasmedge_sys/instance/index.html @@ -0,0 +1,2 @@ +wasmedge_sys::instance - Rust
wasmedge_sys

Module instance

Source
Expand description

Defines WasmEdge instance structs, including Function, Global, Memory, Table, and etc.

+

Modules§

  • Defines WasmEdge Function and FuncType structs.
  • Defines WasmEdge Global and GlobalType structs.
  • Defines WasmEdge Memory and MemType structs.
  • Defines WasmEdge Instance and other relevant types.
  • Defines WasmEdge Table and TableType structs.

Structs§

\ No newline at end of file diff --git a/wasmedge_sys/instance/memory/index.html b/wasmedge_sys/instance/memory/index.html new file mode 100644 index 000000000..6cf085b8c --- /dev/null +++ b/wasmedge_sys/instance/memory/index.html @@ -0,0 +1,6 @@ +wasmedge_sys::instance::memory - Rust
wasmedge_sys::instance

Module memory

Source
Expand description

Defines WasmEdge Memory and MemType structs.

+

A WasmEdge Memory defines a linear memory as described by MemType. +MemType specifies the limits on the size of a memory by a range. The start of +the limit range specifies min size (initial size) of that memory, while the end +restricts the size to which the memory can grow later.

+

Structs§

  • Defines a WebAssembly memory instance, which is a linear memory described by its type. Each memory instance consists of a vector of bytes and an optional maximum size, and its size is a multiple of the WebAssembly page size (64KiB of each page).
\ No newline at end of file diff --git a/wasmedge_sys/instance/memory/sidebar-items.js b/wasmedge_sys/instance/memory/sidebar-items.js new file mode 100644 index 000000000..faa07ccd1 --- /dev/null +++ b/wasmedge_sys/instance/memory/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Memory"]}; \ No newline at end of file diff --git a/wasmedge_sys/instance/memory/struct.Memory.html b/wasmedge_sys/instance/memory/struct.Memory.html new file mode 100644 index 000000000..eb3a989bb --- /dev/null +++ b/wasmedge_sys/instance/memory/struct.Memory.html @@ -0,0 +1,120 @@ +Memory in wasmedge_sys::instance::memory - Rust
wasmedge_sys::instance::memory

Struct Memory

Source
pub struct Memory { /* private fields */ }
Expand description

Defines a WebAssembly memory instance, which is a linear memory described by its type. Each memory instance consists of a vector of bytes and an optional maximum size, and its size is a multiple of the WebAssembly page size (64KiB of each page).

+

Implementations§

Source§

impl Memory

Source

pub fn create(ty: &MemoryType) -> WasmEdgeResult<Self>

Create a new Memory to be associated with the given capacity limit.

+
§Arguments
+
    +
  • ty - The type of the new Memory instance.
  • +
+
§Errors
+ +
Source

pub fn ty(&self) -> WasmEdgeResult<MemoryType>

Returns the type of the Memory.

+
§Errors
+

If fail to get the type from the Memory, then an error is returned.

+
Source

pub fn get_data(&self, offset: u32, len: u32) -> WasmEdgeResult<Vec<u8>>

Copies the data from the Memory to the output buffer.

+
§Arguments
+
    +
  • +

    offset - The data start offset in the Memory.

    +
  • +
  • +

    len - The requested data length.

    +
  • +
+
§Errors
+

If the offset + len is larger than the data size in the Memory, then an error is returned.

+
Source

pub fn set_data( + &mut self, + data: impl AsRef<[u8]>, + offset: u32, +) -> WasmEdgeResult<()>

Copies the data from the given input buffer into the Memory.

+
§Arguments
+
    +
  • +

    data - The data buffer to copy.

    +
  • +
  • +

    offset - The data start offset in the Memory.

    +
  • +
+
§Errors
+

If the sum of the offset and the data length is larger than the size of the Memory, +then an error is returned.

+
Source

pub unsafe fn data_pointer( + &self, + offset: u32, + len: u32, +) -> WasmEdgeResult<*const u8>

Returns the const data pointer to the Memory.

+
§Arguments
+
    +
  • +

    offset - The data start offset in the Memory.

    +
  • +
  • +

    len - The requested data length. If the size of offset + len is larger than the data size in the Memory

    +
  • +
+
§Errors
+

If fail to get the data pointer, then an error is returned.

+
§Safety
+

The lifetime of the returned pointer must not exceed that of the object itself.

+
Source

pub unsafe fn data_pointer_mut( + &mut self, + offset: u32, + len: u32, +) -> WasmEdgeResult<*mut u8>

Returns the data pointer to the Memory.

+
§Arguments
+
    +
  • +

    offset - The data start offset in the Memory.

    +
  • +
  • +

    len - The requested data length. If the size of offset + len is larger than the data size in the Memory

    +
  • +
+
§Errors
+

If fail to get the data pointer, then an error is returned.

+
§Safety
+

The lifetime of the returned pointer must not exceed that of the object itself.

+
Source

pub fn size(&self) -> u32

Returns the size, in WebAssembly pages (64 KiB of each page), of this wasm memory.

+
Source

pub fn grow(&mut self, count: u32) -> WasmEdgeResult<()>

Grows this WebAssembly memory by count pages.

+
§Arguments
+
    +
  • count - The page counts to be extended to the Memory.
  • +
+
§Errors
+

If fail to grow the page count, then an error is returned.

+
Source

pub unsafe fn as_ptr(&self) -> *const WasmEdge_MemoryInstanceContext

§Safety
+

Provides a raw pointer to the inner memory context. +The lifetime of the returned pointer must not exceed that of the object itself.

+
Source§

impl Memory

Source

pub fn get_ref<T: Sized>(&self, offset: usize) -> Option<&T>

Source

pub fn slice<T: Sized>(&self, offset: usize, len: usize) -> Option<&[T]>

Source

pub fn get_ref_mut<T: Sized>(&mut self, offset: usize) -> Option<&mut T>

Source

pub fn mut_slice<T: Sized>(&self, offset: usize, len: usize) -> Option<&mut [T]>

Source

pub fn write<T: Sized>(&mut self, offset: usize, data: T) -> Option<()>

Trait Implementations§

Source§

impl Debug for Memory

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Memory

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Memory for Memory

Available on crate feature async and Linux only.
Source§

fn get_data<T: Sized>(&self, offset: WasmPtr<T>) -> Result<&T, Errno>

Source§

fn get_slice<T: Sized>( + &self, + offset: WasmPtr<T>, + len: usize, +) -> Result<&[T], Errno>

Source§

fn get_iovec<'a>( + &self, + iovec_ptr: WasmPtr<__wasi_ciovec_t>, + iovec_len: __wasi_size_t, +) -> Result<Vec<IoSlice<'a>>, Errno>

Source§

fn mut_data<T: Sized>(&mut self, offset: WasmPtr<T>) -> Result<&mut T, Errno>

Source§

fn mut_slice<T: Sized>( + &mut self, + offset: WasmPtr<T>, + len: usize, +) -> Result<&mut [T], Errno>

Source§

fn mut_iovec( + &mut self, + iovec_ptr: WasmPtr<__wasi_iovec_t>, + iovec_len: __wasi_size_t, +) -> Result<Vec<IoSliceMut<'_>>, Errno>

Source§

fn write_data<T: Sized>( + &mut self, + offset: WasmPtr<T>, + data: T, +) -> Result<(), Errno>

Auto Trait Implementations§

§

impl Freeze for Memory

§

impl RefUnwindSafe for Memory

§

impl Send for Memory

§

impl Sync for Memory

§

impl Unpin for Memory

§

impl UnwindSafe for Memory

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/instance/module/index.html b/wasmedge_sys/instance/module/index.html new file mode 100644 index 000000000..c946351aa --- /dev/null +++ b/wasmedge_sys/instance/module/index.html @@ -0,0 +1,2 @@ +wasmedge_sys::instance::module - Rust
wasmedge_sys::instance

Module module

Source
Expand description

Defines WasmEdge Instance and other relevant types.

+

Structs§

Traits§

  • The object as an module instance is required to implement this trait.
\ No newline at end of file diff --git a/wasmedge_sys/instance/module/sidebar-items.js b/wasmedge_sys/instance/module/sidebar-items.js new file mode 100644 index 000000000..5fd16117e --- /dev/null +++ b/wasmedge_sys/instance/module/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["ImportModule","Instance","WasiModule"],"trait":["AsInstance"]}; \ No newline at end of file diff --git a/wasmedge_sys/instance/module/struct.ImportModule.html b/wasmedge_sys/instance/module/struct.ImportModule.html new file mode 100644 index 000000000..e1e356a3a --- /dev/null +++ b/wasmedge_sys/instance/module/struct.ImportModule.html @@ -0,0 +1,55 @@ +ImportModule in wasmedge_sys::instance::module - Rust
wasmedge_sys::instance::module

Struct ImportModule

Source
pub struct ImportModule<T: ?Sized> { /* private fields */ }
Expand description

An ImportModule represents a host module with a name. A host module consists of one or more host function, table, memory, and global instances, which are defined outside wasm modules and fed into wasm modules as imports.

+

Implementations§

Source§

impl<T: Sized> ImportModule<T>

Source

pub fn create(name: impl AsRef<str>, data: Box<T>) -> WasmEdgeResult<Self>

Creates a module instance which is used to import host functions, tables, memories, and globals into a wasm module.

+
§Argument
+
    +
  • +

    name - The name of the import module instance.

    +
  • +
  • +

    data - The host context data used in this function.

    +
  • +
+
§Error
+

If fail to create the import module instance, then an error is returned.

+
Source

pub unsafe fn as_raw(&self) -> *mut WasmEdge_ModuleInstanceContext

§Safety
+

Provides a raw pointer to the inner module instance context. +The lifetime of the returned pointer must not exceed that of the object itself.

+
Source

pub unsafe fn from_raw(ctx: *mut WasmEdge_ModuleInstanceContext) -> Self

§Safety
+

This function will take over the lifetime management of ctx, so do not call ffi::WasmEdge_ModuleInstanceDelete on ctx after this.

+
Source

pub fn get_host_data(&self) -> &T

Source

pub fn get_host_data_mut(&mut self) -> &mut T

Source§

impl<T: Sized> ImportModule<T>

Source

pub fn add_func(&mut self, name: impl AsRef<str>, func: Function)

Source

pub fn add_table(&mut self, name: impl AsRef<str>, table: Table)

Source

pub fn add_memory(&mut self, name: impl AsRef<str>, memory: Memory)

Source

pub fn add_global(&mut self, name: impl AsRef<str>, global: Global)

Trait Implementations§

Source§

impl<T: Sized> AsInstance for ImportModule<T>

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Table, &Self>>
where + Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &Self>>
where + Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &mut Self>>
where + Self: Sized,

Source§

fn get_global( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &Self>>
where + Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &mut Self>>
where + Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut(&mut self, name: &str) -> WasmEdgeResult<FuncRef<&mut Instance>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
Source§

impl<T: Send> AsMut<ImportModule<T>> for AsyncImportObject<T>

Available on crate feature async and Linux only.
Source§

fn as_mut(&mut self) -> &mut ImportModule<T>

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<T: Send> AsRef<ImportModule<T>> for AsyncImportObject<T>

Available on crate feature async and Linux only.
Source§

fn as_ref(&self) -> &ImportModule<T>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T: Debug + ?Sized> Debug for ImportModule<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: ?Sized> Drop for ImportModule<T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<T> Freeze for ImportModule<T>
where + T: ?Sized,

§

impl<T> RefUnwindSafe for ImportModule<T>
where + T: RefUnwindSafe + ?Sized,

§

impl<T> Send for ImportModule<T>
where + T: Send + ?Sized,

§

impl<T> Sync for ImportModule<T>
where + T: Sync + ?Sized,

§

impl<T> Unpin for ImportModule<T>
where + T: Unpin + ?Sized,

§

impl<T> UnwindSafe for ImportModule<T>
where + T: UnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/instance/module/struct.Instance.html b/wasmedge_sys/instance/module/struct.Instance.html new file mode 100644 index 000000000..0a4701dc0 --- /dev/null +++ b/wasmedge_sys/instance/module/struct.Instance.html @@ -0,0 +1,32 @@ +Instance in wasmedge_sys::instance::module - Rust
wasmedge_sys::instance::module

Struct Instance

Source
pub struct Instance { /* private fields */ }
Expand description

An Instance represents an instantiated module. In the instantiation process, An Instance is created from alModule. From an Instance the exported functions, tables, memories, and globals can be fetched.

+

Trait Implementations§

Source§

impl AsInstance for Instance

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Table, &Self>>
where + Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &Self>>
where + Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &mut Self>>
where + Self: Sized,

Source§

fn get_global( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &Self>>
where + Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &mut Self>>
where + Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut(&mut self, name: &str) -> WasmEdgeResult<FuncRef<&mut Instance>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
Source§

impl AsMut<Instance> for AsyncInstance

Available on crate feature async and Linux only.
Source§

fn as_mut(&mut self) -> &mut Instance

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<Instance> for WasiModule

Source§

fn as_mut(&mut self) -> &mut Instance

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Instance> for AsyncInstance

Available on crate feature async and Linux only.
Source§

fn as_ref(&self) -> &Instance

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<Instance> for WasiModule

Source§

fn as_ref(&self) -> &Instance

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for Instance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Instance

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/instance/module/struct.WasiModule.html b/wasmedge_sys/instance/module/struct.WasiModule.html new file mode 100644 index 000000000..4c8b26fd1 --- /dev/null +++ b/wasmedge_sys/instance/module/struct.WasiModule.html @@ -0,0 +1,80 @@ +WasiModule in wasmedge_sys::instance::module - Rust
wasmedge_sys::instance::module

Struct WasiModule

Source
pub struct WasiModule(/* private fields */);
Expand description

A WasiModule is a module instance for the WASI specification.

+

Implementations§

Source§

impl WasiModule

Source

pub fn create( + args: Option<Vec<&str>>, + envs: Option<Vec<&str>>, + preopens: Option<Vec<&str>>, +) -> WasmEdgeResult<Self>

Creates a WASI host module which contains the WASI host functions, and initializes it with the given parameters.

+
§Arguments
+
    +
  • +

    args - The commandline arguments. The first argument is the program name.

    +
  • +
  • +

    envs - The environment variables in the format ENV_VAR_NAME=VALUE.

    +
  • +
  • +

    preopens - The directories to pre-open. The required format is GUEST_PATH:HOST_PATH.

    +
  • +
+
§Error
+

If fail to create a host module, then an error is returned.

+
Source

pub fn name(&self) -> &str

Returns the name of the module instance.

+
Source

pub fn init_wasi( + &mut self, + args: Option<Vec<&str>>, + envs: Option<Vec<&str>>, + preopens: Option<Vec<&str>>, +)

Initializes the WASI host module with the given parameters.

+
§Arguments
+
    +
  • +

    args - The commandline arguments. The first argument is the program name.

    +
  • +
  • +

    envs - The environment variables in the format ENV_VAR_NAME=VALUE.

    +
  • +
  • +

    preopens - The directories to pre-open. The required format is GUEST_PATH:HOST_PATH.

    +
  • +
+
Source

pub fn exit_code(&self) -> u32

Returns the WASI exit code.

+

The WASI exit code can be accessed after running the “_start” function of a wasm32-wasi program.

+
Source

pub fn get_native_handler(&self, fd: i32) -> WasmEdgeResult<u64>

Returns the native handler from the mapped FD/Handler.

+
§Argument
+
    +
  • fd - The WASI mapped Fd.
  • +
+
§Error
+

If fail to get the native handler, then an error is returned.

+

Trait Implementations§

Source§

impl AsMut<Instance> for WasiModule

Source§

fn as_mut(&mut self) -> &mut Instance

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Instance> for WasiModule

Source§

fn as_ref(&self) -> &Instance

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for WasiModule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<Inst> AsInstance for Inst
where + Inst: AsMut<Instance> + AsRef<Instance>,

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Table, &Self>>
where + Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &Self>>
where + Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &mut Self>>
where + Self: Sized,

Source§

fn get_global( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &Self>>
where + Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &mut Self>>
where + Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut(&mut self, name: &str) -> WasmEdgeResult<FuncRef<&mut Instance>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/instance/module/trait.AsInstance.html b/wasmedge_sys/instance/module/trait.AsInstance.html new file mode 100644 index 000000000..efd105b3a --- /dev/null +++ b/wasmedge_sys/instance/module/trait.AsInstance.html @@ -0,0 +1,115 @@ +AsInstance in wasmedge_sys::instance::module - Rust
wasmedge_sys::instance::module

Trait AsInstance

Source
pub trait AsInstance {
+
Show 17 methods // Required method + unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext; + + // Provided methods + fn name(&self) -> Option<String> { ... } + fn get_table( + &self, + name: impl AsRef<str>, + ) -> WasmEdgeResult<InnerRef<Table, &Self>> + where Self: Sized { ... } + fn get_memory_ref( + &self, + name: impl AsRef<str>, + ) -> WasmEdgeResult<InnerRef<Memory, &Self>> + where Self: Sized { ... } + fn get_memory_mut( + &mut self, + name: impl AsRef<str>, + ) -> WasmEdgeResult<InnerRef<Memory, &mut Self>> + where Self: Sized { ... } + fn get_global( + &self, + name: impl AsRef<str>, + ) -> WasmEdgeResult<InnerRef<Global, &Self>> + where Self: Sized { ... } + fn get_global_mut( + &mut self, + name: impl AsRef<str>, + ) -> WasmEdgeResult<InnerRef<Global, &mut Self>> + where Self: Sized { ... } + fn func_len(&self) -> u32 { ... } + fn func_names(&self) -> Option<Vec<String>> { ... } + fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>> { ... } + fn get_func_mut( + &mut self, + name: &str, + ) -> WasmEdgeResult<FuncRef<&mut Instance>> { ... } + fn table_len(&self) -> u32 { ... } + fn table_names(&self) -> Option<Vec<String>> { ... } + fn mem_len(&self) -> u32 { ... } + fn mem_names(&self) -> Option<Vec<String>> { ... } + fn global_len(&self) -> u32 { ... } + fn global_names(&self) -> Option<Vec<String>> { ... } +
}
Expand description

The object as an module instance is required to implement this trait.

+

Required Methods§

Source

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

§Safety
+

Provides a raw pointer to the inner module instance context. +The lifetime of the returned pointer must not exceed that of the object itself.

+

Provided Methods§

Source

fn name(&self) -> Option<String>

Returns the name of this exported module instance.

+

If this module instance is an active module instance, then None is returned.

+
Source

fn get_table( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Table, &Self>>
where + Self: Sized,

Returns the exported table instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target table instance, then an error is returned.

+
Source

fn get_memory_ref( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &Self>>
where + Self: Sized,

Returns the exported memory instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target memory instance, then an error is returned.

+
Source

fn get_memory_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &mut Self>>
where + Self: Sized,

Source

fn get_global( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &Self>>
where + Self: Sized,

Returns the exported global instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target global instance, then an error is returned.

+
Source

fn get_global_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &mut Self>>
where + Self: Sized,

Source

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.

+
Source

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.

+
Source

fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>>

Returns the exported function instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target function, then an error is returned.

+
Source

fn get_func_mut(&mut self, name: &str) -> WasmEdgeResult<FuncRef<&mut Instance>>

Returns the exported function instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target function, then an error is returned.

+
Source

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.

+
Source

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.

+
Source

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.

+
Source

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.

+
Source

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.

+
Source

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.

+

Implementors§

Source§

impl AsInstance for Instance

Source§

impl<Inst> AsInstance for Inst
where + Inst: AsMut<Instance> + AsRef<Instance> + Sized,

Source§

impl<T: Send> AsInstance for AsyncImportObject<T>

Available on crate feature async and Linux only.
Source§

impl<T: Sized> AsInstance for ImportModule<T>

\ No newline at end of file diff --git a/wasmedge_sys/instance/sidebar-items.js b/wasmedge_sys/instance/sidebar-items.js new file mode 100644 index 000000000..b9feca747 --- /dev/null +++ b/wasmedge_sys/instance/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["function","global","memory","module","table"],"struct":["FuncType","GlobalType","InnerRef","MemoryType","TableType"]}; \ No newline at end of file diff --git a/wasmedge_sys/instance/struct.FuncType.html b/wasmedge_sys/instance/struct.FuncType.html new file mode 100644 index 000000000..8549d4885 --- /dev/null +++ b/wasmedge_sys/instance/struct.FuncType.html @@ -0,0 +1,30 @@ +FuncType in wasmedge_sys::instance - Rust
wasmedge_sys::instance

Struct FuncType

Source
pub struct FuncType { /* private fields */ }
Expand description

Struct of WasmEdge FuncType.

+

A FuncType is used to declare the types of the parameters and return values of a WasmEdge Func to be created.

+

Implementations§

Source§

impl FuncType

Source

pub fn new(args: Vec<ValType>, returns: Vec<ValType>) -> FuncType

Creates a new FuncType with the given types of arguments and returns.

+
§Arguments
+
    +
  • +

    args - A vector of ValTypes that represent the types of the arguments.

    +
  • +
  • +

    returns - A vector of ValTypes that represent the types of the returns.

    +
  • +
+
Source

pub fn args(&self) -> &[ValType]

Returns the types of the arguments of a host function.

+
Source

pub fn args_len(&self) -> usize

Returns the number of the arguments of a host function.

+
Source

pub fn returns(&self) -> &[ValType]

Returns the types of the returns of a host function.

+
Source

pub fn returns_len(&self) -> usize

Returns the number of the returns of a host function.

+

Trait Implementations§

Source§

impl Clone for FuncType

Source§

fn clone(&self) -> FuncType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FuncType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for FuncType

Source§

fn default() -> FuncType

Returns the “default value” for a type. Read more
Source§

impl PartialEq for FuncType

Source§

fn eq(&self, other: &FuncType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for FuncType

Source§

impl StructuralPartialEq for FuncType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/instance/struct.GlobalType.html b/wasmedge_sys/instance/struct.GlobalType.html new file mode 100644 index 000000000..6cd2eaf02 --- /dev/null +++ b/wasmedge_sys/instance/struct.GlobalType.html @@ -0,0 +1,28 @@ +GlobalType in wasmedge_sys::instance - Rust
wasmedge_sys::instance

Struct GlobalType

Source
pub struct GlobalType { /* private fields */ }
Expand description

Struct of WasmEdge GlobalType.

+

A GlobalType is used to declare the type of a WasmEdge Global to be created.

+

Implementations§

Source§

impl GlobalType

Source

pub fn new(ty: ValType, mutability: Mutability) -> GlobalType

Creates a new GlobalType with the given value type and mutability.

+
§Arguments
+
    +
  • +

    ty - The value type of the global to be created.

    +
  • +
  • +

    mutability - The value mutability property of the global to be created.

    +
  • +
+
Source

pub fn value_ty(&self) -> ValType

Returns the value type defined in the GlobalType.

+
Source

pub fn mutability(&self) -> Mutability

Returns the value mutability property defined in the GlobalType.

+

Trait Implementations§

Source§

impl Clone for GlobalType

Source§

fn clone(&self) -> GlobalType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GlobalType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for GlobalType

Source§

fn default() -> GlobalType

Returns the “default value” for a type. Read more
Source§

impl PartialEq for GlobalType

Source§

fn eq(&self, other: &GlobalType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for GlobalType

Source§

impl StructuralPartialEq for GlobalType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/instance/struct.InnerRef.html b/wasmedge_sys/instance/struct.InnerRef.html new file mode 100644 index 000000000..81464d723 --- /dev/null +++ b/wasmedge_sys/instance/struct.InnerRef.html @@ -0,0 +1,35 @@ +InnerRef in wasmedge_sys::instance - Rust
wasmedge_sys::instance

Struct InnerRef

Source
pub struct InnerRef<D, Ref: ?Sized> { /* private fields */ }

Implementations§

Source§

impl<D, Ref: ?Sized> InnerRef<D, &Ref>

Source

pub unsafe fn create_from_ref(value: ManuallyDrop<D>, _r: &Ref) -> Self

§Safety
+

The return value type of this function should ensure the correctness of lifetimes.

+
Source

pub unsafe fn create_ref(value: ManuallyDrop<D>) -> Self

§Safety
+

The return value type of this function should ensure the correctness of lifetimes.

+
Source§

impl<D, Ref: ?Sized> InnerRef<D, &mut Ref>

Source

pub unsafe fn create_from_mut(value: ManuallyDrop<D>, _r: &mut Ref) -> Self

§Safety
+

The return value type of this function should ensure the correctness of lifetimes.

+
Source

pub unsafe fn create_mut(value: ManuallyDrop<D>) -> Self

§Safety
+

The return value type of this function should ensure the correctness of lifetimes.

+

Trait Implementations§

Source§

impl<D: Clone, Ref> Clone for InnerRef<D, &mut Ref>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<D: Debug, Ref> Debug for InnerRef<D, Ref>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D, Ref> Deref for InnerRef<D, &Ref>

Source§

type Target = D

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<D, Ref> Deref for InnerRef<D, &mut Ref>

Source§

type Target = D

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<D, Ref> DerefMut for InnerRef<D, &mut Ref>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<D, Ref> Freeze for InnerRef<D, Ref>
where + D: Freeze, + Ref: ?Sized,

§

impl<D, Ref> RefUnwindSafe for InnerRef<D, Ref>
where + D: RefUnwindSafe, + Ref: RefUnwindSafe + ?Sized,

§

impl<D, Ref> Send for InnerRef<D, Ref>
where + D: Send, + Ref: Send + ?Sized,

§

impl<D, Ref> Sync for InnerRef<D, Ref>
where + D: Sync, + Ref: Sync + ?Sized,

§

impl<D, Ref> Unpin for InnerRef<D, Ref>
where + D: Unpin, + Ref: Unpin + ?Sized,

§

impl<D, Ref> UnwindSafe for InnerRef<D, Ref>
where + D: UnwindSafe, + Ref: UnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<P, T> Receiver for P
where + P: Deref<Target = T> + ?Sized, + T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/instance/struct.MemoryType.html b/wasmedge_sys/instance/struct.MemoryType.html new file mode 100644 index 000000000..fd1ef7805 --- /dev/null +++ b/wasmedge_sys/instance/struct.MemoryType.html @@ -0,0 +1,36 @@ +MemoryType in wasmedge_sys::instance - Rust
wasmedge_sys::instance

Struct MemoryType

Source
pub struct MemoryType { /* private fields */ }
Expand description

Struct of WasmEdge MemoryType.

+

A MemoryType is used to declare the size range of a WasmEdge Memory to be created.

+

Implementations§

Source§

impl MemoryType

Source

pub fn new( + min: u32, + max: Option<u32>, + shared: bool, +) -> Result<MemoryType, Box<WasmEdgeError>>

Creates a new MemoryType with the given size range.

+
§Arguments
+
    +
  • +

    min - The minimum size of the memory to be created.

    +
  • +
  • +

    max - The maximum size of the memory to be created. If shared is set to true, max must be set.

    +
  • +
  • +

    shared - Enables shared memory if true.

    +
  • +
+
Source

pub fn minimum(&self) -> u32

Returns the minimum size defined in the MemoryType.

+
Source

pub fn maximum(&self) -> Option<u32>

Returns the maximum size defined in the MemoryType.

+
Source

pub fn shared(&self) -> bool

Returns whether the memory is shared.

+

Trait Implementations§

Source§

impl Clone for MemoryType

Source§

fn clone(&self) -> MemoryType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MemoryType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for MemoryType

Source§

fn default() -> MemoryType

Returns the “default value” for a type. Read more
Source§

impl PartialEq for MemoryType

Source§

fn eq(&self, other: &MemoryType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for MemoryType

Source§

impl StructuralPartialEq for MemoryType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/instance/struct.TableType.html b/wasmedge_sys/instance/struct.TableType.html new file mode 100644 index 000000000..0d0c75be3 --- /dev/null +++ b/wasmedge_sys/instance/struct.TableType.html @@ -0,0 +1,32 @@ +TableType in wasmedge_sys::instance - Rust
wasmedge_sys::instance

Struct TableType

Source
pub struct TableType { /* private fields */ }
Expand description

Struct of WasmEdge TableType.

+

A TableType is used to declare the element type and the size range of a WasmEdge Table to be created.

+

Implementations§

Source§

impl TableType

Source

pub fn new(elem_ty: RefType, min: u32, max: Option<u32>) -> TableType

Creates a new TableType with the given element type and the size range.

+
§Arguments
+
    +
  • +

    elem_ty - The element type of the table to be created.

    +
  • +
  • +

    min - The minimum size of the table to be created.

    +
  • +
  • +

    max - The maximum size of the table to be created.

    +
  • +
+
Source

pub fn elem_ty(&self) -> RefType

Returns the element type defined in the TableType.

+
Source

pub fn minimum(&self) -> u32

Returns the minimum size defined in the TableType.

+
Source

pub fn maximum(&self) -> Option<u32>

Returns the maximum size defined in the TableType.

+

Trait Implementations§

Source§

impl Clone for TableType

Source§

fn clone(&self) -> TableType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TableType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for TableType

Source§

fn default() -> TableType

Returns the “default value” for a type. Read more
Source§

impl PartialEq for TableType

Source§

fn eq(&self, other: &TableType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for TableType

Source§

impl StructuralPartialEq for TableType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/instance/table/index.html b/wasmedge_sys/instance/table/index.html new file mode 100644 index 000000000..4ba619b97 --- /dev/null +++ b/wasmedge_sys/instance/table/index.html @@ -0,0 +1,6 @@ +wasmedge_sys::instance::table - Rust
wasmedge_sys::instance

Module table

Source
Expand description

Defines WasmEdge Table and TableType structs.

+

A WasmEdge Table defines a WebAssembly table instance described by its TableType. +TableType specifies the limits on the size of a table. The start of +the limit range specifies the lower bound (inclusive) of the size, while +the end resticts the upper bound (inclusive).

+

Structs§

  • A WasmEdge Table defines a WebAssembly table instance described by its type. A table is an array-like structure and stores function references.
\ No newline at end of file diff --git a/wasmedge_sys/instance/table/sidebar-items.js b/wasmedge_sys/instance/table/sidebar-items.js new file mode 100644 index 000000000..f5d91bfb7 --- /dev/null +++ b/wasmedge_sys/instance/table/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Table"]}; \ No newline at end of file diff --git a/wasmedge_sys/instance/table/struct.Table.html b/wasmedge_sys/instance/table/struct.Table.html new file mode 100644 index 000000000..b92926a5e --- /dev/null +++ b/wasmedge_sys/instance/table/struct.Table.html @@ -0,0 +1,57 @@ +Table in wasmedge_sys::instance::table - Rust
wasmedge_sys::instance::table

Struct Table

Source
pub struct Table { /* private fields */ }
Expand description

A WasmEdge Table defines a WebAssembly table instance described by its type. A table is an array-like structure and stores function references.

+

This example shows how to use Table to store and retrieve function references.

+

Implementations§

Source§

impl Table

Source

pub fn create(ty: TableType) -> WasmEdgeResult<Self>

Creates a new Table to be associated with the given element type and the size.

+
§Arguments
+
    +
  • ty specifies the type of the new Table.
  • +
+
§Error
+
    +
  • If fail to create the table instance, then WasmEdgeError::Table(TableError::Create)(crate::error::TableError) is returned.
  • +
+
Source

pub fn ty(&self) -> WasmEdgeResult<TableType>

Returns the [TableType] of the Table.

+
§Error
+

If fail to get type, then an error is returned.

+
Source

pub fn get_data(&self, idx: u32) -> WasmEdgeResult<WasmValue>

Returns the element value at a specific position in the Table.

+
§Arguments
+
    +
  • idx specifies the position in the Table, at which the WasmValue is returned.
  • +
+
§Error
+

If fail to get the data, then an error is returned.

+
Source

pub fn set_data(&mut self, data: WasmValue, idx: u32) -> WasmEdgeResult<()>

Sets a new element value at a specific position in the Table.

+
§Arguments
+
    +
  • +

    data specifies the new data.

    +
  • +
  • +

    idx specifies the position of the new data to be stored in the Table.

    +
  • +
+
§Error
+

If fail to set data, then an error is returned.

+
Source

pub fn capacity(&self) -> usize

Returns the capacity of the Table.

+
Source

pub fn grow(&mut self, size: u32) -> WasmEdgeResult<()>

Increases the capacity of the Table.

+

After growing, the new capacity must be in the range defined by limit when the table is created.

+
§Argument
+
    +
  • size specifies the size to be added to the Table.
  • +
+
§Error
+

If fail to increase the size of the Table, then an error is returned.

+
Source

pub unsafe fn as_ptr(&self) -> *const WasmEdge_TableInstanceContext

§Safety
+

The lifetime of the returned pointer must not exceed that of the object itself.

+
Source

pub unsafe fn from_raw(ptr: *mut WasmEdge_TableInstanceContext) -> Self

§Safety
+

This function will take over the lifetime management of ptr, so do not call ffi::WasmEdge_TableInstanceDelete on ptr after this.

+

Trait Implementations§

Source§

impl Debug for Table

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Table

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Table

§

impl RefUnwindSafe for Table

§

impl Send for Table

§

impl Sync for Table

§

impl Unpin for Table

§

impl UnwindSafe for Table

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/loader/struct.Loader.html b/wasmedge_sys/loader/struct.Loader.html new file mode 100644 index 000000000..613caa617 --- /dev/null +++ b/wasmedge_sys/loader/struct.Loader.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sys/struct.Loader.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sys/plugin/enum.ProgramOptionType.html b/wasmedge_sys/plugin/enum.ProgramOptionType.html new file mode 100644 index 000000000..7bf767a62 --- /dev/null +++ b/wasmedge_sys/plugin/enum.ProgramOptionType.html @@ -0,0 +1,29 @@ +ProgramOptionType in wasmedge_sys::plugin - Rust
wasmedge_sys::plugin

Enum ProgramOptionType

Source
pub enum ProgramOptionType {
+
Show 13 variants None = 0, + Toggle = 1, + I8 = 2, + I16 = 3, + I32 = 4, + I64 = 5, + U8 = 6, + U16 = 7, + U32 = 8, + U64 = 9, + F32 = 10, + F64 = 11, + String = 12, +
}
Expand description

Defines the type of the program options.

+

Variants§

§

None = 0

§

Toggle = 1

§

I8 = 2

§

I16 = 3

§

I32 = 4

§

I64 = 5

§

U8 = 6

§

U16 = 7

§

U32 = 8

§

U64 = 9

§

F32 = 10

§

F64 = 11

§

String = 12

Trait Implementations§

Source§

impl Clone for ProgramOptionType

Source§

fn clone(&self) -> ProgramOptionType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProgramOptionType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<ProgramOptionType> for WasmEdge_ProgramOptionType

Source§

fn from(value: ProgramOptionType) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for ProgramOptionType

Source§

fn from(ty: WasmEdge_ProgramOptionType) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ProgramOptionType

Source§

fn eq(&self, other: &ProgramOptionType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for ProgramOptionType

Source§

impl Eq for ProgramOptionType

Source§

impl StructuralPartialEq for ProgramOptionType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/plugin/index.html b/wasmedge_sys/plugin/index.html new file mode 100644 index 000000000..163e84b93 --- /dev/null +++ b/wasmedge_sys/plugin/index.html @@ -0,0 +1,2 @@ +wasmedge_sys::plugin - Rust
wasmedge_sys

Module plugin

Source
Expand description

Defines PluginManager and Plugin structs.

+

Structs§

  • Defines the module descriptor for plugins.
  • Represents a loaded plugin. It provides the APIs for accessing the plugin.
  • Represents Plugin descriptor for plugins.
  • Defines the APIs for loading plugins and check the basic information of the loaded plugins.
  • Defines the version of a plugin.
  • Defines the program option for plugins.

Enums§

Type Aliases§

\ No newline at end of file diff --git a/wasmedge_sys/plugin/sidebar-items.js b/wasmedge_sys/plugin/sidebar-items.js new file mode 100644 index 000000000..f79f620f5 --- /dev/null +++ b/wasmedge_sys/plugin/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["ProgramOptionType"],"struct":["ModuleDescriptor","Plugin","PluginDescriptor","PluginManager","PluginVersion","ProgramOption"],"type":["ModuleInstanceCreateFn","PluginModule"]}; \ No newline at end of file diff --git a/wasmedge_sys/plugin/struct.ModuleDescriptor.html b/wasmedge_sys/plugin/struct.ModuleDescriptor.html new file mode 100644 index 000000000..42d0d07da --- /dev/null +++ b/wasmedge_sys/plugin/struct.ModuleDescriptor.html @@ -0,0 +1,18 @@ +ModuleDescriptor in wasmedge_sys::plugin - Rust
wasmedge_sys::plugin

Struct ModuleDescriptor

Source
pub struct ModuleDescriptor { /* private fields */ }
Expand description

Defines the module descriptor for plugins.

+

Implementations§

Source§

impl ModuleDescriptor

Source

pub fn create( + name: impl AsRef<str>, + desc: impl AsRef<str>, + f: Option<ModuleInstanceCreateFn>, +) -> WasmEdgeResult<Self>

Creates a new module descriptor.

+
Source

pub fn as_raw_ptr(&self) -> *const WasmEdge_ModuleDescriptor

Available on crate feature ffi only.

Returns the raw pointer to the inner WasmEdge_ModuleDescriptor.

+

Trait Implementations§

Source§

impl Debug for ModuleDescriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/plugin/struct.Plugin.html b/wasmedge_sys/plugin/struct.Plugin.html new file mode 100644 index 000000000..58f6f5c15 --- /dev/null +++ b/wasmedge_sys/plugin/struct.Plugin.html @@ -0,0 +1,26 @@ +Plugin in wasmedge_sys::plugin - Rust
wasmedge_sys::plugin

Struct Plugin

Source
pub struct Plugin { /* private fields */ }
Expand description

Represents a loaded plugin. It provides the APIs for accessing the plugin.

+

Implementations§

Source§

impl Plugin

Source

pub fn name(&self) -> String

Returns the name of this plugin.

+
Source

pub fn mod_count(&self) -> u32

Returns the count of the module instances in this plugin.

+
Source

pub fn mod_names(&self) -> Vec<String>

Returns the names of all module instances in this plugin.

+
Source

pub fn mod_instance(&self, name: impl AsRef<str>) -> WasmEdgeResult<Instance>

Returns a plugin module instance that is generated from the module with the given name in this plugin.

+
§Argument
+
    +
  • name - The name of the target module.
  • +
+
§Error
+

If failed to return the plugin module instance, then return PluginError::Create error.

+
Source

pub unsafe fn as_ptr(&self) -> *const WasmEdge_PluginContext

§Safety
+

The lifetime of the returned pointer must not exceed that of the object itself.

+

Trait Implementations§

Source§

impl Clone for Plugin

Source§

fn clone(&self) -> Plugin

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Plugin

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for Plugin

Auto Trait Implementations§

§

impl Freeze for Plugin

§

impl RefUnwindSafe for Plugin

§

impl Send for Plugin

§

impl Sync for Plugin

§

impl Unpin for Plugin

§

impl UnwindSafe for Plugin

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/plugin/struct.PluginDescriptor.html b/wasmedge_sys/plugin/struct.PluginDescriptor.html new file mode 100644 index 000000000..60f297cb6 --- /dev/null +++ b/wasmedge_sys/plugin/struct.PluginDescriptor.html @@ -0,0 +1,27 @@ +PluginDescriptor in wasmedge_sys::plugin - Rust
wasmedge_sys::plugin

Struct PluginDescriptor

Source
pub struct PluginDescriptor { /* private fields */ }
Expand description

Represents Plugin descriptor for plugins.

+

Implementations§

Source§

impl PluginDescriptor

Source

pub fn create( + name: impl AsRef<str>, + desc: impl AsRef<str>, + version: PluginVersion, +) -> WasmEdgeResult<Self>

Source

pub fn add_module_descriptor( + self, + name: impl AsRef<str>, + desc: impl AsRef<str>, + f: Option<ModuleInstanceCreateFn>, +) -> WasmEdgeResult<Self>

Source

pub fn add_program_option( + self, + name: impl AsRef<str>, + desc: impl AsRef<str>, + ty: ProgramOptionType, +) -> WasmEdgeResult<Self>

Source

pub fn as_raw_ptr(&self) -> *const WasmEdge_PluginDescriptor

Available on crate feature ffi only.

Returns the raw pointer to the inner WasmEdge_PluginDescriptor.

+

Trait Implementations§

Source§

impl Debug for PluginDescriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/plugin/struct.PluginManager.html b/wasmedge_sys/plugin/struct.PluginManager.html new file mode 100644 index 000000000..ce4278718 --- /dev/null +++ b/wasmedge_sys/plugin/struct.PluginManager.html @@ -0,0 +1,63 @@ +PluginManager in wasmedge_sys::plugin - Rust
wasmedge_sys::plugin

Struct PluginManager

Source
pub struct PluginManager {}
Expand description

Defines the APIs for loading plugins and check the basic information of the loaded plugins.

+

Implementations§

Source§

impl PluginManager

Source

pub fn load_plugins_from_default_paths()

Load plugins from the default path. The default plugin path could be one of the following:

+
    +
  • +

    The environment variable “WASMEDGE_PLUGIN_PATH”.

    +
  • +
  • +

    The ../plugin/ directory related to the WasmEdge installation path.

    +
  • +
  • +

    The wasmedge/ directory under the library path if the WasmEdge is installed under the “/usr”.

    +
  • +
+
Source

pub fn load_plugins(path: impl AsRef<Path>) -> WasmEdgeResult<()>

Load a single or multiple plugins from a given path.

+
    +
  • +

    If the path is pointing at a file , then it indicates that a single plugin will be loaded from the file.

    +
  • +
  • +

    If the path is pointing at a directory, then the method will load plugins from the files in the directory.

    +
  • +
+
§Argument
+
    +
  • param - A path to a plugin file or a directory holding plugin files.
  • +
+
§Error
+ +
Source

pub fn nn_preload(preloads: Vec<&str>)

Available on crate feature wasi_nn only.
Source

pub fn count() -> u32

Returns the count of loaded plugins.

+
Source

pub fn names() -> Vec<String>

Returns the names of all loaded plugins.

+
Source

pub fn find(name: impl AsRef<str>) -> WasmEdgeResult<Plugin>

Returns the target plugin by its name.

+
§Argument
+
    +
  • name - The name of the target plugin.
  • +
+
§Error
+

If not found the plugin, then return PluginError::NotFound error.

+
Source

pub fn create_plugin_instance( + pname: impl AsRef<str>, + mname: impl AsRef<str>, +) -> WasmEdgeResult<Instance>

Source

pub fn init_wasmedge_process(allowed_cmds: Option<Vec<&str>>, allowed: bool)

Available on Linux and crate feature wasmedge_process and non-crate feature static only.

Initializes the wasmedge_process plugin module instance with the parameters.

+
§Arguments
+
    +
  • +

    allowed_cmds - A white list of commands.

    +
  • +
  • +

    allowed - Determines if wasmedge_process is allowed to execute all commands on the white list.

    +
  • +
+

Trait Implementations§

Source§

impl Debug for PluginManager

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/plugin/struct.PluginVersion.html b/wasmedge_sys/plugin/struct.PluginVersion.html new file mode 100644 index 000000000..c84bf5b06 --- /dev/null +++ b/wasmedge_sys/plugin/struct.PluginVersion.html @@ -0,0 +1,18 @@ +PluginVersion in wasmedge_sys::plugin - Rust
wasmedge_sys::plugin

Struct PluginVersion

Source
pub struct PluginVersion {
+    pub major: u32,
+    pub minor: u32,
+    pub patch: u32,
+    pub build: u32,
+}
Expand description

Defines the version of a plugin.

+

Fields§

§major: u32§minor: u32§patch: u32§build: u32

Implementations§

Source§

impl PluginVersion

Source

pub fn create(major: u32, minor: u32, patch: u32, build: u32) -> Self

Creates a new plugin version.

+

Trait Implementations§

Source§

impl Debug for PluginVersion

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<PluginVersion> for WasmEdge_PluginVersionData

Source§

fn from(value: PluginVersion) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/plugin/struct.ProgramOption.html b/wasmedge_sys/plugin/struct.ProgramOption.html new file mode 100644 index 000000000..0d08c9425 --- /dev/null +++ b/wasmedge_sys/plugin/struct.ProgramOption.html @@ -0,0 +1,20 @@ +ProgramOption in wasmedge_sys::plugin - Rust
wasmedge_sys::plugin

Struct ProgramOption

Source
pub struct ProgramOption {
+    pub inner: WasmEdge_ProgramOption,
+    /* private fields */
+}
Expand description

Defines the program option for plugins.

+

Fields§

§inner: WasmEdge_ProgramOption

Implementations§

Source§

impl ProgramOption

Source

pub fn create( + name: impl AsRef<str>, + desc: impl AsRef<str>, + ty: ProgramOptionType, +) -> WasmEdgeResult<Self>

Creates a new program option.

+

Trait Implementations§

Source§

impl Debug for ProgramOption

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Send for ProgramOption

Source§

impl Sync for ProgramOption

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/plugin/type.ModuleInstanceCreateFn.html b/wasmedge_sys/plugin/type.ModuleInstanceCreateFn.html new file mode 100644 index 000000000..219471220 --- /dev/null +++ b/wasmedge_sys/plugin/type.ModuleInstanceCreateFn.html @@ -0,0 +1,2 @@ +ModuleInstanceCreateFn in wasmedge_sys::plugin - Rust
wasmedge_sys::plugin

Type Alias ModuleInstanceCreateFn

Source
pub type ModuleInstanceCreateFn = unsafe extern "C" fn(arg1: *const WasmEdge_ModuleDescriptor) -> *mut WasmEdge_ModuleInstanceContext;
Expand description

Defines the type of the function that creates a module instance for a plugin.

+
\ No newline at end of file diff --git a/wasmedge_sys/plugin/type.PluginModule.html b/wasmedge_sys/plugin/type.PluginModule.html new file mode 100644 index 000000000..002b3f591 --- /dev/null +++ b/wasmedge_sys/plugin/type.PluginModule.html @@ -0,0 +1,2 @@ +PluginModule in wasmedge_sys::plugin - Rust
wasmedge_sys::plugin

Type Alias PluginModule

Source
pub type PluginModule = Instance;
Expand description

Represents a Plugin module instance.

+

Aliased Type§

struct PluginModule { /* private fields */ }
\ No newline at end of file diff --git a/wasmedge_sys/sidebar-items.js b/wasmedge_sys/sidebar-items.js new file mode 100644 index 000000000..5d2a18ba2 --- /dev/null +++ b/wasmedge_sys/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["async","ffi","frame","instance","plugin","types","utils"],"struct":["CallingFrame","Compiler","Config","Executor","ExportType","FuncType","Function","Global","GlobalType","ImportModule","ImportType","Instance","Loader","Memory","MemoryType","Module","Statistics","Store","Table","TableType","Validator","WasiModule","WasmValue"],"trait":["AsInstance"],"type":["FuncRef","SyncFn","WasiCtx"]}; \ No newline at end of file diff --git a/wasmedge_sys/statistics/struct.Statistics.html b/wasmedge_sys/statistics/struct.Statistics.html new file mode 100644 index 000000000..40d4957ed --- /dev/null +++ b/wasmedge_sys/statistics/struct.Statistics.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sys/struct.Statistics.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sys/store/struct.Store.html b/wasmedge_sys/store/struct.Store.html new file mode 100644 index 000000000..009b4b061 --- /dev/null +++ b/wasmedge_sys/store/struct.Store.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sys/struct.Store.html...

+ + + \ No newline at end of file diff --git a/wasmedge_sys/struct.CallingFrame.html b/wasmedge_sys/struct.CallingFrame.html new file mode 100644 index 000000000..59b787f3f --- /dev/null +++ b/wasmedge_sys/struct.CallingFrame.html @@ -0,0 +1,32 @@ +CallingFrame in wasmedge_sys - Rust
wasmedge_sys

Struct CallingFrame

Source
pub struct CallingFrame { /* private fields */ }
Expand description

Represents a calling frame on top of stack.

+

Implementations§

Source§

impl CallingFrame

Source

pub fn memory_ref(&self, idx: u32) -> Option<InnerRef<Memory, &Self>>

Returns an immutable smart pointer borrowing the memory instance by the given index from the module instance of the current +calling frame. If the memory instance is not found, returns None.

+

By default, a WASM module has only one memory instance after instantiation. Therefore, users can pass in 0 as +the index to get the memory instance in host function body. When the MultiMemories +config option is enabled, there would be more than one memory instances in the wasm module. Users can retrieve +the target memory instance by specifying the index of the memory instance in the wasm module instance.

+
§Arguments
+
    +
  • idx - The index of the memory instance.
  • +
+
Source

pub fn memory_mut(&mut self, idx: u32) -> Option<InnerRef<Memory, &mut Self>>

Returns an mutable smart pointer borrowing the memory instance by the given index from the module instance of the current +calling frame. If the memory instance is not found, returns None.

+

By default, a WASM module has only one memory instance after instantiation. Therefore, users can pass in 0 as +the index to get the memory instance in host function body. When the MultiMemories +config option is enabled, there would be more than one memory instances in the wasm module. Users can retrieve +the target memory instance by specifying the index of the memory instance in the wasm module instance.

+
§Arguments
+
    +
  • idx - The index of the memory instance.
  • +
+

Trait Implementations§

Source§

impl Debug for CallingFrame

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.Compiler.html b/wasmedge_sys/struct.Compiler.html new file mode 100644 index 000000000..fab745c89 --- /dev/null +++ b/wasmedge_sys/struct.Compiler.html @@ -0,0 +1,48 @@ +Compiler in wasmedge_sys - Rust
wasmedge_sys

Struct Compiler

Source
pub struct Compiler { /* private fields */ }
Available on crate feature aot only.
Expand description

Defines WasmEdge ahead-of-time(AOT) compiler and the relevant APIs.

+

Implementations§

Source§

impl Compiler

Source

pub fn create(config: Option<&Config>) -> WasmEdgeResult<Self>

Creates a new AOT compiler.

+
§Error
+

If fail to create a AOT compiler, then an error is returned.

+
Source

pub fn compile_from_file( + &self, + wasm_file: impl AsRef<Path>, + aot_file: impl AsRef<Path>, +) -> WasmEdgeResult<()>

Compiles the input WASM from the given file path for the AOT mode and stores the result to the output file path.

+
§Arguments
+
    +
  • +

    wasm_file - The input wasm file, of which the file extension should be one of wasm orwat.

    +
  • +
  • +

    aot_file - The generated AOT wasm file, of which the file extension should be dylib on macOS, so on Linux or dll on Windows.

    +
  • +
+
§Error
+

If fail to compile, then an error is returned.

+
Source

pub fn compile_from_bytes( + &self, + wasm_bytes: impl AsRef<[u8]>, + aot_file: impl AsRef<Path>, +) -> WasmEdgeResult<()>

Compiles the input WASM from the given bytes for the AOT mode and stores the result to the output file path.

+
§Argument
+
    +
  • +

    wasm_bytes - The in-memory WASM bytes.

    +
  • +
  • +

    aot_file - The generated AOT wasm file, of which the file extension should be dylib on macOS, so on Linux or dll on Windows.

    +
  • +
+
§Error
+

If fail to compile, then an error is returned.

+
Source

pub fn as_ptr(&self) -> *const WasmEdge_CompilerContext

Available on crate feature ffi only.

Provides a raw pointer to the inner Compiler context.

+

Trait Implementations§

Source§

impl Debug for Compiler

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Compiler

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.Config.html b/wasmedge_sys/struct.Config.html new file mode 100644 index 000000000..671e87027 --- /dev/null +++ b/wasmedge_sys/struct.Config.html @@ -0,0 +1,333 @@ +Config in wasmedge_sys - Rust
wasmedge_sys

Struct Config

Source
pub struct Config { /* private fields */ }
Expand description

Defines Config struct used to check/set the configuration options.

+

Config manages the configuration options, which are used to initiate Loader, Validator, Executor, and Compiler.

+

The configuration options are categorized into the following four groups:

+
    +
  • +

    WebAssembly Proposals

    +

    This group of options are used to turn on/off the WebAssembly proposals. They are effective to any WasmEdge +context created with Config.

    + +
  • +
  • +

    Host Registrations

    +
      +
    • +

      Wasi turns on the WASI support.

      +
    • +
    • +

      WasmEdgeProcess turns on the wasmedge_process support.

      +
    • +
    +
  • +
  • +

    Memory Management

    +
      +
    • maximum_memory_page limits the page size of Memory.
    • +
    +
  • +
  • +

    AOT Compilation

    +

    The AOT compiler options configure the behavior about optimization level, output format, dump IR, +and generic binary.

    +
      +
    • +

      Compiler Optimization Levels

      +
        +
      • +

        O0 performs as many optimizations as possible.

        +
      • +
      • +

        O1 optimizes quickly without destroying debuggability.

        +
      • +
      • +

        02 optimizes for fast execution as much as possible without triggering significant incremental +compile time or code size growth.

        +
      • +
      • +

        O3 optimizes for fast execution as much as possible.

        +
      • +
      • +

        Os optimizes for small code size as much as possible without triggering significant incremental +compile time or execution time slowdowns.

        +
      • +
      • +

        Oz optimizes for small code size as much as possible.

        +
      • +
      +
    • +
    • +

      Compiler Output Formats

      +
        +
      • +

        Native specifies the output format is native dynamic library (*.wasm.so).

        +
      • +
      • +

        Wasm specifies the output format is WebAssembly with AOT compiled codes in custom section (*.wasm).

        +
      • +
      +
    • +
    • +

      dump_ir determines if AOT compiler generates IR or not.

      +
    • +
    • +

      generic_binary determines if AOT compiler generates the generic binary or not.

      +
    • +
    • +

      interruptible determines if AOT compiler generates interruptible binary or not.

      +
    • +
    +

    The configuration options above are only effective to Compiler.

    +
  • +
  • +

    Runtime Statistics

    +
      +
    • +

      instr_counting determines if measuring the count of instructions when running a compiled or pure WASM.

      +
    • +
    • +

      cost_measuring determines if measuring the instruction costs when running a compiled or pure WASM.

      +
    • +
    • +

      time_measuring determines if measuring the running time when running a compiled or pure WASM.

      +
    • +
    +
  • +
+

API users can first set the options of interest, such as those related to the WebAssembly proposals, +host registrations, AOT compiler options, and etc., then apply the configuration +to create other WasmEdge runtime structs.

+

Implementations§

Source§

impl Config

Source

pub fn create() -> WasmEdgeResult<Self>

Creates a new Config.

+
§Error
+

If fail to create, then an error is returned.

+
Source

pub fn set_max_memory_pages(&mut self, count: u32)

Sets the maximum number of the memory pages available.

+
§Argument
+
    +
  • count - The page count (64KB per page).
  • +
+
Source

pub fn get_max_memory_pages(&self) -> u32

Returns the number of the memory pages available.

+
Source

pub fn mutable_globals(&mut self, enable: bool)

Enables or disables the ImportExportMutGlobals option. By default, the option is enabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn mutable_globals_enabled(&self) -> bool

Checks if the ImportExportMutGlobals option turns on or not.

+
Source

pub fn non_trap_conversions(&mut self, enable: bool)

Enables or disables the NonTrapFloatToIntConversions option. By default, the option is enabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn non_trap_conversions_enabled(&self) -> bool

Checks if the NonTrapFloatToIntConversions option turns on or not.

+
Source

pub fn sign_extension_operators(&mut self, enable: bool)

Enables or disables the SignExtensionOperators option. By default, the option is enabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn sign_extension_operators_enabled(&self) -> bool

Checks if the SignExtensionOperators option turns on or not.

+
Source

pub fn multi_value(&mut self, enable: bool)

Enables or disables the MultiValue option. By default, the option is enabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn multi_value_enabled(&self) -> bool

Checks if the MultiValue option turns on or not.

+
Source

pub fn bulk_memory_operations(&mut self, enable: bool)

Enables or disables the BulkMemoryOperations option. By default, the option is enabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn bulk_memory_operations_enabled(&self) -> bool

Checks if the BulkMemoryOperations option turns on or not.

+
Source

pub fn reference_types(&mut self, enable: bool)

Enables or disables the ReferenceTypes option. By default, the option is enabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn reference_types_enabled(&self) -> bool

Checks if the ReferenceTypes option turns on or not.

+
Source

pub fn simd(&mut self, enable: bool)

Enables or disables the SIMD option. By default, the option is enabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn simd_enabled(&self) -> bool

Checks if the SIMD option turns on or not.

+
Source

pub fn tail_call(&mut self, enable: bool)

Enables or disables the TailCall option. By default, the option is disabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn tail_call_enabled(&self) -> bool

Checks if the TailCall option turns on or not.

+
Source

pub fn annotations(&mut self, enable: bool)

Enables or disables the Annotations option. By default, the option is disabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn annotations_enabled(&self) -> bool

Checks if the Annotations option turns on or not.

+
Source

pub fn memory64(&mut self, enable: bool)

Enables or disables the Memory64 option. By default, the option is disabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn memory64_enabled(&self) -> bool

Checks if the Memory64 option turns on or not.

+
Source

pub fn threads(&mut self, enable: bool)

Enables or disables the Threads option. By default, the option is disabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn threads_enabled(&self) -> bool

Checks if the Threads option turns on or not.

+
Source

pub fn gc(&mut self, enable: bool)

Enables or disables the GC option. By default, the option is disabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn gc_enabled(&self) -> bool

Checks if the GC option turns on or not.

+
Source

pub fn exception_handling(&mut self, enable: bool)

Enables or disables the ExceptionHandling option. By default, the option is disabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn exception_handling_enabled(&self) -> bool

Checks if the ExceptionHandling option turns on or not.

+
Source

pub fn function_references(&mut self, enable: bool)

Enables or disables the FunctionReferences option. By default, the option is disabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn function_references_enabled(&self) -> bool

Checks if the FunctionReferences option turns on or not.

+
Source

pub fn multi_memories(&mut self, enable: bool)

Enables or disables the MultiMemories option. By default, the option is disabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn multi_memories_enabled(&self) -> bool

Checks if the MultiMemories option turns on or not.

+
Source

pub fn interpreter_mode(&mut self, enable: bool)

Enables or disables the ForceInterpreter option. By default, the option is disabled.

+
§Argument
+
    +
  • enable - Whether the option turns on or not.
  • +
+
Source

pub fn interpreter_mode_enabled(&self) -> bool

Checks if the ForceInterpreter option turns on or not.

+
Source

pub fn set_aot_optimization_level( + &mut self, + opt_level: CompilerOptimizationLevel, +)

Available on crate feature aot only.

Sets the optimization level of AOT compiler. By default, the optimization level is O3.

+

Notice that this function is only available when the aot feature is enabled.

+
§Argument
+
    +
  • opt_level - The optimization level of AOT compiler.
  • +
+
Source

pub fn get_aot_optimization_level(&self) -> CompilerOptimizationLevel

Available on crate feature aot only.

Returns the optimization level of AOT compiler.

+

Notice that this function is only available when the aot feature is enabled.

+
Source

pub fn set_aot_compiler_output_format(&mut self, format: CompilerOutputFormat)

Available on crate feature aot only.

Sets the output binary format of AOT compiler. By default, the compiler output format is Wasm.

+

Notice that this function is only available when the aot feature is enabled.

+
§Argument
+
    +
  • format - The format of the output binary.
  • +
+
Source

pub fn get_aot_compiler_output_format(&self) -> CompilerOutputFormat

Available on crate feature aot only.

Returns the output binary format of AOT compiler.

+

Notice that this function is only available when the aot feature is enabled.

+
Source

pub fn dump_ir(&mut self, flag: bool)

Available on crate feature aot only.

Sets the dump IR option of AOT compiler. By default, the option is disabled.

+

Notice that this function is only available when the aot feature is enabled.

+
§Argument
+
    +
  • flag - Whether dump ir or not.
  • +
+
Source

pub fn dump_ir_enabled(&self) -> bool

Available on crate feature aot only.

Checks if the dump IR option turns on or not.

+

Notice that this function is only available when the aot feature is enabled.

+
Source

pub fn generic_binary(&mut self, flag: bool)

Available on crate feature aot only.

Sets the generic binary option of AOT compiler. By default, the option is disabled.

+

Notice that this function is only available when the aot feature is enabled.

+
§Argument
+
    +
  • flag - Whether generate the generic binary or not when perform AOT compilation.
  • +
+
Source

pub fn generic_binary_enabled(&self) -> bool

Available on crate feature aot only.

Checks if the generic binary option of AOT compiler turns on or not.

+

Notice that this function is only available when the aot feature is enabled.

+
Source

pub fn interruptible(&mut self, enable: bool)

Available on crate feature aot only.

Enables or Disables the Interruptible option of AOT compiler. This option determines to generate interruptible binary or not when compilation in AOT compiler. By default, the option is disabled.

+

Notice that this function is only available when the aot feature is enabled.

+
§Argument
+
    +
  • enable - Whether turn on the Interruptible option.
  • +
+
Source

pub fn interruptible_enabled(&self) -> bool

Available on crate feature aot only.

Checks if the Interruptible option of AOT Compiler turns on or not.

+

Notice that this function is only available when the aot feature is enabled.

+
Source

pub fn count_instructions(&mut self, flag: bool)

Sets the instruction counting option. By default, the option is disabled.

+
§Argument
+
    +
  • flag - Whether support instruction counting or not when execution after AOT compilation.
  • +
+
Source

pub fn is_instruction_counting(&self) -> bool

Checks if the instruction counting option turns on or not.

+
Source

pub fn measure_cost(&mut self, flag: bool)

Sets the cost measuring option. By default, the option is disabled.

+
§Argument
+
    +
  • flag - Whether support cost measuring or not when execution after AOT compilation.
  • +
+
Source

pub fn is_cost_measuring(&self) -> bool

Checks if the cost measuring option turns on or not.

+
Source

pub fn measure_time(&mut self, flag: bool)

Sets the time measuring option. By default, the option is disabled.

+
§Argument
+
    +
  • flag - Whether support time measuring or not when execution after AOT compilation.
  • +
+
Source

pub fn is_time_measuring(&self) -> bool

Checks if the time measuring option turns on or not.

+
Source

pub fn as_ptr(&self) -> *const WasmEdge_ConfigureContext

Available on crate feature ffi only.

Provides a raw pointer to the inner Configure context.

+

Trait Implementations§

Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Config

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.Executor.html b/wasmedge_sys/struct.Executor.html new file mode 100644 index 000000000..6cd728b39 --- /dev/null +++ b/wasmedge_sys/struct.Executor.html @@ -0,0 +1,197 @@ +Executor in wasmedge_sys - Rust
wasmedge_sys

Struct Executor

Source
pub struct Executor { /* private fields */ }
Expand description

Defines an execution environment for both pure WASM and compiled WASM.

+

Implementations§

Source§

impl Executor

Source

pub fn create( + config: Option<&Config>, + stat: Option<Statistics>, +) -> WasmEdgeResult<Self>

Creates a new executor to be associated with the given config and statistics.

+
§Arguments
+ +
§Error
+

If fail to create a executor, then an error is returned.

+
Source§

impl Executor

Source

pub fn call_func( + &mut self, + func: &mut Function, + params: impl IntoIterator<Item = WasmValue>, +) -> WasmEdgeResult<Vec<WasmValue>>

Runs a host function instance and returns the results.

+
§Arguments
+
    +
  • +

    func - The function instance to run.

    +
  • +
  • +

    params - The arguments to pass to the function.

    +
  • +
+
§Errors
+

If fail to run the host function, then an error is returned.

+
Source

pub fn call_func_with_timeout( + &self, + func: &mut Function, + params: impl IntoIterator<Item = WasmValue>, + timeout: Duration, +) -> WasmEdgeResult<Vec<WasmValue>>

Available on Linux and non-musl only.

Run a host function instance and return the results or timeout.

+
§Arguments
+
    +
  • +

    func - The function instance to run.

    +
  • +
  • +

    params - The arguments to pass to the function.

    +
  • +
  • +

    timeout - The maximum execution time of the function to be run.

    +
  • +
+
§Errors
+

If fail to run the host function, then an error is returned.

+
Source

pub async fn call_func_async( + &mut self, + async_state: &AsyncState, + func: &mut Function, + params: impl IntoIterator<Item = WasmValue> + Send, +) -> WasmEdgeResult<Vec<WasmValue>>

Available on crate feature async and Linux only.

Asynchronously runs a host function instance and returns the results.

+
§Arguments
+
    +
  • +

    async_state - Used to store asynchronous state at run time.

    +
  • +
  • +

    func - The function instance to run.

    +
  • +
  • +

    params - The arguments to pass to the function.

    +
  • +
+
§Errors
+

If fail to run the host function, then an error is returned.

+
Source

pub async fn call_func_async_with_timeout( + &mut self, + async_state: &AsyncState, + func: &mut Function, + params: impl IntoIterator<Item = WasmValue> + Send, + timeout: Duration, +) -> WasmEdgeResult<Vec<WasmValue>>

Available on crate feature async and Linux and non-musl only.

Asynchronously runs a host function instance with a timeout setting

+
§Arguments
+
    +
  • +

    async_state - Used to store asynchronous state at run time.

    +
  • +
  • +

    func - The function instance to run.

    +
  • +
  • +

    params - The arguments to pass to the function.

    +
  • +
  • +

    timeout - The maximum execution time of the function to be run.

    +
  • +
+
§Errors
+

If fail to run the host function, then an error is returned.

+
Source

pub fn call_func_ref<FuncRef: AsFunc>( + &mut self, + func_ref: &mut FuncRef, + params: impl IntoIterator<Item = WasmValue>, +) -> WasmEdgeResult<Vec<WasmValue>>

Runs a host function reference instance and returns the results.

+
§Arguments
+
    +
  • +

    func_ref - The function reference instance to run.

    +
  • +
  • +

    params - The arguments to pass to the function.

    +
  • +
+
§Errors
+

If fail to run the host function reference instance, then an error is returned.

+
Source

pub async fn call_func_ref_async<FuncRef: AsFunc + Send>( + &mut self, + async_state: &AsyncState, + func_ref: &mut FuncRef, + params: impl IntoIterator<Item = WasmValue> + Send, +) -> WasmEdgeResult<Vec<WasmValue>>

Available on crate feature async and Linux only.

Asynchronously runs a host function reference instance and returns the results.

+
§Arguments
+
    +
  • +

    async_state - Used to store asynchronous state at run time.

    +
  • +
  • +

    func_ref - The function reference instance to run.

    +
  • +
  • +

    params - The arguments to pass to the function.

    +
  • +
+
§Errors
+

If fail to run the host function reference instance, then an error is returned.

+
Source§

impl Executor

Source

pub fn register_import_module<T: AsInstance + ?Sized>( + &mut self, + store: &mut Store, + import: &T, +) -> WasmEdgeResult<()>

Registers and instantiates a import module into a store.

+
§Arguments
+ +
§Error
+

If fail to register the given import module, then an error is returned.

+
Source

pub fn register_named_module( + &mut self, + store: &mut Store, + module: &Module, + name: impl AsRef<str>, +) -> WasmEdgeResult<Instance>

Registers and instantiates a WasmEdge module into a store.

+

Instantiates the given WasmEdge module, including the functions, memories, tables, and globals it hosts; and then, registers the module instance into the store with the given name.

+
§Arguments
+
    +
  • +

    store - The target store, into which the given module is registered.

    +
  • +
  • +

    module - A validated module to be registered.

    +
  • +
  • +

    name - The exported name of the registered module.

    +
  • +
+
§Error
+

If fail to register the given module, then an error is returned.

+
Source

pub fn register_active_module( + &mut self, + store: &mut Store, + module: &Module, +) -> WasmEdgeResult<Instance>

Registers and instantiates a WasmEdge module into a store as an anonymous module.

+

Notice that when a new module is instantiated into the store, the old instantiated module is removed; in addition, ensure that the imports the module depends on are already registered into the store.

+
§Arguments
+
    +
  • +

    store - The store, in which the module to be instantiated is stored.

    +
  • +
  • +

    ast_mod - The target module to be instantiated.

    +
  • +
+
§Error
+

If fail to instantiate the given module, then an error is returned.

+

Trait Implementations§

Source§

impl Debug for Executor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Executor

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.ExportType.html b/wasmedge_sys/struct.ExportType.html new file mode 100644 index 000000000..ce80744d3 --- /dev/null +++ b/wasmedge_sys/struct.ExportType.html @@ -0,0 +1,14 @@ +ExportType in wasmedge_sys - Rust
wasmedge_sys

Struct ExportType

Source
pub struct ExportType<'module> { /* private fields */ }
Expand description

Defines the types of the exported wasm values.

+

Implementations§

Source§

impl ExportType<'_>

Source

pub fn ty(&self) -> WasmEdgeResult<ExternalInstanceType>

Returns the type of this export.

+
Source

pub fn name(&self) -> Cow<'_, str>

Returns the name by which this export is known by.

+

Trait Implementations§

Source§

impl<'module> Debug for ExportType<'module>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'module> Freeze for ExportType<'module>

§

impl<'module> RefUnwindSafe for ExportType<'module>

§

impl<'module> Send for ExportType<'module>

§

impl<'module> Sync for ExportType<'module>

§

impl<'module> Unpin for ExportType<'module>

§

impl<'module> UnwindSafe for ExportType<'module>

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.FuncType.html b/wasmedge_sys/struct.FuncType.html new file mode 100644 index 000000000..959d75019 --- /dev/null +++ b/wasmedge_sys/struct.FuncType.html @@ -0,0 +1,30 @@ +FuncType in wasmedge_sys - Rust
wasmedge_sys

Struct FuncType

Source
pub struct FuncType { /* private fields */ }
Expand description

Struct of WasmEdge FuncType.

+

A FuncType is used to declare the types of the parameters and return values of a WasmEdge Func to be created.

+

Implementations§

Source§

impl FuncType

Source

pub fn new(args: Vec<ValType>, returns: Vec<ValType>) -> FuncType

Creates a new FuncType with the given types of arguments and returns.

+
§Arguments
+
    +
  • +

    args - A vector of ValTypes that represent the types of the arguments.

    +
  • +
  • +

    returns - A vector of ValTypes that represent the types of the returns.

    +
  • +
+
Source

pub fn args(&self) -> &[ValType]

Returns the types of the arguments of a host function.

+
Source

pub fn args_len(&self) -> usize

Returns the number of the arguments of a host function.

+
Source

pub fn returns(&self) -> &[ValType]

Returns the types of the returns of a host function.

+
Source

pub fn returns_len(&self) -> usize

Returns the number of the returns of a host function.

+

Trait Implementations§

Source§

impl Clone for FuncType

Source§

fn clone(&self) -> FuncType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FuncType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for FuncType

Source§

fn default() -> FuncType

Returns the “default value” for a type. Read more
Source§

impl PartialEq for FuncType

Source§

fn eq(&self, other: &FuncType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for FuncType

Source§

impl StructuralPartialEq for FuncType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.Function.html b/wasmedge_sys/struct.Function.html new file mode 100644 index 000000000..595760a8c --- /dev/null +++ b/wasmedge_sys/struct.Function.html @@ -0,0 +1,77 @@ +Function in wasmedge_sys - Rust
wasmedge_sys

Struct Function

Source
pub struct Function { /* private fields */ }
Expand description

Defines a host function.

+

A WasmEdge Function defines a WebAssembly host function described by its type. A host function is a closure of the original function defined in either the host or the WebAssembly module.

+

Implementations§

Source§

impl Function

Source

pub unsafe fn create_sync_func<T>( + ty: &FuncType, + real_fn: SyncFn<T>, + data: *mut T, + cost: u64, +) -> WasmEdgeResult<Self>

Creates a host function with the given function type.

+

N.B. that this function is used for thread-safe scenarios.

+
§Arguments
+
    +
  • +

    ty - The types of the arguments and returns of the target function.

    +
  • +
  • +

    real_fn - The pointer to the target function.

    +
  • +
  • +

    data - The host context data used in this function.

    +
  • +
  • +

    cost - The function cost in the Statistics. Pass 0 if the calculation is not needed.

    +
  • +
+
§Error
+ +
§Safety
+

The lifetime of data must be greater than that of Function itself.

+
Source

pub unsafe fn create_with_custom_wrapper( + ty: &FuncType, + fn_wrapper: CustomFnWrapper, + real_fn: *mut c_void, + data: *mut c_void, + cost: u64, +) -> WasmEdgeResult<Self>

Creates a host function with the given function type and the custom function wrapper.

+
§Arguments
+
    +
  • +

    ty - The types of the arguments and returns of the target function.

    +
  • +
  • +

    fn_wrapper - The custom function wrapper.

    +
  • +
  • +

    real_fn - The pointer to the target function.

    +
  • +
  • +

    data - The pointer to the host context data used in this function.

    +
  • +
  • +

    cost - The function cost in the Statistics. Pass 0 if the calculation is not needed.

    +
  • +
+
§Error
+ +
§Safety
+

Notice that the caller should guarantee the life cycle of both the real_fn and the data object.

+
Source

pub unsafe fn as_ptr(&self) -> *mut WasmEdge_FunctionInstanceContext

§Safety
+

The lifetime of the returned pointer must not exceed that of the object itself.

+
Source

pub unsafe fn from_raw(ctx: *mut WasmEdge_FunctionInstanceContext) -> Self

§Safety
+

This function will take over the lifetime management of ctx, so do not call ffi::WasmEdge_FunctionInstanceDelete on ctx after this.

+

Trait Implementations§

Source§

impl AsFunc for Function

Source§

impl AsMut<Function> for AsyncFunction

Available on crate feature async and Linux only.
Source§

fn as_mut(&mut self) -> &mut Function

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Function> for AsyncFunction

Available on crate feature async and Linux only.
Source§

fn as_ref(&self) -> &Function

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for Function

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Function

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.Global.html b/wasmedge_sys/struct.Global.html new file mode 100644 index 000000000..25198f0e3 --- /dev/null +++ b/wasmedge_sys/struct.Global.html @@ -0,0 +1,34 @@ +Global in wasmedge_sys - Rust
wasmedge_sys

Struct Global

Source
pub struct Global { /* private fields */ }
Expand description

Defines a WebAssembly global variable, which stores a single value of the given type and a flag indicating whether it is mutable or not.

+

Implementations§

Source§

impl Global

Source

pub fn create(ty: &GlobalType, val: WasmValue) -> WasmEdgeResult<Self>

Creates a new Global instance to be associated with the given [GlobalType] and WasmValue.

+

The type of the given WasmValue must be matched with [GlobalType]; otherwise, it causes a failure. For example, WasmValue::I32(520) conflicts with a [GlobalType] with a value type defined as ValType::F32.

+
§Errors
+
    +
  • If fail to create the Global instance, then WasmEdgeError::Global(GlobalError::Create)(crate::error::GlobalError) is returned.
  • +
+
Source

pub fn ty(&self) -> WasmEdgeResult<GlobalType>

Returns the underlying wasm type of a Global instance.

+
§Errors
+

If fail to get the type, then an error is returned.

+
Source

pub fn get_value(&self) -> WasmValue

Returns the value of the Global instance.

+
Source

pub fn set_value(&mut self, val: WasmValue) -> WasmEdgeResult<()>

Sets the value of the Global instance.

+

Notice that only the Global instance of Mutability::Var type can be set a new value. Setting a new value for a Global of Mutability::Const causes a failure.

+
§Argument
+
    +
  • val - The new wasm value to be set.
  • +
+
§Errors
+

If fail to set value, then an error is returned.

+
Source

pub unsafe fn as_ptr(&self) -> *const WasmEdge_GlobalInstanceContext

§Safety
+

The lifetime of the returned pointer must not exceed that of the object itself.

+
Source

pub unsafe fn from_raw(ptr: *mut WasmEdge_GlobalInstanceContext) -> Self

§Safety
+

This function takes ownership of ptr, so do not call ffi::WasmEdge_GlobalInstanceDelete on ptr after this.

+

Trait Implementations§

Source§

impl Debug for Global

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Global

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Global

§

impl RefUnwindSafe for Global

§

impl Send for Global

§

impl Sync for Global

§

impl Unpin for Global

§

impl UnwindSafe for Global

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.GlobalType.html b/wasmedge_sys/struct.GlobalType.html new file mode 100644 index 000000000..28c12bda3 --- /dev/null +++ b/wasmedge_sys/struct.GlobalType.html @@ -0,0 +1,28 @@ +GlobalType in wasmedge_sys - Rust
wasmedge_sys

Struct GlobalType

Source
pub struct GlobalType { /* private fields */ }
Expand description

Struct of WasmEdge GlobalType.

+

A GlobalType is used to declare the type of a WasmEdge Global to be created.

+

Implementations§

Source§

impl GlobalType

Source

pub fn new(ty: ValType, mutability: Mutability) -> GlobalType

Creates a new GlobalType with the given value type and mutability.

+
§Arguments
+
    +
  • +

    ty - The value type of the global to be created.

    +
  • +
  • +

    mutability - The value mutability property of the global to be created.

    +
  • +
+
Source

pub fn value_ty(&self) -> ValType

Returns the value type defined in the GlobalType.

+
Source

pub fn mutability(&self) -> Mutability

Returns the value mutability property defined in the GlobalType.

+

Trait Implementations§

Source§

impl Clone for GlobalType

Source§

fn clone(&self) -> GlobalType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GlobalType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for GlobalType

Source§

fn default() -> GlobalType

Returns the “default value” for a type. Read more
Source§

impl PartialEq for GlobalType

Source§

fn eq(&self, other: &GlobalType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for GlobalType

Source§

impl StructuralPartialEq for GlobalType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.ImportModule.html b/wasmedge_sys/struct.ImportModule.html new file mode 100644 index 000000000..303403683 --- /dev/null +++ b/wasmedge_sys/struct.ImportModule.html @@ -0,0 +1,55 @@ +ImportModule in wasmedge_sys - Rust
wasmedge_sys

Struct ImportModule

Source
pub struct ImportModule<T: ?Sized> { /* private fields */ }
Expand description

An ImportModule represents a host module with a name. A host module consists of one or more host function, table, memory, and global instances, which are defined outside wasm modules and fed into wasm modules as imports.

+

Implementations§

Source§

impl<T: Sized> ImportModule<T>

Source

pub fn create(name: impl AsRef<str>, data: Box<T>) -> WasmEdgeResult<Self>

Creates a module instance which is used to import host functions, tables, memories, and globals into a wasm module.

+
§Argument
+
    +
  • +

    name - The name of the import module instance.

    +
  • +
  • +

    data - The host context data used in this function.

    +
  • +
+
§Error
+

If fail to create the import module instance, then an error is returned.

+
Source

pub unsafe fn as_raw(&self) -> *mut WasmEdge_ModuleInstanceContext

§Safety
+

Provides a raw pointer to the inner module instance context. +The lifetime of the returned pointer must not exceed that of the object itself.

+
Source

pub unsafe fn from_raw(ctx: *mut WasmEdge_ModuleInstanceContext) -> Self

§Safety
+

This function will take over the lifetime management of ctx, so do not call ffi::WasmEdge_ModuleInstanceDelete on ctx after this.

+
Source

pub fn get_host_data(&self) -> &T

Source

pub fn get_host_data_mut(&mut self) -> &mut T

Source§

impl<T: Sized> ImportModule<T>

Source

pub fn add_func(&mut self, name: impl AsRef<str>, func: Function)

Source

pub fn add_table(&mut self, name: impl AsRef<str>, table: Table)

Source

pub fn add_memory(&mut self, name: impl AsRef<str>, memory: Memory)

Source

pub fn add_global(&mut self, name: impl AsRef<str>, global: Global)

Trait Implementations§

Source§

impl<T: Sized> AsInstance for ImportModule<T>

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Table, &Self>>
where + Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &Self>>
where + Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &mut Self>>
where + Self: Sized,

Source§

fn get_global( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &Self>>
where + Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &mut Self>>
where + Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut(&mut self, name: &str) -> WasmEdgeResult<FuncRef<&mut Instance>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
Source§

impl<T: Send> AsMut<ImportModule<T>> for AsyncImportObject<T>

Available on crate feature async and Linux only.
Source§

fn as_mut(&mut self) -> &mut ImportModule<T>

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<T: Send> AsRef<ImportModule<T>> for AsyncImportObject<T>

Available on crate feature async and Linux only.
Source§

fn as_ref(&self) -> &ImportModule<T>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T: Debug + ?Sized> Debug for ImportModule<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: ?Sized> Drop for ImportModule<T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<T> Freeze for ImportModule<T>
where + T: ?Sized,

§

impl<T> RefUnwindSafe for ImportModule<T>
where + T: RefUnwindSafe + ?Sized,

§

impl<T> Send for ImportModule<T>
where + T: Send + ?Sized,

§

impl<T> Sync for ImportModule<T>
where + T: Sync + ?Sized,

§

impl<T> Unpin for ImportModule<T>
where + T: Unpin + ?Sized,

§

impl<T> UnwindSafe for ImportModule<T>
where + T: UnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.ImportType.html b/wasmedge_sys/struct.ImportType.html new file mode 100644 index 000000000..104c7f799 --- /dev/null +++ b/wasmedge_sys/struct.ImportType.html @@ -0,0 +1,16 @@ +ImportType in wasmedge_sys - Rust
wasmedge_sys

Struct ImportType

Source
pub struct ImportType<'module> { /* private fields */ }
Expand description

Defines the types of the imported wasm value.

+

Implementations§

Source§

impl ImportType<'_>

Source

pub fn ty(&self) -> WasmEdgeResult<ExternalInstanceType>

Returns the type of this import.

+
Source

pub fn name(&self) -> Cow<'_, str>

Returns the field name of the module that this import is expected to come from.

+
Source

pub fn module_name(&self) -> Cow<'_, str>

Returns the module name that this import is expected to come from.

+
Source

pub fn as_ptr(&self) -> *const WasmEdge_ImportTypeContext

Available on crate feature ffi only.

Provides a raw pointer to the inner ImportType context.

+

Trait Implementations§

Source§

impl<'module> Debug for ImportType<'module>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for ImportType<'_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'module> Freeze for ImportType<'module>

§

impl<'module> RefUnwindSafe for ImportType<'module>

§

impl<'module> Send for ImportType<'module>

§

impl<'module> Sync for ImportType<'module>

§

impl<'module> Unpin for ImportType<'module>

§

impl<'module> UnwindSafe for ImportType<'module>

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.Instance.html b/wasmedge_sys/struct.Instance.html new file mode 100644 index 000000000..556adedd9 --- /dev/null +++ b/wasmedge_sys/struct.Instance.html @@ -0,0 +1,32 @@ +Instance in wasmedge_sys - Rust
wasmedge_sys

Struct Instance

Source
pub struct Instance { /* private fields */ }
Expand description

An Instance represents an instantiated module. In the instantiation process, An Instance is created from alModule. From an Instance the exported functions, tables, memories, and globals can be fetched.

+

Trait Implementations§

Source§

impl AsInstance for Instance

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Table, &Self>>
where + Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &Self>>
where + Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &mut Self>>
where + Self: Sized,

Source§

fn get_global( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &Self>>
where + Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &mut Self>>
where + Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut(&mut self, name: &str) -> WasmEdgeResult<FuncRef<&mut Instance>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
Source§

impl AsMut<Instance> for AsyncInstance

Available on crate feature async and Linux only.
Source§

fn as_mut(&mut self) -> &mut Instance

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<Instance> for WasiModule

Source§

fn as_mut(&mut self) -> &mut Instance

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Instance> for AsyncInstance

Available on crate feature async and Linux only.
Source§

fn as_ref(&self) -> &Instance

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<Instance> for WasiModule

Source§

fn as_ref(&self) -> &Instance

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for Instance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Instance

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.Loader.html b/wasmedge_sys/struct.Loader.html new file mode 100644 index 000000000..a993cdf9f --- /dev/null +++ b/wasmedge_sys/struct.Loader.html @@ -0,0 +1,42 @@ +Loader in wasmedge_sys - Rust
wasmedge_sys

Struct Loader

Source
pub struct Loader { /* private fields */ }
Expand description

Loader is used to load WASM modules from the given WASM files or buffers.

+

Implementations§

Source§

impl Loader

Source

pub fn create(config: Option<&Config>) -> WasmEdgeResult<Self>

Create a new Loader to be associated with the given global configuration.

+
§Arguments
+
    +
  • config - A global configuration.
  • +
+
§Error
+

If fail to create a Loader, then an error is returned.

+
Source

pub fn from_file(&self, file: impl AsRef<Path>) -> WasmEdgeResult<Arc<Module>>

Loads a WASM module from a WASM file.

+
§Arguments
+
    +
  • file - A wasm file or an AOT wasm file.
  • +
+
§Error
+

If fail to load, then an error is returned.

+
§Example
+
let file = "path/to/foo.wasm"
+let module = loader.from_file(file)?;
+
Source

pub fn from_bytes(&self, bytes: impl AsRef<[u8]>) -> WasmEdgeResult<Arc<Module>>

Loads a WASM module from a in-memory bytes.

+
§Arguments
+
    +
  • bytes - A in-memory WASM bytes.
  • +
+
§Error
+

If fail to load, then an error is returned.

+
§Example
+
let bytes = b"\0asm\x01\0\0\0";
+let module = loader.from_bytes(&bytes)?;
+

Note that the text format is not accepted:

+ +
assert!(loader.from_bytes(b"(module)").is_err());
+

Trait Implementations§

Source§

impl Debug for Loader

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Loader

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Loader

§

impl RefUnwindSafe for Loader

§

impl Send for Loader

§

impl Sync for Loader

§

impl Unpin for Loader

§

impl UnwindSafe for Loader

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.Memory.html b/wasmedge_sys/struct.Memory.html new file mode 100644 index 000000000..236b4027d --- /dev/null +++ b/wasmedge_sys/struct.Memory.html @@ -0,0 +1,120 @@ +Memory in wasmedge_sys - Rust
wasmedge_sys

Struct Memory

Source
pub struct Memory { /* private fields */ }
Expand description

Defines a WebAssembly memory instance, which is a linear memory described by its type. Each memory instance consists of a vector of bytes and an optional maximum size, and its size is a multiple of the WebAssembly page size (64KiB of each page).

+

Implementations§

Source§

impl Memory

Source

pub fn create(ty: &MemoryType) -> WasmEdgeResult<Self>

Create a new Memory to be associated with the given capacity limit.

+
§Arguments
+
    +
  • ty - The type of the new Memory instance.
  • +
+
§Errors
+ +
Source

pub fn ty(&self) -> WasmEdgeResult<MemoryType>

Returns the type of the Memory.

+
§Errors
+

If fail to get the type from the Memory, then an error is returned.

+
Source

pub fn get_data(&self, offset: u32, len: u32) -> WasmEdgeResult<Vec<u8>>

Copies the data from the Memory to the output buffer.

+
§Arguments
+
    +
  • +

    offset - The data start offset in the Memory.

    +
  • +
  • +

    len - The requested data length.

    +
  • +
+
§Errors
+

If the offset + len is larger than the data size in the Memory, then an error is returned.

+
Source

pub fn set_data( + &mut self, + data: impl AsRef<[u8]>, + offset: u32, +) -> WasmEdgeResult<()>

Copies the data from the given input buffer into the Memory.

+
§Arguments
+
    +
  • +

    data - The data buffer to copy.

    +
  • +
  • +

    offset - The data start offset in the Memory.

    +
  • +
+
§Errors
+

If the sum of the offset and the data length is larger than the size of the Memory, +then an error is returned.

+
Source

pub unsafe fn data_pointer( + &self, + offset: u32, + len: u32, +) -> WasmEdgeResult<*const u8>

Returns the const data pointer to the Memory.

+
§Arguments
+
    +
  • +

    offset - The data start offset in the Memory.

    +
  • +
  • +

    len - The requested data length. If the size of offset + len is larger than the data size in the Memory

    +
  • +
+
§Errors
+

If fail to get the data pointer, then an error is returned.

+
§Safety
+

The lifetime of the returned pointer must not exceed that of the object itself.

+
Source

pub unsafe fn data_pointer_mut( + &mut self, + offset: u32, + len: u32, +) -> WasmEdgeResult<*mut u8>

Returns the data pointer to the Memory.

+
§Arguments
+
    +
  • +

    offset - The data start offset in the Memory.

    +
  • +
  • +

    len - The requested data length. If the size of offset + len is larger than the data size in the Memory

    +
  • +
+
§Errors
+

If fail to get the data pointer, then an error is returned.

+
§Safety
+

The lifetime of the returned pointer must not exceed that of the object itself.

+
Source

pub fn size(&self) -> u32

Returns the size, in WebAssembly pages (64 KiB of each page), of this wasm memory.

+
Source

pub fn grow(&mut self, count: u32) -> WasmEdgeResult<()>

Grows this WebAssembly memory by count pages.

+
§Arguments
+
    +
  • count - The page counts to be extended to the Memory.
  • +
+
§Errors
+

If fail to grow the page count, then an error is returned.

+
Source

pub unsafe fn as_ptr(&self) -> *const WasmEdge_MemoryInstanceContext

§Safety
+

Provides a raw pointer to the inner memory context. +The lifetime of the returned pointer must not exceed that of the object itself.

+
Source§

impl Memory

Source

pub fn get_ref<T: Sized>(&self, offset: usize) -> Option<&T>

Source

pub fn slice<T: Sized>(&self, offset: usize, len: usize) -> Option<&[T]>

Source

pub fn get_ref_mut<T: Sized>(&mut self, offset: usize) -> Option<&mut T>

Source

pub fn mut_slice<T: Sized>(&self, offset: usize, len: usize) -> Option<&mut [T]>

Source

pub fn write<T: Sized>(&mut self, offset: usize, data: T) -> Option<()>

Trait Implementations§

Source§

impl Debug for Memory

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Memory

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Memory for Memory

Available on crate feature async and Linux only.
Source§

fn get_data<T: Sized>(&self, offset: WasmPtr<T>) -> Result<&T, Errno>

Source§

fn get_slice<T: Sized>( + &self, + offset: WasmPtr<T>, + len: usize, +) -> Result<&[T], Errno>

Source§

fn get_iovec<'a>( + &self, + iovec_ptr: WasmPtr<__wasi_ciovec_t>, + iovec_len: __wasi_size_t, +) -> Result<Vec<IoSlice<'a>>, Errno>

Source§

fn mut_data<T: Sized>(&mut self, offset: WasmPtr<T>) -> Result<&mut T, Errno>

Source§

fn mut_slice<T: Sized>( + &mut self, + offset: WasmPtr<T>, + len: usize, +) -> Result<&mut [T], Errno>

Source§

fn mut_iovec( + &mut self, + iovec_ptr: WasmPtr<__wasi_iovec_t>, + iovec_len: __wasi_size_t, +) -> Result<Vec<IoSliceMut<'_>>, Errno>

Source§

fn write_data<T: Sized>( + &mut self, + offset: WasmPtr<T>, + data: T, +) -> Result<(), Errno>

Auto Trait Implementations§

§

impl Freeze for Memory

§

impl RefUnwindSafe for Memory

§

impl Send for Memory

§

impl Sync for Memory

§

impl Unpin for Memory

§

impl UnwindSafe for Memory

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.MemoryType.html b/wasmedge_sys/struct.MemoryType.html new file mode 100644 index 000000000..7282286c3 --- /dev/null +++ b/wasmedge_sys/struct.MemoryType.html @@ -0,0 +1,36 @@ +MemoryType in wasmedge_sys - Rust
wasmedge_sys

Struct MemoryType

Source
pub struct MemoryType { /* private fields */ }
Expand description

Struct of WasmEdge MemoryType.

+

A MemoryType is used to declare the size range of a WasmEdge Memory to be created.

+

Implementations§

Source§

impl MemoryType

Source

pub fn new( + min: u32, + max: Option<u32>, + shared: bool, +) -> Result<MemoryType, Box<WasmEdgeError>>

Creates a new MemoryType with the given size range.

+
§Arguments
+
    +
  • +

    min - The minimum size of the memory to be created.

    +
  • +
  • +

    max - The maximum size of the memory to be created. If shared is set to true, max must be set.

    +
  • +
  • +

    shared - Enables shared memory if true.

    +
  • +
+
Source

pub fn minimum(&self) -> u32

Returns the minimum size defined in the MemoryType.

+
Source

pub fn maximum(&self) -> Option<u32>

Returns the maximum size defined in the MemoryType.

+
Source

pub fn shared(&self) -> bool

Returns whether the memory is shared.

+

Trait Implementations§

Source§

impl Clone for MemoryType

Source§

fn clone(&self) -> MemoryType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MemoryType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for MemoryType

Source§

fn default() -> MemoryType

Returns the “default value” for a type. Read more
Source§

impl PartialEq for MemoryType

Source§

fn eq(&self, other: &MemoryType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for MemoryType

Source§

impl StructuralPartialEq for MemoryType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.Module.html b/wasmedge_sys/struct.Module.html new file mode 100644 index 000000000..04c10aa3f --- /dev/null +++ b/wasmedge_sys/struct.Module.html @@ -0,0 +1,20 @@ +Module in wasmedge_sys - Rust
wasmedge_sys

Struct Module

Source
pub struct Module { /* private fields */ }
Expand description

Defines compiled in-memory representation of an input WASM binary.

+

Module is also called AST Module in WasmEdge terminology. A Module is a compiled in-memory +representation of an input WebAssembly binary. In the instantiation process, a Module is used to create a +module stance, from which the exported functions, tables, +memories, and globals can be fetched.

+

Implementations§

Source§

impl Module

Source

pub fn count_of_imports(&self) -> u32

Returns the number of wasm imports in the Module.

+
Source

pub fn imports(&self) -> Vec<ImportType<'_>>

Returns the types of wasm imports in the Module.

+
Source

pub fn count_of_exports(&self) -> u32

Returns the count of wasm exports in the Module.

+
Source

pub fn export(&self) -> Vec<ExportType<'_>>

Returns the types of wasm exports in the Module.

+
Source

pub unsafe fn from_raw(ptr: *mut WasmEdge_ASTModuleContext) -> Self

Trait Implementations§

Source§

impl Debug for Module

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Module

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Module

§

impl RefUnwindSafe for Module

§

impl Send for Module

§

impl Sync for Module

§

impl Unpin for Module

§

impl UnwindSafe for Module

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.Statistics.html b/wasmedge_sys/struct.Statistics.html new file mode 100644 index 000000000..7d29cf185 --- /dev/null +++ b/wasmedge_sys/struct.Statistics.html @@ -0,0 +1,49 @@ +Statistics in wasmedge_sys - Rust
wasmedge_sys

Struct Statistics

Source
pub struct Statistics { /* private fields */ }
Expand description

Struct of WasmEdge Statistics.

+

Implementations§

Source§

impl Statistics

Source

pub fn create() -> WasmEdgeResult<Self>

Creates a new Statistics.

+
§Error
+

If fail to create a Statistics, then an error is returned.

+
Source

pub fn instr_count(&self) -> u64

Returns the instruction count in execution.

+
Source

pub fn instr_per_sec(&self) -> f64

Returns the instruction count per second in execution.

+
§Notice
+

For the following cases,

+
    +
  • Statistics is not enabled, or
  • +
  • the total execution time is 0
  • +
+

The instructions per second could be NaN, which represents divided-by-zero. +Use the is_nan function of F64 to check the return value before use it, +for example,

+ +
use wasmedge_sys::Statistics;
+
+// create a Statistics instance
+let stat = Statistics::create().expect("fail to create a Statistics");
+
+// check instruction count per second
+assert!(stat.instr_per_sec().is_nan());
+
Source

pub fn cost_in_total(&self) -> u64

Returns the total cost in execution.

+
Source

pub fn set_cost_table(&mut self, cost_table: impl AsRef<[u64]>)

Sets the cost of instructions.

+
§Arguments
+
    +
  • cost_table - The slice of cost table.
  • +
+
Source

pub fn set_cost_limit(&mut self, limit: u64)

Sets the cost limit in execution.

+
§Arguments
+
    +
  • limit - The cost limit.
  • +
+
Source

pub fn clear(&mut self)

Clears the data in this statistics.

+
Source

pub fn as_ptr(&self) -> *const WasmEdge_StatisticsContext

Available on crate feature ffi only.

Provides a raw pointer to the inner Statistics context.

+

Trait Implementations§

Source§

impl Clone for Statistics

Source§

fn clone(&self) -> Statistics

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Statistics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Statistics

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.Store.html b/wasmedge_sys/struct.Store.html new file mode 100644 index 000000000..4b5e18bb2 --- /dev/null +++ b/wasmedge_sys/struct.Store.html @@ -0,0 +1,32 @@ +Store in wasmedge_sys - Rust
wasmedge_sys

Struct Store

Source
pub struct Store { /* private fields */ }
Expand description

The Store is a collection of registered modules and assists wasm modules in finding the import modules they need.

+

Implementations§

Source§

impl Store

Source

pub fn create() -> WasmEdgeResult<Self>

Creates a new Store.

+
§Error
+

If fail to create, then an error is returned.

+
Source

pub fn module_len(&self) -> u32

Returns the length of the registered modules.

+
Source

pub fn module_names(&self) -> Option<Vec<String>>

Returns the names of all registered modules.

+
Source

pub fn module( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Instance, &Self>>

Returns the module instance by the module name.

+
§Argument
+
    +
  • name - The name of the module instance to get.
  • +
+
§Error
+

If fail to find the target module instance, then an error is returned.

+
Source

pub fn contains(&self, name: impl AsRef<str>) -> bool

Checks if the Store contains a module of which the name matches the given name.

+
§Argument
+
    +
  • name - The name of the module to search.
  • +
+

Trait Implementations§

Source§

impl Debug for Store

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Store

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Store

§

impl RefUnwindSafe for Store

§

impl Send for Store

§

impl Sync for Store

§

impl Unpin for Store

§

impl UnwindSafe for Store

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.Table.html b/wasmedge_sys/struct.Table.html new file mode 100644 index 000000000..f53240a08 --- /dev/null +++ b/wasmedge_sys/struct.Table.html @@ -0,0 +1,57 @@ +Table in wasmedge_sys - Rust
wasmedge_sys

Struct Table

Source
pub struct Table { /* private fields */ }
Expand description

A WasmEdge Table defines a WebAssembly table instance described by its type. A table is an array-like structure and stores function references.

+

This example shows how to use Table to store and retrieve function references.

+

Implementations§

Source§

impl Table

Source

pub fn create(ty: TableType) -> WasmEdgeResult<Self>

Creates a new Table to be associated with the given element type and the size.

+
§Arguments
+
    +
  • ty specifies the type of the new Table.
  • +
+
§Error
+
    +
  • If fail to create the table instance, then WasmEdgeError::Table(TableError::Create)(crate::error::TableError) is returned.
  • +
+
Source

pub fn ty(&self) -> WasmEdgeResult<TableType>

Returns the [TableType] of the Table.

+
§Error
+

If fail to get type, then an error is returned.

+
Source

pub fn get_data(&self, idx: u32) -> WasmEdgeResult<WasmValue>

Returns the element value at a specific position in the Table.

+
§Arguments
+
    +
  • idx specifies the position in the Table, at which the WasmValue is returned.
  • +
+
§Error
+

If fail to get the data, then an error is returned.

+
Source

pub fn set_data(&mut self, data: WasmValue, idx: u32) -> WasmEdgeResult<()>

Sets a new element value at a specific position in the Table.

+
§Arguments
+
    +
  • +

    data specifies the new data.

    +
  • +
  • +

    idx specifies the position of the new data to be stored in the Table.

    +
  • +
+
§Error
+

If fail to set data, then an error is returned.

+
Source

pub fn capacity(&self) -> usize

Returns the capacity of the Table.

+
Source

pub fn grow(&mut self, size: u32) -> WasmEdgeResult<()>

Increases the capacity of the Table.

+

After growing, the new capacity must be in the range defined by limit when the table is created.

+
§Argument
+
    +
  • size specifies the size to be added to the Table.
  • +
+
§Error
+

If fail to increase the size of the Table, then an error is returned.

+
Source

pub unsafe fn as_ptr(&self) -> *const WasmEdge_TableInstanceContext

§Safety
+

The lifetime of the returned pointer must not exceed that of the object itself.

+
Source

pub unsafe fn from_raw(ptr: *mut WasmEdge_TableInstanceContext) -> Self

§Safety
+

This function will take over the lifetime management of ptr, so do not call ffi::WasmEdge_TableInstanceDelete on ptr after this.

+

Trait Implementations§

Source§

impl Debug for Table

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Table

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Table

§

impl RefUnwindSafe for Table

§

impl Send for Table

§

impl Sync for Table

§

impl Unpin for Table

§

impl UnwindSafe for Table

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.TableType.html b/wasmedge_sys/struct.TableType.html new file mode 100644 index 000000000..8ff466832 --- /dev/null +++ b/wasmedge_sys/struct.TableType.html @@ -0,0 +1,32 @@ +TableType in wasmedge_sys - Rust
wasmedge_sys

Struct TableType

Source
pub struct TableType { /* private fields */ }
Expand description

Struct of WasmEdge TableType.

+

A TableType is used to declare the element type and the size range of a WasmEdge Table to be created.

+

Implementations§

Source§

impl TableType

Source

pub fn new(elem_ty: RefType, min: u32, max: Option<u32>) -> TableType

Creates a new TableType with the given element type and the size range.

+
§Arguments
+
    +
  • +

    elem_ty - The element type of the table to be created.

    +
  • +
  • +

    min - The minimum size of the table to be created.

    +
  • +
  • +

    max - The maximum size of the table to be created.

    +
  • +
+
Source

pub fn elem_ty(&self) -> RefType

Returns the element type defined in the TableType.

+
Source

pub fn minimum(&self) -> u32

Returns the minimum size defined in the TableType.

+
Source

pub fn maximum(&self) -> Option<u32>

Returns the maximum size defined in the TableType.

+

Trait Implementations§

Source§

impl Clone for TableType

Source§

fn clone(&self) -> TableType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TableType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for TableType

Source§

fn default() -> TableType

Returns the “default value” for a type. Read more
Source§

impl PartialEq for TableType

Source§

fn eq(&self, other: &TableType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for TableType

Source§

impl StructuralPartialEq for TableType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.Validator.html b/wasmedge_sys/struct.Validator.html new file mode 100644 index 000000000..56a3caf53 --- /dev/null +++ b/wasmedge_sys/struct.Validator.html @@ -0,0 +1,28 @@ +Validator in wasmedge_sys - Rust
wasmedge_sys

Struct Validator

Source
pub struct Validator { /* private fields */ }
Expand description

Struct of WasmEdge Validator.

+

Implementations§

Source§

impl Validator

Source

pub fn create(config: Option<&Config>) -> WasmEdgeResult<Self>

Creates a new Validator to be associated with the given global configuration.

+
§Arguments
+
    +
  • config - The global environment configuration.
  • +
+
§Error
+

If fail to create a Validator, then an error is returned.

+
Source

pub fn validate(&self, module: &Module) -> WasmEdgeResult<()>

Validates a given WasmEdge Module.

+

Modules are valid when all components they contain are valid. Furthermore, most definitions are themselves classified with a suitable type.

+
§Arguments
+
    +
  • module - The Module to be validated.
  • +
+
§Error
+

If the validation fails, then an error is returned.

+
Source

pub fn as_ptr(&self) -> *const WasmEdge_ValidatorContext

Available on crate feature ffi only.

Provides a raw pointer to the inner Validator context.

+

Trait Implementations§

Source§

impl Debug for Validator

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Validator

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.WasiModule.html b/wasmedge_sys/struct.WasiModule.html new file mode 100644 index 000000000..407a386c7 --- /dev/null +++ b/wasmedge_sys/struct.WasiModule.html @@ -0,0 +1,80 @@ +WasiModule in wasmedge_sys - Rust
wasmedge_sys

Struct WasiModule

Source
pub struct WasiModule(/* private fields */);
Expand description

A WasiModule is a module instance for the WASI specification.

+

Implementations§

Source§

impl WasiModule

Source

pub fn create( + args: Option<Vec<&str>>, + envs: Option<Vec<&str>>, + preopens: Option<Vec<&str>>, +) -> WasmEdgeResult<Self>

Creates a WASI host module which contains the WASI host functions, and initializes it with the given parameters.

+
§Arguments
+
    +
  • +

    args - The commandline arguments. The first argument is the program name.

    +
  • +
  • +

    envs - The environment variables in the format ENV_VAR_NAME=VALUE.

    +
  • +
  • +

    preopens - The directories to pre-open. The required format is GUEST_PATH:HOST_PATH.

    +
  • +
+
§Error
+

If fail to create a host module, then an error is returned.

+
Source

pub fn name(&self) -> &str

Returns the name of the module instance.

+
Source

pub fn init_wasi( + &mut self, + args: Option<Vec<&str>>, + envs: Option<Vec<&str>>, + preopens: Option<Vec<&str>>, +)

Initializes the WASI host module with the given parameters.

+
§Arguments
+
    +
  • +

    args - The commandline arguments. The first argument is the program name.

    +
  • +
  • +

    envs - The environment variables in the format ENV_VAR_NAME=VALUE.

    +
  • +
  • +

    preopens - The directories to pre-open. The required format is GUEST_PATH:HOST_PATH.

    +
  • +
+
Source

pub fn exit_code(&self) -> u32

Returns the WASI exit code.

+

The WASI exit code can be accessed after running the “_start” function of a wasm32-wasi program.

+
Source

pub fn get_native_handler(&self, fd: i32) -> WasmEdgeResult<u64>

Returns the native handler from the mapped FD/Handler.

+
§Argument
+
    +
  • fd - The WASI mapped Fd.
  • +
+
§Error
+

If fail to get the native handler, then an error is returned.

+

Trait Implementations§

Source§

impl AsMut<Instance> for WasiModule

Source§

fn as_mut(&mut self) -> &mut Instance

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Instance> for WasiModule

Source§

fn as_ref(&self) -> &Instance

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for WasiModule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<Inst> AsInstance for Inst
where + Inst: AsMut<Instance> + AsRef<Instance>,

Source§

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

Safety Read more
Source§

fn name(&self) -> Option<String>

Returns the name of this exported module instance. Read more
Source§

fn get_table( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Table, &Self>>
where + Self: Sized,

Returns the exported table instance by name. Read more
Source§

fn get_memory_ref( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &Self>>
where + Self: Sized,

Returns the exported memory instance by name. Read more
Source§

fn get_memory_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &mut Self>>
where + Self: Sized,

Source§

fn get_global( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &Self>>
where + Self: Sized,

Returns the exported global instance by name. Read more
Source§

fn get_global_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &mut Self>>
where + Self: Sized,

Source§

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.
Source§

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.
Source§

fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>>

Returns the exported function instance by name. Read more
Source§

fn get_func_mut(&mut self, name: &str) -> WasmEdgeResult<FuncRef<&mut Instance>>

Returns the exported function instance by name. Read more
Source§

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.
Source§

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.
Source§

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.
Source§

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.
Source§

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.
Source§

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/struct.WasmValue.html b/wasmedge_sys/struct.WasmValue.html new file mode 100644 index 000000000..06aaf83ea --- /dev/null +++ b/wasmedge_sys/struct.WasmValue.html @@ -0,0 +1,69 @@ +WasmValue in wasmedge_sys - Rust
wasmedge_sys

Struct WasmValue

Source
pub struct WasmValue { /* private fields */ }
Expand description

Defines a WebAssembly value.

+

Implementations§

Source§

impl WasmValue

Source

pub fn as_raw(&self) -> WasmEdge_Value

Returns the raw WasmEdge_Value.

+
Source

pub fn ty(&self) -> ValType

Returns the type of a WasmValue.

+
Source

pub fn from_i32(val: i32) -> Self

Creates a WasmValue from a i32 value.

+
§Argument
+
    +
  • val - The source i32 value.
  • +
+
Source

pub fn to_i32(&self) -> i32

Generates a i32 value from a WasmValue.

+
Source

pub fn from_i64(val: i64) -> Self

Creates a WasmValue from a i64 value.

+
§Argument
+
    +
  • val - The source i64 value.
  • +
+
Source

pub fn to_i64(&self) -> i64

Generates a i64 value from a WasmValue.

+
Source

pub fn from_f32(val: f32) -> Self

Creates a WasmValue from a f32 value.

+
§Argument
+
    +
  • val - The source f32 value.
  • +
+
Source

pub fn to_f32(&self) -> f32

Generates a f32 value from a WasmValue.

+
Source

pub fn from_f64(val: f64) -> Self

Creates a WasmValue from a f64 value.

+
§Argument
+
    +
  • val - The source f64 value.
  • +
+
Source

pub fn to_f64(&self) -> f64

Generates a f64 value from a WasmValue.

+
Source

pub fn from_v128(val: i128) -> Self

Creates a WasmValue from a i128 value.

+
§Argument
+
    +
  • val - The source i128 value.
  • +
+
Source

pub fn to_v128(&self) -> i128

Generates a v128 value from a WasmValue.

+
Source

pub fn is_null_ref(&self) -> bool

Checks if a WasmValue is NullRef or not.

+
Source

pub fn from_func_ref<Func: AsFunc>(func_ref: &Func) -> Self

Creates a WasmValue from a FuncRef.

+

Notice that the WasmValues generated from FuncRefs are only meaningful when the bulk_memory_operations or reference_types option is enabled in the Config.

+
§Argument
+ +
Source

pub fn func_ref(&self) -> Option<FuncRef<&Self>>

Returns the FuncRef(crate::FuncRef).

+

If the WasmValue is a NullRef, then None is returned.

+
Source

pub fn from_extern_ref<T>(extern_obj: &mut T) -> Self

Creates a WasmValue from a reference to an external object.

+

The WasmValues generated by this function are only meaningful when the reference_types option is enabled in +the Config.

+
§Argument
+
    +
  • extern_obj - The reference to an external object.
  • +
+
Source

pub fn null_extern_ref() -> Self

Creates a null WasmValue with a ExternRef.

+
§Argument
+
    +
  • val - The [RefType`] value.
  • +
+
Source

pub fn extern_ref<T>(&self) -> Option<&T>

Returns the reference to an external object.

+

If the WasmValue is a NullRef, then None is returned.

+

Trait Implementations§

Source§

impl Clone for WasmValue

Source§

fn clone(&self) -> WasmValue

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<WasmEdge_Value> for WasmValue

Source§

fn from(raw_val: WasmEdge_Value) -> Self

Converts to this type from the input type.
Source§

impl Copy for WasmValue

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/trait.AsInstance.html b/wasmedge_sys/trait.AsInstance.html new file mode 100644 index 000000000..2a447fc56 --- /dev/null +++ b/wasmedge_sys/trait.AsInstance.html @@ -0,0 +1,115 @@ +AsInstance in wasmedge_sys - Rust
wasmedge_sys

Trait AsInstance

Source
pub trait AsInstance {
+
Show 17 methods // Required method + unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext; + + // Provided methods + fn name(&self) -> Option<String> { ... } + fn get_table( + &self, + name: impl AsRef<str>, + ) -> WasmEdgeResult<InnerRef<Table, &Self>> + where Self: Sized { ... } + fn get_memory_ref( + &self, + name: impl AsRef<str>, + ) -> WasmEdgeResult<InnerRef<Memory, &Self>> + where Self: Sized { ... } + fn get_memory_mut( + &mut self, + name: impl AsRef<str>, + ) -> WasmEdgeResult<InnerRef<Memory, &mut Self>> + where Self: Sized { ... } + fn get_global( + &self, + name: impl AsRef<str>, + ) -> WasmEdgeResult<InnerRef<Global, &Self>> + where Self: Sized { ... } + fn get_global_mut( + &mut self, + name: impl AsRef<str>, + ) -> WasmEdgeResult<InnerRef<Global, &mut Self>> + where Self: Sized { ... } + fn func_len(&self) -> u32 { ... } + fn func_names(&self) -> Option<Vec<String>> { ... } + fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>> { ... } + fn get_func_mut( + &mut self, + name: &str, + ) -> WasmEdgeResult<FuncRef<&mut Instance>> { ... } + fn table_len(&self) -> u32 { ... } + fn table_names(&self) -> Option<Vec<String>> { ... } + fn mem_len(&self) -> u32 { ... } + fn mem_names(&self) -> Option<Vec<String>> { ... } + fn global_len(&self) -> u32 { ... } + fn global_names(&self) -> Option<Vec<String>> { ... } +
}
Expand description

The object as an module instance is required to implement this trait.

+

Required Methods§

Source

unsafe fn as_ptr(&self) -> *const WasmEdge_ModuleInstanceContext

§Safety
+

Provides a raw pointer to the inner module instance context. +The lifetime of the returned pointer must not exceed that of the object itself.

+

Provided Methods§

Source

fn name(&self) -> Option<String>

Returns the name of this exported module instance.

+

If this module instance is an active module instance, then None is returned.

+
Source

fn get_table( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Table, &Self>>
where + Self: Sized,

Returns the exported table instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target table instance, then an error is returned.

+
Source

fn get_memory_ref( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &Self>>
where + Self: Sized,

Returns the exported memory instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target memory instance, then an error is returned.

+
Source

fn get_memory_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Memory, &mut Self>>
where + Self: Sized,

Source

fn get_global( + &self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &Self>>
where + Self: Sized,

Returns the exported global instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target global instance, then an error is returned.

+
Source

fn get_global_mut( + &mut self, + name: impl AsRef<str>, +) -> WasmEdgeResult<InnerRef<Global, &mut Self>>
where + Self: Sized,

Source

fn func_len(&self) -> u32

Returns the length of the exported function instances in this module instance.

+
Source

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.

+
Source

fn get_func(&self, name: &str) -> WasmEdgeResult<FuncRef<&Instance>>

Returns the exported function instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target function, then an error is returned.

+
Source

fn get_func_mut(&mut self, name: &str) -> WasmEdgeResult<FuncRef<&mut Instance>>

Returns the exported function instance by name.

+
§Argument
+ +
§Error
+

If fail to find the target function, then an error is returned.

+
Source

fn table_len(&self) -> u32

Returns the length of the exported table instances in this module instance.

+
Source

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.

+
Source

fn mem_len(&self) -> u32

Returns the length of the exported memory instances in this module instance.

+
Source

fn mem_names(&self) -> Option<Vec<String>>

Returns the names of all exported memory instances in this module instance.

+
Source

fn global_len(&self) -> u32

Returns the length of the exported global instances in this module instance.

+
Source

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.

+

Implementors§

Source§

impl AsInstance for Instance

Source§

impl<Inst> AsInstance for Inst
where + Inst: AsMut<Instance> + AsRef<Instance> + Sized,

Source§

impl<T: Send> AsInstance for AsyncImportObject<T>

Available on crate feature async and Linux only.
Source§

impl<T: Sized> AsInstance for ImportModule<T>

\ No newline at end of file diff --git a/wasmedge_sys/type.FuncRef.html b/wasmedge_sys/type.FuncRef.html new file mode 100644 index 000000000..4a2f2d850 --- /dev/null +++ b/wasmedge_sys/type.FuncRef.html @@ -0,0 +1,2 @@ +FuncRef in wasmedge_sys - Rust
wasmedge_sys

Type Alias FuncRef

Source
pub type FuncRef<Ref> = InnerRef<Function, Ref>;
Expand description

Defines a reference to a host function.

+

Aliased Type§

struct FuncRef<Ref> { /* private fields */ }
\ No newline at end of file diff --git a/wasmedge_sys/type.SyncFn.html b/wasmedge_sys/type.SyncFn.html new file mode 100644 index 000000000..61a2f64ac --- /dev/null +++ b/wasmedge_sys/type.SyncFn.html @@ -0,0 +1 @@ +SyncFn in wasmedge_sys - Rust
wasmedge_sys

Type Alias SyncFn

Source
pub type SyncFn<Data> = for<'a, 'b, 'c> fn(_: &'a mut Data, _: &'b mut Instance, _: &'c mut CallingFrame, _: Vec<WasmValue>) -> Result<Vec<WasmValue>, CoreError>;
\ No newline at end of file diff --git a/wasmedge_sys/type.WasiCtx.html b/wasmedge_sys/type.WasiCtx.html new file mode 100644 index 000000000..a41db9454 --- /dev/null +++ b/wasmedge_sys/type.WasiCtx.html @@ -0,0 +1,6 @@ +WasiCtx in wasmedge_sys - Rust
wasmedge_sys

Type Alias WasiCtx

Source
pub type WasiCtx = WasiCtx;
Available on crate feature async and Linux only.
Expand description

Type of wasi context that is used to configure the wasi environment.

+

Aliased Type§

struct WasiCtx {
+    pub args: Vec<String>,
+    pub exit_code: u32,
+    /* private fields */
+}

Fields§

§args: Vec<String>§exit_code: u32
\ No newline at end of file diff --git a/wasmedge_sys/types/index.html b/wasmedge_sys/types/index.html new file mode 100644 index 000000000..17acd006e --- /dev/null +++ b/wasmedge_sys/types/index.html @@ -0,0 +1,2 @@ +wasmedge_sys::types - Rust
wasmedge_sys

Module types

Source
Expand description

Defines the WebAssembly primitive types.

+

Structs§

\ No newline at end of file diff --git a/wasmedge_sys/types/sidebar-items.js b/wasmedge_sys/types/sidebar-items.js new file mode 100644 index 000000000..7cab93e60 --- /dev/null +++ b/wasmedge_sys/types/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["WasmEdgeString","WasmValue"]}; \ No newline at end of file diff --git a/wasmedge_sys/types/struct.WasmEdgeString.html b/wasmedge_sys/types/struct.WasmEdgeString.html new file mode 100644 index 000000000..d4a781a00 --- /dev/null +++ b/wasmedge_sys/types/struct.WasmEdgeString.html @@ -0,0 +1,17 @@ +WasmEdgeString in wasmedge_sys::types - Rust
wasmedge_sys::types

Struct WasmEdgeString

Source
pub struct WasmEdgeString { /* private fields */ }
Expand description

Struct of WasmEdge String.

+

Implementations§

Source§

impl WasmEdgeString

Source

pub unsafe fn into_raw(self) -> WasmEdge_String

§Safety
+

After calling this function, the caller is responsible for managing the lifetime of ffi::WasmEdge_String`` and should call ffi::WasmEdge_StringDelete`` at the appropriate time.

+
Source

pub unsafe fn from_raw(s: WasmEdge_String) -> Self

§Safety
+

This function takes ownership of s, so do not call ffi::WasmEdge_StringDelete on s after this.

+

Trait Implementations§

Source§

impl AsMut<WasmEdge_String> for WasmEdgeString

Source§

fn as_mut(&mut self) -> &mut WasmEdge_String

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<WasmEdge_String> for WasmEdgeString

Source§

fn as_ref(&self) -> &WasmEdge_String

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for WasmEdgeString

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for WasmEdgeString

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl From<&WasmEdgeString> for &CStr

Source§

fn from(s: &WasmEdgeString) -> Self

Converts to this type from the input type.
Source§

impl From<&WasmEdgeString> for String

Source§

fn from(s: &WasmEdgeString) -> Self

Converts to this type from the input type.
Source§

impl<T: AsRef<str>> From<T> for WasmEdgeString

Source§

fn from(s: T) -> Self

Converts to this type from the input type.
Source§

impl From<WasmEdgeString> for &CStr

Source§

fn from(s: WasmEdgeString) -> Self

Converts to this type from the input type.
Source§

impl From<WasmEdgeString> for String

Source§

fn from(s: WasmEdgeString) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for WasmEdgeString

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for WasmEdgeString

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/types/struct.WasmValue.html b/wasmedge_sys/types/struct.WasmValue.html new file mode 100644 index 000000000..e15e4cf88 --- /dev/null +++ b/wasmedge_sys/types/struct.WasmValue.html @@ -0,0 +1,69 @@ +WasmValue in wasmedge_sys::types - Rust
wasmedge_sys::types

Struct WasmValue

Source
pub struct WasmValue { /* private fields */ }
Expand description

Defines a WebAssembly value.

+

Implementations§

Source§

impl WasmValue

Source

pub fn as_raw(&self) -> WasmEdge_Value

Returns the raw WasmEdge_Value.

+
Source

pub fn ty(&self) -> ValType

Returns the type of a WasmValue.

+
Source

pub fn from_i32(val: i32) -> Self

Creates a WasmValue from a i32 value.

+
§Argument
+
    +
  • val - The source i32 value.
  • +
+
Source

pub fn to_i32(&self) -> i32

Generates a i32 value from a WasmValue.

+
Source

pub fn from_i64(val: i64) -> Self

Creates a WasmValue from a i64 value.

+
§Argument
+
    +
  • val - The source i64 value.
  • +
+
Source

pub fn to_i64(&self) -> i64

Generates a i64 value from a WasmValue.

+
Source

pub fn from_f32(val: f32) -> Self

Creates a WasmValue from a f32 value.

+
§Argument
+
    +
  • val - The source f32 value.
  • +
+
Source

pub fn to_f32(&self) -> f32

Generates a f32 value from a WasmValue.

+
Source

pub fn from_f64(val: f64) -> Self

Creates a WasmValue from a f64 value.

+
§Argument
+
    +
  • val - The source f64 value.
  • +
+
Source

pub fn to_f64(&self) -> f64

Generates a f64 value from a WasmValue.

+
Source

pub fn from_v128(val: i128) -> Self

Creates a WasmValue from a i128 value.

+
§Argument
+
    +
  • val - The source i128 value.
  • +
+
Source

pub fn to_v128(&self) -> i128

Generates a v128 value from a WasmValue.

+
Source

pub fn is_null_ref(&self) -> bool

Checks if a WasmValue is NullRef or not.

+
Source

pub fn from_func_ref<Func: AsFunc>(func_ref: &Func) -> Self

Creates a WasmValue from a FuncRef.

+

Notice that the WasmValues generated from FuncRefs are only meaningful when the bulk_memory_operations or reference_types option is enabled in the Config.

+
§Argument
+ +
Source

pub fn func_ref(&self) -> Option<FuncRef<&Self>>

Returns the FuncRef(crate::FuncRef).

+

If the WasmValue is a NullRef, then None is returned.

+
Source

pub fn from_extern_ref<T>(extern_obj: &mut T) -> Self

Creates a WasmValue from a reference to an external object.

+

The WasmValues generated by this function are only meaningful when the reference_types option is enabled in +the Config.

+
§Argument
+
    +
  • extern_obj - The reference to an external object.
  • +
+
Source

pub fn null_extern_ref() -> Self

Creates a null WasmValue with a ExternRef.

+
§Argument
+
    +
  • val - The [RefType`] value.
  • +
+
Source

pub fn extern_ref<T>(&self) -> Option<&T>

Returns the reference to an external object.

+

If the WasmValue is a NullRef, then None is returned.

+

Trait Implementations§

Source§

impl Clone for WasmValue

Source§

fn clone(&self) -> WasmValue

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<WasmEdge_Value> for WasmValue

Source§

fn from(raw_val: WasmEdge_Value) -> Self

Converts to this type from the input type.
Source§

impl Copy for WasmValue

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_sys/utils/fn.driver_aot_compiler.html b/wasmedge_sys/utils/fn.driver_aot_compiler.html new file mode 100644 index 000000000..d2bc8589c --- /dev/null +++ b/wasmedge_sys/utils/fn.driver_aot_compiler.html @@ -0,0 +1,4 @@ +driver_aot_compiler in wasmedge_sys::utils - Rust
wasmedge_sys::utils

Function driver_aot_compiler

Source
pub fn driver_aot_compiler<I, V>(args: I) -> i32
where + I: IntoIterator<Item = V>, + V: AsRef<str>,
Expand description

Triggers the WasmEdge AOT compiler tool

+
\ No newline at end of file diff --git a/wasmedge_sys/utils/fn.driver_runtime_tool.html b/wasmedge_sys/utils/fn.driver_runtime_tool.html new file mode 100644 index 000000000..25ff76710 --- /dev/null +++ b/wasmedge_sys/utils/fn.driver_runtime_tool.html @@ -0,0 +1,4 @@ +driver_runtime_tool in wasmedge_sys::utils - Rust
wasmedge_sys::utils

Function driver_runtime_tool

Source
pub fn driver_runtime_tool<I, V>(args: I) -> i32
where + I: IntoIterator<Item = V>, + V: AsRef<str>,
Expand description

Triggers the WasmEdge runtime tool

+
\ No newline at end of file diff --git a/wasmedge_sys/utils/fn.driver_unified_tool.html b/wasmedge_sys/utils/fn.driver_unified_tool.html new file mode 100644 index 000000000..a653ebede --- /dev/null +++ b/wasmedge_sys/utils/fn.driver_unified_tool.html @@ -0,0 +1,4 @@ +driver_unified_tool in wasmedge_sys::utils - Rust
wasmedge_sys::utils

Function driver_unified_tool

Source
pub fn driver_unified_tool<I, V>(args: I) -> i32
where + I: IntoIterator<Item = V>, + V: AsRef<str>,
Expand description

Triggers the WasmEdge unified tool

+
\ No newline at end of file diff --git a/wasmedge_sys/utils/fn.log_debug_info.html b/wasmedge_sys/utils/fn.log_debug_info.html new file mode 100644 index 000000000..a87c01863 --- /dev/null +++ b/wasmedge_sys/utils/fn.log_debug_info.html @@ -0,0 +1,2 @@ +log_debug_info in wasmedge_sys::utils - Rust
wasmedge_sys::utils

Function log_debug_info

Source
pub fn log_debug_info()
Expand description

Logs the debug information.

+
\ No newline at end of file diff --git a/wasmedge_sys/utils/fn.log_error_info.html b/wasmedge_sys/utils/fn.log_error_info.html new file mode 100644 index 000000000..3ac3a8a4b --- /dev/null +++ b/wasmedge_sys/utils/fn.log_error_info.html @@ -0,0 +1,2 @@ +log_error_info in wasmedge_sys::utils - Rust
wasmedge_sys::utils

Function log_error_info

Source
pub fn log_error_info()
Expand description

Logs the error information.

+
\ No newline at end of file diff --git a/wasmedge_sys/utils/fn.log_off.html b/wasmedge_sys/utils/fn.log_off.html new file mode 100644 index 000000000..a18a2369d --- /dev/null +++ b/wasmedge_sys/utils/fn.log_off.html @@ -0,0 +1,2 @@ +log_off in wasmedge_sys::utils - Rust
wasmedge_sys::utils

Function log_off

Source
pub fn log_off()
Expand description

Sets the logging system off.

+
\ No newline at end of file diff --git a/wasmedge_sys/utils/fn.version_major_value.html b/wasmedge_sys/utils/fn.version_major_value.html new file mode 100644 index 000000000..bed26ea2f --- /dev/null +++ b/wasmedge_sys/utils/fn.version_major_value.html @@ -0,0 +1,2 @@ +version_major_value in wasmedge_sys::utils - Rust
wasmedge_sys::utils

Function version_major_value

Source
pub fn version_major_value() -> u32
Expand description

Returns the major version value.

+
\ No newline at end of file diff --git a/wasmedge_sys/utils/fn.version_minor_value.html b/wasmedge_sys/utils/fn.version_minor_value.html new file mode 100644 index 000000000..5237e48d5 --- /dev/null +++ b/wasmedge_sys/utils/fn.version_minor_value.html @@ -0,0 +1,2 @@ +version_minor_value in wasmedge_sys::utils - Rust
wasmedge_sys::utils

Function version_minor_value

Source
pub fn version_minor_value() -> u32
Expand description

Returns the minor version value.

+
\ No newline at end of file diff --git a/wasmedge_sys/utils/fn.version_patch_value.html b/wasmedge_sys/utils/fn.version_patch_value.html new file mode 100644 index 000000000..72aca534d --- /dev/null +++ b/wasmedge_sys/utils/fn.version_patch_value.html @@ -0,0 +1,2 @@ +version_patch_value in wasmedge_sys::utils - Rust
wasmedge_sys::utils

Function version_patch_value

Source
pub fn version_patch_value() -> u32
Expand description

Returns the patch version value.

+
\ No newline at end of file diff --git a/wasmedge_sys/utils/fn.version_string.html b/wasmedge_sys/utils/fn.version_string.html new file mode 100644 index 000000000..3452f028d --- /dev/null +++ b/wasmedge_sys/utils/fn.version_string.html @@ -0,0 +1,2 @@ +version_string in wasmedge_sys::utils - Rust
wasmedge_sys::utils

Function version_string

Source
pub fn version_string() -> String
Expand description

Returns the version string.

+
\ No newline at end of file diff --git a/wasmedge_sys/utils/index.html b/wasmedge_sys/utils/index.html new file mode 100644 index 000000000..3cbd40a1b --- /dev/null +++ b/wasmedge_sys/utils/index.html @@ -0,0 +1,2 @@ +wasmedge_sys::utils - Rust
wasmedge_sys

Module utils

Source
Expand description

Defines the versioning and logging functions.

+

Functions§

\ No newline at end of file diff --git a/wasmedge_sys/utils/sidebar-items.js b/wasmedge_sys/utils/sidebar-items.js new file mode 100644 index 000000000..de7e04bcb --- /dev/null +++ b/wasmedge_sys/utils/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["driver_aot_compiler","driver_runtime_tool","driver_unified_tool","log_debug_info","log_error_info","log_off","version_major_value","version_minor_value","version_patch_value","version_string"]}; \ No newline at end of file diff --git a/wasmedge_sys/validator/struct.Validator.html b/wasmedge_sys/validator/struct.Validator.html new file mode 100644 index 000000000..ce2ac9fee --- /dev/null +++ b/wasmedge_sys/validator/struct.Validator.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../wasmedge_sys/struct.Validator.html...

+ + + \ No newline at end of file diff --git a/wasmedge_types/all.html b/wasmedge_types/all.html new file mode 100644 index 000000000..11e870d70 --- /dev/null +++ b/wasmedge_types/all.html @@ -0,0 +1 @@ +List of all items in this crate
\ No newline at end of file diff --git a/wasmedge_types/enum.CompilerOptimizationLevel.html b/wasmedge_types/enum.CompilerOptimizationLevel.html new file mode 100644 index 000000000..c8aab88a3 --- /dev/null +++ b/wasmedge_types/enum.CompilerOptimizationLevel.html @@ -0,0 +1,29 @@ +CompilerOptimizationLevel in wasmedge_types - Rust
wasmedge_types

Enum CompilerOptimizationLevel

Source
pub enum CompilerOptimizationLevel {
+    O0,
+    O1,
+    O2,
+    O3,
+    Os,
+    Oz,
+}
Expand description

Defines WasmEdge AOT compiler optimization level.

+

Variants§

§

O0

Disable as many optimizations as possible.

+
§

O1

Optimize quickly without destroying debuggability.

+
§

O2

Optimize for fast execution as much as possible without triggering significant incremental compile time or code size growth.

+
§

O3

Optimize for fast execution as much as possible.

+
§

Os

Optimize for small code size as much as possible without triggering +significant incremental compile time or execution time slowdowns.

+
§

Oz

Optimize for small code size as much as possible.

+

Trait Implementations§

Source§

impl Clone for CompilerOptimizationLevel

Source§

fn clone(&self) -> CompilerOptimizationLevel

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompilerOptimizationLevel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<CompilerOptimizationLevel> for i32

Source§

fn from(val: CompilerOptimizationLevel) -> i32

Converts to this type from the input type.
Source§

impl From<CompilerOptimizationLevel> for u32

Source§

fn from(val: CompilerOptimizationLevel) -> u32

Converts to this type from the input type.
Source§

impl From<i32> for CompilerOptimizationLevel

Source§

fn from(val: i32) -> CompilerOptimizationLevel

Converts to this type from the input type.
Source§

impl From<u32> for CompilerOptimizationLevel

Source§

fn from(val: u32) -> CompilerOptimizationLevel

Converts to this type from the input type.
Source§

impl PartialEq for CompilerOptimizationLevel

Source§

fn eq(&self, other: &CompilerOptimizationLevel) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for CompilerOptimizationLevel

Source§

impl Eq for CompilerOptimizationLevel

Source§

impl StructuralPartialEq for CompilerOptimizationLevel

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/enum.CompilerOutputFormat.html b/wasmedge_types/enum.CompilerOutputFormat.html new file mode 100644 index 000000000..8cfdb1483 --- /dev/null +++ b/wasmedge_types/enum.CompilerOutputFormat.html @@ -0,0 +1,20 @@ +CompilerOutputFormat in wasmedge_types - Rust
wasmedge_types

Enum CompilerOutputFormat

Source
pub enum CompilerOutputFormat {
+    Native,
+    Wasm,
+}
Expand description

Defines WasmEdge AOT compiler output binary format.

+

Variants§

§

Native

Native dynamic library format.

+
§

Wasm

WebAssembly with AOT compiled codes in custom sections.

+

Trait Implementations§

Source§

impl Clone for CompilerOutputFormat

Source§

fn clone(&self) -> CompilerOutputFormat

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompilerOutputFormat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<CompilerOutputFormat> for i32

Source§

fn from(val: CompilerOutputFormat) -> i32

Converts to this type from the input type.
Source§

impl From<CompilerOutputFormat> for u32

Source§

fn from(val: CompilerOutputFormat) -> u32

Converts to this type from the input type.
Source§

impl From<i32> for CompilerOutputFormat

Source§

fn from(val: i32) -> CompilerOutputFormat

Converts to this type from the input type.
Source§

impl From<u32> for CompilerOutputFormat

Source§

fn from(val: u32) -> CompilerOutputFormat

Converts to this type from the input type.
Source§

impl PartialEq for CompilerOutputFormat

Source§

fn eq(&self, other: &CompilerOutputFormat) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for CompilerOutputFormat

Source§

impl Eq for CompilerOutputFormat

Source§

impl StructuralPartialEq for CompilerOutputFormat

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/enum.ExternalInstanceType.html b/wasmedge_types/enum.ExternalInstanceType.html new file mode 100644 index 000000000..6cc2e318b --- /dev/null +++ b/wasmedge_types/enum.ExternalInstanceType.html @@ -0,0 +1,25 @@ +ExternalInstanceType in wasmedge_types - Rust
wasmedge_types

Enum ExternalInstanceType

Source
pub enum ExternalInstanceType {
+    Func(FuncType),
+    Table(TableType),
+    Memory(MemoryType),
+    Global(GlobalType),
+}
Expand description

Defines the type of external WasmEdge instances.

+

Variants§

§

Func(FuncType)

A WasmEdge instance that is a WasmEdge Func.

+
§

Table(TableType)

A WasmEdge instance that is a WasmEdge Table.

+
§

Memory(MemoryType)

A WasmEdge instance that is a WasmEdge Memory.

+
§

Global(GlobalType)

A WasmEdge instance that is a WasmEdge Global.

+

Trait Implementations§

Source§

impl Clone for ExternalInstanceType

Source§

fn clone(&self) -> ExternalInstanceType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExternalInstanceType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ExternalInstanceType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<i32> for ExternalInstanceType

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for ExternalInstanceType

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ExternalInstanceType

Source§

fn eq(&self, other: &ExternalInstanceType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for ExternalInstanceType

Source§

impl StructuralPartialEq for ExternalInstanceType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/enum.HostRegistration.html b/wasmedge_types/enum.HostRegistration.html new file mode 100644 index 000000000..cb467ce75 --- /dev/null +++ b/wasmedge_types/enum.HostRegistration.html @@ -0,0 +1,26 @@ +HostRegistration in wasmedge_types - Rust
wasmedge_types

Enum HostRegistration

Source
pub enum HostRegistration {
+    Wasi,
+    WasmEdgeProcess,
+    WasiNn,
+    WasiCryptoCommon,
+    WasiCryptoAsymmetricCommon,
+    WasiCryptoKx,
+    WasiCryptoSignatures,
+    WasiCryptoSymmetric,
+}
Expand description

Defines WasmEdge host module registration enum.

+

Variants§

§

Wasi

§

WasmEdgeProcess

§

WasiNn

§

WasiCryptoCommon

§

WasiCryptoAsymmetricCommon

§

WasiCryptoKx

§

WasiCryptoSignatures

§

WasiCryptoSymmetric

Trait Implementations§

Source§

impl Clone for HostRegistration

Source§

fn clone(&self) -> HostRegistration

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HostRegistration

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<HostRegistration> for u32

Source§

fn from(val: HostRegistration) -> u32

Converts to this type from the input type.
Source§

impl From<u32> for HostRegistration

Source§

fn from(val: u32) -> Self

Converts to this type from the input type.
Source§

impl Hash for HostRegistration

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for HostRegistration

Source§

fn eq(&self, other: &HostRegistration) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for HostRegistration

Source§

impl Eq for HostRegistration

Source§

impl StructuralPartialEq for HostRegistration

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/enum.Mutability.html b/wasmedge_types/enum.Mutability.html new file mode 100644 index 000000000..3f67a8a8f --- /dev/null +++ b/wasmedge_types/enum.Mutability.html @@ -0,0 +1,21 @@ +Mutability in wasmedge_types - Rust
wasmedge_types

Enum Mutability

Source
pub enum Mutability {
+    Const,
+    Var,
+}
Expand description

Defines the mutability property of WasmEdge Global variables.

+

Mutability determines the mutability property of a WasmEdge Global variable is either mutable or immutable.

+

Variants§

§

Const

Identifies an immutable global variable.

+
§

Var

Identifies a mutable global variable.

+

Trait Implementations§

Source§

impl Clone for Mutability

Source§

fn clone(&self) -> Mutability

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Mutability

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Mutability> for i32

Source§

fn from(value: Mutability) -> Self

Converts to this type from the input type.
Source§

impl From<Mutability> for u32

Source§

fn from(value: Mutability) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Mutability

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Mutability

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Mutability

Source§

fn eq(&self, other: &Mutability) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for Mutability

Source§

impl Eq for Mutability

Source§

impl StructuralPartialEq for Mutability

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/enum.NeverType.html b/wasmedge_types/enum.NeverType.html new file mode 100644 index 000000000..a63caa9bd --- /dev/null +++ b/wasmedge_types/enum.NeverType.html @@ -0,0 +1,14 @@ +NeverType in wasmedge_types - Rust
wasmedge_types

Enum NeverType

Source
pub enum NeverType {}
Expand description

This is a workaround solution to the never type in Rust. It will be replaced by ! once it is stable.

+

Trait Implementations§

Source§

impl Clone for NeverType

Source§

fn clone(&self) -> NeverType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NeverType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Send for NeverType

Source§

impl Sync for NeverType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/enum.RefType.html b/wasmedge_types/enum.RefType.html new file mode 100644 index 000000000..22cfe6b50 --- /dev/null +++ b/wasmedge_types/enum.RefType.html @@ -0,0 +1,20 @@ +RefType in wasmedge_types - Rust
wasmedge_types

Enum RefType

Source
pub enum RefType {
+    FuncRef,
+    ExternRef,
+}
Expand description

Defines WasmEdge reference types.

+

Variants§

§

FuncRef

Refers to the infinite union of all references to host functions, regardless of their function types.

+
§

ExternRef

Refers to the infinite union of all references to objects and that can be passed into WebAssembly under this type.

+

Trait Implementations§

Source§

impl Clone for RefType

Source§

fn clone(&self) -> RefType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RefType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<RefType> for ValType

Source§

fn from(value: RefType) -> Self

Converts to this type from the input type.
Source§

impl From<ValType> for RefType

Source§

fn from(value: ValType) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for RefType

Source§

fn eq(&self, other: &RefType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for RefType

Source§

impl Eq for RefType

Source§

impl StructuralPartialEq for RefType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/enum.ValType.html b/wasmedge_types/enum.ValType.html new file mode 100644 index 000000000..6eb3c1ba6 --- /dev/null +++ b/wasmedge_types/enum.ValType.html @@ -0,0 +1,36 @@ +ValType in wasmedge_types - Rust
wasmedge_types

Enum ValType

Source
pub enum ValType {
+    I32,
+    I64,
+    F32,
+    F64,
+    V128,
+    FuncRef,
+    ExternRef,
+    UnsupportedRef,
+}
Expand description

Defines WasmEdge value types.

+

Variants§

§

I32

32-bit integer.

+

Integers are not inherently signed or unsigned, their interpretation is determined by individual operations.

+
§

I64

64-bit integer.

+

Integers are not inherently signed or unsigned, their interpretation is determined by individual operations.

+
§

F32

32-bit floating-point data as defined by the IEEE 754-2019.

+
§

F64

64-bit floating-point data as defined by the IEEE 754-2019.

+
§

V128

128-bit vector of packed integer or floating-point data.

+

The packed data can be interpreted as signed or unsigned integers, single or double precision floating-point +values, or a single 128 bit type. The interpretation is determined by individual operations.

+
§

FuncRef

A reference to a host function.

+
§

ExternRef

A reference to object.

+
§

UnsupportedRef

A reference that unsupported by c-api.

+

Trait Implementations§

Source§

impl Clone for ValType

Source§

fn clone(&self) -> ValType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ValType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<RefType> for ValType

Source§

fn from(value: RefType) -> Self

Converts to this type from the input type.
Source§

impl From<ValType> for RefType

Source§

fn from(value: ValType) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ValType

Source§

fn eq(&self, other: &ValType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Copy for ValType

Source§

impl Eq for ValType

Source§

impl StructuralPartialEq for ValType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.CoreCommonError.html b/wasmedge_types/error/enum.CoreCommonError.html new file mode 100644 index 000000000..cff9d88da --- /dev/null +++ b/wasmedge_types/error/enum.CoreCommonError.html @@ -0,0 +1,29 @@ +CoreCommonError in wasmedge_types::error - Rust
wasmedge_types::error

Enum CoreCommonError

Source
pub enum CoreCommonError {
+    Terminated,
+    RuntimeError,
+    CostLimitExceeded,
+    WrongVMWorkflow,
+    FuncNotFound,
+    AOTDisabled,
+    Interrupted,
+    UserDefError,
+    NotValidated,
+    NonNullRequired,
+    SetValueToConst,
+    SetValueErrorType,
+}
Expand description

The error type for the common errors from WasmEdge Core.

+

Variants§

§

Terminated

§

RuntimeError

§

CostLimitExceeded

§

WrongVMWorkflow

§

FuncNotFound

§

AOTDisabled

§

Interrupted

§

UserDefError

§

NotValidated

§

NonNullRequired

§

SetValueToConst

§

SetValueErrorType

Trait Implementations§

Source§

impl Clone for CoreCommonError

Source§

fn clone(&self) -> CoreCommonError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreCommonError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CoreCommonError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CoreCommonError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CoreCommonError

Source§

fn eq(&self, other: &CoreCommonError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreCommonError

Source§

impl StructuralPartialEq for CoreCommonError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.CoreComponentError.html b/wasmedge_types/error/enum.CoreComponentError.html new file mode 100644 index 000000000..bdbd9ae00 --- /dev/null +++ b/wasmedge_types/error/enum.CoreComponentError.html @@ -0,0 +1,29 @@ +CoreComponentError in wasmedge_types::error - Rust
wasmedge_types::error

Enum CoreComponentError

Source
pub enum CoreComponentError {
+    MalformedSort,
+    MalformedAliasTarget,
+    MalformedCoreInstance,
+    MalformedInstance,
+    MalformedDefType,
+    MalformedRecordType,
+    MalformedVariantType,
+    MalformedTupleType,
+    MalformedFlagsType,
+    MalformedCanonical,
+    UnknownCanonicalOption,
+    MalformedName,
+}
Expand description

The error type for the component model phase from WasmEdge Core.

+

Variants§

§

MalformedSort

§

MalformedAliasTarget

§

MalformedCoreInstance

§

MalformedInstance

§

MalformedDefType

§

MalformedRecordType

§

MalformedVariantType

§

MalformedTupleType

§

MalformedFlagsType

§

MalformedCanonical

§

UnknownCanonicalOption

§

MalformedName

Trait Implementations§

Source§

impl Clone for CoreComponentError

Source§

fn clone(&self) -> CoreComponentError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreComponentError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CoreComponentError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CoreComponentError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CoreComponentError

Source§

fn eq(&self, other: &CoreComponentError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreComponentError

Source§

impl StructuralPartialEq for CoreComponentError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.CoreError.html b/wasmedge_types/error/enum.CoreError.html new file mode 100644 index 000000000..2591db24a --- /dev/null +++ b/wasmedge_types/error/enum.CoreError.html @@ -0,0 +1,24 @@ +CoreError in wasmedge_types::error - Rust
wasmedge_types::error

Enum CoreError

Source
pub enum CoreError {
+    Common(CoreCommonError),
+    Load(CoreLoadError),
+    Validation(CoreValidationError),
+    Instantiation(CoreInstantiationError),
+    Execution(CoreExecutionError),
+    Component(CoreComponentError),
+    UnknownError(u32),
+}
Expand description

The error types raised by WasmEdge Core.

+

Variants§

Trait Implementations§

Source§

impl Clone for CoreError

Source§

fn clone(&self) -> CoreError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CoreError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CoreError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CoreError> for WasmEdgeError

Source§

fn from(source: CoreError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for CoreError

Source§

fn eq(&self, other: &CoreError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreError

Source§

impl StructuralPartialEq for CoreError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.CoreExecutionError.html b/wasmedge_types/error/enum.CoreExecutionError.html new file mode 100644 index 000000000..5682aacdf --- /dev/null +++ b/wasmedge_types/error/enum.CoreExecutionError.html @@ -0,0 +1,41 @@ +CoreExecutionError in wasmedge_types::error - Rust
wasmedge_types::error

Enum CoreExecutionError

Source
pub enum CoreExecutionError {
+
Show 24 variants WrongInstanceAddress, + WrongInstanceIndex, + InstrTypeMismatch, + FuncSigMismatch, + DivideByZero, + IntegerOverflow, + InvalidConvToInt, + TableOutOfBounds, + MemoryOutOfBounds, + ArrayOutOfBounds, + Unreachable, + UninitializedElement, + UndefinedElement, + IndirectCallTypeMismatch, + HostFuncFailed, + RefTypeMismatch, + UnalignedAtomicAccess, + ExpectSharedMemory, + CastNullToNonNull, + AccessNullFunc, + AccessNullStruct, + AccessNullArray, + AccessNullI31, + CastFailed, +
}
Expand description

The error type for the execution phase from WasmEdge Core.

+

Variants§

§

WrongInstanceAddress

§

WrongInstanceIndex

§

InstrTypeMismatch

§

FuncSigMismatch

§

DivideByZero

§

IntegerOverflow

§

InvalidConvToInt

§

TableOutOfBounds

§

MemoryOutOfBounds

§

ArrayOutOfBounds

§

Unreachable

§

UninitializedElement

§

UndefinedElement

§

IndirectCallTypeMismatch

§

HostFuncFailed

§

RefTypeMismatch

§

UnalignedAtomicAccess

§

ExpectSharedMemory

§

CastNullToNonNull

§

AccessNullFunc

§

AccessNullStruct

§

AccessNullArray

§

AccessNullI31

§

CastFailed

Trait Implementations§

Source§

impl Clone for CoreExecutionError

Source§

fn clone(&self) -> CoreExecutionError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreExecutionError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CoreExecutionError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CoreExecutionError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CoreExecutionError

Source§

fn eq(&self, other: &CoreExecutionError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreExecutionError

Source§

impl StructuralPartialEq for CoreExecutionError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.CoreInstantiationError.html b/wasmedge_types/error/enum.CoreInstantiationError.html new file mode 100644 index 000000000..f52581a8c --- /dev/null +++ b/wasmedge_types/error/enum.CoreInstantiationError.html @@ -0,0 +1,22 @@ +CoreInstantiationError in wasmedge_types::error - Rust
wasmedge_types::error

Enum CoreInstantiationError

Source
pub enum CoreInstantiationError {
+    ModuleNameConflict,
+    IncompatibleImportType,
+    UnknownImport,
+    DataSegDoesNotFit,
+    ElemSegDoesNotFit,
+}
Expand description

The error type for the instantiation phase from WasmEdge Core.

+

Variants§

§

ModuleNameConflict

§

IncompatibleImportType

§

UnknownImport

§

DataSegDoesNotFit

§

ElemSegDoesNotFit

Trait Implementations§

Source§

impl Clone for CoreInstantiationError

Source§

fn clone(&self) -> CoreInstantiationError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreInstantiationError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CoreInstantiationError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CoreInstantiationError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CoreInstantiationError

Source§

fn eq(&self, other: &CoreInstantiationError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreInstantiationError

Source§

impl StructuralPartialEq for CoreInstantiationError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.CoreLoadError.html b/wasmedge_types/error/enum.CoreLoadError.html new file mode 100644 index 000000000..3f23408c8 --- /dev/null +++ b/wasmedge_types/error/enum.CoreLoadError.html @@ -0,0 +1,45 @@ +CoreLoadError in wasmedge_types::error - Rust
wasmedge_types::error

Enum CoreLoadError

Source
pub enum CoreLoadError {
+
Show 28 variants IllegalPath, + ReadError, + UnexpectedEnd, + MalformedMagic, + MalformedVersion, + MalformedSection, + SectionSizeMismatch, + LengthOutOfBounds, + JunkSection, + IncompatibleFuncCode, + IncompatibleDataCount, + DataCountRequired, + MalformedImportKind, + MalformedExportKind, + ExpectedZeroByte, + InvalidMut, + TooManyLocals, + MalformedValType, + MalformedElemType, + MalformedRefType, + MalformedUTF8, + IntegerTooLarge, + IntegerTooLong, + IllegalOpCode, + IllegalGrammar, + SharedMemoryNoMax, + IntrinsicsTableNotFound, + MalformedTable, +
}
Expand description

The error type for the load phase from WasmEdge Core.

+

Variants§

§

IllegalPath

§

ReadError

§

UnexpectedEnd

§

MalformedMagic

§

MalformedVersion

§

MalformedSection

§

SectionSizeMismatch

§

LengthOutOfBounds

§

JunkSection

§

IncompatibleFuncCode

§

IncompatibleDataCount

§

DataCountRequired

§

MalformedImportKind

§

MalformedExportKind

§

ExpectedZeroByte

§

InvalidMut

§

TooManyLocals

§

MalformedValType

§

MalformedElemType

§

MalformedRefType

§

MalformedUTF8

§

IntegerTooLarge

§

IntegerTooLong

§

IllegalOpCode

§

IllegalGrammar

§

SharedMemoryNoMax

§

IntrinsicsTableNotFound

§

MalformedTable

Trait Implementations§

Source§

impl Clone for CoreLoadError

Source§

fn clone(&self) -> CoreLoadError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreLoadError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CoreLoadError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CoreLoadError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CoreLoadError

Source§

fn eq(&self, other: &CoreLoadError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreLoadError

Source§

impl StructuralPartialEq for CoreLoadError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.CoreValidationError.html b/wasmedge_types/error/enum.CoreValidationError.html new file mode 100644 index 000000000..04db9a194 --- /dev/null +++ b/wasmedge_types/error/enum.CoreValidationError.html @@ -0,0 +1,53 @@ +CoreValidationError in wasmedge_types::error - Rust
wasmedge_types::error

Enum CoreValidationError

Source
pub enum CoreValidationError {
+
Show 36 variants InvalidAlignment, + TypeCheckFailed, + InvalidLabelIdx, + InvalidLocalIdx, + InvalidFieldIdx, + InvalidFuncTypeIdx, + InvalidFuncIdx, + InvalidTableIdx, + InvalidMemoryIdx, + InvalidGlobalIdx, + InvalidElemIdx, + InvalidDataIdx, + InvalidRefIdx, + ConstExprRequired, + DupExportName, + ImmutableGlobal, + ImmutableField, + ImmutableArray, + InvalidResultArity, + MultiTables, + MultiMemories, + InvalidLimit, + InvalidMemPages, + InvalidStartFunc, + InvalidLaneIdx, + InvalidUninitLocal, + InvalidNotDefaultableField, + InvalidNotDefaultableArray, + InvalidPackedField, + InvalidPackedArray, + InvalidUnpackedField, + InvalidUnpackedArray, + InvalidBrRefType, + ArrayTypesMismatch, + ArrayTypesNumtypeRequired, + InvalidSubType, +
}
Expand description

The error type for the validation phase from WasmEdge Core.

+

Variants§

§

InvalidAlignment

§

TypeCheckFailed

§

InvalidLabelIdx

§

InvalidLocalIdx

§

InvalidFieldIdx

§

InvalidFuncTypeIdx

§

InvalidFuncIdx

§

InvalidTableIdx

§

InvalidMemoryIdx

§

InvalidGlobalIdx

§

InvalidElemIdx

§

InvalidDataIdx

§

InvalidRefIdx

§

ConstExprRequired

§

DupExportName

§

ImmutableGlobal

§

ImmutableField

§

ImmutableArray

§

InvalidResultArity

§

MultiTables

§

MultiMemories

§

InvalidLimit

§

InvalidMemPages

§

InvalidStartFunc

§

InvalidLaneIdx

§

InvalidUninitLocal

§

InvalidNotDefaultableField

§

InvalidNotDefaultableArray

§

InvalidPackedField

§

InvalidPackedArray

§

InvalidUnpackedField

§

InvalidUnpackedArray

§

InvalidBrRefType

§

ArrayTypesMismatch

§

ArrayTypesNumtypeRequired

§

InvalidSubType

Trait Implementations§

Source§

impl Clone for CoreValidationError

Source§

fn clone(&self) -> CoreValidationError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreValidationError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CoreValidationError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CoreValidationError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CoreValidationError

Source§

fn eq(&self, other: &CoreValidationError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for CoreValidationError

Source§

impl StructuralPartialEq for CoreValidationError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.ExportError.html b/wasmedge_types/error/enum.ExportError.html new file mode 100644 index 000000000..2cb4728ac --- /dev/null +++ b/wasmedge_types/error/enum.ExportError.html @@ -0,0 +1,25 @@ +ExportError in wasmedge_types::error - Rust
wasmedge_types::error

Enum ExportError

Source
pub enum ExportError {
+    Type {
+        expected: ExternalInstanceType,
+        actual: ExternalInstanceType,
+    },
+    FuncType(String),
+    TableType(String),
+    MemType(String),
+    GlobalType(String),
+}
Expand description

The error types for WasmEdge ExportType.

+

Variants§

§

Type

§

FuncType(String)

§

TableType(String)

§

MemType(String)

§

GlobalType(String)

Trait Implementations§

Source§

impl Clone for ExportError

Source§

fn clone(&self) -> ExportError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExportError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ExportError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ExportError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ExportError> for WasmEdgeError

Source§

fn from(source: ExportError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ExportError

Source§

fn eq(&self, other: &ExportError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for ExportError

Source§

impl StructuralPartialEq for ExportError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.FuncError.html b/wasmedge_types/error/enum.FuncError.html new file mode 100644 index 000000000..29dc21a4b --- /dev/null +++ b/wasmedge_types/error/enum.FuncError.html @@ -0,0 +1,20 @@ +FuncError in wasmedge_types::error - Rust
wasmedge_types::error

Enum FuncError

Source
pub enum FuncError {
+    Create,
+    CreateBinding(String),
+    Type,
+}
Expand description

The error types for WasmEdge Function.

+

Variants§

§

Create

§

CreateBinding(String)

§

Type

Trait Implementations§

Source§

impl Clone for FuncError

Source§

fn clone(&self) -> FuncError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FuncError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FuncError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for FuncError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<FuncError> for WasmEdgeError

Source§

fn from(source: FuncError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for FuncError

Source§

fn eq(&self, other: &FuncError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for FuncError

Source§

impl StructuralPartialEq for FuncError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.GlobalError.html b/wasmedge_types/error/enum.GlobalError.html new file mode 100644 index 000000000..8fe2d6225 --- /dev/null +++ b/wasmedge_types/error/enum.GlobalError.html @@ -0,0 +1,21 @@ +GlobalError in wasmedge_types::error - Rust
wasmedge_types::error

Enum GlobalError

Source
pub enum GlobalError {
+    Create,
+    Type,
+    ModifyConst,
+    UnmatchedValType,
+}
Expand description

The error types for WasmEdge Global.

+

Variants§

§

Create

§

Type

§

ModifyConst

§

UnmatchedValType

Trait Implementations§

Source§

impl Clone for GlobalError

Source§

fn clone(&self) -> GlobalError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GlobalError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for GlobalError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for GlobalError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<GlobalError> for WasmEdgeError

Source§

fn from(source: GlobalError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for GlobalError

Source§

fn eq(&self, other: &GlobalError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for GlobalError

Source§

impl StructuralPartialEq for GlobalError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.HostFuncError.html b/wasmedge_types/error/enum.HostFuncError.html new file mode 100644 index 000000000..7424c5e9a --- /dev/null +++ b/wasmedge_types/error/enum.HostFuncError.html @@ -0,0 +1,19 @@ +HostFuncError in wasmedge_types::error - Rust
wasmedge_types::error

Enum HostFuncError

Source
pub enum HostFuncError {
+    User(u32),
+    Runtime(u32),
+}
Expand description

The error type for the host function definition.

+

Variants§

§

User(u32)

§

Runtime(u32)

Trait Implementations§

Source§

impl Clone for HostFuncError

Source§

fn clone(&self) -> HostFuncError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HostFuncError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for HostFuncError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for HostFuncError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for HostFuncError

Source§

fn eq(&self, other: &HostFuncError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for HostFuncError

Source§

impl StructuralPartialEq for HostFuncError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.ImportError.html b/wasmedge_types/error/enum.ImportError.html new file mode 100644 index 000000000..36f5ecfcd --- /dev/null +++ b/wasmedge_types/error/enum.ImportError.html @@ -0,0 +1,25 @@ +ImportError in wasmedge_types::error - Rust
wasmedge_types::error

Enum ImportError

Source
pub enum ImportError {
+    Type {
+        expected: ExternalInstanceType,
+        actual: ExternalInstanceType,
+    },
+    FuncType(String),
+    TableType(String),
+    MemType(String),
+    GlobalType(String),
+}
Expand description

The error types for WasmEdge ImportType.

+

Variants§

§

Type

§

FuncType(String)

§

TableType(String)

§

MemType(String)

§

GlobalType(String)

Trait Implementations§

Source§

impl Clone for ImportError

Source§

fn clone(&self) -> ImportError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ImportError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ImportError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ImportError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ImportError> for WasmEdgeError

Source§

fn from(source: ImportError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ImportError

Source§

fn eq(&self, other: &ImportError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for ImportError

Source§

impl StructuralPartialEq for ImportError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.InstanceError.html b/wasmedge_types/error/enum.InstanceError.html new file mode 100644 index 000000000..ecaed81b3 --- /dev/null +++ b/wasmedge_types/error/enum.InstanceError.html @@ -0,0 +1,26 @@ +InstanceError in wasmedge_types::error - Rust
wasmedge_types::error

Enum InstanceError

Source
pub enum InstanceError {
+    Create,
+    CreateWasi,
+    CreateWasmEdgeProcess,
+    CreateImportModule,
+    NotFoundFunc(String),
+    NotFoundTable(String),
+    NotFoundMem(String),
+    NotFoundGlobal(String),
+    NotFoundMappedFdHandler,
+}
Expand description

The error types for WasmEdge Instance.

+

Variants§

§

Create

§

CreateWasi

§

CreateWasmEdgeProcess

§

CreateImportModule

§

NotFoundFunc(String)

§

NotFoundTable(String)

§

NotFoundMem(String)

§

NotFoundGlobal(String)

§

NotFoundMappedFdHandler

Trait Implementations§

Source§

impl Clone for InstanceError

Source§

fn clone(&self) -> InstanceError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InstanceError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for InstanceError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for InstanceError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<InstanceError> for WasmEdgeError

Source§

fn from(source: InstanceError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for InstanceError

Source§

fn eq(&self, other: &InstanceError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for InstanceError

Source§

impl StructuralPartialEq for InstanceError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.MemError.html b/wasmedge_types/error/enum.MemError.html new file mode 100644 index 000000000..a41963513 --- /dev/null +++ b/wasmedge_types/error/enum.MemError.html @@ -0,0 +1,23 @@ +MemError in wasmedge_types::error - Rust
wasmedge_types::error

Enum MemError

Source
pub enum MemError {
+    Create,
+    CreateSharedType,
+    Type,
+    ConstPtr,
+    MutPtr,
+    Ptr2Ref,
+}
Expand description

The error types for WasmEdge Memory.

+

Variants§

§

Create

§

CreateSharedType

§

Type

§

ConstPtr

§

MutPtr

§

Ptr2Ref

Trait Implementations§

Source§

impl Clone for MemError

Source§

fn clone(&self) -> MemError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MemError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for MemError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for MemError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<MemError> for WasmEdgeError

Source§

fn from(source: MemError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for MemError

Source§

fn eq(&self, other: &MemError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for MemError

Source§

impl StructuralPartialEq for MemError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.PluginError.html b/wasmedge_types/error/enum.PluginError.html new file mode 100644 index 000000000..9b75ef089 --- /dev/null +++ b/wasmedge_types/error/enum.PluginError.html @@ -0,0 +1,19 @@ +PluginError in wasmedge_types::error - Rust
wasmedge_types::error

Enum PluginError

Source
pub enum PluginError {
+    Create(String),
+    NotFound(String),
+}
Expand description

The error types for WasmEdge plugin.

+

Variants§

§

Create(String)

§

NotFound(String)

Trait Implementations§

Source§

impl Clone for PluginError

Source§

fn clone(&self) -> PluginError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PluginError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for PluginError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for PluginError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<PluginError> for WasmEdgeError

Source§

fn from(source: PluginError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for PluginError

Source§

fn eq(&self, other: &PluginError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for PluginError

Source§

impl StructuralPartialEq for PluginError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.StoreError.html b/wasmedge_types/error/enum.StoreError.html new file mode 100644 index 000000000..3c887c584 --- /dev/null +++ b/wasmedge_types/error/enum.StoreError.html @@ -0,0 +1,40 @@ +StoreError in wasmedge_types::error - Rust
wasmedge_types::error

Enum StoreError

Source
pub enum StoreError {
+    Create,
+    NotFoundFunc(String),
+    NotFoundFuncRegistered {
+        func_name: String,
+        mod_name: String,
+    },
+    NotFoundTable(String),
+    NotFoundTableRegistered {
+        table_name: String,
+        mod_name: String,
+    },
+    NotFoundMem(String),
+    NotFoundMemRegistered {
+        mem_name: String,
+        mod_name: String,
+    },
+    NotFoundGlobal(String),
+    NotFoundGlobalRegistered {
+        global_name: String,
+        mod_name: String,
+    },
+    NotFoundModule(String),
+    NotFoundActiveModule,
+}
Expand description

The error types for WasmEdge Store.

+

Variants§

§

Create

§

NotFoundFunc(String)

§

NotFoundFuncRegistered

Fields

§func_name: String
§mod_name: String
§

NotFoundTable(String)

§

NotFoundTableRegistered

Fields

§table_name: String
§mod_name: String
§

NotFoundMem(String)

§

NotFoundMemRegistered

Fields

§mem_name: String
§mod_name: String
§

NotFoundGlobal(String)

§

NotFoundGlobalRegistered

Fields

§global_name: String
§mod_name: String
§

NotFoundModule(String)

§

NotFoundActiveModule

Trait Implementations§

Source§

impl Clone for StoreError

Source§

fn clone(&self) -> StoreError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StoreError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for StoreError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for StoreError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<StoreError> for WasmEdgeError

Source§

fn from(source: StoreError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for StoreError

Source§

fn eq(&self, other: &StoreError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for StoreError

Source§

impl StructuralPartialEq for StoreError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.TableError.html b/wasmedge_types/error/enum.TableError.html new file mode 100644 index 000000000..5143fc655 --- /dev/null +++ b/wasmedge_types/error/enum.TableError.html @@ -0,0 +1,19 @@ +TableError in wasmedge_types::error - Rust
wasmedge_types::error

Enum TableError

Source
pub enum TableError {
+    Create,
+    Type,
+}
Expand description

The error types for WasmEdge Table.

+

Variants§

§

Create

§

Type

Trait Implementations§

Source§

impl Clone for TableError

Source§

fn clone(&self) -> TableError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TableError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for TableError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for TableError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<TableError> for WasmEdgeError

Source§

fn from(source: TableError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for TableError

Source§

fn eq(&self, other: &TableError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for TableError

Source§

impl StructuralPartialEq for TableError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.VmError.html b/wasmedge_types/error/enum.VmError.html new file mode 100644 index 000000000..7ad842af4 --- /dev/null +++ b/wasmedge_types/error/enum.VmError.html @@ -0,0 +1,39 @@ +VmError in wasmedge_types::error - Rust
wasmedge_types::error

Enum VmError

Source
pub enum VmError {
+
Show 22 variants Create, + CreateWithWasiContext, + NotFoundFuncType(String), + NotFoundModule(String), + NotFoundWasiModule, + NotFoundWasmEdgeProcessModule, + NotFoundWasiNnModule, + NotFoundWasiCryptoCommonModule, + NotFoundWasiCryptoAsymmetricCommonModule, + NotFoundWasiCryptoSymmetricModule, + NotFoundWasiCryptoKxModule, + NotFoundWasiCryptoSignaturesModule, + NotFoundStore, + NotFoundStatistics, + NotFoundImportModule(String), + DuplicateImportModule(String), + DuplicateModuleInstance(String), + NotFoundLoader, + NotFoundValidator, + NotFoundExecutor, + InvalidImportModule, + NotFoundActiveModule, +
}
Expand description

The error types for WasmEdge Vm.

+

Variants§

§

Create

§

CreateWithWasiContext

§

NotFoundFuncType(String)

§

NotFoundModule(String)

§

NotFoundWasiModule

§

NotFoundWasmEdgeProcessModule

§

NotFoundWasiNnModule

§

NotFoundWasiCryptoCommonModule

§

NotFoundWasiCryptoAsymmetricCommonModule

§

NotFoundWasiCryptoSymmetricModule

§

NotFoundWasiCryptoKxModule

§

NotFoundWasiCryptoSignaturesModule

§

NotFoundStore

§

NotFoundStatistics

§

NotFoundImportModule(String)

§

DuplicateImportModule(String)

§

DuplicateModuleInstance(String)

§

NotFoundLoader

§

NotFoundValidator

§

NotFoundExecutor

§

InvalidImportModule

§

NotFoundActiveModule

Trait Implementations§

Source§

impl Clone for VmError

Source§

fn clone(&self) -> VmError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VmError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for VmError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for VmError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<VmError> for WasmEdgeError

Source§

fn from(source: VmError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for VmError

Source§

fn eq(&self, other: &VmError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for VmError

Source§

impl StructuralPartialEq for VmError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/enum.WasmEdgeError.html b/wasmedge_types/error/enum.WasmEdgeError.html new file mode 100644 index 000000000..9413a3422 --- /dev/null +++ b/wasmedge_types/error/enum.WasmEdgeError.html @@ -0,0 +1,49 @@ +WasmEdgeError in wasmedge_types::error - Rust
wasmedge_types::error

Enum WasmEdgeError

Source
pub enum WasmEdgeError {
+
Show 31 variants Operation(String), + User(u32), + Core(CoreError), + ImportObjCreate, + ExecutorCreate, + Store(StoreError), + StatisticsCreate, + ModuleCreate, + LoaderCreate, + ConfigCreate, + CompilerCreate, + ValidatorCreate, + Vm(VmError), + Func(FuncError), + FuncTypeCreate, + ExecuteTimeout, + Mem(MemError), + MemTypeCreate, + Global(GlobalError), + GlobalTypeCreate, + Table(TableError), + TableTypeCreate, + Import(ImportError), + Export(ExportError), + Instance(InstanceError), + Plugin(PluginError), + FoundNulByte(NulError), + NotFoundNulByte(FromBytesWithNulError), + Utf8(Utf8Error), + FromUtf8(FromUtf8Error), + WindowsPathConversion(String), +
}
Expand description

The error types used by both wasmedge-sys and wasmedge crates.

+

Variants§

§

Operation(String)

§

User(u32)

§

Core(CoreError)

Errors raised by WasmEdge Core.

+
§

ImportObjCreate

§

ExecutorCreate

§

Store(StoreError)

§

StatisticsCreate

§

ModuleCreate

§

LoaderCreate

§

ConfigCreate

§

CompilerCreate

§

ValidatorCreate

§

Vm(VmError)

§

Func(FuncError)

§

FuncTypeCreate

§

ExecuteTimeout

§

Mem(MemError)

§

MemTypeCreate

§

Global(GlobalError)

§

GlobalTypeCreate

§

Table(TableError)

§

TableTypeCreate

§

Import(ImportError)

§

Export(ExportError)

§

Instance(InstanceError)

§

Plugin(PluginError)

§

FoundNulByte(NulError)

§

NotFoundNulByte(FromBytesWithNulError)

§

Utf8(Utf8Error)

§

FromUtf8(FromUtf8Error)

§

WindowsPathConversion(String)

Trait Implementations§

Source§

impl Clone for WasmEdgeError

Source§

fn clone(&self) -> WasmEdgeError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmEdgeError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for WasmEdgeError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for WasmEdgeError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CoreError> for WasmEdgeError

Source§

fn from(source: CoreError) -> Self

Converts to this type from the input type.
Source§

impl From<ExportError> for WasmEdgeError

Source§

fn from(source: ExportError) -> Self

Converts to this type from the input type.
Source§

impl From<FromBytesWithNulError> for WasmEdgeError

Source§

fn from(source: FromBytesWithNulError) -> Self

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for WasmEdgeError

Source§

fn from(source: FromUtf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<FuncError> for WasmEdgeError

Source§

fn from(source: FuncError) -> Self

Converts to this type from the input type.
Source§

impl From<GlobalError> for WasmEdgeError

Source§

fn from(source: GlobalError) -> Self

Converts to this type from the input type.
Source§

impl From<ImportError> for WasmEdgeError

Source§

fn from(source: ImportError) -> Self

Converts to this type from the input type.
Source§

impl From<InstanceError> for WasmEdgeError

Source§

fn from(source: InstanceError) -> Self

Converts to this type from the input type.
Source§

impl From<MemError> for WasmEdgeError

Source§

fn from(source: MemError) -> Self

Converts to this type from the input type.
Source§

impl From<NulError> for WasmEdgeError

Source§

fn from(source: NulError) -> Self

Converts to this type from the input type.
Source§

impl From<PluginError> for WasmEdgeError

Source§

fn from(source: PluginError) -> Self

Converts to this type from the input type.
Source§

impl From<StoreError> for WasmEdgeError

Source§

fn from(source: StoreError) -> Self

Converts to this type from the input type.
Source§

impl From<TableError> for WasmEdgeError

Source§

fn from(source: TableError) -> Self

Converts to this type from the input type.
Source§

impl From<Utf8Error> for WasmEdgeError

Source§

fn from(source: Utf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<VmError> for WasmEdgeError

Source§

fn from(source: VmError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for WasmEdgeError

Source§

fn eq(&self, other: &WasmEdgeError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for WasmEdgeError

Source§

impl StructuralPartialEq for WasmEdgeError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where + T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/error/index.html b/wasmedge_types/error/index.html new file mode 100644 index 000000000..889ed0061 --- /dev/null +++ b/wasmedge_types/error/index.html @@ -0,0 +1,2 @@ +wasmedge_types::error - Rust
wasmedge_types

Module error

Source
Expand description

Defines WasmEdge error types.

+

Enums§

\ No newline at end of file diff --git a/wasmedge_types/error/sidebar-items.js b/wasmedge_types/error/sidebar-items.js new file mode 100644 index 000000000..1435083c3 --- /dev/null +++ b/wasmedge_types/error/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["CoreCommonError","CoreComponentError","CoreError","CoreExecutionError","CoreInstantiationError","CoreLoadError","CoreValidationError","ExportError","FuncError","GlobalError","HostFuncError","ImportError","InstanceError","MemError","PluginError","StoreError","TableError","VmError","WasmEdgeError"]}; \ No newline at end of file diff --git a/wasmedge_types/fn.wat2wasm.html b/wasmedge_types/fn.wat2wasm.html new file mode 100644 index 000000000..2f7a2c355 --- /dev/null +++ b/wasmedge_types/fn.wat2wasm.html @@ -0,0 +1,28 @@ +wat2wasm in wasmedge_types - Rust
wasmedge_types

Function wat2wasm

pub fn wat2wasm(bytes: &[u8]) -> Result<Cow<'_, [u8]>, Error>
Expand description

Parses in-memory bytes as either the WebAssembly Text format, or a binary WebAssembly module. +Parses in-memory bytes as either the WebAssembly Text format, or a +binary WebAssembly module.

+

This function will attempt to interpret the given bytes as one of two +options:

+
    +
  • A utf-8 string which is a *.wat file to be parsed.
  • +
  • A binary WebAssembly file starting with b"\0asm"
  • +
+

If the input is a string then it will be parsed as *.wat, and then after +parsing it will be encoded back into a WebAssembly binary module. If the +input is a binary that starts with b"\0asm" it will be returned verbatim. +Everything that doesn’t start with b"\0asm" will be parsed as a utf-8 +*.wat file, returning errors as appropriate.

+

For more information about parsing wat files, see [parse_str].

+

§Errors

+

In addition to all of the errors that can be returned from [parse_str], +this function will also return an error if the input does not start with +b"\0asm" and is invalid utf-8. (failed to even try to call [parse_str]).

+

§Examples

+
// Parsing bytes that are actually `*.wat` files
+assert_eq!(&*wat::parse_bytes(b"(module)")?, b"\0asm\x01\0\0\0");
+assert!(wat::parse_bytes(b"module").is_err());
+assert!(wat::parse_bytes(b"binary\0file\0\that\0is\0not\0wat").is_err());
+
+// Pass through binaries that look like real wasm files
+assert_eq!(&*wat::parse_bytes(b"\0asm\x01\0\0\0")?, b"\0asm\x01\0\0\0");
+
\ No newline at end of file diff --git a/wasmedge_types/index.html b/wasmedge_types/index.html new file mode 100644 index 000000000..17fff5beb --- /dev/null +++ b/wasmedge_types/index.html @@ -0,0 +1,8 @@ +wasmedge_types - Rust

Crate wasmedge_types

Source
Expand description

The wasmedge-types crate defines a group of common data structures used by both wasmedge-sdk and wasmedge-sys crates.

+

See also

+ +

Modules§

  • Defines WasmEdge error types.

Structs§

Enums§

Functions§

Type Aliases§

\ No newline at end of file diff --git a/wasmedge_types/sidebar-items.js b/wasmedge_types/sidebar-items.js new file mode 100644 index 000000000..cee3992fa --- /dev/null +++ b/wasmedge_types/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["CompilerOptimizationLevel","CompilerOutputFormat","ExternalInstanceType","HostRegistration","Mutability","NeverType","RefType","ValType"],"fn":["wat2wasm"],"mod":["error"],"struct":["FuncType","GlobalType","MemoryType","TableType"],"type":["WasmEdgeResult"]}; \ No newline at end of file diff --git a/wasmedge_types/struct.FuncType.html b/wasmedge_types/struct.FuncType.html new file mode 100644 index 000000000..49b3d83b2 --- /dev/null +++ b/wasmedge_types/struct.FuncType.html @@ -0,0 +1,30 @@ +FuncType in wasmedge_types - Rust
wasmedge_types

Struct FuncType

Source
pub struct FuncType { /* private fields */ }
Expand description

Struct of WasmEdge FuncType.

+

A FuncType is used to declare the types of the parameters and return values of a WasmEdge Func to be created.

+

Implementations§

Source§

impl FuncType

Source

pub fn new(args: Vec<ValType>, returns: Vec<ValType>) -> Self

Creates a new FuncType with the given types of arguments and returns.

+
§Arguments
+
    +
  • +

    args - A vector of ValTypes that represent the types of the arguments.

    +
  • +
  • +

    returns - A vector of ValTypes that represent the types of the returns.

    +
  • +
+
Source

pub fn args(&self) -> &[ValType]

Returns the types of the arguments of a host function.

+
Source

pub fn args_len(&self) -> usize

Returns the number of the arguments of a host function.

+
Source

pub fn returns(&self) -> &[ValType]

Returns the types of the returns of a host function.

+
Source

pub fn returns_len(&self) -> usize

Returns the number of the returns of a host function.

+

Trait Implementations§

Source§

impl Clone for FuncType

Source§

fn clone(&self) -> FuncType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FuncType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FuncType

Source§

fn default() -> FuncType

Returns the “default value” for a type. Read more
Source§

impl PartialEq for FuncType

Source§

fn eq(&self, other: &FuncType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for FuncType

Source§

impl StructuralPartialEq for FuncType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/struct.GlobalType.html b/wasmedge_types/struct.GlobalType.html new file mode 100644 index 000000000..99291c892 --- /dev/null +++ b/wasmedge_types/struct.GlobalType.html @@ -0,0 +1,28 @@ +GlobalType in wasmedge_types - Rust
wasmedge_types

Struct GlobalType

Source
pub struct GlobalType { /* private fields */ }
Expand description

Struct of WasmEdge GlobalType.

+

A GlobalType is used to declare the type of a WasmEdge Global to be created.

+

Implementations§

Source§

impl GlobalType

Source

pub fn new(ty: ValType, mutability: Mutability) -> Self

Creates a new GlobalType with the given value type and mutability.

+
§Arguments
+
    +
  • +

    ty - The value type of the global to be created.

    +
  • +
  • +

    mutability - The value mutability property of the global to be created.

    +
  • +
+
Source

pub fn value_ty(&self) -> ValType

Returns the value type defined in the GlobalType.

+
Source

pub fn mutability(&self) -> Mutability

Returns the value mutability property defined in the GlobalType.

+

Trait Implementations§

Source§

impl Clone for GlobalType

Source§

fn clone(&self) -> GlobalType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GlobalType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GlobalType

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for GlobalType

Source§

fn eq(&self, other: &GlobalType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for GlobalType

Source§

impl StructuralPartialEq for GlobalType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/struct.MemoryType.html b/wasmedge_types/struct.MemoryType.html new file mode 100644 index 000000000..29f04b6d0 --- /dev/null +++ b/wasmedge_types/struct.MemoryType.html @@ -0,0 +1,32 @@ +MemoryType in wasmedge_types - Rust
wasmedge_types

Struct MemoryType

Source
pub struct MemoryType { /* private fields */ }
Expand description

Struct of WasmEdge MemoryType.

+

A MemoryType is used to declare the size range of a WasmEdge Memory to be created.

+

Implementations§

Source§

impl MemoryType

Source

pub fn new(min: u32, max: Option<u32>, shared: bool) -> WasmEdgeResult<Self>

Creates a new MemoryType with the given size range.

+
§Arguments
+
    +
  • +

    min - The minimum size of the memory to be created.

    +
  • +
  • +

    max - The maximum size of the memory to be created. If shared is set to true, max must be set.

    +
  • +
  • +

    shared - Enables shared memory if true.

    +
  • +
+
Source

pub fn minimum(&self) -> u32

Returns the minimum size defined in the MemoryType.

+
Source

pub fn maximum(&self) -> Option<u32>

Returns the maximum size defined in the MemoryType.

+
Source

pub fn shared(&self) -> bool

Returns whether the memory is shared.

+

Trait Implementations§

Source§

impl Clone for MemoryType

Source§

fn clone(&self) -> MemoryType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MemoryType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MemoryType

Source§

fn default() -> MemoryType

Returns the “default value” for a type. Read more
Source§

impl PartialEq for MemoryType

Source§

fn eq(&self, other: &MemoryType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for MemoryType

Source§

impl StructuralPartialEq for MemoryType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/struct.TableType.html b/wasmedge_types/struct.TableType.html new file mode 100644 index 000000000..26529675b --- /dev/null +++ b/wasmedge_types/struct.TableType.html @@ -0,0 +1,32 @@ +TableType in wasmedge_types - Rust
wasmedge_types

Struct TableType

Source
pub struct TableType { /* private fields */ }
Expand description

Struct of WasmEdge TableType.

+

A TableType is used to declare the element type and the size range of a WasmEdge Table to be created.

+

Implementations§

Source§

impl TableType

Source

pub fn new(elem_ty: RefType, min: u32, max: Option<u32>) -> Self

Creates a new TableType with the given element type and the size range.

+
§Arguments
+
    +
  • +

    elem_ty - The element type of the table to be created.

    +
  • +
  • +

    min - The minimum size of the table to be created.

    +
  • +
  • +

    max - The maximum size of the table to be created.

    +
  • +
+
Source

pub fn elem_ty(&self) -> RefType

Returns the element type defined in the TableType.

+
Source

pub fn minimum(&self) -> u32

Returns the minimum size defined in the TableType.

+
Source

pub fn maximum(&self) -> Option<u32>

Returns the maximum size defined in the TableType.

+

Trait Implementations§

Source§

impl Clone for TableType

Source§

fn clone(&self) -> TableType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TableType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TableType

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for TableType

Source§

fn eq(&self, other: &TableType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for TableType

Source§

impl StructuralPartialEq for TableType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/wasmedge_types/type.WasmEdgeResult.html b/wasmedge_types/type.WasmEdgeResult.html new file mode 100644 index 000000000..d695eb2c3 --- /dev/null +++ b/wasmedge_types/type.WasmEdgeResult.html @@ -0,0 +1,7 @@ +WasmEdgeResult in wasmedge_types - Rust
wasmedge_types

Type Alias WasmEdgeResult

Source
pub type WasmEdgeResult<T> = Result<T, Box<WasmEdgeError>>;
Expand description

The WasmEdge result type.

+

Aliased Type§

enum WasmEdgeResult<T> {
+    Ok(T),
+    Err(Box<WasmEdgeError>),
+}

Variants§

§1.0.0

Ok(T)

Contains the success value

+
§1.0.0

Err(Box<WasmEdgeError>)

Contains the error value

+
\ No newline at end of file