// the find
FuelLabs/sway
🌴 Empowering everyone to build reliable and efficient smart contracts.
Sway is a Rust-inspired smart contract language built specifically for the Fuel blockchain VM. It's for developers who want to write contracts with proper type safety, a `purity` system that enforces read-only vs. state-mutating functions at the type level, and a Cargo-alike toolchain (forc) rather than Hardhat. If you're not building on Fuel, this is irrelevant to you.
The purity system is genuinely useful — functions annotated `#[storage(read)]` or `#[storage(write)]` are enforced by the compiler, catching a class of bugs that Solidity leaves to auditors. The toolchain is mature: forc ships a formatter, LSP, doc generator, test runner, and deploy client as first-party plugins, not community afterthoughts. Predicates as a first-class program type (stateless scripts that gate UTXOs without deploying a contract) are an interesting primitive that Solidity simply doesn't have. The compiler is written in Rust with a clear IR layer, so it's actually hackable.
The entire bet is on Fuel mainnet adoption — if Fuel doesn't get traction, Sway contracts have zero portability to EVM chains, and right now Fuel's ecosystem is thin compared to Ethereum. The language is still pre-1.0 with known issues documented in `known_issues_and_workarounds.md`, which is not a file you want to see in a production smart contract toolchain. Testing story requires a Fuel node or the SDK harness; there's no lightweight in-process simulation the way Foundry's cheatcodes work for EVM. Error messages from the compiler appear to be improving but the `undefined_behavior.md` reference doc existing at all is a yellow flag for a language targeting financial contracts.