|
3 | 3 | <a href="https://www.swimos.org"><img src="https://docs.swimos.org/readme/marlin-blue.svg" align="left"></a>
|
4 | 4 | <br><br><br><br>
|
5 | 5 |
|
| 6 | +The Swim Rust SDK contains software framework for building stateful applications that can be interacted |
| 7 | +with via multiplexed streaming APIs. It is built on top of the [Tokio asynchronous runtime](https://tokio.rs/) |
| 8 | +and a Tokio runtime is required for any Swim application. |
| 9 | + |
| 10 | +Each application consists of some number of stateful agents, each of which runs as a separate Tokio task |
| 11 | +and can be individually addressed by a URI. An agent may have both public and private state which can either |
| 12 | +be held solely in memory or, optionally, in persistent storage. The public state of the agent consists of a |
| 13 | +number of lanes, analogous to a field in a record. There are multiple kinds of lanes that, for example, lanes |
| 14 | +containing single values and those containing a map of key-value pairs. |
| 15 | + |
| 16 | +The state of any lane can be observed by establishing a link to it (either from another agent instance or a |
| 17 | +dedicated client). A established link will push all updates to the state of that lane to the subscriber and |
| 18 | +will also allow the subscriber to request changes to the state (for lane kinds that support this). Links |
| 19 | +operate over a web-socket connection and are multiplexed, meaning that links to multiple lanes on the same |
| 20 | +host can share a single web-socket connection. |
| 21 | + |
6 | 22 | ## Usage Guides
|
7 | 23 |
|
8 | 24 | [Implementing Swim Agents in Rust](docs/agent.md)
|
|
14 | 30 | TODO
|
15 | 31 | ## Development
|
16 | 32 |
|
17 |
| -### Dependencies |
18 |
| -[Formatting](https://github.com/rust-lang/rustfmt): `rustup component add rustfmt`<br> |
19 |
| -[Clippy](https://github.com/rust-lang/rust-clippy): `rustup component add clippy`<br> |
20 |
| -[Tarpaulin](https://github.com/xd009642/tarpaulin) `cargo install cargo-tarpaulin`<br> |
21 |
| - |
22 |
| -### Unit tests |
23 |
| -##### Basic: `cargo test` |
24 |
| -##### With coverage: `cargo tarpaulin --ignore-tests -o Html -t 300` |
25 |
| - |
26 |
| -### Lint |
27 |
| -##### Manual |
28 |
| -1) `cargo fmt --all -- --check` |
29 |
| -2) `cargo clippy --all-features --workspace --all-targets -- -D warnings` |
30 |
| - |
31 |
| -##### Automatic (before commit): |
32 |
| -- Install hook: `sh ./install-commit-hook.sh` |
33 |
| -- Remove hook: `sh ./remove-commit-hook.sh` |
34 |
| - |
35 |
| -Note: The pre-commit hooks take a while to run all checks. |
| 33 | +See the [development guide](DEVELOPMENT.md); |
0 commit comments