π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:
If you prefer Cargo to create the directory automatically use
cargo new botrs
Modify botrs
to your project name following snake_case or kebab-case structure
You need Rust and Cargo installed on your computer, if not, follow the instructions below.
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
Cargo.toml
Last updated