Wasm plugins can be run through `wasmtime`, with supported for sandboxed system integration through WASI. There are three `plugin` crates that implement different things:
2.`plugin` is the crate that Rust Wasm plugins should depend on. It re-exports some required crates (e.g. `serde`, `bincode`) and provides some necessary macros for generating bindings that `plugin_runtime` can hook into.
3.`plugin_macros` implements the proc macros required by `plugin`, like the `#[bind]` attribute macro.
## ABI
The interface between the host Rust runtime ('Runtime') and plugins implemented in Wasm ('Plugin') is pretty simple.
All the serialization code is automatically generated by `#[export]`.
You can specify functions that must be defined host-side by using the `#[import]` attribute. This attribute must be attached to a function signature:
```rust
#[import]
fn run(command: String) -> Vec<u8>;
```
The `#[import]` macro will generate a function body that performs the proper serialization/deserialization needed to call out to the host rust runtime. Note that the same ABI is used for both `#[import]` and `#[export]`.