Skip to content

Commit 25e2863

Browse files
committed
doc: Give crate feature flags its own doc page
Tighten up the crate feature list on the main page, and link over to a page with more full information - where we can explain more. This gives more room to the main page.
1 parent 7528092 commit 25e2863

File tree

3 files changed

+44
-23
lines changed

3 files changed

+44
-23
lines changed

src/doc/crate_feature_flags.rs

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//! Crate Feature Flags
2+
//!
3+
//! The following crate feature flags are available. They are configured in your
4+
//! `Cargo.toml` where the dependency on `ndarray` is defined.
5+
//!
6+
//! ## `std`
7+
//! - Rust standard library (enabled by default)
8+
//! - This crate can be used without the standard library by disabling the
9+
//! default `std` feature. To do so, use `default-features = false` in
10+
//! your `Cargo.toml`.
11+
//! - The `geomspace` `linspace` `logspace` `range` `std` `var` `var_axis`
12+
//! and `std_axis` methods are only available when `std` is enabled.
13+
//!
14+
//! ## `serde`
15+
//! - Enables serialization support for serde 1.x
16+
//!
17+
//! ## `rayon`
18+
//! - Enables parallel iterators, parallelized methods, the [`parallel`] module and [`par_azip!`].
19+
//! - Implies std
20+
//!
21+
//! ## `approx`
22+
//! - Enables implementations of traits from version 0.4 of the [`approx`] crate.
23+
//!
24+
//! ## `approx-0_5`
25+
//! - Enables implementations of traits from version 0.5 of the [`approx`] crate.
26+
//!
27+
//! ## `blas`
28+
//! - Enable transparent BLAS support for matrix multiplication.
29+
//! Uses ``blas-src`` for pluggable backend, which needs to be configured
30+
//! separately (see the README).
31+
//!
32+
//! ## `matrixmultiply-threading`
33+
//! - Enable the ``threading`` feature in the matrixmultiply package
34+
//!
35+
//! [`parallel`]: crate::parallel

src/doc/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
//! Standalone documentation pages.
22
3+
pub mod crate_feature_flags;
34
pub mod ndarray_for_numpy_users;

src/lib.rs

+8-23
Original file line numberDiff line numberDiff line change
@@ -75,30 +75,15 @@
7575
//! ## Crate Feature Flags
7676
//!
7777
//! The following crate feature flags are available. They are configured in your
78-
//! `Cargo.toml`.
78+
//! `Cargo.toml`. See [`doc::crate_feature_flags`] for more information.
7979
//!
80-
//! - `std`
81-
//! - Rust standard library (enabled by default)
82-
//! - This crate can be used without the standard library by disabling the
83-
//! default `std` feature. To do so, use `default-features = false` in
84-
//! your `Cargo.toml`.
85-
//! - The `geomspace` `linspace` `logspace` `range` `std` `var` `var_axis`
86-
//! and `std_axis` methods are only available when `std` is enabled.
87-
//! - `serde`
88-
//! - Enables serialization support for serde 1.x
89-
//! - `rayon`
90-
//! - Enables parallel iterators, parallelized methods, the [`parallel`] module and [`par_azip!`].
91-
//! - Implies std
92-
//! - `approx`
93-
//! - Enables implementations of traits from version 0.4 of the [`approx`] crate.
94-
//! - `approx-0_5`
95-
//! - Enables implementations of traits from version 0.5 of the [`approx`] crate.
96-
//! - `blas`
97-
//! - Enable transparent BLAS support for matrix multiplication.
98-
//! Uses ``blas-src`` for pluggable backend, which needs to be configured
99-
//! separately (see the README).
100-
//! - `matrixmultiply-threading`
101-
//! - Enable the ``threading`` feature in the matrixmultiply package
80+
//! - `std`: Rust standard library-using functionality (enabled by default)
81+
//! - `serde`: serialization support for serde 1.x
82+
//! - `rayon`: Parallel iterators, parallelized methods, the [`parallel`] module and [`par_azip!`].
83+
//! - `approx` Implementations of traits from version 0.4 of the [`approx`] crate.
84+
//! - `approx-0_5`: Implementations of traits from version 0.5 of the [`approx`] crate.
85+
//! - `blas`: transparent BLAS support for matrix multiplication, needs configuration.
86+
//! - `matrixmultiply-threading`: Use threading from `matrixmultiply`.
10287
//!
10388
//! ## Documentation
10489
//!

0 commit comments

Comments
 (0)