Repository navigation
Releases
Roost 2.5.0
Roost 2.5.0 adds channels in Phoenix's protocol, jobs kept in PostgreSQL, live pages the server updates, PubSub between servers, and HTTPS.
- Channels accept WebSockets at
/socketin Phoenix's V2 protocol, so phoenix.js connects unchanged. Presence events follow Phoenix's format, and withRoostApp.pubSubchannel broadcasts reach the sockets of every server. JobQueue.postgres(_:)keeps jobs in the app's PostgreSQL database through swift-jobs: they survive restarts, run on every server, and retry with backoff.RoostApp.scheduledJobsruns cron jobs from one server at a time.- A
LivePagenames itstopics, andhandleInfo(_:state:conn:)updates its open pages from server broadcasts.LiveRoute(_:pubSub:)reaches the pages open on every server. ValkeyPubSubdelivers PubSub messages between servers through Valkey or Redis, with theValkeytrait.ServerConfig(tls:)serves HTTPS and negotiates HTTP/2. A missing certificate or key stops the app at startup.
Upgrade: Roost requires macOS 15 on macOS, as swift-jobs does. Set .macOS(.v15) in the app's Package.swift, or SwiftPM rejects it. Tests that read a presence_diff, and channels with an intercept, have changes described in the changelog.
Requires Swift 6.3+, macOS 15+ or Linux; ESW 1.7.0+, Nexus 2.1.0+, and Spectro 2.3.1+. Use roost-cli 3.0.1, whose generated apps support macOS 15.
See the changelog. The attached archive contains Roost and RoostTest documentation.
Validation: the framework's five CI jobs passed locally: framework tests on macOS (Swift 6.4) and Linux (Swift 6.3.3), the Valkey trait, the example app with its browser tests, and the generated app in release mode. Strict DocC, website checks, and all eight playground tests passed.
Roost 2.4.0
Roost 2.4.0 adds the app commands behind roost-cli 3.0's database and route tooling.
App db create|drop|seed|setup|resetmanages the database with the server's configuration, likemix ecto.setup.setupcreates the database, migrates it, and runsSeeds/<env>.sqlwhen it exists;dropandresetrefuse production.App routeslists each route's method and full path in matching order, likemix phx.routes.App migrate downtakes--step Nand--allfor SQL migrations. Usage and database errors print a message and exit instead of crashing.- Apps no longer build Spectro's CLI or fetch Noora. The
RichTerminaltrait stays declared with no effect, so manifests that enable it still resolve.
Requires Swift 6.3+, macOS 14+ or Linux; ESW 1.7.0+, Nexus 2.1.0+, and Spectro 2.3.1+. Use roost-cli 3.0.0 for roost db, roost routes, and roost gen live.
See the changelog. The attached archive contains Roost and RoostTest documentation.
Validation: the framework's five CI jobs passed, including the generated app with roost-cli 3.0.0; strict DocC, website checks, and all eight playground tests passed locally.
Roost 2.3.0
Roost 2.3.0 brings live pages, reusable form controls, typed data operations, migrations, and persistent key-value stores.
LivePageandLiveRoute: request-aware interactive pages, SSE updates, CSRF-protected events, session ownership, and graceful shutdown.Input,Textarea, andFormFieldRepresentable: accessible fields with escaped values, constraints, hints, and validation errors.- Typed
Changes, permitted model fields, owner-scoped repositories, and typed authentication scopes. - Swift migration registries alongside bundled SQL history.
conn.store, typed store keys, Valkey-backed sessions and shared rate limits.- Better request error handling, test-browser sign-in helpers, and CSS live reload.
Requires Swift 6.3+, macOS 14+ or Linux; ESW 1.7.0+, Nexus 2.1.0+, and Spectro 2.3.1+. The optional Valkey backend requires macOS 15+. Live state remains process-local.
See the changelog and upgrade notes for AuthScope migration, deprecated stubs, and rate-limit behavior changes. The attached archive contains Roost and RoostTest documentation.
Validation: the framework's five CI jobs passed before the documentation-only release preparation; strict DocC, website checks, and all eight playground tests passed locally.
Roost 2.1.3
roost spectro can show Spectro's colors, spinners, and styled tables again.
-
Roost has a
RichTerminaltrait that turns on Spectro's. Apps opt in on their
swift-roost dependency:.package(url: "https://github.com/roost-framework/swift-roost", from: "2.1.3", traits: [.defaults, "RichTerminal"])
Apps created by roost-cli 2.1.1 or later include it. Without it, an app
downloads no Noora androost spectroprints plain text, as in 2.1.2. -
The trait is off by default because SwiftPM 6.4 can't resolve a dependency
trait that a non-root package turns on through its own default traits: every
app depending on Roost would fail with "exhausted attempts to resolve the
dependencies graph". -
An app that added Spectro as a direct dependency to get the richer output can
drop that dependency and use the trait.
Upgrade
Update swift-roost before adding the trait to an existing app. SwiftPM checks
traits against the version an app already resolved, and releases before 2.1.3
declare none, so adding the trait first fails with "enables traits
[RichTerminal, default] on package 'swift-roost' that declares no traits":
swift package update swift-roost # with the old dependency line
# then add traits: [.defaults, "RichTerminal"] and run:
swift package resolveRoost 2.1.2
Roost apps no longer download Noora: an app built on Roost resolves 39 packages
and 448 MB of sources, down from 42 and 536 MB with 2.1.1.
- Roost depends on Spectro 2.3.0 or later with only its
CLItrait.roost spectrostill builds and runs the app's ownspectrocommand, now without
Noora: it prints plain text instead of colors, spinners, and styled tables.
An app that depends on Spectro directly keeps its default traits and the
richer output.
Roost 2.1.1
Roost apps download about 75 MB less.
- Roost depends on Nexus 2.1.0 or later with its default
Vaportrait turned
off. SwiftPM no longer fetches Vapor, routing-kit, multipart-kit,
console-kit, or websocket-kit for an app built on Roost. An app that depends
on Nexus directly keeps the trait, soNexusVaporkeeps working there. - Spectro keeps its default traits, because
roost spectrobuilds and runs the
app's ownspectrocommand.
Roost 2.1.0
Roost adds Phoenix-style controllers. Routes name a controller action the
compiler checks, actions decode only the parameters they permit, and every
request is logged and traced by action.
Upgrade
- Closure routes keep working; adopting controllers is optional. See the
Controllers guide (Sources/Roost/Roost.docc/Controllers.md). - The
roostCLI moved to roost-cli
and swift-roost no longer has aroostexecutable product. Install it with
mint install roost-framework/roost-cli@2.1.0. pipeline(_:_:)andscope(_:pipelines:)with string names are deprecated.
An undeclared name now stops the app at startup. Previously it was ignored, so
its routes were served without the pipeline's plugs, which could include CSRF
protection or authentication. DeclareNamedPipelinevalues and pass them to
scope(_:pipelines:)instead.- The default
plugsuseroost_requestLogger()instead of Nexus's
requestLogger(). It logs through swift-log with theroost.requestlabel
instead of printing. Apps that overrideplugskeep the loggers they list. tracing()names spans after the matched route (GET /recipes/:id) instead of
the raw path, and reuses the ID fromrequestId()when that plug runs first.
Update dashboards or alerts that match the old span names.- Roost requires swift-distributed-tracing 1.3.0 or later.
Controllers
Controllergroups actions. ItsActionenum names them, and an exhaustive
switchinaction(_:)maps each one to its function, so a missing function
or a route to an undeclared action is a compile error.GET,POST,PUT,PATCH, andDELETEtake a controller and an action.resources(_:_:only:except:)routes the REST actions a controller declares:
index,new,create,show,edit,update(PATCH and PUT), and
delete.- Controller
plugsrun after routing and before the action, each optionally
limited withonly:orexcept:. conn.matchedRoutereports the route pattern, controller, and action, and is
kept on error responses.
Parameters
conn.permit(T.self)decodes a request into aDecodabletype: the JSON body,
or query, form, and path parameters with path parameters taking precedence.
Undeclared fields are dropped. A missing or invalid field throws
ValidationErrorsnaming it; a malformed JSON body is a 400 response.FormValues.decode(as:)decodes a whole form into a type with the same rules.
Logging, tracing, and metrics
roost_requestLogger(filterParameters:logger:)writes one line per request when
the response is ready, with the action, route, status, duration, request ID,
and parameters as metadata. Parameters such as passwords, tokens, and keys are
logged as[FILTERED], including inside JSON bodies. Failed requests are
logged with their action too.tracing(tracer:)continues an incoming trace when the tracer understands its
headers, recordshttp.route,roost.controller, androost.action, wraps
each action in a child span namedController.action, and marks server
errors. Spans started inside an action nest under it.- The development metrics endpoint groups durations by route pattern.
Routing
scope(_:pipelines:)acceptsNamedPipelinevalues, and a pipeline builder
accepts a list of plugs such asbrowserPlugs().
Roost 2.0.1
Roost, ESW, Spectro, Nexus, and the Roost Playground moved to the
roost-framework organization.
Upgrade
- Point package URLs at
https://github.com/roost-framework/. The former
Maartz/swift-roostandSpectro-ORM/*URLs redirect, but SwiftPM warns when
one dependency graph reaches a package through both. Apps generated by Roost
2.0.0 also declare ESW at its former URL; update it together with Roost's. - The website moved to https://roost-framework.github.io/swift-roost/.
Changes
- Roost resolves ESW, Spectro, and Nexus from
roost-framework, androost new
generates apps that do the same.
Roost 2.0.0
Roost is the new name for Peregrine. Version 2.0.0 brings the renamed framework, CLI, generated application workflow, and reading-list example together.
What's included
Roost,RoostTest, and theroostCLI, with generated authentication, scoped resources, typed ESW views, HTML/JSON routes, and database tests.- Published GitHub dependencies by default: Spectro
from: "2.0.0", Nexusfrom: "2.0.0", and ESWfrom: "1.5.0". No sibling checkouts are required. Spectro 2.1.0 is accepted when published; existing applications can runswift package update spectro. - Spectro SQL migrations from both the CLI and compiled application, plus corrected session persistence, CSRF/form handling, flash messages, and ownership checks.
- A complete PostgreSQL reading-list example, refreshed README, DocC guides and API reference, and the website and guided browser playground.
Test drive
Requires Swift 6.3+, macOS 14+ or Linux, and local PostgreSQL/client tools for the example. Linux builds require zlib1g-dev.
git clone --branch 2.0.0 --depth 1 https://github.com/Maartz/swift-roost.git Roost
cd Roost
unset ROOST_FRAMEWORK_PATH ROOST_ECOSYSTEM_PATH ROOST_ESW_PATH
swift build -c release --product roost
swift run -c release roost --version
cd examples/Roost
./devOpen http://127.0.0.1:4000 and sign in with reader@roost.test / Read-with-Roost-2026.
For a new app, follow the quickstart.
Verification
- 445 framework and CLI tests passed on macOS and Linux with Swift 6.3.3 and freshly resolved GitHub packages.
- Linux generated-app acceptance passed against PostgreSQL 18, including an optimized executable, authentication, CSRF, HTML/JSON updates, two-user ownership, and migration rollback/reapply.
- A fresh app resolves published Roost 2.0.0 entirely from GitHub and passes its generated database tests, optimized HTTP workflow, and compiled migration rollback/reapply on macOS. Both the generated app and reading-list example resolve 48 GitHub packages with no filesystem dependencies. The example passes all eight tests against the published tag.
- The DocC catalogs built successfully with documentation warnings treated as errors.
- All eight browser playground checks and static-site link/asset checks passed; GitHub Pages deployed successfully.
Upgrading from Peregrine
This is a breaking rename: update products/imports, application symbols, the executable name, and environment variables. Existing browser sessions expire; application records and migration history are preserved. See Moving to Roost.
Roost's generators use Spectro's SQL migration workflow. Optional Swift migration declarations in Spectro 2.1 require a separate migration executable. Channels, SMTP, persistent PubSub/job adapters, and TLS/HTTP2 application wiring remain incomplete; see implementation status.
1.2.1
What's Changed
- Fix linux build by @jclejeune in #1
New Contributors
- @jclejeune made their first contribution in #1
Full Changelog: 1.2.0...1.2.1