The Sway Programming Language
1.
Introduction
1.1.
Installation
1.2.
Getting Started
1.3.
The Sway Toolchain
1.4.
A Forc Project
1.5.
Standard Library
2.
Examples
2.1.
Counter
2.2.
Subcurrency
2.3.
FizzBuzz
2.4.
Wallet Smart Contract
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.
Blockchain Types
4.4.
Functions
4.5.
Structs, Tuples, and Enums
4.6.
Methods and Associated Functions
4.7.
Comments and Logging
4.8.
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
6.
Advanced Concepts
6.1.
Generic Types
6.2.
Traits
6.3.
Trait Constraints
6.4.
Assembly
7.
Testing
7.1.
Testing with Rust
8.
Application Frontend
8.1.
TypeScript SDK
9.
Sway Reference
9.1.
Style Guide
9.2.
Known Issues and Workarounds
9.3.
Differences From Solidity
9.4.
Differences From Rust
9.5.
Contributing To Sway
10.
Forc Reference
10.1.
Manifest Reference
10.2.
Dependencies
10.3.
Commands
10.3.1.
forc addr2line
10.3.2.
forc build
10.3.3.
forc check
10.3.4.
forc clean
10.3.5.
forc completions
10.3.6.
forc deploy
10.3.7.
forc init
10.3.8.
forc json-abi
10.3.9.
forc new
10.3.10.
forc parse-bytecode
10.3.11.
forc plugins
10.3.12.
forc run
10.3.13.
forc test
10.3.14.
forc update
10.3.15.
forc template
10.4.
Plugins
10.4.1.
forc explore
10.4.2.
forc fmt
10.4.3.
forc lsp
Light (default)
Rust
Coal
Navy
Ayu
The Sway Programming Language
Sway Reference
Style Guide
Known Issues and Workarounds
Differences from Rust
Differences from Solidity
Contributing to Sway