diff --git a/Cargo.toml b/Cargo.toml index 4e7a8900..a3c5741c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ faer = { version = "0.24", default-features = false, features = [ ] } faer-traits = "0.24" cudarc = { version = "0.19", default-features = false } -diffsl = { version = "0.11.9", features = ["rayon"] } +diffsl = { version = "0.11.9" } plotly = { version = "0.14" } argmin = { version = "0.11.0" } diff --git a/diffsol-c/Cargo.toml b/diffsol-c/Cargo.toml index d0c77414..6cee3e9a 100644 --- a/diffsol-c/Cargo.toml +++ b/diffsol-c/Cargo.toml @@ -14,6 +14,7 @@ crate-type = ["cdylib", "rlib"] [features] default = ["diffsl-external-dynamic"] wasm = ["getrandom/js"] +rayon = ["diffsol/rayon", "faer/rayon"] external = [] external-dynamic = [] diffsl-external-f64 = [ @@ -43,7 +44,7 @@ suitesparse = ["diffsol/suitesparse"] [dependencies] diffsl = { workspace = true } -diffsol = { path = "../diffsol", version = "0.14.0", features = ["diffsl"] } +diffsol = { path = "../diffsol", version = "0.14.0", default-features = false, features = ["nalgebra", "faer", "diffsl"] } dlmalloc = { version = "0.2", features = ["global"] } nalgebra = { workspace = true, features = ["std"] } ndarray = { version = "0.17.2" } @@ -52,12 +53,11 @@ schemars = "1.1.0" serde = { workspace = true } serde_json = { workspace = true } paste = { workspace = true } +faer = { workspace = true } [target.'cfg(target_arch = "wasm32")'.dependencies] getrandom = { version = "0.2", features = ["js"] } -faer = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] getrandom = { version = "0.2", optional = true } -faer = { workspace = true, features = ["rayon"] } diff --git a/diffsol/Cargo.toml b/diffsol/Cargo.toml index 7d9a8de7..7567c265 100644 --- a/diffsol/Cargo.toml +++ b/diffsol/Cargo.toml @@ -15,6 +15,7 @@ readme = "../README.md" default = ["nalgebra", "faer"] faer = [] nalgebra = [] +rayon = ["faer/rayon", "diffsl?/rayon"] cuda = ["dep:cudarc"] sundials = ["suitesparse_sys", "bindgen", "cc"] suitesparse = ["suitesparse_sys"] @@ -57,11 +58,6 @@ cudarc = { workspace = true, optional = true, default-features = false, features ] } log = "0.4.29" serde_json = { workspace = true } - -[target.'cfg(not(target_arch = "wasm32"))'.dependencies] -faer = { workspace = true, features = ["rayon"] } - -[target.'cfg(target_arch = "wasm32")'.dependencies] faer = { workspace = true } [dev-dependencies]