Rust
Axum, Actix Web, Rocket and Loco, deployed from the repo
Push a Rust app and homeport recognises it from Cargo.toml and its Cargo.lock. It builds your binary with cargo build --release --locked in the official Rust image and runs it beside your app’s files, so there is no Dockerfile to write.
Frameworks
Axum, Actix Web, Poem, Salvo and Warp
Recognised from your Cargo.toml’s dependencies, and run as they are: your binary, listening on $PORT and 0.0.0.0 (in $HOST).
Loco
Recognised by loco-rs. Runs as its CLI’s start --environment production --binding $HOST --port $PORT, with db migrate --environment production as the release command when it has its migration crate.
Rocket
Recognised by rocket. Rocket listens on ROCKET_ADDRESS and ROCKET_PORT, not PORT, so the app must read PORT itself and listen on 0.0.0.0. The build says so.
What homeport reads
- Cargo.toml + Cargo.lock
- A crate with a binary (src/main.rs or a [[bin]]), built with cargo build --release --locked. A Cargo.toml without its Cargo.lock fails the build, saying to commit the lockfile.
- rust-toolchain.toml or rust-toolchain
- The Rust to build with: stable or none is homeport’s pinned 1.99.1, and 1.x or 1.x.y that version (1.67 and newer). nightly and beta build, but are downloaded in every build. Without one, a rust-version newer than 1.99.1 picks that version.
- default-run
- Which binary runs: default-run, else the only binary, else the one named like the package. With several and none of them that, the build asks you to set default-run.
- A Cargo workspace
- Set the root directory to the member that’s the app, like crates/api. The workspace’s Cargo.lock and toolchain file are used.
What you get
- Your binary and your app’s files (static/, templates/, config/) in one bundle, run from that folder: no Dockerfile
- Compiled dependencies kept between builds, so a build that changed only your code compiles only your own crates
- Prefer rustls over native-tls, and bundled SQLite: a system library such as libpq isn’t there when the app runs
- Postgres in one click, with DATABASE_URL set for you
- You pay only while it’s in use, and nothing while nobody is using it
- HTTPS on a homeport.run address, and your own domain on paid plans
- Environment variables set in the dashboard, exportable as .env
When you need more
The start command, release command and processes are set in the dashboard under Settings → Build settings, or in an optional homeport.yaml. Each is arguments to your binary, without a shell:
run: --port $PORT
release: migrate up
processes:
worker: worker