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
  • Files
  • Compressing the Files
  • ✍ Hosting your bot
  • Hosting Your Site
  • Using Rocket
  • Installing Rocket
  • Configuring Rocket for DisCloud
Edit on GitHub
  1. Suport
  2. Languages

Rust

PreviousPhpNextCreate the Cargo.toml

Last updated 1 year ago

Files

You should not send all your application files to .zip, there are some exceptions, they are:

- File Cargo.lock
- File .gitignore
- Folder target
- Folder .git

Compressing the Files

For more details on how to Compress your Files according to your Operating System, you can see below

✍ Hosting your bot

This feature needs some basic requirements to be able to be used, please check the requirements here before continuing

Using Rocket

Rocket is a web framework built in rust, currently it only works in the nightly version of rust

rustup override set nightly

Installing Rocket

Configuring Rocket for DisCloud

Create anrust-toolchain.toml file:

rust-toolchain.toml
[toolchain]
channel = "nightly"

This will instruct rustup to use the nightly version, and download that version if necessary.

discloud.config example for Rocket

discloud.config
ID=subdomino
TYPE=site
MAIN=src/main.rs
RAM=512
AUTORESTART=false
VERSION=latest
APT=tools

Hosting Your Site

Consult the official documentation:

⌨️
🦀
🌎
How to compress my files?
☁️How to Host
https://rocket.rs/
📁
🗜️
📄Create the Cargo.toml