pub enum PackageCommand {
    New {
        name: String,
    },
    Build,
    Info,
    ErrMapGen {
        error_prefix: Option<String>,
        output_file: PathBuf,
    },
    Prove {
        target_filter: Option<String>,
        for_test: bool,
        options: Option<ProverOptions>,
    },
    CoverageReport {
        options: CoverageSummaryOptions,
    },
    UnitTest {
        instruction_execution_bound: u64,
        filter: Option<String>,
        list: bool,
        num_threads: usize,
        report_statistics: bool,
        report_storage_on_error: bool,
        check_stackless_vm: bool,
        verbose_mode: bool,
        compute_coverage: bool,
    },
    BytecodeView {
        interactive: bool,
        package_name: Option<String>,
        module_or_script_name: String,
    },
}

Variants

New

Fields

name: String

The name of the package to be created.

Create a new Move package with name name at path. If path is not provided the package will be created in the directory name.

Build

Build the package at path. If no path is provided defaults to current directory.

Info

Print address information.

ErrMapGen

Fields

error_prefix: Option<String>

The prefix that all error reasons within modules will be prefixed with, e.g., “E” if all error reasons are “E_CANNOT_PERFORM_OPERATION”, “E_CANNOT_ACCESS”, etc.

output_file: PathBuf

The file to serialize the generated error map to.

Generate error map for the package and its dependencies at path for use by the Move explanation tool.

Prove

Fields

target_filter: Option<String>

The target filter used to prune the modules to verify. Modules with a name that contains this string will be part of verification.

for_test: bool

Internal field indicating that this prover run is for a test.

options: Option<ProverOptions>

Any options passed to the prover.

Run the Move Prover on the package at path. If no path is provided defaults to current directory. Use .. prove .. -- <options> to pass on options to the prover.

CoverageReport

Fields

Inspect test coverage for this package. A previous test run with the --coverage flag must have previously been run.

UnitTest

Fields

instruction_execution_bound: u64

Bound the number of instructions that can be executed by any one test.

filter: Option<String>

A filter string to determine which unit tests to run. A unit test will be run only if it contains this string in its fully qualified (::<module_name>::<fn_name>) name.

list: bool

List all tests

num_threads: usize

Number of threads to use for running tests.

report_statistics: bool

Report test statistics at the end of testing

report_storage_on_error: bool

Show the storage state at the end of execution of a failing test

check_stackless_vm: bool

Use the stackless bytecode interpreter to run the tests and cross check its results with the execution result from Move VM.

verbose_mode: bool

Verbose mode

compute_coverage: bool

Collect coverage information for later use with the various package coverage subcommands

Run Move unit tests in this package.

BytecodeView

Fields

interactive: bool

Start a disassembled bytecode-to-source explorer

package_name: Option<String>

The package name. If not provided defaults to current package modules only

module_or_script_name: String

The name of the module or script in the package to disassemble

Disassemble the Move bytecode pointed to

Trait Implementations

👎 Deprecated since 3.1.0:

Replaced with `CommandFactory::command

Deprecated, replaced with CommandFactory::command

👎 Deprecated since 3.1.0:

Replaced with `CommandFactory::command_for_update

Deprecated, replaced with CommandFactory::command_for_update

Build a Command that can instantiate Self. Read more

Build a Command that can update self. Read more

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more

Assign values from ArgMatches to self.

Parse from std::env::args_os(), exit on error

Parse from std::env::args_os(), return Err on error.

Parse from iterator, exit on error

Parse from iterator, return Err on error.

Update from iterator, exit on error

Update from iterator, return Err on error.

Append to Command so it can instantiate Self. Read more

Append to Command so it can update self. Read more

Test whether Self can parse a specific subcommand

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more