·
62 commits
to main
since this release
All four crates ship 0.28.0 (rustio-admin, rustio-admin-macros, rustio-admin-cli, rio-theme).
rustio-admin = "0.28.0"Changed
#[derive(RustioAdmin)]now generatesimpl Modeltoo. The derive already walked every field to buildAdminModel; it now emits theorm::Modelimpl (TABLE,COLUMNS,INSERT_COLUMNS,id,from_row,insert_values) from the same walk. Models are declared once — the hand-written ORM glue that had to be kept in sync with the struct by hand is gone. Two struct-level escape hatches cover what the field walk can't infer:#[rustio(table = "…")]when the SQL table name differs from the auto slug (e.g.Address→addresses), and#[rustio(extra_columns = ["…"])]for generated/virtual columns that aren't struct fields (e.g. a Postgrestsvector).- Runtime dependencies are re-exported from
rustio_admin.chrono,rust_decimal,uuid, andsqlx(plus theDecimal/DateTime/Utc/NaiveDate/NaiveTime/Uuidtype aliases) are now re-exported. The derive's generated code routes through these paths, so a model crate can depend onrustio-adminalone; the scaffold'sCargo.tomldrops its directchrono/uuid/rust_decimal/sqlxdependencies. One resolved copy of each, no version skew.
Internal
- Two drift-guard tests with no machine check before: one asserts the
admin.css@importmanifest matches theADMIN_CSSconcat!(include_str!(…))bundle inroutes.rs; one assertsrustio_admin_macros::HUMANISE_ACRONYMSis byte-identical toadmin::render::HUMANISE_ACRONYMS.
⚠️ Upgrading from 0.27.x (breaking)
- Delete any hand-written
impl Modelblocks for types that deriveRustioAdmin— they now collide with the generated impl. If a model needs a non-default table name or virtual columns, use the new#[rustio(table = "…")]/#[rustio(extra_columns = ["…"])]attributes instead. - You can drop direct
chrono/uuid/rust_decimal/sqlxdependencies from a model crate'sCargo.tomland route throughrustio_admin's re-exports.
Full changelog: https://github.com/abdulwahed-sweden/rustio-admin/blob/v0.28.0/CHANGELOG.md