Cargo Features

[dependencies]
cairo-vm = { version = "1.0.0-rc1", default-features = false, features = ["std", "with_mimalloc", "cairo-1-hints", "test_utils", "skip_next_instruction_hint", "hooks", "arbitrary", "extensive_hints", "print"] }
default = std, with_mimalloc

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

std default arbitrary? print?

Enables zip, std of anyhow and bincode, std of serde_json, starknet-crypto, starknet-types-core ^0.0.9, and thiserror-no-std and num-prime

only for std

with_mimalloc default

Enables mimalloc

cairo-1-hints

Enables cairo-lang-starknet

Dependencies for cairo-1-hints feature

and ark-ff, ark-std, and cairo-lang-casm

ark-ff:

TODO: check these dependencies for wasm compatibility

Affects hint_processor::cairo_1_hint_processor

test_utils = hooks, print, skip_next_instruction_hint

Note that these features are not retro-compatible with the cairo Python VM.
This feature will reference every test-oriented feature

skip_next_instruction_hint test_utils?

Affects hint_code::SKIP_NEXT_INSTRUCTION, builtin_hint_processor::skip_next_instruction

hooks test_utils?

Affects vm::hooks

arbitrary = std

Enables arbitrary and std of starknet-types-core ^0.0.9 and arbitrary

Enable arbitrary when fuzzing

Affects cairo_run::cairo_run_fuzzed_program

extensive_hints

Allows extending the set of hints for the current vm run from within a hint.
For a usage example checkout vm/src/tests/run_deprecated_contract_class_simplified.rs

Affects hint_processor_definition::HintProcessorLogic.execute_hint_extensive, program::HintRange

print test_utils? = std

Affects builtin_hint_processor::print