Getting Started
To get started with Arbiter, you will need to add it to your Cargo.toml.
Installation
Add the following to your Cargo.toml dependencies:
[dependencies]
arbiter = "0.5.0"
First Steps
Once you have Arbiter installed, the typical flow for setting up a simulation is:
- Initialize the Runtime: The runtime is the execution environment for your actors.
- Define an Actor: Create a struct for your agent and implement the
LifeCycleandHandlertraits. - Spawn the Actor: Use the runtime to spawn your actor into the environment.
- Send Messages: Interact with your actors by sending them messages through their addresses.
Let’s explore these concepts in more detail in the next chapter.