🌴 Empowering everyone to build reliable and efficient smart contracts.
Find a file
2025-08-04 14:11:13 -03:00
.devcontainer Create devcontainer.json (#4377) 2023-06-06 00:53:23 +03:00
.github feat: forc mcp server - with forc-call tool integration (#7284) 2025-07-24 08:18:31 -07:00
.vscode Fix function_cache garbage collection bug (#6555) 2024-09-18 09:18:02 +01:00
deployment Update Rust in dockerfile to 1.87 (#7201) 2025-05-28 14:14:07 +04:00
docs feat: forc-mcp auth for mcp server hosting (#7300) 2025-07-31 18:13:37 +12:00
examples Contract self impl (#7275) 2025-07-11 11:02:37 +00:00
forc Remove some uses of ptr_to_int and int_to_ptr, using ptr instead (#7297) 2025-08-01 19:22:59 +10:00
forc-pkg Better observability for the compiler (#7250) 2025-07-18 07:24:32 +00:00
forc-plugins fix sroa for arrays 2025-08-01 16:38:04 -03:00
forc-test Better observability for the compiler (#7250) 2025-07-18 07:24:32 +00:00
forc-tracing feat: forc call json output (#7156) 2025-05-09 20:07:27 +12:00
forc-util Bump fuel deps (#7228) 2025-06-23 13:05:53 +04:00
scripts feat: forc mcp server - with forc-call tool integration (#7284) 2025-07-24 08:18:31 -07:00
sway-ast Add #[abi_name(name = "foo")] attribute to rename ABI items. (#7057) 2025-07-17 20:12:36 -07:00
sway-core fix locals offset 2025-08-04 14:11:13 -03:00
sway-error Fix type check for variables in const generics (#7273) 2025-07-20 08:29:34 +04:00
sway-features Implement new hashing (#7259) 2025-07-11 14:39:29 +12:00
sway-ir fix sroa test 2025-08-01 16:38:04 -03:00
sway-lib-std Fix const generics standalone fns (#7292) 2025-07-23 16:31:09 +04:00
sway-lsp feat: check file descriptor limits before running forc node (#7302) 2025-07-31 11:31:43 +10:00
sway-parse Add #[abi_name(name = "foo")] attribute to rename ABI items. (#7057) 2025-07-17 20:12:36 -07:00
sway-types use mcli when initializing array repeat 2025-08-01 16:33:39 -03:00
sway-utils feat: registry source resolution and builds (#7038) 2025-04-09 21:09:47 -07:00
swayfmt Add migration for renaming existing panic identifiers to r#panic (#7231) 2025-06-17 22:13:24 +10:00
templates chore: update templates to use newer fuels SDK (#7024) 2025-03-18 07:13:19 +11:00
test fix locals offset 2025-08-04 14:11:13 -03: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 Subroutine calls using the new JAL instruction (#7085) 2025-07-12 08:23:53 +00:00
benchmark.sh ci: fixing typos programmatically (#5975) 2024-05-09 10:21:32 +10:00
Cargo.lock feat: forc-mcp auth for mcp server hosting (#7300) 2025-07-31 18:13:37 +12:00
Cargo.toml feat: check file descriptor limits before running forc node (#7302) 2025-07-31 11:31:43 +10:00
ci_checks.sh remove archived forc-explore plugin from CI and docs (#7257) 2025-06-27 12:53:25 +00:00
clippy.toml Workaround clippy::result_large_err error with Rust 1.65. (#3276) 2022-11-03 16:39:59 -06:00
LICENSE
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.