🌴 Empowering everyone to build reliable and efficient smart contracts.
Find a file
João Matos f4b155f337
Split processing of impl methods in two phases (part 1). (#4890)
## Description

This PR mainly refactors existing code around type checking and
processing of functions.

[Split type checking and namespace insertion for parameters and type
parameters](327deace24)

[Split processing of functions in two
phases.](e3cf148f3f)

I've split this up from the rest of the PR for fixing impl methods
calling to make it easier to review (also made it easier for me to find
and fix some regressions).

I also threw in another round of clippy fixes that my Rust toolchain was
complaining about.

## Checklist

- [x] I have linked to any relevant issues.
- [x] 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).
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] 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.
2023-08-07 23:40:09 +01:00
.devcontainer Create devcontainer.json (#4377) 2023-06-06 00:53:23 +03:00
.github Use buildjet runner for gh-pages workflow (#4902) 2023-08-03 12:16:25 +01:00
deployment Update our deployment Docker file to Rust 1.67. (#4023) 2023-02-08 10:14:38 +00:00
docs SuperABIs for ABIs (#4272) 2023-07-27 08:45:50 +04:00
examples SuperABIs for ABIs (#4272) 2023-07-27 08:45:50 +04:00
forc Bump to v0.43.2 (#4907) 2023-08-03 18:23:32 +02:00
forc-pkg Split processing of impl methods in two phases (part 1). (#4890) 2023-08-07 23:40:09 +01:00
forc-plugins Split processing of impl methods in two phases (part 1). (#4890) 2023-08-07 23:40:09 +01:00
forc-test Bump to v0.43.2 (#4907) 2023-08-03 18:23:32 +02:00
forc-tracing Bump to v0.43.2 (#4907) 2023-08-03 18:23:32 +02:00
forc-util Bump to v0.43.2 (#4907) 2023-08-03 18:23:32 +02:00
scripts Bump to v0.43.0 (#4897) 2023-08-02 22:57:10 +02:00
sway-ast Bump to v0.43.2 (#4907) 2023-08-03 18:23:32 +02:00
sway-core Split processing of impl methods in two phases (part 1). (#4890) 2023-08-07 23:40:09 +01:00
sway-error Bump to v0.43.2 (#4907) 2023-08-03 18:23:32 +02:00
sway-ir Split processing of impl methods in two phases (part 1). (#4890) 2023-08-07 23:40:09 +01:00
sway-lib-core u256 more operations (#4904) 2023-08-07 10:35:06 +02:00
sway-lib-std Use the Self annotation in implementation blocks (#4871) 2023-07-26 15:02:07 +00:00
sway-lsp Refactor parse_project to return a result. (#4922) 2023-08-07 21:20:08 +10:00
sway-parse Bump to v0.43.2 (#4907) 2023-08-03 18:23:32 +02:00
sway-types Bump to v0.43.2 (#4907) 2023-08-03 18:23:32 +02:00
sway-utils Bump to v0.43.2 (#4907) 2023-08-03 18:23:32 +02:00
swayfmt Bump to v0.43.2 (#4907) 2023-08-03 18:23:32 +02:00
templates Update fuel-core to 0.19 (#4718) 2023-07-25 02:42:25 +01:00
test Split processing of impl methods in two phases (part 1). (#4890) 2023-08-07 23:40:09 +01:00
.gitattributes .in_ir and .out_ir are no longer used in the sway-ir unit tests. (#1429) 2022-04-29 11:54:08 +10:00
.gitignore fix: broken links, ignore DS_Store (#4695) 2023-06-21 02:23:29 +02:00
.markdownlint.yaml Create markdown-lint.yml (#2534) 2022-08-15 12:45:07 -04:00
.markdownlintignore Add CSS styling to forc doc (#3471) 2022-12-06 20:18:07 -06:00
benchmark.sh Benchmark / performance tracking (#4564) 2023-05-29 21:01:01 +10:00
Cargo.lock Bump to v0.43.2 (#4907) 2023-08-03 18:23:32 +02:00
Cargo.toml Update fuel-core to 0.19 (#4718) 2023-07-25 02:42:25 +01:00
ci_checks.sh Update fuel-core to 0.19 (#4718) 2023-07-25 02:42:25 +01: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 fix broken link and add logging example (#3767) 2023-01-13 08:46:59 +11:00
rustfmt.toml chore: rename fn_args_layout to fn_params_layout in rustfmt.toml (#4530) 2023-05-04 08:23:35 +00: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/.

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.