Skip to content

Commit b39d413

Browse files
committed
Add new cargo feature, core with main functionality
1 parent efc2699 commit b39d413

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ exclude = [
1515
]
1616

1717
[features]
18+
core = []
1819
algorithm = []
1920
arithmetic = []
2021
blas = []
@@ -29,7 +30,7 @@ signal = []
2930
sparse = []
3031
statistics = []
3132
vision = []
32-
default = ["algorithm", "arithmetic", "blas", "data", "indexing", "graphics", "image", "lapack",
33+
default = ["core", "algorithm", "arithmetic", "blas", "data", "indexing", "graphics", "image", "lapack",
3334
"macros", "random", "signal", "sparse", "statistics", "vision"]
3435

3536
[dependencies]

src/lib.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
#[macro_use]
3535
extern crate lazy_static;
3636

37+
#[cfg(feature="core")]
3738
pub use array::*;
39+
#[cfg(feature="core")]
3840
mod array;
3941

4042
#[cfg(feature="algorithm")]
@@ -47,7 +49,9 @@ pub use arith::*;
4749
#[cfg(feature="arithmetic")]
4850
mod arith;
4951

52+
#[cfg(feature="core")]
5053
pub use backend::*;
54+
#[cfg(feature="core")]
5155
mod backend;
5256

5357
#[cfg(feature="blas")]
@@ -60,24 +64,34 @@ pub use data::*;
6064
#[cfg(feature="data")]
6165
mod data;
6266

67+
#[cfg(feature="core")]
6368
pub use device::*;
69+
#[cfg(feature="core")]
6470
mod device;
6571

72+
#[cfg(feature="core")]
6673
pub use defines::*;
74+
#[cfg(feature="core")]
6775
mod defines;
6876

77+
#[cfg(feature="core")]
6978
pub use dim4::Dim4;
79+
#[cfg(feature="core")]
7080
mod dim4;
7181

82+
#[cfg(feature="core")]
7283
pub use error::{Callback, ErrorCallback, register_error_handler, handle_error_general};
84+
#[cfg(feature="core")]
7385
mod error;
7486

7587
#[cfg(feature="indexing")]
7688
pub use index::*;
7789
#[cfg(feature="indexing")]
7890
mod index;
7991

92+
#[cfg(feature="indexing")]
8093
pub use seq::Seq;
94+
#[cfg(feature="indexing")]
8195
mod seq;
8296

8397
#[cfg(feature="graphics")]
@@ -119,7 +133,9 @@ pub use statistics::*;
119133
#[cfg(feature="statistics")]
120134
mod statistics;
121135

136+
#[cfg(feature="core")]
122137
pub use util::{HasAfEnum, get_size};
138+
#[cfg(feature="core")]
123139
mod util;
124140

125141
#[cfg(feature="vision")]

0 commit comments

Comments
 (0)