Search forkrail

Search documentation, comparisons, and CLI commands.

APIs & backends
Production ready

Deploy Rust on forkrail

Cross-compile Axum, Actix-web, or Vercel vercel_runtime [[bin]] targets to native Linux arm64 with cargo zigbuild --release, cached Cargo registries, and sub-50 ms cold starts.

Adapter
None (Axum/Actix on PORT, or vercel_runtime [[bin]])
Runtime
AWS Lambda provided.al2023 (aarch64 glibc 2.34)
Detection
Cargo.toml ([[bin]] or server crate)
Memory
256–640 MB
  • Axum / Actix / Tokio
    Any Rust HTTP server listening on process PORT
  • Vercel api/ binaries
    Cargo [[bin]] endpoints with vercel_runtime unchanged
  • Cached cargo builds
    Cargo registry and target/ persisted across deployments
  • Native arm64 speed
    Compiled with cargo zigbuild --release for Amazon Linux 2023

1. Web server or vercel_runtime [[bin]]

Deploy a standard Rust HTTP server (such as Axum or Actix-web) listening on PORT, or keep Vercel’s api/*.rs [[bin]] layout using the vercel_runtime crate (forkrail passes VERCEL_DEV_PORT automatically):

use axum::{routing::get, Json, Router};
use serde_json::json;
#[tokio::main]
async fn main() {
let app = Router::new()
.route("/health", get(|| async { Json(json!({ "ok": true })) }));
let port = std::env::var("PORT").unwrap_or_else(|_| "8080".into());
let listener = tokio::net::TcpListener::bind(format!("0.0.0.0:{port}")).await.unwrap();
axum::serve(listener, app).await.unwrap();
}

2. Deploy & cache builds

forkrail compiles releases with cargo zigbuild --release targeting Amazon Linux 2023’s glibc 2.34 (aarch64-unknown-linux-gnu.2.34) and caches both the Cargo registry and target/ directory so incremental deploys stay fast.

Deploy Rust service
forkrail deploy
forkrail deploy --prod
Ready to deploy your Rust project inside your own AWS account?
Quickstart