# Solstack: The Book

**Solstack** is a library that enables the management of an application's control flow through a **state stack machine**.

A `Stack` `struct` holds any number of `State`s. When said `Stack` is ticked, it executes the main methods of the **topmost `State`**. This means that only the `State` at the top of the `Stack` is executed, while the ones below it are effectively **paused**. An exception are the `State`'s `on_shadow_tick` method introduced in `v0.3.0` which is always executed independently of the `State`'s position on the `Stack`.

* You can read [The Book](https://solmateus.gitbook.io/solstack/).
* Take a look at the examples on the [git repository](https://github.com/solmateus/solstack).
* Search documentation at the [crate's docs](https://crates.io/crates/solstack).
* Watch the project develop through its [changelog](https://github.com/solmateus/solstack/blob/main/CHANGELOG.md)!

> *Project is in early development, things may change around! Take a look at the changelog before updating. Some text may imply that things are done, when they're not, like The Book. There may be bugs, though the tests should guarantee there aren't many.*

### Thanks

> The documentation will always be up to date.

Thank you for using `solstack`!

*By Sol* <solmateusbraga@gmail.com>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://solmateus.gitbook.io/solstack/solstack-the-book.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
