🌴 Empowering everyone to build reliable and efficient smart contracts.
Find a file
Daniel Frederico Lins Leite e025355b5f
Encoding v1 docs (#6350)
## Description

This PR introduces some slides with more detailed explanation how the
"abi encoding v1" works.

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [x] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: K1-R1 <77465250+K1-R1@users.noreply.github.com>
Co-authored-by: IGI-111 <igi-111@protonmail.com>
2025-01-24 19:14:32 +01:00
.devcontainer Create devcontainer.json (#4377) 2023-06-06 00:53:23 +03:00
.github fix: scope access to FuelLabs org 2025-01-23 14:48:11 -08:00
.vscode Fix function_cache garbage collection bug (#6555) 2024-09-18 09:18:02 +01:00
deployment Update rust version in forc docker image (#6422) 2024-08-16 22:35:28 +00:00
docs Encoding v1 docs (#6350) 2025-01-24 19:14:32 +01:00
examples Implement Iterator for StorageVec (#6821) 2025-01-14 16:18:16 +01:00
forc codegen: Use idiomatic fuel-vm ops for memcpy and addr_of (#6795) 2025-01-16 10:49:25 +11:00
forc-pkg Refactor the module structure of the namespace module (#6291) 2025-01-17 00:55:37 +00:00
forc-plugins fix: Adds generic trait impls to forc-doc (#6850) 2025-01-23 08:40:21 +11:00
forc-test Show error when contract method names conflict (#6782) 2025-01-15 15:27:25 +01:00
forc-tracing Add forc-migrate tool (#6790) 2025-01-20 13:14:20 +01:00
forc-util Add forc-migrate tool (#6790) 2025-01-20 13:14:20 +01:00
scripts Add forc-migrate tool (#6790) 2025-01-20 13:14:20 +01:00
sway-ast Add forc-migrate tool (#6790) 2025-01-20 13:14:20 +01:00
sway-core Do not allow inline VirtualImmediate* instantiations (#6852) 2025-01-22 19:37:14 +01:00
sway-error Add forc-migrate tool (#6790) 2025-01-20 13:14:20 +01:00
sway-features Add forc-migrate tool (#6790) 2025-01-20 13:14:20 +01:00
sway-ir Show error when contract method names conflict (#6782) 2025-01-15 15:27:25 +01:00
sway-lib-core Implement Iterator for StorageVec (#6821) 2025-01-14 16:18:16 +01:00
sway-lib-std Add Bytes conversions for Address, ContractId, EvmAddress, B512 and AssetId (#6857) 2025-01-24 12:02:51 +01:00
sway-lsp Refactor the module structure of the namespace module (#6291) 2025-01-17 00:55:37 +00:00
sway-parse Add forc-migrate tool (#6790) 2025-01-20 13:14:20 +01:00
sway-types Add forc-migrate tool (#6790) 2025-01-20 13:14:20 +01:00
sway-utils Storage domains (#6466) 2024-11-15 04:46:56 +01:00
swayfmt Add forc-migrate tool (#6790) 2025-01-20 13:14:20 +01:00
templates chore: bump to v0.66.2 (#6643) 2024-10-16 23:07:23 +11:00
test Add Bytes conversions for Address, ContractId, EvmAddress, B512 and AssetId (#6857) 2025-01-24 12:02:51 +01:00
.gitattributes Remove syntax highlighting of Sway files as Rust (#5926) 2024-04-26 11:06:49 -07:00
.gitignore Better error array numerics (#6420) 2024-08-26 13:28:25 +00:00
.markdownlint.yaml add docs CI, rename docs README to index (#4874) 2023-08-09 10:51:10 -06:00
.markdownlintignore add docs CI, rename docs README to index (#4874) 2023-08-09 10:51:10 -06:00
.typos.toml ci: fixing typos programmatically (#5975) 2024-05-09 10:21:32 +10:00
benchmark.sh ci: fixing typos programmatically (#5975) 2024-05-09 10:21:32 +10:00
Cargo.lock Bump to v0.66.6 (#6853) 2025-01-23 09:20:02 +11:00
Cargo.toml chore: enable serde feature for num_bigint (#6855) 2025-01-23 10:34:16 +11:00
ci_checks.sh chore: update ci_checks script to represent current ci better (#5934) 2024-04-29 11:02:51 +00:00
clippy.toml Workaround clippy::result_large_err error with Rust 1.65. (#3276) 2022-11-03 16:39:59 -06:00
LICENSE Create LICENSE (#452) 2021-12-11 22:28:09 -05:00
README.md docs: added a link to the Fuel blockchain (#6574) 2024-09-21 00:15:15 +00:00
rustfmt.toml chore: rename fn_args_layout to fn_params_layout in rustfmt.toml (#4530) 2023-05-04 08:23:35 +00:00
SECURITY.md feat: update security policy 2024-08-21 16:06:11 -07:00
update_fuel_dependencies.sh chore: add a script to bump all fuel maintained dependencies (#6684) 2024-11-03 22:20:09 -08:00

Sway

build crates.io docs discord

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

For Sway Standard library documentation, see: https://fuellabs.github.io/sway/master/std/

Also view the technical reference for the Sway programming language: https://fuellabs.github.io/sway/master/reference/

Building from Source

This section is for developing the Sway compiler and toolchain. For developing contracts and using Sway, see the above documentation section.

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}"

Building Forc

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

Contributing to Sway

We welcome contributions to Sway!

Please see the Contributing To Sway section of the Sway book for guidelines and instructions to help you get started.