sway/docs/book
Vaivaswatha N ec51769132
Some checks failed
CI / cargo-clippy (push) Has been cancelled
Codspeed Benchmarks / benchmarks (push) Has been cancelled
CI / check-dependency-version-formats (push) Has been cancelled
CI / check-forc-manifest-version (push) Has been cancelled
CI / get-fuel-core-version (push) Has been cancelled
CI / build-sway-lib-std (push) Has been cancelled
CI / build-sway-examples (push) Has been cancelled
CI / build-reference-examples (push) Has been cancelled
CI / forc-fmt-check-sway-lib-std (push) Has been cancelled
CI / forc-fmt-check-sway-examples (push) Has been cancelled
CI / forc-fmt-check-panic (push) Has been cancelled
CI / check-sdk-harness-test-suite-compatibility (push) Has been cancelled
CI / build-mdbook (push) Has been cancelled
CI / build-forc-doc-sway-lib-std (push) Has been cancelled
CI / build-forc-test-project (push) Has been cancelled
CI / cargo-build-workspace (push) Has been cancelled
CI / cargo-toml-fmt-check (push) Has been cancelled
CI / cargo-fmt-check (push) Has been cancelled
CI / forc-unit-tests (push) Has been cancelled
CI / forc-pkg-fuels-deps-check (push) Has been cancelled
CI / cargo-unused-deps-check (push) Has been cancelled
CI / pre-publish-check (push) Has been cancelled
github pages / deploy (push) Has been cancelled
CI / notify-slack-on-failure (push) Has been cancelled
CI / publish (push) Has been cancelled
CI / publish-sway-lib-std (push) Has been cancelled
CI / Build and upload forc binaries to release (push) Has been cancelled
CI / cargo-test-lib-std (push) Has been cancelled
CI / forc-run-benchmarks (push) Has been cancelled
CI / verifications-complete (push) Has been cancelled
CI / cargo-run-e2e-test (push) Has been cancelled
CI / cargo-run-e2e-test-release (push) Has been cancelled
CI / Build and test various forc tools (push) Has been cancelled
Introduce alloc intrinsic to avoid using asm (#7499)
Improvement chart:
https://github.com/FuelLabs/sway/pull/7499#issuecomment-3574549744

---------

Co-authored-by: Igor Rončević <ironcev@hotmail.com>
2025-11-26 10:18:25 +00:00
..
src Introduce alloc intrinsic to avoid using asm (#7499) 2025-11-26 10:18:25 +00:00
theme Updated the sway.js file by adding mod and type in keyword (#4427) 2023-04-12 22:39:45 +00:00
.gitignore Introduce the Sway reference, a more technical Sway source of documentation. (#2562) 2022-12-08 21:53:09 +00:00
.spellcheck.yml docs: configure spell check, minor improvements (#5369) 2023-12-19 15:10:26 -08:00
book.toml Add Google Analytics ID to book.toml (#4121) 2023-02-20 13:37:44 +00:00
README.md remove archived forc-explore plugin from CI and docs (#7257) 2025-06-27 12:53:25 +00:00
spell-check-custom-words.txt Add docs for ABI Backtracing (#7435) 2025-10-11 18:31:58 +11:00

Documentation

Building From Source

Install mdbook and then open a new terminal session in order to run the subsequent commands

cargo install mdbook

To set up and build the book locally, you must also have mdbook-forc-documenter preprocessor and relevant forc plugins installed.

If you wish to make changes to the Commands or Plugins chapters, please read the next section first.

From the project root, install mdbook-forc-documenter:

cargo install --path ./scripts/mdbook-forc-documenter

You must also install forc plugins that are already documented within the book. You can skip plugins that are going to be removed and install plugins that are going to be added to the book:

cargo install --path ./forc-plugins/forc-client
cargo install --path ./forc-plugins/forc-doc
cargo install --path ./forc-plugins/forc-fmt
cargo install --path ./forc-plugins/forc-lsp

To build book:

mdbook build docs/book

To build the book on strict mode to check if pages should be removed or added within the Forc Reference:

MDBOOK_preprocessor__FORC_documenter__STRICT="true" mdbook build docs/book

To serve locally:

mdbook serve docs/book

Generating documentation for Forc commands/plugins

The mdbook-forc-documenter preprocessor now automatically handles documenting forc commands and plugins, but some actions have to be taken for the preprocessor to work. Please read the mdbook-forc-documenter README before making changes to Forc commands or plugins.

It is important to note that changing the chapter names Commands and Plugins will affect the behavior of the preprocessor. When renaming the chapters, please make the same change here.