Struct wasmedge_sdk::plugin::PluginManager
source · pub struct PluginManager {}
Expand description
Defines the API to manage plugins.
Implementations§
source§impl PluginManager
impl PluginManager
sourcepub fn load(path: Option<&Path>) -> WasmEdgeResult<()>
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. IfNone
, then the default plugin path will be used.
sourcepub fn init_wasmedge_process(allowed_cmds: Option<Vec<&str>>, allowed: bool)
pub fn init_wasmedge_process(allowed_cmds: Option<Vec<&str>>, allowed: bool)
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.