Skip to main content

Crate anchor_cli

Crate anchor_cli 

Source

Modules§

codama
Codama IDL integration for the Anchor CLI.
config
coverage
anchor coverage — generates LCOV source-level coverage from SBF register traces. Reuses the debugger’s DWARF resolution to map executed PCs to source lines.
debugger
anchor debugger — a foundry-style SBF instruction stepper built on the same per-test register traces that --profile consumes for flamegraphs.
rust_template

Macros§

home_path

Structs§

Opts

Enums§

ClusterCommand
Command
ConfigCommand
IdlCommand
KeygenCommand
KeysCommand
ProgramCommand

Constants§

BUILD_SUBCOMMAND
Subcommand + toolchain pin passed to cargo for every SBF build the CLI invokes. --tools-version v1.52 is the SBF platform-tools release the rest of anchor’s stack is tested against; using anything else risks link errors against the bundled stdlib (e.g. feature edition2024 is required when the user’s host toolchain is too old to build modern transitive deps).
DEFAULT_RPC_PORT
Default RPC port
DOCKER_BUILDER_VERSION
VERSION
WEBSOCKET_PORT_OFFSET
WebSocket port offset for solana-test-validator (RPC port + 1)

Statics§

AVM_HOME

Functions§

build
cargo_build_sbf
Shell out to cargo build-sbf with our pinned toolchain (BUILD_SUBCOMMAND) plus any user-supplied extra_args.
create_files
Create files from the given (path, content) tuple array.
entry
expand
get_recommended_micro_lamport_fee
Get the recommended priority fee from the RPC client, falling back to 0 if unavailable
override_or_create_files
Override or create files from the given (path, content) tuple array.
prepend_compute_unit_ix
Prepend a compute unit ix, if the priority fee is greater than 0.
target_dir
Return the cargo build artifacts directory. The successful result is cached.
verify

Type Aliases§

Files
Array of (path, content) tuple.