1. The Sway Programming Language
  2. 1. Introduction
    1. 1.1. Installation
    2. 1.2. Sway Quickstart
    3. 1.3. The Fuel Toolchain
    4. 1.4. A Forc Project
    5. 1.5. Standard Library
  3. 2. Examples
    1. 2.1. Counter
    2. 2.2. Subcurrency
    3. 2.3. FizzBuzz
    4. 2.4. Wallet Smart Contract
  4. 3. Program Types
    1. 3.1. Contracts
    2. 3.2. Libraries
    3. 3.3. Scripts
    4. 3.4. Predicates
  5. 4. Sway Language Basics
    1. 4.1. Variables
    2. 4.2. Built-in Types
    3. 4.3. Blockchain Types
    4. 4.4. Functions
    5. 4.5. Structs, Tuples, and Enums
    6. 4.6. Methods and Associated Functions
    7. 4.7. Comments and Logging
    8. 4.8. Control Flow
  6. 5. Blockchain Development with Sway
    1. 5.1. Hashing and Cryptography
    2. 5.2. Contract Storage
    3. 5.3. Function Purity
    4. 5.4. Identifiers
    5. 5.5. Native Assets
    6. 5.6. Access Control
    7. 5.7. Calling Contracts
  7. 6. Advanced Concepts
    1. 6.1. Generic Types
    2. 6.2. Traits
    3. 6.3. Assembly
  8. 7. Common Collections
    1. 7.1. Vectors on the Heap
    2. 7.2. Storage Vectors
    3. 7.3. Storage Maps
  9. 8. Testing
    1. 8.1. Testing with Rust
  10. 9. Application Frontend
    1. 9.1. TypeScript SDK
  11. 10. Sway Reference
    1. 10.1. Style Guide
    2. 10.2. Known Issues and Workarounds
    3. 10.3. Differences From Solidity
    4. 10.4. Differences From Rust
    5. 10.5. Contributing To Sway
  12. 11. Forc Reference
    1. 11.1. Manifest Reference
    2. 11.2. Dependencies
    3. 11.3. Commands
      1. 11.3.1. forc addr2line
      2. 11.3.2. forc build
      3. 11.3.3. forc check
      4. 11.3.4. forc clean
      5. 11.3.5. forc completions
      6. 11.3.6. forc init
      7. 11.3.7. forc new
      8. 11.3.8. forc parse-bytecode
      9. 11.3.9. forc plugins
      10. 11.3.10. forc test
      11. 11.3.11. forc update
      12. 11.3.12. forc template
    4. 11.4. Plugins
      1. 11.4.1. forc client
        1. 11.4.1.1. forc deploy
        2. 11.4.1.2. forc run
      2. 11.4.2. forc explore
      3. 11.4.3. forc fmt
      4. 11.4.4. forc lsp

The Sway Programming Language

Sway Reference

  • Style Guide
  • Known Issues and Workarounds
  • Differences from Rust
  • Differences from Solidity
  • Contributing to Sway