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 default-features = false somewhere in the dependency tree.

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 and write functions, but makes the crate fully no_std. If this feature is enabled, but the std feature is not, the crate becomes no_std + alloc.

Affects smf::Track, smf::Smf, smf::BytemappedTrack, smf::SmfBytemap

std default parallel = alloc

Integrate with the std library. Depends on the alloc 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.

rayon parallel