Skip to content

RustCMS v0.13.0

Choose a tag to compare

@irisvn irisvn released this 17 Nov 06:55
· 1 commit to main since this release

RustCMS v0.13.0. Install: https://irisvn.github.io/RustCMS/ (guide, install scripts).

Built from irisvn/RustCMS-Core v0.13.0.

— 2026-11-17

Added

  • rustcms serve --watch (macOS and Linux; first written by
    @giangittb112000): builds and runs serve through cargo run, then
    rebuilds on changes (sources, configuration, .env, lang/, built
    extension scripts, the workspace's manifest and lockfile) and replaces the
    server once the build succeeds; a failed build keeps the running server;
    templates that reload themselves (resources/views/) are not watched;
    changes during a build make another round; the build and the server run in
    their own process groups, stopped together (SIGTERM, then SIGKILL after
    6 s) on Ctrl-C. The binary is the package's only one or its default-run.
  • Inputs and layouts shown under conditions (vocabulary 13, ADR 0037; contributed by @giangittb112000):
    .shown_when(when("x").eq(v)) (ne, is_in, filled, is_true,
    Condition::all/any) on inputs, layouts, settings forms and
    ActionFields, and .clear_when_hidden(). The panel evaluates them on
    every change, without a request; the server again on every write (create,
    update, settings, actions, CSV imports), on what the user's form holds
    (never on values the user may not read or view, so a write's outcome tells
    nothing about them): values sent for hidden inputs are dropped (never the
    key a relation binds), clear_when_hidden fields a write hides take their
    column's default (else null, else empty), required fields are required
    only when shown. Schemas send condition values in canonical form. Boot
    checks names, kinds, values, cycles, and refuses a conditional input whose
    column is not nullable and has no default.
  • JSON repeaters (vocabulary 15, ADR 0040; contributed by @giangittb112000): Repeater::make("faq").schema(…)
    edits rows of inputs stored as a JSON array, with Filament's options
    (min_items, max_items, reorderable, collapsible, collapsed,
    item_label, add_action_label, addable, deletable, default_items,
    cloneable); row inputs declare required, max_length, integer. The
    server checks every row (errors at faq.2.question), removes inputs hidden
    by the row's conditions, and refuses media, rich text and secrets in rows.
    SettingField::repeater for settings pages; RepeatableEntry on view
    pages; issue code min_items. Demo: footer links on the site settings.
  • Relationship repeaters (ADR 0040 part 2, ADR 0041; contributed by
    @giangittb112000): Repeater::make("lines").relationship().order_column("position")
    edits the children of a has-many relation in the parent's form. A save sends
    a change (create, update, delete, order; new rows tagged {"new": ref}),
    written in the parent's transaction with the child's checks; the child must
    lock its parent (lock_parent), rows inherit the child form's rules and may
    not hold references, media, rich text or secrets; one locking pass per
    child, positions by MAX typed by the order column; the parent's history
    counts rows; addable/deletable enforced; new rows use the child's create
    inputs (createComponents, vocabulary 16). Issue codes not_a_row,
    row_order, rows_not_addable, rows_not_deletable, too_many_rows,
    positions_exhausted.
  • Count columns and row history (ADR 0040, part 3; contributed by @giangittb112000): TextColumn::make("faq") .count() shows how many items a JSON field holds;
    TextColumn::make("posts_count").counts("posts") how many records of a
    has-many relation each record has, among those the user may list (list
    envelopes carry counts; the column is left out for users who may not list
    the relation; one grouped query per page). The history shows a repeater's
    change line by row and input (faq › 2 › question). CSV exports write rows
    as JSON text and imports check them as forms do. Demo: categories count
    their posts in the list (posts are edited in the category's relation
    section; the demo's categories also edit their posts in the form).
  • Infolists for record view pages (vocabulary 14, ADR 0039; contributed by @giangittb112000):
    Resource::infolist() replaces the read-only form on the view page with
    entries in the form's layouts: TextEntry (badge/color, copyable,
    limit, url, number, list, multiline, password,
    prefix/suffix, options), RelationEntry (linked when the related
    resource may be listed), BooleanEntry, KeyValueEntry, MediaEntry,
    RichTextEntry, ComputedEntry and CustomEntry (registerEntry), with
    shown_when on the stored values. Resource::computed() declares values
    computed when the view page opens (route records/{key}/computed, only for
    users who may view the record; .readable, .timeout, 5 s by default and
    30 s at most); one that fails, times out or exceeds 64 KiB shows "not
    available" alone. PageView::Infolist draws a panel page's data with
    entries. Extension host ui 3: registerEntry and the SDK's Infolist
    (rustcms make:sdk points at registrations to move to ui: 3). Without
    infolist() nothing changes. Demo: a category's view page.
  • Record titles from several fields (ADR 0038; contributed by @giangittb112000):
    ResourceMeta::title_template("{name} (grade {grade})") for headings,
    breadcrumbs, row menus, relationship selects (searched over every field of
    the template, ordered by them) and labels; title(f) is {f}. No title
    when the user may not read one of its fields. ResourceInfo.title_fields
    lists the fields of a title of several. Boot checks the placeholders.
  • Number bounds (vocabulary 12; contributed by @giangittb112000): NumberInput::make(…).min(n).max(n).step(n)
    and SettingField::min/max/step (integer settings). min and max bound
    client writes on every path (issues min_value, max_value); step is a
    hint. Integers and decimals are compared exactly with the bound as written,
    decimals also as rounded to the column's scale. The boot refuses bounds on
    other inputs or settings, min above max, a step that is not positive, a
    setting default outside its bounds, and bounds on a settings form input that
    differ from its field's. i32 and f64 values get a native number input
    (text it cannot read is reported, not saved as empty); i64 and decimals
    stay text.

Changed

  • Breaking (Rust API): new enum variants Component::Entry,
    ComponentSchema::Entry and PageView::Infolist (exhaustive matches need
    an arm); DynResource gains computed (only for code implementing it by
    hand). Extension host ui 3 (bundles built for ui 2 keep working).
  • Computed values (infolists): at most 2 view pages computing at once per
    user, besides the 8 across users, so one user cannot hold every turn.
  • Relationship selects (lookup) search each word of the search over the
    title's fields, every word required (repeated words once): with
    title("name"), "big red" no longer matches only the exact phrase. Titles
    with an empty value are left out of titles(). rustcms_admin::Condition
    (exported for conditions) can clash with sea_orm::Condition when both
    are glob-imported: import one by name.
  • Validation issues: {min}, {max} and {bytes} placeholders only match
    numbers, so an application's message such as "must be at least 18 years
    old" stays custom.
  • CSV import reports keep messages whose numbers are negative or decimal
    (must be at least 0.5) instead of showing is invalid; other text is
    still never quoted back.

Fixed

  • Writes check media references after every other lock (links, and a parent's
    repeater rows), and media rows rank after every resource: lock order of
    writes that link records and reference media (ADR 0041). lock_parent may
    not target the media library.
  • A create leaving out a column that may not be null (not declared
    required, no default) answered 500: it is now that field's
    is required (422), or the form error is incomplete for a column outside
    the resource's fields, on SQLite, PostgreSQL and MySQL.
  • Admin panel: a record's History card had no space under its "Show history"
    button when closed (the header has no bottom padding), and its entries were
    inset less than the header.
  • Admin panel: the arrow of native selects sat against the right border, at a
    different inset per browser; it is now drawn inset like the text.

Security

  • SQLite 3.54.1 (libsqlite3-sys 0.39.1; RUSTSEC-2026-0459, uninitialized
    memory read when a database is opened with a crafted -wal file). No sqlx
    release allows it yet: Core and new applications patch sqlx to an
    unreleased commit ([patch.crates-io], rev 10462fa4), removed once a
    release does. ammonia 4.2.5 (RUSTSEC-2026-0533).

Internal

  • CI and release builds run on macos-15 (GitHub no longer offers
    macos-14).