Add nalgebra/macros feature and re-export matrix macros from nalgebra

This commit is contained in:
Andreas Longva 2021-04-30 16:47:09 +02:00
parent b96c75549d
commit eeab4db69a
2 changed files with 6 additions and 1 deletions

View File

@ -22,7 +22,7 @@ name = "nalgebra"
path = "src/lib.rs" path = "src/lib.rs"
[features] [features]
default = [ "std" ] default = [ "std", "macros" ]
std = [ "matrixmultiply", "simba/std" ] std = [ "matrixmultiply", "simba/std" ]
sparse = [ ] sparse = [ ]
debug = [ "approx/num-complex", "rand" ] debug = [ "approx/num-complex", "rand" ]
@ -32,6 +32,7 @@ compare = [ "matrixcompare-core" ]
libm = [ "simba/libm" ] libm = [ "simba/libm" ]
libm-force = [ "simba/libm_force" ] libm-force = [ "simba/libm_force" ]
no_unsound_assume_init = [ ] no_unsound_assume_init = [ ]
macros = [ "nalgebra-macros" ]
# Conversion # Conversion
convert-mint = [ "mint" ] convert-mint = [ "mint" ]
@ -60,6 +61,7 @@ proptest-support = [ "proptest" ]
slow-tests = [] slow-tests = []
[dependencies] [dependencies]
nalgebra-macros = { version = "0.1", path = "nalgebra-macros", optional = true }
typenum = "1.12" typenum = "1.12"
rand-package = { package = "rand", version = "0.8", optional = true, default-features = false } rand-package = { package = "rand", version = "0.8", optional = true, default-features = false }
num-traits = { version = "0.2", default-features = false } num-traits = { version = "0.2", default-features = false }

View File

@ -136,6 +136,9 @@ pub use crate::sparse::*;
)] )]
pub use base as core; pub use base as core;
#[cfg(feature = "macros")]
pub use nalgebra_macros::{dmatrix, dvector, matrix, vector};
use simba::scalar::SupersetOf; use simba::scalar::SupersetOf;
use std::cmp::{self, Ordering, PartialOrd}; use std::cmp::{self, Ordering, PartialOrd};