Cargo Features
[dependencies]
cubek-reduce = { version = "0.2.0-pre.2", default-features = false, features = ["std", "pretty_assertions"] }
- default = std
-
These default features are set whenever
cubek-reduceis added withoutsomewhere in the dependency tree.default-features = false Enables cubecl
- std default
-
Enables std of cubecl and thiserror
thiserror:
Std feature enables support for formatting std::path::{Path, PathBuf}
conveniently in an error message.
#[derive(Error, Debug)]
#[error("failed to create configuration file {path}")]
pub struct MyError {
pub path: PathBuf,
pub source: std::io::Error,
}
Without std, this would need to be written #[error("... {}", path.display())].
Features from optional dependencies
- pretty_assertions implicit feature
-
Enables pretty_assertions
pretty_assertions:
Overwrite
assert_eq!andassert_ne!with drop-in replacements, adding colorful diffs