Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laurci/mx-plug
MultiversX WASM VM plugin framework
https://github.com/laurci/mx-plug
Last synced: about 1 month ago
JSON representation
MultiversX WASM VM plugin framework
- Host: GitHub
- URL: https://github.com/laurci/mx-plug
- Owner: laurci
- Created: 2023-09-30T22:02:25.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-20T07:45:24.000Z (over 1 year ago)
- Last Synced: 2024-10-30T06:27:17.742Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mx-plug
This repository contains the framework for creating plugins for my fork of the MultiversX Blockchain VM.
Learn more about this repository [here](https://laurci.notion.site/XDay-Hackathon-Log-087f6778a60245f58a4e0d9e2bea3b95?pvs=4).
Each plugin is split in 2 parts:
- contract bridge: this is a library that is used by the smart contract and it wraps direct calls to the plugin
- plugin: this is a C dynamic library that gets loaded by the VM on startup and exposes functions that are called from the VM## Plugin definition
You just need to use the `plugin!` macro and specify the name and the list of functions you want to expose to the contract:
```rust
mx_plug_core::plugin! {
name = "demo",
fns = [test_1, test_2, test_3]
}
```Check the example in the `plugin-demo/plugin/` directory.