Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

sway

> 编程语言
Open source

🌴 Empowering everyone to build reliable and efficient smart contracts.

61.5K stars0 likes2 views
WebsiteGitHub

About

🌴 Empowering everyone to build reliable and efficient smart contracts.

Sway

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 latest released Sway Book: https://fuellabs.github.io/sway/latest/.

The documentation URLs describe different source versions:

  • latest redirects to the most recently published Sway release.
  • vX.Y.Z is documentation built from that exact Sway release tag.
  • master is built from the default branch and may describe unreleased behavior.

These labels are Sway documentation versions. They are not Fuelup channel names and do not identify the toolchain activated on a Fuel network. Check the compiler you are running with forc --version and consult the Fuelup channel documentation when selecting network-compatible tooling.

For Sway standard library documentation from the default branch, see https://fuellabs.github.io/sway/master/std/.

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

The Stable Sway and Forc pages on docs.fuel.network are published by FuelLabs/docs-hub from an explicitly selected Sway release. That selection can differ from both the newest upstream release and the compiler in a named Fuelup network channel.

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:

bash
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.

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

Building Forc

Clone the repository and build the Sway toolchain:

bash
git clone [email protected]:FuelLabs/sway.git
cd sway
cargo build

Confirm the Sway toolchain built successfully:

bash
cargo run --bin forc -- --help

All other scripts/commands

For all other scripts and commands use https://github.com/casey/just:

> just --list
Available recipes:
    [automation]
    update-contract-ids
    update-fuel-dependencies

    [benchmark]
    benchmark
    benchmark-tests
    collect-gas-usage

    [build]
    build-highlightjs
    build-prism
    generate-sway-lib-std

    [ci]
    ci-check
    install-ci-check

    [test]
    test-forc-fmt-check-panic

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.

Issues· 950 open

View all issuesOpen on GitHub
  • #6496

    Trait constraint error does not always mention the exact constrained type

    compilercompiler: frontendcompiler: uiteam:compilerUpdated Sep 17, 2026
  • #7615

    Using associated const initialized to `__size_of::<V>` causes compiler panic in `type_check_analysis.rs`

    bugcompilerUpdated Sep 14, 2026
  • #7663

    Compiler panics when using `--dump-impls`

    bugcompilercompiler: frontendUpdated Sep 14, 2026
  • #7730

    Release ASM cleanup removes observable NOOP and self-MOVE status clearing across a join

    Updated Sep 14, 2026
  • #7731

    Generic aggregate bound checking ignores trait type arguments

    Updated Sep 14, 2026
  • #7681

    Compiler panics on `String::from_shared_ascii_str_array`

    bugcompilercompiler: irUpdated Sep 13, 2026
  • #7711

    sway-lsp: deadlock via read-lock in hover_data

    bugtriageUpdated Sep 13, 2026
  • #7732

    Release constant folding removes arithmetic operations that must clear $of

    Updated Sep 13, 2026
  • #5727

    Stabilize encoding v1

    compilerteam:compilerUpdated Sep 11, 2026
  • #5063

    References

    enhancementlanguage featureNeeds RFCtracking-issueUpdated Sep 11, 2026

> Tags

Rustcompilerfuellanguagesway

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言