Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pluggable Incoming and Outgoing Service via WASM modules #566

Open
matdehaast opened this issue Dec 16, 2019 · 2 comments
Open

Pluggable Incoming and Outgoing Service via WASM modules #566

matdehaast opened this issue Dec 16, 2019 · 2 comments
Labels

Comments

@matdehaast
Copy link
Collaborator

Adding custom logic within the packet path allows people to add business logic in an easy manner. This can currently be done by writing your own services in rust and compiling the node. However that limits to people capable of writing Rust.

Other projects allow plugin type models for similar functionality though are language specific:

Another option is to have the plugin be a WASM module. This would mean implementors could choose any WASM language to write the logic and I believe WASM can allow you to have strict checks on the interface of the module before running it.

@emschwartz
Copy link
Member

This is an awesome idea, thanks for the suggestion!

It would be worth looking into wasmtime and wasmer for this.

@emschwartz
Copy link
Member

The thing that might be hard about this is making the wasm module interact with the Account struct and the store (database). Each service is generic over a specific type of Account + store combo that provides the functionality it needs. I'm not sure there's a sensible or safe way to have the module define methods on those objects or use methods that are defined in other traits. This may be worth investigating but it may be difficult to make it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants