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
midlyis added withoutsomewhere in the dependency tree.default-features = false - strict
-
Reject corrupted or uncompliant files, even if they could be read anyway.
ErrorKind::Malformederrors will only be raised when this feature is enabled. - alloc default std
-
Enable the
allocdependency.Disabling this feature leaves pretty much only the raw
parseandwritefunctions, but makes the crate fullyno_std. If this feature is enabled, but thestdfeature is not, the crate becomesno_std + alloc.Affects
smf::Track,smf::Smf,smf::BytemappedTrack,smf::SmfBytemap… - std default parallel = alloc
-
Integrate with the
stdlibrary. Depends on theallocfeature.Affects
smf::write_std… - parallel default = rayon, std
-
Enable multithreaded parsing. Depends on the
stdfeature.Multithreaded parsing is automatically disabled for tiny MIDI files. Currently, multithreading brings in the
rayondependency.
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.