Cargo Features
[dependencies]
yaxpeax-arm = { version = "0.4.0", default-features = false, features = ["non-exhaustive-enums", "alloc", "fmt", "std", "use-serde"] }
- default = alloc, fmt, non-exhaustive-enums, std, use-serde
-
These default features are set whenever
yaxpeax-armis added withoutsomewhere in the dependency tree.default-features = false - non-exhaustive-enums default
-
IF YOU DISABLE DEFAULT FEATURES, EXPLICITLY ENABLE
non-exhaustive-enums. unless you read the rest of this section and manage or tolerate additional Operand variants appearing across minor releases.OpcodeandOperandenums are marked non-exhaustive to tolerate future growth of the ISA or additions to the disassembler (NEON, etc). typically disassemblers either care about a specific subset of instructions (b<cc>,blcome to mind), or many (all?) instructions (program analysis, semantic lifting, ..).this feature allows users to control the presence of the
#[non_exhaustive]attribute on Opcode and Operand to get feedback on missing variants in large match blocks.additions to
OpcodeandOperandwill happen across minor version bumps, but not patch versions. code removing#[non_exhaustive]should probably lock to a minor versions.this is an enabled-by-default feature to handle cases where a library removes this feature, but something else in the dependency tree enables it. this way, libraries can test with this feature disabled, lock to corresponding major.minor versions of the disassembler and opcode set, and then harmlessly tolerate
#[non_exhaustive]if it's added inadvertently elsewhere in the dependency tree. - alloc default
-
fmt-related features that depend on the alloc crate. additionally, some supporting implementation comes from
yaxpeax-arch's alloc feature.Enables alloc of yaxpeax-arch
- fmt default
-
formatting code (Display, Debug impls, etc) are (inconsistently) optional on
fmt. future crate releases will movefmtimpls consistently behind this feature.some
fmtcode also hasallocfeatures (InstructionDisplayBuffer)Affects
display::InstructionDisplayer… - std default
-
opt-in for std-related Error impl - necessary to
?-unwrapDecodeError.Enables std of yaxpeax-arch
- use-serde default = serde, serde_derive
-
Enables use-serde of yaxpeax-arch
yaxpeax-arch:
enables the (optional) use of Serde for bounds on
Arch and Arch::AddressAffects
a64::ARMv8…
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.