Skip to content

Commit

Permalink
forc: Improve the print_*_asm CLI option docs (FuelLabs#2095)
Browse files Browse the repository at this point in the history
Previously, these implied no bytecode was generated if the flag was not
set, however this is not the case.
  • Loading branch information
mitchmindtree authored Jun 23, 2022
1 parent 2c5564b commit 91b8eee
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
11 changes: 8 additions & 3 deletions forc/src/cli/commands/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,18 @@ pub struct Command {
/// Path to the project, if not specified, current working directory will be used.
#[clap(short, long)]
pub path: Option<String>,
/// Whether to compile to bytecode (false) or to print out the generated ASM (true).
/// Print the finalized ASM.
///
/// This is the state of the ASM with registers allocated and optimisations applied.
#[clap(long)]
pub print_finalized_asm: bool,
/// Whether to compile to bytecode (false) or to print out the generated ASM (true).
/// Print the generated ASM.
///
/// This is the state of the ASM prior to performing register allocation and other ASM
/// optimisations.
#[clap(long)]
pub print_intermediate_asm: bool,
/// Whether to compile to bytecode (false) or to print out the generated IR (true).
/// Print the generated Sway IR (Intermediate Representation).
#[clap(long)]
pub print_ir: bool,
/// If set, outputs a binary file representing the script bytes.
Expand Down
11 changes: 8 additions & 3 deletions forc/src/cli/commands/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ pub struct Command {
/// Path to the project, if not specified, current working directory will be used.
#[clap(short, long)]
pub path: Option<String>,
/// Whether to compile to bytecode (false) or to print out the generated ASM (true).
/// Print the finalized ASM.
///
/// This is the state of the ASM with registers allocated and optimisations applied.
#[clap(long)]
pub print_finalized_asm: bool,
/// Whether to compile to bytecode (false) or to print out the generated ASM (true).
/// Print the generated ASM.
///
/// This is the state of the ASM prior to performing register allocation and other ASM
/// optimisations.
#[clap(long)]
pub print_intermediate_asm: bool,
/// Whether to compile to bytecode (false) or to print out the IR (true).
/// Print the generated Sway IR (Intermediate Representation).
#[clap(long)]
pub print_ir: bool,
/// If set, outputs a binary file representing the script bytes.
Expand Down
11 changes: 8 additions & 3 deletions forc/src/cli/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,20 @@ pub struct Command {
#[clap(short, long)]
pub kill_node: bool,

/// Whether to compile to bytecode (false) or to print out the generated ASM (true).
/// Print the finalized ASM.
///
/// This is the state of the ASM with registers allocated and optimisations applied.
#[clap(long)]
pub print_finalized_asm: bool,

/// Whether to compile to bytecode (false) or to print out the generated ASM (true).
/// Print the generated ASM.
///
/// This is the state of the ASM prior to performing register allocation and other ASM
/// optimisations.
#[clap(long)]
pub print_intermediate_asm: bool,

/// Whether to compile to bytecode (false) or to print out the IR (true).
/// Print the generated Sway IR (Intermediate Representation).
#[clap(long)]
pub print_ir: bool,

Expand Down

0 comments on commit 91b8eee

Please sign in to comment.