Setup
Get ready to program with Dagrs in Rust.
This tutorial will get you ready to program with Dagrs in Rust.
Getting Help
At any point, if you get stuck, you can always get help on Discord. Don't worry about asking "begginger" questions. We all start somewhere and are happy to help.
Prerequisites
Readers should already be familiar with Rust. The Rust book is an excellent resource to get started with.
While not required, some experience with writing networking code using the Rust standard library or another language can be helpful.
Install Dagrs as a Library
With the help of Rust's package manager cargo, everything will be easy to install Dagrs as a Library.
Step 1: Checking Rust installation
Before getting started, you should make sure that you have the Rust toolchain installed and ready to go. If you don't have it, the easiest way to install it is using rustup.
The most recent stable version of Rust is recommended.
To check that Rust is installed on your computer, run the following:
rustc --version
You should see output like rustc 1.81.0 (eeb90cda1 2024-09-04)
.
Step 2: Creating a Project with Cargo
Let’s create a new Rust project named dagrs_setup
using Cargo:
cargo new dagrs_setup
cd dagrs_setup
Step 3: Install Dagrs as dependency
Run the following Cargo command in your project directory:
cargo add dagrs
Or add the following line to your Cargo.toml:
dagrs = "0.2.0"
Ready to go
That's it, everything is ready to go.