πCreate the Cargo.toml
The Cargo.toml
file is a manifest file for the Cargo package manager. This file contains metadata like name, version and dependencies for packages, which are called "crates" in Rust.
How to create Cargo.toml
file?
Cargo.toml
file?Starting a new package with Cargo in an existing directory
Open Terminal in your project directory and run:
cargo init
If you prefer Cargo to create the directory automatically use
cargo new botrs

Putting dependencies in your Cargo.toml
file
Cargo.toml
fileInstalling serenity
Serenity - is a Rust library for the Discord API.
Add the following line to your Cargo.toml
file or run cargo add serenity
[dependencies]
serenity = "0.11"
Last updated