Build profile options
forc deploy [OPTIONS] [SIGNING_KEY]
<SIGNING_KEY> Set the key to be used for signing
Print the generated Sway AST (Abstract Syntax Tree)
Name of the build profile to use.
If unspecified, forc will use debug build profile.
Print the computed Sway DCA graph
Print the finalized ASM.
This is the state of the ASM with registers allocated and optimisations applied.
If set, outputs source file mapping in JSON format
Gas limit for the transaction
Gas price for the transaction
Print help information
Print the generated ASM.
This is the state of the ASM prior to performing register allocation and other ASM optimisations.
Print the generated Sway IR (Intermediate Representation)
By default the JSON for ABIs is formatted for human readability. By using this option JSON output will be "minified", i.e. all on one line without whitespace
By default the JSON for initial storage slots is formatted for human readability. By using this option JSON output will be "minified", i.e. all on one line without whitespace
Requires that the Forc.lock file is up-to-date. If the lock file is missing, or it needs to be updated, Forc will exit with an error
The URL of the Fuel node to which we're submitting the transaction. If unspecified,
checks the manifest's
network table, then falls back to [
If set, outputs a binary file representing the script bytes
Offline mode, prevents Forc from using the network when managing dependencies. Meaning it will only try to use previously downloaded dependencies
The directory in which the sway compiler output artifacts are placed.
By default, this is
Path to the project, if not specified, current working directory will be used
Use release build plan. If a custom release plan is not specified, it is implicitly added to the manifest file.
If --build-profile is also provided, forc omits this flag and uses provided build-profile.
Terse mode. Limited warning and error output
Output the time elapsed over each part of the compilation process
Do not sign the transaction
Print version information
You can use
forc deploy, which triggers a contract deployment transaction and sends it to a running node.
Alternatively, you can deploy your Sway contract programmatically using fuels-rs, our Rust SDK.
You can find an example within our fuels-rs book.