feat: some shit
This commit is contained in:
11
nodes/multiply/Cargo.toml
Normal file
11
nodes/multiply/Cargo.toml
Normal file
@@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "multiply"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
wasm-bindgen = "0.2.91"
|
||||
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
10
nodes/multiply/src/lib.rs
Normal file
10
nodes/multiply/src/lib.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
#[no_mangle]
|
||||
pub extern "C" fn execute(a: u32, b: u32) -> u32 {
|
||||
a + b
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn get_definition() -> String {
|
||||
let bytes = include_str!("./node.json");
|
||||
bytes.to_string()
|
||||
}
|
||||
17
nodes/multiply/src/node.json
Normal file
17
nodes/multiply/src/node.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"inputs": {
|
||||
"left": {
|
||||
"type": "integer",
|
||||
"default": 50,
|
||||
"min": 0,
|
||||
"max": 255
|
||||
},
|
||||
"right": {
|
||||
"type": "integer",
|
||||
"default": 50,
|
||||
"min": 0,
|
||||
"max": 255
|
||||
}
|
||||
},
|
||||
"outputs": ["integer"]
|
||||
}
|
||||
Reference in New Issue
Block a user