metaplex-foundation / shank

Extracts IDL from Solana Rust contracts
https://docs.rs/crate/shank_macro/latest
118 stars 23 forks source link

feat: shank cli to generate IDL #8

Closed thlorenz closed 2 years ago

thlorenz commented 2 years ago

Adds simple CLI using clap. Right now it includes an idl command, i.e. shank idl ..

Uses current dir to derive input and output directories but also supports providing them:

➝  cargo run idl --help

USAGE:
    shank idl [OPTIONS]

OPTIONS:
    -h, --help                       Print help information
    -o, --out-dir <OUT_DIR>          Output directory for the IDL JSON [default: idl]
    -r, --crate-root <CRATE_ROOT>    Directory of program crate for which to generate the IDL