Cargo Features

[dependencies]
iced-x86 = { version = "1.21.0", default-features = false, features = ["decoder", "encoder", "block_encoder", "op_code_info", "instr_info", "nasm", "fast_fmt", "db", "std", "no_std", "no_xop", "no_d3now", "mvex", "code_asm", "serde"] }

These features are documented in README.md / lib.rs

default = block_encoder, decoder, encoder, fast_fmt, gas, instr_info, intel, masm, nasm, op_code_info, std

These default features are set whenever iced-x86 is added without default-features = false somewhere in the dependency tree.

decoder default

Affects enums::TupleType, enums::EncodingKind

encoder default block_encoder op_code_info

Affects enums::OpCodeOperandKind, enums::MandatoryPrefix, enums::OpCodeTableKind, enums::TupleType, enums::EncodingKind

block_encoder default code_asm? = encoder
op_code_info default = encoder

Affects enums::OpCodeOperandKind, enums::MandatoryPrefix, enums::OpCodeTableKind, enums::TupleType, enums::EncodingKind

instr_info default

Affects enums::FlowControl, enums::CpuidFeature, enums::RflagsBits, enums::OpAccess, enums::ConditionCode, formatter::Formatter.op_access, instruction::FpuStackIncrementInfo, enums::EncodingKind

gas intel masm nasm default

Affects formatter::FormatterOutput, formatter::Formatter

fast_fmt default
db

Not used anymore, but removing it is a breaking change

std default = lazy_static
no_std

no_std feature is needed since std and no_std require different deps

Enables spin_no_std of lazy_static

if: decoder or encoder or gas or intel or masm or nasm or fast_fmt It's not really optional, std or no_std must be used and they both require it.

exhaustive_enums no_vex no_evex no_xop
no_d3now
mvex

Affects enums::MvexEHBit, enums::MvexConvFn, enums::MvexRegMemConv, enums::MvexTupleTypeLutKind

code_asm = block_encoder

Affects iced-x86::code_asm

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.

lazy_static no_std? std
serde implicit feature

Enables serde

serde:

A generic serialization/deserialization framework