diff --git a/Cargo.toml b/Cargo.toml index 872012ed..47d4cf13 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,6 +32,7 @@ sparse = [ ] debug = [ "approx/num-complex", "rand/std" ] alloc = [ ] io = [ "pest", "pest_derive" ] +serde_derive = [] # dummy feature to avoid breakage [dependencies] typenum = "1.10" @@ -44,8 +45,7 @@ num-rational = { version = "0.2", default-features = false } approx = { version = "0.3", default-features = false } alga = { version = "0.9", default-features = false } matrixmultiply = { version = "0.2", optional = true } -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } abomonation = { version = "0.7", optional = true } mint = { version = "0.5", optional = true } quickcheck = { version = "0.8", optional = true } diff --git a/nalgebra-lapack/Cargo.toml b/nalgebra-lapack/Cargo.toml index 7f632869..1c2d2390 100644 --- a/nalgebra-lapack/Cargo.toml +++ b/nalgebra-lapack/Cargo.toml @@ -13,7 +13,8 @@ license = "BSD-3-Clause" edition = "2018" [features] -serde-serialize = [ "serde", "serde_derive" ] +serde-serialize = [ "serde" ] # kept to avoid breakage; prefer to use serde feature directly +serde_derive = [] # dummy feature to avoid breakage # For BLAS/LAPACK default = ["openblas"] @@ -27,8 +28,7 @@ nalgebra = { version = "0.18", path = ".." } num-traits = "0.2" num-complex = { version = "0.2", default-features = false } alga = { version = "0.9", default-features = false } -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } lapack = { version = "0.16", default-features = false } lapack-src = { version = "0.2", default-features = false } # clippy = "*" diff --git a/src/lib.rs b/src/lib.rs index 59f3420f..08dfcbe2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -89,10 +89,6 @@ an optimized set of tools for computer graphics and physics. Those features incl #![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(all(feature = "alloc", not(feature = "std")), feature(alloc))] -#[cfg(feature = "serde")] -#[macro_use] -extern crate serde_derive; - #[macro_use] extern crate approx; extern crate num_traits as num;