The Sway Programming Language
1.
Introduction
1.1.
Getting Started
1.2.
The Fuel Toolchain
1.3.
A Forc Project
1.4.
Standard Library
1.5.
Core Library
1.6.
Sway Language Standards
2.
Examples
2.1.
Counter
2.2.
FizzBuzz
2.3.
Wallet Smart Contract
2.4.
Liquidity Pool
2.5.
Sway Applications
3.
Program Types
3.1.
Contracts
3.2.
Libraries
3.3.
Scripts
3.4.
Predicates
4.
Sway Language Basics
4.1.
Variables
4.2.
Built-in Types
4.3.
Commonly Used Library Types
4.4.
Blockchain Types
4.5.
Converting Types
4.6.
Functions
4.7.
Structs, Tuples, and Enums
4.8.
Methods and Associated Functions
4.9.
Constants
4.10.
Comments and Logging
4.11.
Control Flow
5.
Blockchain Development with Sway
5.1.
Hashing and Cryptography
5.2.
Contract Storage
5.3.
Function Purity
5.4.
Identifiers
5.5.
Native Assets
5.6.
Access Control
5.7.
Calling Contracts
5.8.
External Code
6.
Advanced Concepts
6.1.
Advanced Types
6.2.
Advanced Storage
6.3.
Generic Types
6.4.
Traits
6.5.
Associated Types
6.6.
Generics and Trait Constraints
6.7.
Assembly
6.8.
Never Type
7.
Common Collections
7.1.
Vectors on the Heap
7.2.
Storage Vectors
7.3.
Storage Maps
8.
Testing
8.1.
Unit Testing
8.2.
Testing with Rust
9.
Debugging
9.1.
Debugging with CLI
9.2.
Debugging with IDE
10.
Sway LSP
10.1.
Installation
10.2.
Features
10.3.
Troubleshooting
11.
Sway Reference
11.1.
Sway Libraries
11.2.
Compiler Intrinsics
11.3.
Attributes
11.4.
Style Guide
11.5.
Known Issues and Workarounds
11.6.
Behavior Considered Undefined
11.7.
Differences From Solidity
11.8.
Differences From Rust
11.9.
Contributing To Sway
11.10.
Keywords
12.
Forc Reference
12.1.
Manifest Reference
12.2.
Workspaces
12.3.
Dependencies
12.4.
Commands
12.4.1.
forc addr2line
12.4.2.
forc build
12.4.3.
forc check
12.4.4.
forc clean
12.4.5.
forc completions
12.4.6.
forc contract-id
12.4.7.
forc init
12.4.8.
forc new
12.4.9.
forc parse-bytecode
12.4.10.
forc plugins
12.4.11.
forc predicate-root
12.4.12.
forc test
12.4.13.
forc update
12.4.14.
forc template
12.5.
Plugins
12.5.1.
forc client
12.5.1.1.
forc deploy
12.5.1.2.
forc run
12.5.1.3.
forc submit
12.5.2.
forc crypto
12.5.3.
forc debug
12.5.4.
forc doc
12.5.5.
forc explore
12.5.6.
forc fmt
12.5.7.
forc lsp
Light
Rust
Coal
Navy
Ayu
The Sway Programming Language
Here are a list of commands available to forc:
forc addr2line
forc build
forc check
forc clean
forc completions
forc contract-id
forc init
forc new
forc parse-bytecode
forc plugins
forc predicate-root
forc test
forc update
forc template