Initial commit
This commit is contained in:
11
plugin/Cargo.toml
Normal file
11
plugin/Cargo.toml
Normal file
@@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "plugin"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
shared = { path = "../shared" }
|
||||
stabby = { workspace = true }
|
||||
9
plugin/src/lib.rs
Normal file
9
plugin/src/lib.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use shared::{Input, Output};
|
||||
|
||||
#[stabby::export]
|
||||
pub extern "C" fn process(input: Input) -> Output {
|
||||
Output {
|
||||
sum: input.a + input.b,
|
||||
product: input.a * input.b,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user