🌴 Empowering everyone to build reliable and efficient smart contracts.
Find a file
2021-12-11 22:28:09 -05:00
.github Update forc code owner (#450) 2021-12-09 07:59:49 -08:00
core-types Run cargo-sort on workspace (#420) 2021-11-26 09:29:44 +01:00
core_lang Added Docstrings (#453) 2021-12-11 14:36:05 -06:00
docs Allow binary ops in stdlib (#441) 2021-12-07 10:44:59 -08:00
docstrings Run cargo-sort on workspace (#420) 2021-11-26 09:29:44 +01:00
example_project Allow binary ops in stdlib (#441) 2021-12-07 10:44:59 -08:00
forc Fix HllParseTree type (#447) 2021-12-09 10:18:18 -08:00
formatter Fix HllParseTree type (#447) 2021-12-09 10:18:18 -08:00
lib-core Allow binary ops in stdlib (#441) 2021-12-07 10:44:59 -08:00
lib-std Formatting lib-std (#445) 2021-12-08 14:07:27 -07:00
parser Run cargo-sort on workspace (#420) 2021-11-26 09:29:44 +01:00
scripts Update syntax highlighting (#426) 2021-12-07 14:18:58 +02:00
sway-server Fix HllParseTree type (#447) 2021-12-09 10:18:18 -08:00
test allow structs/enums with zero fields (#419) 2021-12-08 14:59:43 -08:00
.gitattributes .gitattributes to highlight .sw syntax as rust (#403) 2021-11-18 09:43:16 -07:00
.gitignore Remove vscode plugin (#54) 2021-05-26 17:45:36 +02:00
Cargo.lock Implement Generic Functions, Structs, and Enums; Refactor storage API into a generic implementation; Script data stdlib functionality (#391) 2021-11-26 16:14:43 -08:00
Cargo.toml Run cargo-sort on workspace (#420) 2021-11-26 09:29:44 +01:00
LICENSE Create LICENSE (#452) 2021-12-11 22:28:09 -05:00
README.md add --locked to install command (#321) 2021-10-21 11:00:41 -05:00
rustfmt.toml rustfmt.toml proposal (#265) 2021-09-24 08:36:01 -05:00

Sway

Compile and Test Community

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

Building from Source

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:

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.

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

To ensure access to all dependent repositories, create and add SSH keys to your GitHub account.

Building Sway

Clone the repository and build the Sway toolchain:

git clone git@github.com:FuelLabs/sway.git
cd sway
cargo build

Confirm the Sway toolchain built successfully:

cargo run --bin forc -- --help
# or
./target/debug/forc --help

To run forc from any directory, install forc to your local Cargo bin directory:

cargo install --locked --path forc
# Also install sway-server if using the IDE plugin
cargo install --locked --path sway-server