Getting started

In this guide, we will walk through creating a simple SwimOS server that stores the state of a single 32 bit signed integer in an agent and then interact with the server using a client application. The guide will introduce some core SwimOS concepts: agents and lanes. Our goal is to equip you with the knowledge and skills to harness the full potential of SwimOS for developing real-time applications.

To initiate the setup of a SwimOS project, start by creating and navigating to the directory where it will be located. First, lets start by creating a new server project named tutorial_server:

$ cargo new tutorial_server --bin

Then we need to declare our dependencies. Let’s start by adding the following to our tutorial_server/Cargo.toml:

[dependencies]
swimos = { version = "0.1.0", features = ["server"] }
swimos_form = "0.1.0"
swimos_client = "0.1.0"
tokio = { version = "1.3", features = ["rt-multi-thread", "macros"] }

The SwimOS platform is built using the tokio runtime so we need to include it.

The Minimum Supported Rust Version is 1.76.0