Icon SunFilledIcon MoonStars
Icon SunFilledIcon MoonStars

Icon LinkThe Fuel Toolchain

The Fuel toolchain consists of several components.

Icon LinkForc (forc)

The "Fuel Orchestrator" Forc Icon Link is our equivalent of Rust's Cargo Icon Link. It is the primary entry point for creating, building, testing, and deploying Sway projects.

Icon LinkSway Language Server (forc-lsp)

The Sway Language Server forc-lsp is provided to expose features to IDEs. Installation instructions.

Currently, only Visual Studio Code is supported through a plugin Icon Link. Vim support is forthcoming, though syntax highlighting is provided Icon Link.

Note: There is no need to manually run forc-lsp (the plugin will automatically start it), however both forc and forc-lsp must be in your $PATH. To check if forc is in your $PATH, type forc --help in your terminal.

Icon LinkSway Formatter (forc-fmt)

A canonical formatter is provided with forc-fmt. Installation instructions. It can be run manually with

forc fmt

The Visual Studio Code plugin Icon Link will automatically format Sway files with forc-fmt on save, though you might have to explicitly set the Sway plugin as the default formatter, like this:

"[sway]": {
  "editor.defaultFormatter": "FuelLabs.sway-vscode-plugin"
}

Icon LinkFuel Core (fuel-core)

An implementation of the Fuel protocol, Fuel Core Icon Link, is provided together with the Sway toolchain to form the Fuel toolchain. The Rust SDK Icon Link will automatically start and stop an instance of the node during tests, so there is no need to manually run a node unless using Forc directly without the SDK.