swift·rust
All posts
deploymentinfrastructure

Deploy one binary, scale forever

How compiling your app to a Rust binary changes the way you ship.

Sam Rivera··5 min read

When you build a Swift Rust app, the output is a single binary. No Node, no edge runtime, no package manager at deploy time. You copy the binary to a server, run it, and it serves.

This has three big consequences:

1. Cold starts are measured in microseconds, not seconds. 2. Memory usage is measured in tens of megabytes, not hundreds. 3. There is no "did you forget to install something" at deploy time.

The binary is also a CLI. Run it with no arguments, and it starts a dev server. Run it with --build, and it produces a production binary. Run it with --start, and it serves the production build.