Skip to content

Releases

Roost 2.5.0

Choose a tag to compare

@Maartz Maartz released this 22 Oct 17:43

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 /socket in Phoenix's V2 protocol, so phoenix.js connects unchanged. Presence events follow Phoenix's format, and with RoostApp.pubSub channel 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.scheduledJobs runs cron jobs from one server at a time.
  • A LivePage names its topics, and handleInfo(_:state:conn:) updates its open pages from server broadcasts. LiveRoute(_:pubSub:) reaches the pages open on every server.
  • ValkeyPubSub delivers PubSub messages between servers through Valkey or Redis, with the Valkey trait.
  • 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

Choose a tag to compare

@Maartz Maartz released this 21 Oct 14:44
69f1feb

Roost 2.4.0 adds the app commands behind roost-cli 3.0's database and route tooling.

  • App db create|drop|seed|setup|reset manages the database with the server's configuration, like mix ecto.setup. setup creates the database, migrates it, and runs Seeds/<env>.sql when it exists; drop and reset refuse production.
  • App routes lists each route's method and full path in matching order, like mix phx.routes.
  • App migrate down takes --step N and --all for 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 RichTerminal trait 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

Choose a tag to compare

@Maartz Maartz released this 19 Oct 12:12
993bf7f

Roost 2.3.0 brings live pages, reusable form controls, typed data operations, migrations, and persistent key-value stores.

  • LivePage and LiveRoute: request-aware interactive pages, SSE updates, CSRF-protected events, session ownership, and graceful shutdown.
  • Input, Textarea, and FormFieldRepresentable: 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

Choose a tag to compare

@Maartz Maartz released this 08 Oct 14:08

roost spectro can show Spectro's colors, spinners, and styled tables again.

  • Roost has a RichTerminal trait 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 and roost spectro prints 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 resolve

Roost 2.1.2

Choose a tag to compare

@Maartz Maartz released this 07 Oct 21:43

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 CLI trait. roost spectro still builds and runs the app's own spectro command, 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

Choose a tag to compare

@Maartz Maartz released this 07 Oct 18:32

Roost apps download about 75 MB less.

  • Roost depends on Nexus 2.1.0 or later with its default Vapor trait 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, so NexusVapor keeps working there.
  • Spectro keeps its default traits, because roost spectro builds and runs the
    app's own spectro command.

Roost 2.1.0

Choose a tag to compare

@Maartz Maartz released this 07 Oct 17:49

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 roost CLI moved to roost-cli
    and swift-roost no longer has a roost executable product. Install it with
    mint install roost-framework/roost-cli@2.1.0.
  • pipeline(_:_:) and scope(_: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. Declare NamedPipeline values and pass them to
    scope(_:pipelines:) instead.
  • The default plugs use roost_requestLogger() instead of Nexus's
    requestLogger(). It logs through swift-log with the roost.request label
    instead of printing. Apps that override plugs keep the loggers they list.
  • tracing() names spans after the matched route (GET /recipes/:id) instead of
    the raw path, and reuses the ID from requestId() 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

  • Controller groups actions. Its Action enum names them, and an exhaustive
    switch in action(_:) 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, and DELETE take 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 plugs run after routing and before the action, each optionally
    limited with only: or except:.
  • conn.matchedRoute reports the route pattern, controller, and action, and is
    kept on error responses.

Parameters

  • conn.permit(T.self) decodes a request into a Decodable type: the JSON body,
    or query, form, and path parameters with path parameters taking precedence.
    Undeclared fields are dropped. A missing or invalid field throws
    ValidationErrors naming 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, records http.route, roost.controller, and roost.action, wraps
    each action in a child span named Controller.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:) accepts NamedPipeline values, and a pipeline builder
    accepts a list of plugs such as browserPlugs().

Roost 2.0.1

Choose a tag to compare

@Maartz Maartz released this 06 Oct 12:49

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-roost and Spectro-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, and roost new
    generates apps that do the same.

Roost 2.0.0

Choose a tag to compare

@Maartz Maartz released this 06 Oct 10:08

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 the roost CLI, with generated authentication, scoped resources, typed ESW views, HTML/JSON routes, and database tests.
  • Published GitHub dependencies by default: Spectro from: "2.0.0", Nexus from: "2.0.0", and ESW from: "1.5.0". No sibling checkouts are required. Spectro 2.1.0 is accepted when published; existing applications can run swift 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
./dev

Open 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

Choose a tag to compare

@Maartz Maartz released this 11 Apr 14:08
36356c4

What's Changed

New Contributors

Full Changelog: 1.2.0...1.2.1