| Crates.io | dls-anchor |
| lib.rs | dls-anchor |
| version | 0.1.0 |
| created_at | 2025-03-07 18:27:28.808267+00 |
| updated_at | 2025-03-07 18:27:28.808267+00 |
| description | Lite IDL generator(cli) for non anchor workspaces |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1583445 |
| size | 33,259 |
A lightweight command-line tool for generating and converting Solana Anchor IDLs without requiring the full Anchor CLI installation.
cargo install --path .
Or install from crate.io:
cargo install dls-anchor
# Basic usage (in the program directory)
dls-anchor build
# Specify program path and output file
dls-anchor build --path /path/to/my/program --output my_program_idl.json
# Skip linting and docs generation
dls-anchor build --skip-lint --no-docs
# Disable account resolution
dls-anchor build --no-resolution
# Generate a legacy format IDL (pre Anchor v0.30)
dls-anchor build --legacy
# Convert from a legacy format
dls-anchor convert --input legacy_idl.json --output converted_idl.json
# Validate an IDL against the specification
dls-anchor validate --input my_program_idl.json
# Show detailed information about all instructions in the program
dls-anchor instructions --input my_program_idl.json
# Show only instruction names for a quick overview
dls-anchor instructions --input my_program_idl.json --names-only
Add the --verbose flag to any command for detailed logging:
dls-anchor --verbose build
The CLI leverages the anchor-lang-idl crate, which is extracted from the Anchor framework. It provides:
Apache License 2.0