pub struct WasmtimeEngineProviderBuilder<'a> { /* private fields */ }
Expand description

Used to build WasmtimeEngineProvider instances.

Implementations

Create a builder instance

Provide contents of the WebAssembly module

Provide a preloaded wasmtime::Module

Warning: the wasmtime::Engine used to load it must be provided via the WasmtimeEngineProviderBuilder::engine method, otherwise the code will panic at runtime later.

Provide a preinitialized wasmtime::Engine

Warning: when used, engine specific options like cache and enable_epoch_interruptions must be pre-configured by the user. WasmtimeEngineProviderBuilder won’t be able to configure them at build time.

WASI params

Enable Wasmtime epoch-based interruptions and set the deadlines to be enforced

Two kind of deadlines have to be set:

  • wapc_init_deadline: the number of ticks the waPC initialization code can take before the code is interrupted. This is the code usually defined inside of the wapc_init/_start functions
  • wapc_func_deadline: the number of ticks any regular waPC guest function can run before its terminated by the host

Both these limits are expressed using the number of ticks that are allowed before the WebAssembly execution is interrupted. It’s up to the embedder of waPC to define how much time a single tick is granted. This could be 1 second, 10 nanoseconds, or whatever the user prefers.

Warning: when providing an instance of wasmtime::Engine via the WasmtimeEngineProvider::engine helper, ensure the wasmtime::Engine has been created with the epoch_interruption feature enabled

Create a WasmtimeEngineProvider instance

Trait Implementations

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Query the “status” flags for the self file descriptor.
Create a new SetFdFlags value for use with set_fd_flags. Read more
Set the “status” flags for the self file descriptor. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more