Deployment
Build
smeltery build
It builds public/assets/css/app.css with Tailwind (--minify) when Tailwind is installed (see
Pages and CSS; without it the committed app.css is kept) and then runs cargo build --release.
app.css is a normal file of the app, so a plain cargo build --release with the committed app.css gives the same
result. In a React or Vue app it runs npm run build instead (installing the packages first when node_modules/ is
missing), which writes the JavaScript, the CSS and manifest.json into public/build/; this needs Node.js on the
build machine, not on the server.
The binary runs on the OS it was built for: build a Linux server's binary on Linux. Two ways:
-
On the server. Install Rust (
rustup, Rust 1.94 or newer) and a C compiler, then build in a checkout of the app:sudo apt install build-essential git curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh cargo build --release -
On another Linux machine (a CI runner, or WSL on Windows), with the same tools, then copy the binary. It links the system C library (glibc) dynamically, so build on the server's Ubuntu release or an older one.
The C compiler builds ring (TLS) and the bundled SQLite. OpenSSL is not used: TLS is rustls, so neither the build
nor the server needs OpenSSL. For outgoing TLS (SMTP, ctx.http(), Redis over rediss://) the server needs the OS
certificate bundle (ca-certificates, installed on Ubuntu by default).