pub struct ProcessConfig(_);
Expand description

Process configurations determine permissions of processes.

The functions spawn_config & spawn_link_config can be used to create processes with a specific configuration.

Implementations

Create a new process configuration with all permissions denied.

There is no memory or fuel limit set on the newly created configuration, they are not inherited from parent.

Returns the id of the configuration resource or -1 in case it’s an inherited configuration.

Sets the maximum amount of memory in bytes that can be used by a process.

If a process tries to allocate more memory with memory.grow, the instruction is going to return -1.

Returns the maximum amount of memory in bytes.

Sets the maximum amount of fuel available to the process.

One unit of fuel is approximately 100k wasm instructions. If a process runs out of fuel it will trap.

Returns the maximum amount of fuel.

Sets the ability of a process to compile WebAssembly modules.

Returns true if processes can compile WebAssembly modules.

Sets the ability of a process to create their own sub-configuration.

This setting can be dangerous. If a process is missing a permission, but has the possibility to create new configurations, it can spawn sub-processes using a new config that has the permission enabled.

Returns true if processes can create their own configurations.

Sets the ability of a process to spawn sub-processes.

Returns true if processes can spawn sub-processes.

Adds environment variable.

Adds command line argument.

Mark a directory as pre-opened.

Trait Implementations

Formats the value using the given formatter. 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.

Calls U::from(self).

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

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.