Cargo Features

[dependencies]
alexcrichton-cranelift-codegen = { version = "0.53.0", default-features = false, features = ["std", "core", "testing_hooks", "x86", "riscv", "all-arch", "enable-serde", "basic-blocks"] }
default = basic-blocks, std

These default features are set whenever alexcrichton-cranelift-codegen is added without default-features = false somewhere in the dependency tree.

std default

The "std" feature enables use of libstd. The "core" feature enables use of some minimal std-like replacement libraries. At least one of these two features need to be enabled.

core = hashbrown

The "core" features enables use of "hashbrown" since core doesn't have a HashMap implementation, and a workaround for Cargo #4866.

testing_hooks

This enables some additional functions useful for writing tests, but which can significantly increase the size of the library.

Affects isa::TargetIsa.emit_inst

x86 all-arch?

ISA targets for which we should build.
If no ISA targets are explicitly enabled, the ISA target for the host machine is enabled.

arm32 arm64 riscv all-arch?
all-arch = arm32, arm64, riscv, x86

Option to enable all architectures.

enable-serde = serde

For dependent crates that want to serialize some parts of cranelift

basic-blocks default

Temporary feature that enforces basic block semantics.

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.

hashbrown core?

Enables hashbrown ^0.6

serde enable-serde?