From 7f2214f15c666f4c1354f753582b1df6e3c45218 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Wed, 21 Jan 2026 17:24:54 +0100 Subject: [PATCH] fix(utils): make sure we do not build a .wasm file for utils --- packages/utils/Cargo.toml | 6 +++--- packages/utils/src/lib.rs | 16 ++++++++++++++++ packages/utils/src/main.rs | 36 ------------------------------------ 3 files changed, 19 insertions(+), 39 deletions(-) delete mode 100644 packages/utils/src/main.rs diff --git a/packages/utils/Cargo.toml b/packages/utils/Cargo.toml index 776a455..4e81b1e 100644 --- a/packages/utils/Cargo.toml +++ b/packages/utils/Cargo.toml @@ -2,15 +2,15 @@ name = "nodarium_utils" version = "0.1.0" edition = "2021" -description = "A collection of utilities for Nodarium" license = "MIT" repository = "https://github.com/jim-fx/nodes" +description = "A collection of utilities for Nodarium" [lib] crate-type = ["rlib"] [dependencies] -serde = { version = "1.0", features = ["derive"] } -serde_json = { version = "1.0", default-features = false, features = ["alloc"] } glam = "0.30.10" noise = "0.9.0" +serde = { version = "1.0", features = ["derive"] } +serde_json = { version = "1.0", default-features = false, features = ["alloc"] } diff --git a/packages/utils/src/lib.rs b/packages/utils/src/lib.rs index 0bcf629..5809ecb 100644 --- a/packages/utils/src/lib.rs +++ b/packages/utils/src/lib.rs @@ -33,3 +33,19 @@ macro_rules! log { }}; } +#[allow(dead_code)] +#[rustfmt::skip] +fn test_split_args(){ + let inputs = vec![ + vec![0, 1, 0, 4, 1056964608, 1065353216, 1056964608, 1, 4, 1080872141, 1054951342, 32, 1, 1 ], + vec![0, 4, 1056964608, 1065353216, 1056964608, 1, 4], + vec![0, 1, 0, 3, 0, 0, 0, 5, 0, 0, 1073741824, 1073741824, 1, 1, 1, 1, 1, 4, 1065353216, 1054615798, 5, 1, 1 ], + vec![ 0, 1, 0, 3, 0, 0, 0, 1, 4, 1073741824, 1073741824, 32, 1, 1 ], + vec![0, 1, 0, 1, 0, 14, 0, 1056964608, 1056964608, 1056964608, 1058810102, 1056964608, 1069547520, 1056964608, 1050421494, 1056964608, 1075838976, 1056964608, 0, 1, 1, 1, 2, 13, 1, 1], + vec![ 0, 1, 0, 2, 0, 0, 5, 0, 0, 1073741824, 1073741824, 1, 2, 0, 1, 4, 1088212173, 1083388723, 20, 1, 1 ] + ]; + + for input in inputs { + println!("RESULT: {:?}", split_args(&input)); + } +} diff --git a/packages/utils/src/main.rs b/packages/utils/src/main.rs deleted file mode 100644 index b628469..0000000 --- a/packages/utils/src/main.rs +++ /dev/null @@ -1,36 +0,0 @@ -use nodarium_utils::{ - geometry::{create_multiple_paths, wrap_multiple_paths}, - split_args, -}; - -#[allow(dead_code)] -#[rustfmt::skip] -fn test_split_args(){ - let inputs = vec![ - vec![0, 1, 0, 4, 1056964608, 1065353216, 1056964608, 1, 4, 1080872141, 1054951342, 32, 1, 1 ], - vec![0, 4, 1056964608, 1065353216, 1056964608, 1, 4], - vec![0, 1, 0, 3, 0, 0, 0, 5, 0, 0, 1073741824, 1073741824, 1, 1, 1, 1, 1, 4, 1065353216, 1054615798, 5, 1, 1 ], - vec![ 0, 1, 0, 3, 0, 0, 0, 1, 4, 1073741824, 1073741824, 32, 1, 1 ], - vec![0, 1, 0, 1, 0, 14, 0, 1056964608, 1056964608, 1056964608, 1058810102, 1056964608, 1069547520, 1056964608, 1050421494, 1056964608, 1075838976, 1056964608, 0, 1, 1, 1, 2, 13, 1, 1], - vec![ 0, 1, 0, 2, 0, 0, 5, 0, 0, 1073741824, 1073741824, 1, 2, 0, 1, 4, 1088212173, 1083388723, 20, 1, 1 ] - ]; - - for input in inputs { - println!("RESULT: {:?}", split_args(&input)); - } -} - -fn test_path() { - // let path_data = create_path(3, 2); - // println!("{:?}", path_data); - - let mut multiple_paths = create_multiple_paths(1, 4, 1); - let mut wrapped_paths = wrap_multiple_paths(&mut multiple_paths); - wrapped_paths[0].points[0] = 1.0; - println!("{:?}", wrapped_paths); - println!("{:?}", multiple_paths); -} - -fn main() { - test_path() -}