sway/docs/book
Matt cf7b6664b5
docs: add sway memory model (#6775)
## Description
Developers get confused by Sway's memory model as it is different from
Rust's. So I added this to the docs.

closes https://app.asana.com/0/1207924201336629/1208429018056446

## Checklist

- [x] 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: Sophie Dankel <47993817+sdankel@users.noreply.github.com>
2024-12-20 10:47:39 -06:00
..
src docs: add sway memory model (#6775) 2024-12-20 10:47:39 -06: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 Add a forc-submit plugin command for submitting txs to a given node (#3885) 2023-02-10 13:08:06 +03:00
spell-check-custom-words.txt docs: add sway memory model (#6775) 2024-12-20 10:47:39 -06: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 forc-explore
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.