Upgrade guide
Upgrading the command and an application
The command:
rustcms self-updatereplaces it with the latest release (--version v0.4.0for a given one, older included). It works when the install script installed it; a command built withcargo installis updated the same way it was installed.rustcms --versionshows the version and the platform.An application: in its directory,
rustcms upgrademoves it to the command's version:shrustcms upgrade --dry-run # what changes in Cargo.toml rustcms upgrade # writes it, then updates Cargo.lock rustcms migrate cargo testIt sets the tag of
rustcmsandrustcms-testing(always the same), thesea-ormpins of that version and[package.metadata.rustcms] version, keeping your comments and features. If Cargo cannot resolve the result,Cargo.tomlandCargo.lockare put back. It refuses to go back to an older version (unless--force), and leaves alone a dependency on a localpath, inherited from a workspace, renamed, or from another repository: change those by hand. Then follow the section of that version below, and commitCargo.tomlandCargo.locktogether.To upgrade to another version than the command's, install that command first (
rustcms self-update --version vX.Y.Z).
From 0.16.0 to 0.17.0
No migration. One change to the API: AppError::Internal holds an InternalError (the message, the error's type, where it was made, its causes) instead of a String:
| 0.16 | 0.17 |
|---|---|
AppError::Internal(message) | AppError::Internal(message.into()) (from a String or &str) |
AppError::Internal(message) => …message… | AppError::Internal(detail) => …detail.message()… |
| rewriting the message to hide a secret | AppError::Internal(detail.redact(|text| …)) (also cleans the causes) |
AppError::Internal(_) patterns and AppError::internal(err) are unchanged.
With APP_DEBUG=true and APP_ENV=local (a new application's .env), a 500 seen from the same machine now shows its details: the debug page. Production is unchanged; check that it does not run with APP_ENV=local. Run rustcms agents to refresh the kit (a rule on internal errors). The SDK's VERSION is 0.17.0 and its ui stays 6. Rollback: install 0.16.0 again and undo the Internal changes.
From 0.15.0 to 0.16.0
No migration of the framework and no change to the API: rustcms upgrade, then build. Then add the kit for AI agents, and commit it:
rustcms agents
git add AGENTS.md CLAUDE.md .claude .rustcmsAn existing CLAUDE.md is kept (an @AGENTS.md line is added at its top); an existing AGENTS.md without the kit's markers is left alone and reported (see Refreshing the kit). The SDK's VERSION is 0.16.0 and its ui stays 6: extensions need no rebuild. Rollback: install 0.15.0 again; the kit's files stay and do no harm (its links point at the 0.16.0 guide until you remove them).
From 0.14.1 to 0.15.0
No migration of the framework: rustcms upgrade, then build. Rollback: install 0.14.1 again; documents saved with a formula (version 4) are then shown read-only in the panel and refused by rich_text::parse, and code using virtual fields goes back with the binary (your tables stay as they are).
- Rich text version 4. Documents with a formula are written in version 4; others are still written in version 1 to 3, so older readers keep working.
rich_text::VERSIONis 4 andNodegainsMathandMathBlock(it is#[non_exhaustive]: amatchalready has a_arm). A frontend that sanitizes the HTML ofto_htmlallows MathML (see formulas on a frontend). New error codes:document_formula,document_formula_missing,max_formulas. - Extensions. The SDK is at
ui6 (ui5: the forms' widgets;ui6:registerField). Bundles built forui1 to 4 keep working unchanged. To use the new widgets or virtual fields, copy the SDK again (rustcms make:sdk), declareRequires { ui: 6 }and rebuild. - Rust API.
Envelopegains a publicunloadedfield: code building anEnvelopewith a struct literal addsunloaded: Vec::new().DynResource(implemented by the engine only) gainshas_virtual_fields,lock_recordandfind_key. Only code that implements it is affected.rustcms::admin::*also exportsVirtual,VirtualField,VirtualInputandChecker: a glob import that brings in another item of the same name needs a path.
- Schema (vocabulary 28).
InputSchemagains the typevirtual(withwidget), envelopes may carryunloaded, and a new error codevirtual_field_stale. A client on an older vocabulary shows forms read-only.
From 0.14.0 to 0.14.1
No migration of the framework and no API change: rustcms upgrade, then build. To roll back, install 0.14.0 again.
From 0.13.1 to 0.14.0
Run rustcms migrate: framework migration m20261202_000023_add_collection_to_media adds a nullable media.collection column and an index. Rollback: its down drops both; 0.13.1 also runs with the column in place (it ignores it), so rolling back the binary alone is safe.
- Table columns show option labels. A text or badge column whose field has a select or checkbox list with options in the form shows the option's label instead of the stored value. Add
.raw()to the column to keep the values. Search, sorting, filters and exports still use the values. .color(..)values are compared as the API sends them. On ani64or decimal column write.color("2", ..)(a number such as.color(2, ..)is read the same way). A value the column cannot hold (a string on ani32or boolean column, a number on a text column) now stops the boot with a message naming it: such colors never matched before.- Colors. Inputs, checkboxes and outline buttons use the new
inputtoken instead ofborder: a theme that setborderfor them setsinputtoo. Primary badges are solid, a row's primary action is an outline button, dark mode's main buttons are light grey, and the lightmuted-foregroundis a little darker (#63636c) so muted text reaches 4.5:1 on selected rows. A theme or branding whose text colors fall under 4.5:1 is named in a warning in the log; nothing is refused. See theming. - Uploads. An upload may carry a
collectionpart. A part other thanfileandcollectionis still refused with codefile_part, with a new message; an undeclared collection gets the new codemedia_collection. - Rust API.
media::entity::Modelgainscollection: code that builds a mediaModelorActiveModelwith a struct literal addscollection: None(orSet(None)).MediaEntry::gallery()is deprecated and does nothing (every image opens in the viewer;.preview(false)keeps a field's images still). - Schema (vocabularies 20 to 23).
ColumnSchemagainsoptionsandformat,EntrySchemaformatandpreview(itsgalleryis gone: code building anEntrySchemadrops it),MediaSchemapreview,InputSchemacollection,FilterSchemanone,MediaItemcollection, the panel's configurationdateFormat/dateTimeFormatandPanelResponsemediaCollections. A client on an older vocabulary shows forms read-only. - Extensions. The SDK's
Badgetakescolor("gray","primary","info","success","warning","danger", any other string shows gray); copy the SDK again (rustcms make:sdk) to get the type.
Repeaters gain conditions, filtered relations, a table layout, rows on view pages and files in rows (see forms and relationships). They need no migration. Rollback: application code using the new builders goes back with the binary; files written into JSON rows stay in their columns. What changes for existing applications:
- Relationship repeaters hold fewer rows by default. The new setting
[admin] repeater_rows(default 50, 1 to 500) bounds the rows of one parent a relationship repeater reads and reorders, and the rows one save adds, changes or removes in it (422too_many_rowsbeyond). 0.13 read up to 100 rows (ormax_items), took up to 100 entries per part of a change and reordered up to 1,000 rows. A parent with more rows than the setting shows its repeater read-only (edit the rows in the relation's section): applications with larger repeaters raise it. Relation lists (GET …/relations/{relation}) now takeper_pageup to that setting when it is above the resource's page size. - The default view page shows relationship repeaters. A resource without
infolist()now lists a relationship repeater's rows under the record (aRepeatableEntryof the relation, its rows' inputs as entries) instead of nothing. Declare aninfolist()to choose otherwise. - Rows keep the child form's conditions. Rows of a relationship repeater whose
.schema()declares no condition are checked with the child form's conditions, as in 0.13. Declaring a condition in the rows (shown_when,when_root) makes the rows follow the repeater's conditions instead of the child form's. - Filtered relations (
Relation::where_null,where_eq) are new.where_eqtakes a boolean, integer, UUID or date field only (others stop the boot). A user who may not read every filtered field does not get the relation (its routes answer 404, a repeater change for it 403); one who may not write them on create cannot create through it (403). A hook that removes or changes a filtered value of a record created or updated through the relation is a 500. - Hooks of repeater rows. A row's
after_saveruns before the save's file check, which comes last: an unavailable file then rolls the whole save back. Do outside work through a job dispatched in the transaction (ctx.dispatch(txn, …)orqueue::dispatch(txn, …)), neverqueue::enqueue(db, …)nor a direct call (see hooks after a write). A child's hook that adds a file to a row no longer fails with a 500: the file is checked with the parent's. - Files per save. One save refers to at most 2,000 distinct files (fields, rich text and rows together; 422
too_many_media, a new code). - Rust API.
- The leaves of
Condition(Eq,Ne,IsIn,Filled,IsTrue) gain ascopemember. The builders (when,Condition::all,Condition::any) are unchanged; code that builds a variant by hand setsscope: Scope::Row, and code matching a variant by all its fields adds... ListQuerygains a hiddenrelation_filtersfield, set by the engine: code that builds it with..Default::default()is unaffected, a struct literal listing every field adds it.DynResource(implemented by the engine only) changes:counted_bytakes the relation's filters before the parents (&[]for none),field_locks_media_or_secretisfield_is_encrypted, and it gains methods. Only code that calls these is affected.
- The leaves of
- Schema (vocabularies 24 and 25). Leaf conditions gain
scope("root","parent"; absent: the same level), relationship repeaters may carryshownWhen,RepeaterSchemagainslayout("table"),RepeaterRelationshiprowLimit,RelationSchemafixed,EntrySchemarows,InputSchematoolbar("compact"), and file uploads and rich editors may appear in rows. A client on an older vocabulary shows forms read-only.
Selects and checkbox lists may compute their options on the server (options_fn), and reactions may read and change the rows of relationship repeaters (reactions on child records). Both are opt-in and need no migration; nothing changes for a form that does not use them. Rollback: code using options_fn, .reacts() on a relationship repeater or the new patches goes back with the binary. Otherwise:
- Idempotent update retries are answered earlier. An update carrying an idempotency key (
Ctx::with_idempotency_key, import rows) whose first run committed now answers with the record before its input is checked, as creates do: a retry of a committed write no longer fails on a rule that changed meanwhile, and runs nooptions_fn. - New answers on saves with
options_fn. A save may fail with the form erroroptions_failed(the options could not be computed) or 409stale(reasonoptions: a dependency changed before the record was locked; send it again). Imports retry such rows. - Rust API.
FormPatchgainsAddRelationRow,UpdateRelationRow,RemoveRelationRowandFlagRelationRow. It is not#[non_exhaustive]: an exhaustivematchon it needs arms for them (or_).SelectOption,RowIdandStateRoware exported at the crate root (rustcms::admin::…); a glob import that brings in another item of the same name needs a path.DynResource(implemented by the engine only) gains hidden methods (form_options,computes_optionsand the row reactions'). Only code that implements it is affected.
- Schema (vocabularies 26 and 27).
InputSchemagainsoptionsFrom({dependsOn}), with a new routeform/options; relationship repeaters may carryreacts,form/react's state carries their rows, and its answer may hold the four row patches. A client on an older vocabulary shows forms read-only.
From 0.13.0 to 0.13.1
No migration. To roll back, install 0.13.0 again; no data changes shape.
- Default view page. A resource without
infolist()is shown by an infolist made from its form instead of the read-only form: values look as before, abelongs_tofield's title links to the related record when the user may list it, and an encrypted field no longer shows whether it is set. A declaredinfolist()is unchanged. - Schema (vocabulary 19).
InfolistSchemagainsfromForm; a view schema withoutkeyno longer carriesinfolist(a client drawing a record's view page passeskey);InputSchemaand rich text entries gainrichNodes, inputs gainreacts(form reactions, a new routeform/react). - Rich text version 3 (underline, superscript, subscript, application elements). Documents are stored in the lowest version they need, so 0.13.0 still reads every document without a version 3 part. Rollback: 0.13.0 refuses version 3 documents on save and shows them read-only.
- Rust API.
Markis#[non_exhaustive]and gainsUnderline,Superscript,Subscript;NodegainsApp: an exhaustivematchneeds an arm (or_).rich_text::parserefusesapp.*nodes: read documents holding them withRegistry::rich_nodes()(orAppNodes::parse). - Extensions: SDK
ui4. Bundles built forui3 keep working. To draw elements, copy the new SDK (rustcms make:sdk), setRequires { ui: 4 }and rebuild.
From 0.12.1 to 0.13.0
No migration. To roll back, install 0.12.1 again; no data changes shape.
SQLite 3.54 (security, RUSTSEC-2026-0459). No sqlx release bundles it yet, and a
[patch.crates-io]in RustCMS does not reach an application: add the section below to theCargo.tomlat your workspace's root (the application's own, or the parent workspace's for an application inside one), then runcargo update -p libsqlite3-sys.rustcms newwrites it for new applications, except with--in-workspace: add it to the parent workspace's root. A later release says when to remove it.toml[patch.crates-io] sqlx = { git = "https://github.com/launchbadge/sqlx", rev = "10462fa4414c6c7f1ed1d39bb31678e3b726878c" } sqlx-core = { git = "https://github.com/launchbadge/sqlx", rev = "10462fa4414c6c7f1ed1d39bb31678e3b726878c" } sqlx-macros = { git = "https://github.com/launchbadge/sqlx", rev = "10462fa4414c6c7f1ed1d39bb31678e3b726878c" } sqlx-macros-core = { git = "https://github.com/launchbadge/sqlx", rev = "10462fa4414c6c7f1ed1d39bb31678e3b726878c" } sqlx-mysql = { git = "https://github.com/launchbadge/sqlx", rev = "10462fa4414c6c7f1ed1d39bb31678e3b726878c" } sqlx-postgres = { git = "https://github.com/launchbadge/sqlx", rev = "10462fa4414c6c7f1ed1d39bb31678e3b726878c" } sqlx-sqlite = { git = "https://github.com/launchbadge/sqlx", rev = "10462fa4414c6c7f1ed1d39bb31678e3b726878c" }Only a process that opens a database file (with its
-wal) written by a less trusted party is exposed; PostgreSQL and MySQL applications are not.New schema vocabulary. The panel and the server move together (the admin panel is embedded): nothing to do, unless an application builds
InputSchemaorLayoutSchemaby hand (new membersnumber,shownWhen,clearWhenHidden).Relationship select search. Each word of a search must match one of the title's fields: with
title("name"), a search of several words no longer matches only that exact phrase. Titles with an empty value are left out oftitles().Extensions: SDK
ui3. Bundles built withui: 2keep working. To useregisterEntryor the SDK'sInfolist, copy the new SDK (rustcms make:sdk, which points at the registrations to move), setRequires { ui: 3 }and rebuild (npm run build).Rust API. New variants:
Component::Entry(forms hold entries in infolists),ComponentSchema::Entry,PageView::Infolist. An exhaustivematchon one of these enums needs an arm for it (or_). Code implementingDynResourceitself (not throughResource) addscomputedandfield_locks_media_or_secret; struct literals ofRepeaterSchemaaddcreate_components.lock_parentcannot target the media library (boot refuses it): media rows are locked after every other record of a write.Name clash.
rustcms_admin::Condition(form conditions) can clash withsea_orm::Conditionwhen an application glob-imports both (use rustcms_admin::*; use sea_orm::*;): import the one you use by name.
From 0.12.0 to 0.12.1
No migration. To roll back, install 0.12.0 again.
- Only new applications change. To format an existing one as new ones are, copy
rustfmt.tomlto its root and runcargo fmt; generators find their markers wherever they sit in the builder chains.
From 0.11.0 to 0.12.0
No migration. To roll back, install 0.11.0 again; no data changes shape.
- Behaviour change: the media and exports cleanups need the scheduler. They are now framework schedules,
rustcms.media-prune.<disk>(every minute) andrustcms.exports-prune.<disk>(every 10 minutes), run only byservewith[schedule] enabled, once per slot across instances. They no longer run inqueue:workor console commands and take no Redis lease. If no instance runsservewith the scheduler, cronmedia:pruneandschedule:run rustcms.exports-prune.local(or.s3). - Temporary files an instance staged (uploads, exports, imports) are removed by that instance after an hour: every
serveandqueue:work, every 10 minutes.media::prune,exports::pruneandimports::pruneno longer sweep them; callrustcms::storage::sweep_stagingif your code relied on it. - New
[app] mode(fullby default, nothing changes). Inapimode (serve --api-only),queue.enabledandschedule.enabledleft out arefalse(API mode). - New opt-in settings
auth.permission_generation_cache_msandauth.jwt.session_cache_ms, both0(unchanged behaviour). MediaResourcenow implementsafter_trashandafter_restore(for media hooks); nothing changes for applications.
From 0.10.3 to 0.11.0
No migration. Read the first points before upgrading: they can make a request a 422 or stop the boot. To roll back, install 0.10.3 again; no data changes shape.
rustcms docsopens the guide of your version online (https://irisvn.github.io/RustCMS/v/X.Y.Z/); the command no longer carries an offline copy. The guide's sources are Markdown files in RustCMS-Core (docs/guide/src).- The hourly auth cleanup (expired sessions, ended JWT sign-ins, reset and invitation links, old audit entries) and the idempotency cleanup are now framework schedules,
rustcms.auth-pruneandrustcms.idempotency-prune: onlyserveruns them, with[schedule] enabled, on the hour (UTC), once across instances. They no longer run inqueue:work, console commands or tests, and take no Redis lease. If no instance runsservewith the scheduler, cronschedule:run rustcms.auth-prune(orsession:prune,audit:prune) andidempotency:prune. They appear on System → Schedules and inschedule:list; holders ofschedules.managecan Run them now. Application schedules still cannot use therustcms.prefix. No migration. - Behaviour change: static options are validated. A client write to a resource (create, update, a relation create, a CSV import row) whose value is not one of a
SelectInput's orCheckboxList's.options(…)is now a 422 (not_option; a checkbox list alsoinvalidwhen not a list andgiven_twicefor a repeated item); it was stored before. Records already holding other values keep them until the field is written. Clients and imports sending values outside the options must send an option, or the options must list the value. Hooks and action handlers are not affected. - New boot failures (the application refuses to start): a select option that is not a value of its column (
12for ani64column, write"12") or that would be stored as another value ("10.555"on a column of scale 2, more digits than a decimal's precision,0.1on anf32column, a timestamp finer than microseconds); options on aSecretInputorSecretMapInput; aCheckboxListon a column that is not JSON; a field in several inputs that do not offer the same options (another set, a select and a checkbox list, or one of them without options). See options. The schema now shows select options in canonical form ("0012"→"12"), and a matched select value is stored as its option ("10.505"→"10.50"). No migration. - A background export over its limits now fails with the reason
too_many_to_exportortoo_many_matchesinstead ofrevoked. A client ofGET {admin}/api/exportsthat maps reasons should add both (unknown reasons should already show as a generic failure). - The panel's sockets refuse to send messages larger than
[realtime] max_message_bytes(it was a fixed 64 KiB): with a lower value, pages that sent up to 64 KiB now getfalsefromsendfor larger messages. Keep the value the same on every instance; open tabs keep the limit they loaded until reloaded. - Export and import pruning only cleans its own disk (
[storage] disk). After a change of disk, expired exports and imports of the old disk stay (rows and files) until a process configured with the old disk boots and prunes them, or you delete them yourself (they are no longer listed nor downloadable once expired). No migration.
From 0.10.2 to 0.10.3
- Nothing to change. On phones a record page's Edit and Delete are in its ⋯ menu: end-to-end tests at phone widths open the menu first.
From 0.10.1 to 0.10.2
- Vocabulary 11: layouts
splitandpane,collapsedandcompacton sections,prefixandsuffixon text inputs,FormSchema.width. An older admin SPA shows the banner and lays such forms out as plain groups; extensions that check the vocabulary version should accept 11. Exhaustive matches onLayoutTypeand clients that buildLayoutSchema,InputSchemaorFormSchemavalues by hand need the new members. - The default theme's
successandwarningcolors are green and amber (they were grays): set them withTheme::colorto keep the old look. - No migration.
From 0.10.0 to 0.10.1
- Run
rustcms migrate(m20261201_000022_add_alt_to_media, a nullable column):servedoes not wait for it, and media queries fail until it has run. 0.10.0 binaries read the migrated database: to roll back, run them withmigrate --allow-newer(or[database] allow_newer_migrations); leave the column in place (migrate:rollbackwould undo the application's own latest migrations first). media.updatenow grants something: renaming one's own files and editing their alternative text (before, updates were always refused); withmedia.manage_all, everyone's files. Review roles that holdmedia.*as a whole.- The navigation and the dashboard's resource cards follow registration order, not slugs: use
ResourceMeta::sortto keep an order. - Every
.bulk()action is also offered on rows where the record's abilities allow it; an action offered only for a selection is not supported (visible_whenalso applies when the action runs, so hiding it on every row would leave a bulk run nothing to process). - Action dialogs no longer say "Run": their button is the action's label without "…" (or
submit_label); empty values read "Not set". Update end-to-end selectors. - Vocabulary 10:
ActionSchema.primaryandsubmitLabel,ColumnSchema.hideBelow; per-recordabilitiesincludevisible_when. An older admin SPA shows the banner and every offered action as a button; extensions that check the vocabulary version should accept 10. - Struct literals:
ActionOutcomehasmessageandopen(add..Default::default());media::entity::Model/ActiveModelhavealt. Clients that build wire types by hand gainMediaItem.alt,RecentColumn.valueType,optionsandcolumn, andRecentRecord.data. Action::newis unchanged; handlers that return an outcome useAction::with_outcome.
From 0.9.0 to 0.10.0
- Rich text documents have a version 2 (tables, embeds, callouts, image captions and widths). Stored version 1 documents stay valid and are read as they are, and the panel keeps writing version 1 unless a document uses a version 2 part. Nothing to migrate. To rewrite stored documents anyway, map each value through
rustcms::admin::rich_text::upgrade_value(onlyversionchanges). - Rolling back to 0.9, or a 0.9 reader of the same database (another service, a replica during a rolling deploy): documents saved with a version 2 part (table, embed, callout, image caption or width) are refused by 0.9's
rich_text::parse, and the 0.9 panel shows them read-only. Deploy every reader first; before rolling back, remove those parts or keep 0.10. A headless consumer that parses documents itself should accept"version": 2and the new nodes (see Rich text). rich_text::Nodeis#[non_exhaustive]and has new variants (Table,Embed,Callout);Node::Imagenow holds anImage { media, alt, caption, width };Documenthas aversionfield. Exhaustive matches, patterns onNode::Image { media, alt }and struct literals need updating.rich_text::to_htmlkeeps its signature but writes images as<figure><img …></figure>and headings with anid. Useto_html_with(&doc, &HashMap<Uuid, ImageInfo>)to write image sizes, andoutlinefor a table of contents.PanelResponsehas an optionaluploadsfield (the upload limits); admin clients that buildPanelResponsevalues by hand need it.
From 0.8.2 to 0.9.0
- New permission
media.view_all(runpermission:syncto list it). Roles that heldmedia.manage_allonly to see other users' files can holdmedia.view_allinstead. InputTypehas aBelongsToManyvariant,InputSchemaalinksfield andDynResourcealink_options_newmethod (exhaustive matches, struct literals and hand-written implementations need them). Admin clients seevocabularyVersion9: an older admin SPA shows these inputs read-only and never sends them, and an extension that checks the vocabulary version should accept 9.Resource::after_relation_changeis new: a link write never updates the parent row, so touchupdated_atthere if your application needs it.- Restores now call
after_restore, whose default callsafter_save: nothing changes unless you override it (then callSelf::after_savefrom it if restores should still run yourafter_save).
From 0.8.1 to 0.8.2
Nothing needs to change (no rebuild of React pages either). A workaround that hid session_changed from reads may stay or go.
From 0.8.0 to 0.8.1
Nothing needs to change. To survive automatic rollbacks, keep migrations additive and start the image with migrate --allow-newer. Deploy that image before adding migrations: a rollback only accepts newer migrations when the image it returns to is 0.8.1 or later with the flag (a 0.8.0 image still refuses). Run migrations once per deployment, not in every replica (Deployment).
From 0.7.1 to 0.8.0
Run rustcms migrate: it adds jobs.started_at, jobs.description and the job_runs and schedule_runs tables. Then:
- Grant
schedules.view(andschedules.managefor Run now) to the roles that should see System → Schedules (rustcms permission:syncdeclares them). .runschedules keep working; switch to.taskto show a summary.- Job kinds starting with
rustcms.are now refused (they are the framework's). - The Queue's Scheduled status is labelled Delayed (the API value stays
scheduled).
From 0.7.0 to 0.7.1
Nothing needs to change. React pages' dialogs get the close button without a rebuild; rustcms make:sdk adds closeButton and closeDisabled to the SDK's types.
From 0.6.1 to 0.7.0
Most applications need no change; update links of your own to theme files, and PermissionInfo struct literals, if you have any.
- The Roles page now groups permissions by area: resource matrix cells under "Resources", the built-in users, roles and permissions permissions under "System", the rest under "Other" until you declare areas (
permission_area,permission_meta). - Theme files moved from
{admin}/assets/ext/to{admin}/assets/brand/(theme.css,logo,favicon). Change any link of your own to the old paths; the panel's pages need nothing. - The sign-in pages now show your
brand(…)name and logo instead of "rustcms". PermissionInfo(fromGET {admin}/api/system/permissions) has new fields; code that builds it with a struct literal must add them.
From 0.6.0 to 0.6.1
Nothing needs to change. Users can now pick Light, Dark or System; your Theme::color_scheme is the default until they do. To use useColorScheme() in a React page, run rustcms make:sdk, then npm run build in resources/admin.
From 0.5.1 to 0.6.0
Nothing needs to change: React pages built with ui: 1 keep working.
To use props.resources, props.toast and the new components:
- Run
rustcms make:sdk: it updatesresources/admin/sdk(keeping files you edited) and lists the registrations to change. - Set
ui: 2in thoseRequires { … }. A bundle built with the new SDK is refused while its provider still declaresui: 1. - Run
npm install && npm run buildinresources/admin, then commit.
From 0.5.0 to 0.5.1
Nothing needs to change. PanelResponse (home), ResourceInfo (sort, nav) and PageLink (sort) have new fields: code that builds these structs with a literal must add them (they are normally only read).
From 0.4.1 to 0.5.0
Nothing needs to change: v1 scripts (extension_script, window.rustcms.registerPage with apiVersion: 1) work as before.
- New, optional: React pages (
rustcms make:page <Name> --react,extension_script_v2). They need Node 20.19+ or 22.12+ to build, not to compile or deploy the app. GET {admin}/api/panelhas a newpermissionslist; a test that compares the whole response should expect it, and Rust code building aPanelResponseliteral must addpermissions.{admin}/api/pages/{slug}/{*path}is new: a page now answers its sub-paths too (with the page's permissions; readctx.page_path()indatato tell them apart).
From 0.4.0 to 0.4.1
rustcms migrate: two new tables,schedule_statesandschedule_slots.- Periodic work can move from your own
tokio::spawnloops to schedules, which run once per slot across instances and only inserve. rustcms::settings::{read, load, write}take the keyring (state.keyring()) instead of&state.config().app.key.settings::get(&state)is unchanged.- New, optional:
APP_PREVIOUS_KEYS(see Rotating APP_KEY), and encrypted columns. - The admin vocabulary is 8 (
secret_mapinputs). An extension that checks the vocabulary version should accept 8.
From 0.3.2 to 0.4.0
rustcms self-update, then rustcms upgrade in each application. Nothing needs to change in your code.
- New
[realtime]keys, all optional:socket_revalidate_secs,max_message_bytes,send_timeout_secs(Configuration). The other keys already existed. - The admin page's CSP now also lists
ws(s)://for the panel's origins inconnect-src. A test that compares the header withrustcms::admin::spa::CONTENT_SECURITY_POLICYshould usecontent_security_policy(&origins)instead. {admin}/api/xbelongs to yourAdminRoutes: nothing built in lives there.- Behind a proxy, if you add WebSocket routes, see the production checklist.
From 0.3.1 to 0.3.2
Only the command changed (new doctor, upgrade, self-update, docs). Install it again with the install script (0.3.1 has no self-update), then rustcms upgrade in each application.
Applications made before 0.3.1
They depend on rustcms = "0.3.0" (not on crates.io) or on a local path. rustcms upgrade moves a version dependency to the Git tag; a path is changed by hand, keeping your features:
[dependencies]
rustcms = { git = "https://github.com/irisvn/RustCMS-Core", tag = "v0.3.1" }
[dev-dependencies]
rustcms-testing = { git = "https://github.com/irisvn/RustCMS-Core", tag = "v0.3.1" }From 0.1.0-alpha.0 (or a 0.2 build) to 0.3.0
- Update the
rustcmsdependency, then runrustcms migrate(new tables for media, JWT sign-ins, idempotency keys, locks, the audit log, settings, jobs, andusers.locale).servenow also runs queue workers (setqueue.enabled = falseto keep them out of web instances). - Rust API changes:
- API routes: move them to
ApiRouteswith an explicitAccessper route (Routing); register them withAuthProvider::new().api_permissions(&api)andapi.register(&mut app). RateLimiter::reserve,releaseandclearare async (.awaitthem).Principalandrustcms::models::user::Modelhave new fields (locale,credential): struct literals need them, or..Default::default().AppError::Conflicthas a newreasonfield.SettingsAbilitieshas a newtestfield;SettingsPage::validate_in(with the application) runsvalidateby default.rustcms::models::user::Modelhasinvitation_pending,invited_at,invited_by(migrations…000018,…000019): struct literals need them (..Default::default()onActiveModels is unaffected).rustcms-authnow enables the coremailfeature.- Mail: register
rustcms::mail::MailProvider(andAdminProvider::mail_settings()for the page); in production withdriver = "smtp"andsource = "settings", set[mail] allowed_hosts. - Functions that change credentials record an audit entry and take one more argument:
credentials::change_passwordandcredentials::logout_everywherean&AuditContext;credentials::issue_tokenandjwt_session::{issue, rotate, logout}a&RequestMeta(both inrustcms::audit;RequestMetais also an extractor). InputTypehas aSecretvariant andAdminPanelasettingsfield (exhaustive matches and struct literals need them); admin clients seevocabularyVersion5.- Resource slugs are limited to 64 bytes and action names to 57, and
user,role,permission,settings,session(andjob,queue, see below) are reserved (boot fails);Ctx::newrecords writes as its principal. ActorKindhas aJobvariant (exhaustive matches need it).AdminPanelhas acustomfield (CustomPanel::empty(base)in hand-built panels),PanelResponseapagesfield andColumnSchemacell/props; admin clients seevocabularyVersion6.SystemLinkshasauditandqueuefields; resource schemas gain thehistoryability.- Resource slugs
jobandqueueare reserved too (subjects of the Queue page's audit entries). - Actions:
datasent to an action without a form is refused (422), and the request body may only holdkeysanddata. Declare what an action needs withAction::form(Actions). Actions are admitted before the body is read: a policy deciding per record should overridePolicy::admitsfor abilities that need a permission. Actions the policy does not admit are no longer listed in the schema. - Run
rustcms migrate(newexportsandimportstables).ResourceSchema.abilitiesmay holdexport;DynResourcehas new methods (implementations outside the crate are not expected). Relationhas new fields andRelationSchemaakind;ActionSchemaaform;ListQuerya hiddenthroughfield (struct literals need..Default::default()). Admin clients seeschemaVersion2 andvocabularyVersion7: an older admin SPA turns read-only.- Tests that build tables from entities instead of running migrations also need the
audit_logstable (Testing).
- API routes: move them to
- Optional: translate your labels. Add
lang/vi.toml, register it withAdminProvider::new().translations("vi", include_str!("../lang/vi.toml")), and fill in whatrustcms lang:missing vilists. - API clients: error bodies gain
issuesandformIssues(andreasonon 409); existing fields are unchanged. - Several instances: see Several instances.
Application layout (0.3)
Applications are laid out like Laravel applications, inside src/ (Directory structure). Generators refuse an application in the old layout; move it once:
| Before | Now |
|---|---|
src/app.rs (build) | src/bootstrap/mod.rs (build) + src/bootstrap/providers.rs |
providers set up in build | src/providers/{auth_service_provider,admin_panel_provider,app_service_provider}.rs |
src/migrations/ | src/database/migrations/ (keep the file names: they are recorded in seaql_migrations) |
src/admin/post.rs | src/admin/resources/post_resource.rs |
src/http/api/mod.rs (routes) | src/routes/api.rs |
src/http/api/posts/handlers.rs | src/http/controllers/post_controller.rs |
src/http/api/posts/requests.rs | src/http/requests/post_request.rs |
src/http/api/posts/json.rs | src/http/resources/post_resource.rs |
| a settings struct with its page | src/settings/<x>_settings.rs + src/admin/pages/<x>_settings_page.rs |
a <app>:seed command | src/database/seeders/ + rustcms db:seed |
tests/*.rs | tests/feature/*.rs listed in tests/feature/main.rs, helpers in tests/support/mod.rs |
assets/admin/<vendor>/*.js, *.css | resources/admin/js/<vendor>/, resources/admin/css/<vendor>/ (update the include_str! paths) |
Then:
src/main.rs:Console::<my_app::database::migrations::Migrator>::new(my_app::bootstrap::build).- Add the generator anchors where generated lines go:
// rustcms:mods(src/lib.rs),// rustcms:resourcesand// rustcms:pages(admin panel provider),// rustcms:seeders,// rustcms:jobs,// rustcms:commands(app service provider),// rustcms:api-routes(src/routes/api.rs),// rustcms:tests(tests/feature/main.rs),// rustcms:extensions(admin panel provider, formake:page --script). A new application fromrustcms newshows every one. rustcms migrate:statuslists every migration as applied: nothing to run.