From 91e45ce50a6e1e8b2fe559d847ec7f77e445f715 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Thu, 23 Jun 2022 14:20:33 +1000 Subject: [PATCH] forc: Improve the `print_*_asm` CLI option docs Previously, these implied no bytecode was generated if the flag was not set, however this is not the case. --- forc/src/cli/commands/build.rs | 11 ++++++++--- forc/src/cli/commands/deploy.rs | 11 ++++++++--- forc/src/cli/commands/run.rs | 11 ++++++++--- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/forc/src/cli/commands/build.rs b/forc/src/cli/commands/build.rs index eb7573f7413..6e00d7ddd36 100644 --- a/forc/src/cli/commands/build.rs +++ b/forc/src/cli/commands/build.rs @@ -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, - /// 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. diff --git a/forc/src/cli/commands/deploy.rs b/forc/src/cli/commands/deploy.rs index cc66e241d30..5493a1cd9f6 100644 --- a/forc/src/cli/commands/deploy.rs +++ b/forc/src/cli/commands/deploy.rs @@ -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, - /// 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. diff --git a/forc/src/cli/commands/run.rs b/forc/src/cli/commands/run.rs index bc23a87da39..e30c408bf28 100644 --- a/forc/src/cli/commands/run.rs +++ b/forc/src/cli/commands/run.rs @@ -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,