Highlights
- composable applications with no interface limitations
- performant language-agnostic plugin system
NOTE: Async types (Future, Stream, ErrorContext) are not yet supported for cross-plugin transfer and will return an error if encountered.
Contents
Project Philosophy
- Single tool, single task: Apps should be broken up into small chunks that are meant to be composed together to create a whole.
- Build around your workflow, not services: Everything You use for a single task should be working together instead of you trying to duct-tape it together yourself.
- The client belongs to the user: Any part should be able to be easily added, removed or switched out for something else.
- Zero-trust by default: Don't just use something and expect it behaves, assume malice and constraint it to the minimum capabilities required.
Example
use ;
// Declare your fixture sources
// Now construct some plugins and related data
let root_interface_id = "root" ;
let plugins = ;
let interfaces = ;
// First you need to tell wasm_link about your plugins, interfaces and where you want
// the execution to begin. wasm_link will try it's best to load in all the plugins,
// upon encountering an error, it will try to salvage as much of the remaining data
// as possible returning a list of failures alongside the `PluginTree`.
let = new;
assert!;
// Once you've got your `PluginTree` constructed, you can link the plugins together
// Since some plugins may fail to load, it is only at this point that the cardinality
// requirements are satisfied by the plugins that managed to get loaded, otherwise it
// tries to salvage as much of the tree as can be loaded returning a list of failures
// alongside the loaded `PluginTreeHead` - the root node of the `PluginTree`.
let engine = default;
let linker = new;
let = tree.load.unwrap;
assert!;
// Now you can dispatch any function on the root interface.
// This will dispatch the function for all plugins plugged in to the root socket returning
// a Result for each in the shape determined by the interface cardinality.
let result = tree_head.dispatch;
match result
Goals
- basic plugin linking
- component model support
- resource support
- async, streams and threads
Further goals are yet to be determined
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Contributions are welcome. For major changes, please open an issue first for discussion.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Quick Start
Using Nix (Recommended)
If you have Nix installed, please use the provided flake.nix to set up everything you need:
Manual Setup
Running this project will only require installing the Rust toolchain