update clap to v3: rbpf-cli
This commit is contained in:
parent
e2bc326d58
commit
cc55684f5f
|
@ -10,7 +10,7 @@ edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "3.0.0-beta.2"
|
clap = { version = "3.1.5", features = ["cargo"] }
|
||||||
serde = "1.0.136"
|
serde = "1.0.136"
|
||||||
serde_json = "1.0.79"
|
serde_json = "1.0.79"
|
||||||
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.10.1" }
|
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.10.1" }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use {
|
use {
|
||||||
clap::{crate_version, App, Arg},
|
clap::{crate_version, Arg, Command},
|
||||||
serde::{Deserialize, Serialize},
|
serde::{Deserialize, Serialize},
|
||||||
serde_json::Result,
|
serde_json::Result,
|
||||||
solana_bpf_loader_program::{
|
solana_bpf_loader_program::{
|
||||||
|
@ -53,7 +53,7 @@ fn load_accounts(path: &Path) -> Result<Input> {
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
solana_logger::setup();
|
solana_logger::setup();
|
||||||
let matches = App::new("Solana BPF CLI")
|
let matches = Command::new("Solana BPF CLI")
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
.author("Solana Maintainers <maintainers@solana.foundation>")
|
.author("Solana Maintainers <maintainers@solana.foundation>")
|
||||||
.about(
|
.about(
|
||||||
|
@ -88,7 +88,7 @@ and the following fields are required
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("PROGRAM")
|
Arg::new("PROGRAM")
|
||||||
.about(
|
.help(
|
||||||
"Program file to use. This is either an ELF shared-object file to be executed, \
|
"Program file to use. This is either an ELF shared-object file to be executed, \
|
||||||
or an assembly file to be assembled and executed.",
|
or an assembly file to be assembled and executed.",
|
||||||
)
|
)
|
||||||
|
@ -97,7 +97,7 @@ and the following fields are required
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("input")
|
Arg::new("input")
|
||||||
.about(
|
.help(
|
||||||
"Input for the program to run on, where FILE is a name of a JSON file \
|
"Input for the program to run on, where FILE is a name of a JSON file \
|
||||||
with input data, or BYTES is the number of 0-valued bytes to allocate for program parameters",
|
with input data, or BYTES is the number of 0-valued bytes to allocate for program parameters",
|
||||||
)
|
)
|
||||||
|
@ -109,7 +109,7 @@ with input data, or BYTES is the number of 0-valued bytes to allocate for progra
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("memory")
|
Arg::new("memory")
|
||||||
.about("Heap memory for the program to run on")
|
.help("Heap memory for the program to run on")
|
||||||
.short('m')
|
.short('m')
|
||||||
.long("memory")
|
.long("memory")
|
||||||
.value_name("BYTES")
|
.value_name("BYTES")
|
||||||
|
@ -118,7 +118,7 @@ with input data, or BYTES is the number of 0-valued bytes to allocate for progra
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("use")
|
Arg::new("use")
|
||||||
.about(
|
.help(
|
||||||
"Method of execution to use, where 'cfg' generates Control Flow Graph \
|
"Method of execution to use, where 'cfg' generates Control Flow Graph \
|
||||||
of the program, 'disassembler' dumps disassembled code of the program, 'interpreter' runs \
|
of the program, 'disassembler' dumps disassembled code of the program, 'interpreter' runs \
|
||||||
the program in the virtual machine's interpreter, and 'jit' precompiles the program to \
|
the program in the virtual machine's interpreter, and 'jit' precompiles the program to \
|
||||||
|
@ -133,7 +133,7 @@ native machine code before execting it in the virtual machine.",
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("instruction limit")
|
Arg::new("instruction limit")
|
||||||
.about("Limit the number of instructions to execute")
|
.help("Limit the number of instructions to execute")
|
||||||
.short('l')
|
.short('l')
|
||||||
.long("limit")
|
.long("limit")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
|
@ -142,25 +142,25 @@ native machine code before execting it in the virtual machine.",
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("trace")
|
Arg::new("trace")
|
||||||
.about("Output trace to 'trace.out' file using tracing instrumentation")
|
.help("Output trace to 'trace.out' file using tracing instrumentation")
|
||||||
.short('t')
|
.short('t')
|
||||||
.long("trace"),
|
.long("trace"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("profile")
|
Arg::new("profile")
|
||||||
.about("Output profile to 'profile.dot' file using tracing instrumentation")
|
.help("Output profile to 'profile.dot' file using tracing instrumentation")
|
||||||
.short('p')
|
.short('p')
|
||||||
.long("profile"),
|
.long("profile"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("verify")
|
Arg::new("verify")
|
||||||
.about("Run the verifier before execution or disassembly")
|
.help("Run the verifier before execution or disassembly")
|
||||||
.short('v')
|
.short('v')
|
||||||
.long("verify"),
|
.long("verify"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("output_format")
|
Arg::new("output_format")
|
||||||
.about("Return information in specified output format")
|
.help("Return information in specified output format")
|
||||||
.long("output")
|
.long("output")
|
||||||
.value_name("FORMAT")
|
.value_name("FORMAT")
|
||||||
.global(true)
|
.global(true)
|
||||||
|
|
Loading…
Reference in New Issue