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"
[features]
default = [ "std" ]
default = [ "std", "macros" ]
std = [ "matrixmultiply", "simba/std" ]
sparse = [ ]
debug = [ "approx/num-complex", "rand" ]
@ -32,6 +32,7 @@ compare = [ "matrixcompare-core" ]
libm = [ "simba/libm" ]
libm-force = [ "simba/libm_force" ]
no_unsound_assume_init = [ ]
macros = [ "nalgebra-macros" ]
# Conversion
convert-mint = [ "mint" ]
@ -60,6 +61,7 @@ proptest-support = [ "proptest" ]
slow-tests = []
[dependencies]
nalgebra-macros = { version = "0.1", path = "nalgebra-macros", optional = true }
typenum = "1.12"
rand-package = { package = "rand", version = "0.8", optional = true, 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;
#[cfg(feature = "macros")]
pub use nalgebra_macros::{dmatrix, dvector, matrix, vector};
use simba::scalar::SupersetOf;
use std::cmp::{self, Ordering, PartialOrd};