Cargo Features
[dependencies]
midly = { version = "0.5.3", default-features = false, features = ["strict", "alloc", "std", "parallel"] }
- default = alloc, parallel, std
-
These default features are set whenever
midly
is added without
somewhere in the dependency tree.default-features = false - strict
-
Reject corrupted or uncompliant files, even if they could be read anyway.
ErrorKind::Malformed
errors will only be raised when this feature is enabled. - alloc default std
-
Enable the
alloc
dependency.Disabling this feature leaves pretty much only the raw
parse
andwrite
functions, but makes the crate fullyno_std
. If this feature is enabled, but thestd
feature is not, the crate becomesno_std + alloc
.Affects
smf::Track
,smf::Smf
,smf::BytemappedTrack
,smf::SmfBytemap
… - std default parallel = alloc
-
Integrate with the
std
library. Depends on thealloc
feature.Affects
smf::write_std
… - parallel default = rayon, std
-
Enable multithreaded parsing. Depends on the
std
feature.Multithreaded parsing is automatically disabled for tiny MIDI files. Currently, multithreading brings in the
rayon
dependency.
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.