🌴 Empowering everyone to build reliable and efficient smart contracts.
Find a file
2025-05-14 10:56:56 +10:00
.devcontainer Create devcontainer.json (#4377) 2023-06-06 00:53:23 +03:00
.github ci: Ensure that std-lib version matches forc version (#7154) 2025-05-08 08:12:35 +04:00
.vscode Fix function_cache garbage collection bug (#6555) 2024-09-18 09:18:02 +01:00
deployment Fix build-publish-master-image CI by upgrading Rust version in Dockerfile (#6882) 2025-02-05 01:32:14 +00:00
docs feat: forc call json output (#7156) 2025-05-09 20:07:27 +12:00
examples Merge std and core libraries (#6729) 2025-03-12 23:52:38 +01:00
forc codegen optimization: symbolic fuel-vm interpretation (#7109) 2025-05-05 10:50:08 +03:00
forc-pkg Upgrade CI and fix Clippy issues with Rust 1.86.0 (#7127) 2025-04-29 12:04:03 +00:00
forc-plugins feat: forc call json output (#7156) 2025-05-09 20:07:27 +12:00
forc-test Better Debug tests and impls for primitives and std lib types (#7119) 2025-05-02 06:40:34 -03:00
forc-tracing feat: forc call json output (#7156) 2025-05-09 20:07:27 +12:00
forc-util Upgrade CI and fix Clippy issues with Rust 1.86.0 (#7127) 2025-04-29 12:04:03 +00:00
scripts Implement partial equivalence and extend forc migrate tool (#6900) 2025-02-11 10:02:45 -03:00
sway-ast Implement panic expression (#7073) 2025-04-30 20:07:05 +10:00
sway-core Rename AllocatedOpcode to AllocatedInstruction to follow fuel-spec/fuel-asm terminology (#7122) 2025-05-06 08:26:09 +00:00
sway-error Implement panic expression (#7073) 2025-04-30 20:07:05 +10:00
sway-features Defining, parsing, and checking #[attribute]s (#6986) 2025-03-24 09:34:31 +11:00
sway-ir Implement panic expression (#7073) 2025-04-30 20:07:05 +10:00
sway-lib-std Optimize vec and bytes modules for bytecode size and gas usage (#7162) 2025-05-08 07:25:02 +00:00
sway-lsp init on first did open wip 2025-05-14 10:56:56 +10:00
sway-parse Support doc comments and attributes on nested items (#7146) 2025-05-08 04:40:32 +00:00
sway-types Parse raw identifiers (r#<identifier>) in expressions (#7137) 2025-05-01 10:59:53 +01:00
sway-utils feat: registry source resolution and builds (#7038) 2025-04-09 21:09:47 -07:00
swayfmt Implement panic expression (#7073) 2025-04-30 20:07:05 +10:00
templates chore: update templates to use newer fuels SDK (#7024) 2025-03-18 07:13:19 +11:00
test Optimize vec and bytes modules for bytecode size and gas usage (#7162) 2025-05-08 07:25:02 +00:00
.gitattributes Remove syntax highlighting of Sway files as Rust (#5926) 2024-04-26 11:06:49 -07:00
.gitignore Merge std and core libraries (#6729) 2025-03-12 23:52:38 +01:00
.markdownlint.yaml add docs CI, rename docs README to index (#4874) 2023-08-09 10:51:10 -06:00
.markdownlintignore add docs CI, rename docs README to index (#4874) 2023-08-09 10:51:10 -06:00
.typos.toml Improved trait coherence checking (#6844) 2025-04-17 22:57:45 +01:00
benchmark.sh ci: fixing typos programmatically (#5975) 2024-05-09 10:21:32 +10:00
Cargo.lock feat: forc call json output (#7156) 2025-05-09 20:07:27 +12:00
Cargo.toml Replace Tokio Thread File Watcher with LSP Client File Watcher (#7147) 2025-05-05 13:54:28 +04:00
ci_checks.sh Merge std and core libraries (#6729) 2025-03-12 23:52:38 +01:00
clippy.toml Workaround clippy::result_large_err error with Rust 1.65. (#3276) 2022-11-03 16:39:59 -06:00
LICENSE Create LICENSE (#452) 2021-12-11 22:28:09 -05:00
README.md docs: added a twitter shield (#6939) 2025-02-18 20:26:34 -08:00
rustfmt.toml chore: rename fn_args_layout to fn_params_layout in rustfmt.toml (#4530) 2023-05-04 08:23:35 +00:00
SECURITY.md feat: update security policy 2024-08-21 16:06:11 -07:00
update_fuel_dependencies.sh chore: add a script to bump all fuel maintained dependencies (#6684) 2024-11-03 22:20:09 -08:00

Sway

build crates.io docs twitter discord

Sway is a language developed for the Fuel blockchain. It is heavily inspired by Rust and aims to bring modern language development and performance to the blockchain ecosystem.

Documentation

For user documentation, including installing release builds, see the Sway Book: https://fuellabs.github.io/sway/latest/.

For Sway Standard library documentation, see: https://fuellabs.github.io/sway/master/std/

Also view the technical reference for the Sway programming language: https://fuellabs.github.io/sway/master/reference/

Building from Source

This section is for developing the Sway compiler and toolchain. For developing contracts and using Sway, see the above documentation section.

Dependencies

Sway is built in Rust. To begin, install the Rust toolchain following instructions at https://www.rust-lang.org/tools/install. Then configure your Rust toolchain to use Rust stable:

rustup default stable

If not already done, add the Cargo bin directory to your PATH by adding the following line to ~/.profile and restarting the shell session.

export PATH="${HOME}/.cargo/bin:${PATH}"

Building Forc

Clone the repository and build the Sway toolchain:

git clone git@github.com:FuelLabs/sway.git
cd sway
cargo build

Confirm the Sway toolchain built successfully:

cargo run --bin forc -- --help

Contributing to Sway

We welcome contributions to Sway!

Please see the Contributing To Sway section of the Sway book for guidelines and instructions to help you get started.