Installation
The CLI
Section titled “The CLI”cargo install puerto --lockedpuerto --version--locked builds with the dependency versions Puerto was tested with. Puerto needs Rust 1.85 or
newer to build. The projects it generates pin their own toolchain (see below), so
rustup is the recommended way to have Rust.
Shell completions are one command away:
puerto completions zsh > ~/.zfunc/_puerto # bash, elvish, fish, powershell, zshWhat a generated project uses
Section titled “What a generated project uses”Puerto only writes files. Running the project takes the usual tools, and its Makefile installs
the Rust ones:
make setup # cargo-nextest, cargo-audit, and sqlx-cli in --db projects| Tool | When | Why |
|---|---|---|
| rustup | always | The project’s rust-toolchain.toml pins Rust 1.95.0 with rustfmt and clippy, so make lint gives the same answer on every machine (ADR-0009) |
| cargo-nextest | always | make test runs the workspace with it |
| Docker | --db, --eventos, --auth oidc, generar correo |
docker-compose.yml runs Postgres, Mailpit, Keycloak or Redpanda for development |
| sqlx-cli | --db |
make sqlx/migrate and make sqlx/prepare |
| Bun | the web frontend (default) | web/ is React on Bun. --sin-web leaves it out |
cmake, libcurl headers |
--eventos kafka |
rdkafka builds librdkafka from source |
Upgrading
Section titled “Upgrading”cargo install puerto --locked --forceA project depends on the runtime crates of the minor version that generated it. When you upgrade
the CLI, read Upgrading: puerto validar warns when the two drift
apart.