feat: some moving around

This commit is contained in:
2024-04-15 22:13:43 +02:00
parent 0254bc1ae5
commit dec205b234
86 changed files with 505 additions and 409 deletions

View File

@@ -18,6 +18,7 @@ wasm-bindgen = "0.2.84"
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
utils = { version = "0.1.0", path = "../../../../packages/utils" }
macros = { version = "0.1.0", path = "../../../../packages/macros" }
serde = { version = "1.0", features = ["derive"] }
serde-wasm-bindgen = "0.4"
console_error_panic_hook = { version = "0.1.7", optional = true }

View File

@@ -0,0 +1,7 @@
{
"value": {
"type": "float",
"value": 0.1,
"internal": true
}
}

View File

@@ -1,17 +1,9 @@
use macros::generate_input_types_file;
use utils::generate_outputs;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub fn get_outputs() -> Vec<String> {
vec!["float".to_string()]
}
#[wasm_bindgen]
pub fn get_input_types() -> String {
r#"{
"value": { "type": "float", "value": 0.1, "internal": true }
}"#
.to_string()
}
generate_outputs!(["float"]);
generate_input_types_file!("src/input.json");
#[wasm_bindgen]
pub fn execute(args: &[i32]) -> Vec<i32> {