Rust HTTP servers
Prepare and deploy a Rust HTTP app from source or a container image.
Deploy an Axum, Actix Web or other Rust web server from source. Smolcloud downloads your crates and compiles a release build.
Prepare your app
Make the server listen on 0.0.0.0 and the port in PORT, and add a health
route that returns 200. If your server uses a fixed port instead, set that
port in the app's Configuration.
If a crate needs a system library, such as OpenSSL or libpq, and the automatic build doesn't have it, add a Dockerfile that installs it.
Deploy source
Include Cargo.toml and Cargo.lock. Public crates are downloaded from crates.io. If your workspace builds more than one binary, say which to build and start in railpack.json.
Create the app to get its ID, then deploy the source folder:
smolcloud deploy APP_ID ./my-app
If the folder has a Dockerfile, Smolcloud uses that instead. Automatic builds lists what a build can download and where to see the commands it chose.
Set the port and health path in the app's Configuration. deploy waits until the app is live and prints its address. Open it and try a real page, not only the health path. If you need a private package registry, build an image in your own CI and deploy that.
Limits
- The app runs as user
10001:10001, not root, and can't write to its own filesystem. - Builds can't reach private package registries or other download sites.
- Keep data in PostgreSQL, a bucket or a disk; anything else is lost on the next deploy.