Prerequisites
- A Zerops account
- Basic knowledge of Rust
- Rust installed locally (for development)
Deploy from Recipe
The fastest way to get started:Import the Project
Log in to Zerops GUI and click Import a project.
Deploy Your Own Rust Application
Step 1: Create Your Application
Create a new Rust project:Cargo.toml:
Cargo.toml
src/main.rs
Step 2: Add zerops.yaml
zerops.yaml
Step 3: Configure Your Service
- Using zCLI
- Using GUI
Create Import:
description.yaml:Step 4: Deploy
Framework Examples
Actix-web (Full Example)
Cargo.toml
src/main.rs
Axum Framework
Cargo.toml
src/main.rs
Adding a Database
Extend with PostgreSQL:description.yaml
Cargo.toml
Build Optimizations
Optimize for Size and Speed
Cargo.toml
Cache Dependencies
zerops.yaml
Parallel Build
Environment Variables
Set inzerops.yaml:
Troubleshooting
Build fails with dependency errors
Build fails with dependency errors
Ensure
Cargo.toml and Cargo.lock are committed:Binary not found
Binary not found
Check your binary name matches:
Out of memory during build
Out of memory during build
Reduce parallel compilation:
Need system libraries
Need system libraries
Install dependencies:
Next Steps
Runtime Overview
Learn about Rust runtime features
Environment Variables
Manage configuration
Scaling
Configure auto-scaling
Monitoring
Monitor your application