Skip to main content
Virtus Cloud supports Rust applications by building and running them directly from source using Cargo. When you upload your project, the platform compiles your code in release mode with cargo run --release, which produces an optimized binary ready for production workloads. You do not need to pre-compile your project or manage a build pipeline — Virtus Cloud handles the build on every deployment. This guide walks you through the full process.

Prerequisites

Before you deploy, make sure you have the following:

Rust version

Virtus Cloud provides the following Rust versions:
VERSION valueRust version
recommended1.89.0
latest1.89.0
Use VERSION=recommended for all production deployments.

Create your config file

Every Virtus Cloud deployment requires a virtuscloud.app configuration file at the root of your project. Set MAIN to your primary Rust source file (typically main.rs or a path like src/main.rs).

Config File Reference

Learn every available parameter — MAIN, MEMORY, VERSION, DISPLAY_NAME, SUBDOMAIN, START, and more.
virtuscloud.app
MAIN=src/main.rs
MEMORY=256
VERSION=recommended
DISPLAY_NAME=My Rust App

Startup behavior

Virtus Cloud determines how to start your application based on whether the START field is set in your config file.
  • If START is not set, the platform runs cargo run --release to build and execute your project in release mode. This optimizes the binary for performance, which is the recommended approach for production.
  • If START is set, the platform executes the START command directly, bypassing the default build behavior.
Custom start command example
START=cargo run --release --bin my-binary
The first deployment may take longer than expected because Cargo compiles your project from scratch. Subsequent deploys reuse the build cache when possible.
For more information on all startup parameters, see the Config File Reference.

Required files

Your ZIP archive must include the following files:
FilePurpose
virtuscloud.app or virtuscloud.configPlatform configuration
src/main.rs (or your Rust source files)Application source code
Cargo.tomlCrate manifest and dependency list
The virtuscloud.app config file must be at the root of the ZIP archive. If it is inside a subfolder, Virtus Cloud cannot find it during deployment.
You do not need to include a target/ directory. Cargo builds the project fresh in the cloud environment.

Upload your project

Once your files are ready, package them into a .zip archive and upload using your preferred method.
1

Install the CLI

If you do not have the Virtus Cloud CLI installed, run the appropriate command for your system:
curl -fsSL https://cli.virtuscloud.app/install | bash
To update an existing installation:
virtuscloud update
2

Authenticate

Retrieve your API key from virtuscloud.app/account by clicking Request API Key, then run:
virtuscloud login
3

Deploy

From your project directory, run:
virtuscloud upload
Or pass the path to an existing ZIP file:
virtuscloud upload my-project.zip

Troubleshooting

This error appears when the file path in your MAIN parameter does not match a file in your ZIP archive. Verify the path is correct relative to the ZIP root. A common value is MAIN=src/main.rs.
The minimum RAM for a bot is 256 MB and for a website or API is 512 MB. Cargo compilation is memory-intensive — if you see out-of-memory errors during the build phase, increase the MEMORY value in your config file. See the LACK_OF_RAM troubleshooting guide for details.
If Cargo fails to resolve a dependency, check that all crate names and version constraints in your Cargo.toml are correct. Run cargo build --release locally first to confirm your project compiles cleanly before uploading.
If you continue to experience issues after reviewing this guide, contact the Virtus Cloud support team.