Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
Signed-off-by: Mahfuza <[email protected]>
  • Loading branch information
mhmohona committed Sep 1, 2023
1 parent a62557a commit cee5ffe
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/embed/use-case/plugin/go_sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 3
---

## Using Plug-ins to Extend the Runtime in C
## Using Plug-ins to Extend the Runtime in Go

The WasmEdge plug-ins are the shared libraries to provide the WasmEdge runtime to load and create host module instances. With the plug-ins, the WasmEdge runtime can be extended more easily.

Expand Down
14 changes: 7 additions & 7 deletions docs/embed/use-case/plugin/rust_sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
sidebar_position: 2
---

## Using Plug-ins to Extend the Runtime in C
## Using Plug-ins to Extend the Runtime in Rust

The WasmEdge plug-ins are the shared libraries to provide the WasmEdge runtime to load and create host module instances. With the plug-ins, the WasmEdge runtime can be extended more easily.

## Loading Plug-ins from Paths

Developers can start using WasmEdge plug-ins by loading them from specific paths. To load plug-ins from the default paths, the following API can be used:

```toml
```rust
impl PluginManager
pub fn load(path: Option<&Path>) -> WasmEdgeResult<()>
```
Expand All @@ -28,7 +28,7 @@ pub fn load(path: Option<&Path>) -> WasmEdgeResult<()>

To get the names of all loaded plug-ins as returns -

```toml
```rust
pub fn names() -> Vec<String>
```

Expand All @@ -41,15 +41,15 @@ pub fn names() -> Vec<String>

Once plug-ins are loaded, developers can list the loaded plug-in names using the following approach:

```toml
```rust
pub fn names() -> Vec<String>
```

## Getting Plug-in Context by Name

Developers can get the plug-in context by its name using the following method:

```toml
```rust
pub fn find(name: impl AsRef<str>) -> Option<Plugin>
```

Expand All @@ -59,7 +59,7 @@ Here `name` is the name of the target plug-in.

With the plug-in context, developers can get module instances by providing the module name:

```toml
```rust
pub fn mod_names(&self) -> Vec<String>
```

Expand All @@ -71,7 +71,7 @@ Before using the plug-ins, developers should [Loading Plug-ins from Paths](#load

To initialize the `wasmedge_process` plug-in module instance with the parameters -

```toml
```rust
pub fn init_wasmedge_process(allowed_cmds: Option<Vec<&str>>, allowed: bool)
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 3
---

## Using Plug-ins to Extend the Runtime in C
## Using Plug-ins to Extend the Runtime in Go

The WasmEdge plug-ins are the shared libraries to provide the WasmEdge runtime to load and create host module instances. With the plug-ins, the WasmEdge runtime can be extended more easily.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
sidebar_position: 2
---

## Using Plug-ins to Extend the Runtime in C
## Using Plug-ins to Extend the Runtime in Rust

The WasmEdge plug-ins are the shared libraries to provide the WasmEdge runtime to load and create host module instances. With the plug-ins, the WasmEdge runtime can be extended more easily.

## Loading Plug-ins from Paths

Developers can start using WasmEdge plug-ins by loading them from specific paths. To load plug-ins from the default paths, the following API can be used:

```toml
```rust
impl PluginManager
pub fn load(path: Option<&Path>) -> WasmEdgeResult<()>
```
Expand All @@ -28,7 +28,7 @@ pub fn load(path: Option<&Path>) -> WasmEdgeResult<()>

To get the names of all loaded plug-ins as returns -

```toml
```rust
pub fn names() -> Vec<String>
```

Expand All @@ -41,15 +41,15 @@ pub fn names() -> Vec<String>

Once plug-ins are loaded, developers can list the loaded plug-in names using the following approach:

```toml
```rust
pub fn names() -> Vec<String>
```

## Getting Plug-in Context by Name

Developers can get the plug-in context by its name using the following method:

```toml
```rust
pub fn find(name: impl AsRef<str>) -> Option<Plugin>
```

Expand All @@ -59,7 +59,7 @@ Here `name` is the name of the target plug-in.

With the plug-in context, developers can get module instances by providing the module name:

```toml
```rust
pub fn mod_names(&self) -> Vec<String>
```

Expand All @@ -71,7 +71,7 @@ Before using the plug-ins, developers should [Loading Plug-ins from Paths](#load

To initialize the `wasmedge_process` plug-in module instance with the parameters -

```toml
```rust
pub fn init_wasmedge_process(allowed_cmds: Option<Vec<&str>>, allowed: bool)
```

Expand Down

0 comments on commit cee5ffe

Please sign in to comment.