Cargo.toml
Comprehensive guide to the Cargo.toml manifest for Rust bots and web (site/API) apps on Discloud.
🗂️ What is Cargo.toml?
Cargo.toml?🛠️ Creating a New Project
1
cargo init2
cargo new my_bot3
cargo add serenity📦 Examples
[package]
name = "discord_bot"
version = "0.1.0"
edition = "2021"
[dependencies]
serenity = { version = "0.11", default-features = false, features = [
"client", "gateway", "rustls_backend", "model" ] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
tracing = "0.1"
dotenvy = "0.15"[package]
name = "axum_api"
version = "0.1.0"
edition = "2021"
[dependencies]
axum = "0.7"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
dotenvy = "0.15"🧰 Common Commands Reference
Last updated