🌴 Empowering everyone to build reliable and efficient smart contracts.
Find a file
Chris O'Brien d9d5cb15a2
Represent module level doc comments in forc doc (#4096)
## Description

Adds module level docs & previews to `forc doc`.

[Screencast from 2023-02-20
20-30-24.webm](https://user-images.githubusercontent.com/57543709/220232486-7ec0742a-59ef-41c9-a459-3c8c9b7d42c7.webm)


## Checklist

- [x] I have linked to any relevant issues. Closes #4095 
- [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-02-22 14:02:14 +11:00
.github refactor: Move the examples workspace manifest into examples directory. Use it in CI. (#4145) 2023-02-21 11:15:29 +11:00
deployment Update our deployment Docker file to Rust 1.67. (#4023) 2023-02-08 10:14:38 +00:00
docs Update match examples (#4107) 2023-02-21 13:32:38 -05:00
examples Update match examples (#4107) 2023-02-21 13:32:38 -05:00
forc Bump to v0.35.3 (#4135) 2023-02-21 16:42:15 -05:00
forc-pkg Bump to v0.35.3 (#4135) 2023-02-21 16:42:15 -05:00
forc-plugins Represent module level doc comments in forc doc (#4096) 2023-02-22 14:02:14 +11:00
forc-test Bump to v0.35.3 (#4135) 2023-02-21 16:42:15 -05:00
forc-tracing Bump to v0.35.3 (#4135) 2023-02-21 16:42:15 -05:00
forc-util Bump to v0.35.3 (#4135) 2023-02-21 16:42:15 -05:00
scripts refactor: Move the examples workspace manifest into examples directory. Use it in CI. (#4145) 2023-02-21 11:15:29 +11:00
sway-ast Bump to v0.35.3 (#4135) 2023-02-21 16:42:15 -05:00
sway-core Represent module level doc comments in forc doc (#4096) 2023-02-22 14:02:14 +11:00
sway-error Bump to v0.35.3 (#4135) 2023-02-21 16:42:15 -05:00
sway-ir Bump to v0.35.3 (#4135) 2023-02-21 16:42:15 -05:00
sway-lib-core Rename Shiftable trait (#3901) 2023-01-27 17:21:29 +00:00
sway-lib-std Represent module level doc comments in forc doc (#4096) 2023-02-22 14:02:14 +11:00
sway-lsp Represent module level doc comments in forc doc (#4096) 2023-02-22 14:02:14 +11:00
sway-parse Represent module level doc comments in forc doc (#4096) 2023-02-22 14:02:14 +11:00
sway-types Bump to v0.35.3 (#4135) 2023-02-21 16:42:15 -05:00
sway-utils Bump to v0.35.3 (#4135) 2023-02-21 16:42:15 -05:00
swayfmt Bump to v0.35.3 (#4135) 2023-02-21 16:42:15 -05:00
templates Bump to v0.35.0 (#4024) 2023-02-08 10:38:48 +00:00
test Fixes struct and enum call path comparison to use suffix. (#4133) 2023-02-20 12:43:39 +00: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 New JSON ABI format supporting generics (#2524) 2022-08-18 13:36:27 -04: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
Cargo.lock Bump to v0.35.3 (#4135) 2023-02-21 16:42:15 -05:00
Cargo.toml refactor: Move the examples workspace manifest into examples directory. Use it in CI. (#4145) 2023-02-21 11:15:29 +11:00
ci_checks.sh refactor: Move the examples workspace manifest into examples directory. Use it in CI. (#4145) 2023-02-21 11:15:29 +11: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 rustfmt.toml proposal (#265) 2021-09-24 08:36:01 -05: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.