What You’ll Deploy
A secure, high-performance Rust web API with:
- Pre-built Rust web server
- TEE security verification
- High-performance endpoints
- No code changes required
This tutorial uses an existing Rust container to demonstrate dstack deployment. Perfect for security-critical and high-performance workloads.
Prerequisites
- Access to a dstack host (see setup guide)
- SSH tunnel to dstack dashboard
- Web browser for dashboard access
- 5 minutes of your time
Step 1: Open Tunnel & Access Dashboard
Connect to your dstack host and open the dashboard:1
Open tunnel & access dashboard
This command lets you access the dstack dashboard running on your remote host.
Step 2: Deploy Rust Container
Navigate to your dstack dashboard and click “Deploy a new instance”.Add the Docker Compose Configuration
Copy this YAML and paste it into the “Docker Compose File” field:2Paste your Docker Compose YAML
Click “Deploy” to start your Rust application.
Step 3: Launch and Monitor
- Click Launch in the dashboard
dstack will start your Rust Warp application. This usually takes 2–3 minutes (Rust compilation).
- Monitor the deployment progress
- Check Serial Logs for VM boot details
- View container status in the Containers tab
- Wait for the Rust compilation and application startup
Step 4: Test Your Deployment
After deployment, find your app’s URL in the dashboard:Test the Endpoints
Expected Responses
Main endpoint (/
):
/health
):
/api/compute
):
Performance Benchmarking
Test the high-performance capabilities:What’s Next?
Your Rust application is now running securely in a dstack TEE environment with: ✅ Zero-Overhead Security - Hardware protection without performance cost✅ High-Performance Computation - Optimized Rust code in secure environment
✅ Memory Safety - Rust’s memory safety + hardware memory encryption
✅ Attestation Support - Cryptographic proof of security available
Continue Learning
- Try another language: Python Tutorial | JavaScript Tutorial
- Full deployment guide: Complete Installation
- Architecture deep dive: How DStack Works