Cargo Features

[dependencies]
cairo-vm = { version = "2.0.0-rc0", default-features = false, features = ["std", "cairo-1-hints", "mod_builtin", "test_utils", "extensive_hints", "clap"] }
default = std

The std feature is set by default whenever cairo-vm is added without default-features = false somewhere in the dependency tree.

std default test_utils?

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

only for std

cairo-1-hints

Enables cairo-lang-starknet and cairo-lang-starknet-classes

cairo-lang-starknet:

Dependencies for cairo-1-hints feature

and ark-ff ^0.4.2, ark-std ^0.4.0, and cairo-lang-casm

ark-ff:

TODO: check these dependencies for wasm compatibility

Affects hint_processor::cairo_1_hint_processor

tracer mod_builtin
test_utils = std

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

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

Enable arbitrary when fuzzing

Affects cairo_run::cairo_run_fuzzed_program, hint_code::SKIP_NEXT_INSTRUCTION, hint_code::PRINT_FELT, hint_code::PRINT_ARR, hint_code::PRINT_DICT, builtin_hint_processor::print, builtin_hint_processor::skip_next_instruction, vm::hooks

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

Features from optional dependencies

clap implicit feature

Enables clap

Used to derive clap traits for CLIs