Discloud Docs
English
English
  • 👋Welcome
  • Suport
    • ☁️How to Host
      • 🤖Bots
        • 🔌Bot
        • 🧩VSCode Extension
        • ⌨️CLI
      • 🌎Website and APIs
        • 🔌Bot
        • 🧩VSCode Extension
        • ⌨️CLI
    • ⌨️Languages
      • 🟨JavaScript
        • 📄Create the package.json
      • 🐍Python
        • 📄Create the requirements.txt
      • ☕Java
      • 💎Ruby
        • 📄Create the Gemfile
      • 🐿️Go
      • 🐘Php
      • 🦀Rust
        • 📄Create the Cargo.toml
    • ⛓️Integrations
      • 🌐Your Own Domain
      • 🐙GitHub and GitLab
      • 🎧Lavalink
      • 💾Database
        • MongoDB Atlas (mLab)
    • ❓Frequently Asked Questions (FAQ)
      • How to compress my files?
      • Discloud ModMail (Ticket)
      • How do I get my bot's ID?
      • What is the main file?
      • Configuring Puppeteer
      • How to report an offender?
      • Why can't I access my website?
      • Very Heavy BOT
    • ⚒️Commands
      • How to get API token
      • How to integrate Github
    • 🤲Donations
  • configuration
    • ⚙️discloud.config
      • 📦APT (Install Packages)
      • 🏗️VERSION (Switch between Versions)
  • 🖥️local environment
    • ⚙️Install
      • 🟨JavaScript (NodeJS)
      • 🐍Python
      • 💎Ruby
      • 🦀Rust
  • API
    • 📡Using the API
    • 🔗Routes
  • About
    • 🎨Discloud Brand
      • Name origin
      • Visual Identity
  • 🔗Links
    • 🌎Website
    • 📊DisCloud Status
  • 📜Legal
    • 📄Terms of Service (TOS)
Powered by GitBook
On this page
  • How to create Cargo.toml file?
  • Putting dependencies in your Cargo.toml file
Edit on GitHub
  1. Suport
  2. Languages
  3. Rust

Create the Cargo.toml

PreviousRustNextIntegrations

Last updated 1 year ago

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 "" in Rust.

How to create Cargo.toml file?

Starting a new 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

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

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
[dependencies]
serenity = "0.11"

Installing

⌨️
🦀
📄
🦀Rust
serenity
crates
package