Repository navigation
RustCMS v0.12.0
RustCMS v0.12.0. Install: https://irisvn.github.io/RustCMS/ (guide, install scripts).
Built from irisvn/RustCMS-Core v0.12.0.
— 2026-11-04
Added
- API mode (ADR 0036):
[app] mode = "api"(RUSTCMS_APP__MODE,serve --api-only) serves the application API only. Nothing under
auth.admin_pathanswers but a JSON 404 (before routing, no session
loaded): no panel, admin API, panel sign-in routes orAdminRoutes
(streams, sockets). Permissions, job kinds, schedules and commands are
declared as infull.queue.enabledandschedule.enabledleft out are
falsein API mode.AppState::mode(),AppBuilder::mode(),
AppBuilder::panel_path(),queue::Jobs::kinds();servein API mode
warns about SQLite, a missing Redis and alocaldisk
(app::api_mode_warnings). - Media hooks:
AdminProvider::media_hook(impl MediaHook)runs application
code in the transaction of every change to a media record (MediaEvent:
Uploaded,Updatedwith the previous record,Trashed,Restored,
Deleted); an error rolls the change back.Registry::media_hook,
Registry::media_hooks. just bench-api(bench/api,scripts/bench-api.sh): a load test of the
application API withohaon PostgreSQL.
Changed
-
The media and exports/imports cleanups are framework schedules
(rustcms.media-prune.<disk>every minute,rustcms.exports-prune.<disk>every 10
minutes, timeout 30 min; one schedule per storage disk, the exports and
imports passes each bounded and attempted independently) instead of
tokio::spawnloops in
AdminProvider::bootwith a Redis lease: run only byservewith the
scheduler, once per slot across instances, never by commands or tests.
Deployments without the scheduler runmedia:pruneand
schedule:run rustcms.exports-prune.<disk>from cron. -
Each instance sweeps its own staging directory (
storage::sweep_staging:
abandoned uploads, export and import files older than an hour):servein
any mode andqueue:workat start and every 10 minutes,queue:work --once
andmedia:pruneonce.media::prune,exports::pruneand
imports::pruneno longer sweep. -
A JWT's sign-in and user are read in one joined statement. Two opt-in
settings (default0, unchanged behaviour) let an instance reuse reads:
auth.permission_generation_cache_ms(the RBAC generation) and
auth.jwt.session_cache_ms(a JWT's sign-in and user), e.g.1000on API
instances (ADR 0012 amendment). Changes made through an instance apply
there on the next request; on other instances within that time. Sessions
and API tokens are never cached. -
A personal access token is checked with one statement (token and owner
joined) andlast_used_atis written only when the value read is more than
a minute old: a request with a token used within the minute sends no
UPDATE(4 statements before the handler became 2). Refusals are unchanged
(wrong secret, revoked, expired, inactive or deleted owner).
Fixed
- The S3 disk's sweep also removes export and import files a crash left in
.s3-staging(it removed only*.upload), so exported data no longer stays
on the instance's disk.