v0.12.1
Enable the new openapi feature and add schemars, which describes the data in your request and response bodies:
cargo add topcoat --features openapi
cargo add schemars
Attach an Operation to a route with with(...). Topcoat takes the path, HTTP methods and path parameters from the router, and you add the rest:
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use topcoat::{
Result,
context::Cx,
openapi::Operation,
router::{StatusCode, content::Json, route},
};
#[derive(Deserialize, JsonSchema)]
struct CreateUser {
/// The name to show for the user.
name: String,
}
#[derive(Serialize, JsonSchema)]
struct User {
id: u64,
name: String,
}
#[route(POST "/api/users", with(
Operation::new()
.summary("Create a user")
.request::<Json<CreateUser>>()
.response_with::<Json<User>>(StatusCode::CREATED, "The new user.")
.response(StatusCode::CONFLICT, "The name is taken.")
))]
async fn create_user(cx: &Cx, Json(input): Json<CreateUser>) -> Result<(StatusCode, Json<User>)> {
let user = User { id: 1, name: input.name };
Ok((StatusCode::CREATED, Json(user)))
}
Doc comments on your types and fields become descriptions in the generated schema.
Use OpenApi to set the title, version and other document settings, then pass it your router. Return the Document from a route to serve it as JSON:
use topcoat::openapi::{Document, OpenApi};
#[route(GET "/openapi.json")]
async fn spec(cx: &Cx) -> Result<Document> {
Ok(OpenApi::new("Acme API", "1.0.0")
.description("Everything you need for tea.")
.server("https://api.example.com")
.generate(&router(cx)))
}
You can also generate the document outside a request, for example in a test or a command that writes openapi.json with Document::to_json_pretty.
An Operation on a layer sets defaults for every route under its path. Each of those routes is included in the document and inherits the layer's tags, responses and other settings. A route can override or extend them with its own operation, or leave the document with .hidden(true):
#[layer("/api", with(
Operation::new()
.tag("api")
.response(StatusCode::UNAUTHORIZED, "The token is missing or wrong.")
))]
async fn api(cx: &Cx, body: Body, next: Next<'_>) -> Result<Response> {
next.run(cx, body).await
}
// Documented through the layer, with its tag and 401 response.
#[route(GET "/api/health")]
async fn health(cx: &Cx) -> Result<&'static str> {
Ok("ok")
}
// Left out of the document.
#[route(GET "/api/debug", with(Operation::new().hidden(true)))]
async fn debug(cx: &Cx) -> Result<&'static str> {
Ok("debug")
}
Operations follow the same rules as route context, so you can also put one on a layout or on the router builder.
Parameterdescribes path, query, header and cookie parameters. Path parameters are included automatically as strings; add aParameterto give one a type or a description.Operation::query::<T>()documents every field of a#[query_params]struct that derivesJsonSchema.- JSON and form extractors describe their bodies when their data type implements
JsonSchema. Implement theContenttrait to describe a custom body type. SecuritySchemeregisters an authentication method on the document, andOperation::securitymarks the routes that require it. Put it on a layer to protect everything below, and use.no_security()on public routes.
Topcoat does not check that an operation matches its handler, and security settings only describe authentication. Your layers and handlers still enforce access rules.
Read the OpenAPI guide for the details, or run the example:
cargo topcoat dev -p openapi
The router can now list its routes. Router::routes returns each registered route and page with its ID, served path, HTTP methods and the context values from its layers. Router::context returns the values set on the router itself. The OpenAPI generator is built on these, and you can use them for your own tooling, such as a sitemap or a route listing in development.
for route in router.routes() {
println!("{}", route.path());
}
🏁 0.30.1
Highlights:
- Added
Config::set_max_outstanding_sent_packets()to configure the maximum number of outstanding sent packets, above which the connection is closed. The default is 22,000 packets. - Added the
congestion_window_uncheckedcongestion control algorithm, behind the non-defaultcongestion_window_unchecked_availablefeature, for deployments that limit transmission outside of quiche. Its fixed congestion window can be set withConfig::set_unchecked_congestion_window(). - Added
h3::WireErrorCode::DatagramErrorfor theH3_DATAGRAM_ERRORcode defined by RFC 9297. - Fixed several issues in stream FIN, reset and
STOP_SENDINGhandling that could hide stream completion, resets orStreamStoppederrors from the application, or retain stream state until the connection closed. This includesh3::Connection::poll()returningEvent::Datainstead ofEvent::Resetwhen a stream was reset in the middle of aDATAframe. - Fixed
quiche_conn_path_stats()always reporting amax_rttof 0. - Other bug fixes.
Full changelog at 0.30.0...0.30.1
actix-multipart: v0.8.8
- Significant performance improvement when reading fields.
wry v0.57.2
Updating crates.io index
Locking 428 packages to highest Rust 1.85 compatible versions
Adding gdkx11 v0.18.2 (available: v0.19.0, requires Rust 1.92)
Adding generic-array v0.14.7 (available: v0.14.9)
Adding getrandom v0.3.4 (available: v0.4.3)
Adding gtk v0.18.2 (available: v0.19.0, requires Rust 1.92)
Adding icu_collections v2.1.1 (available: v2.4.0, requires Rust 1.88)
Adding icu_locale_core v2.1.1 (available: v2.4.0, requires Rust 1.88)
Adding icu_normalizer v2.1.1 (available: v2.4.0, requires Rust 1.88)
Adding icu_normalizer_data v2.1.1 (available: v2.4.0, requires Rust 1.88)
Adding icu_properties v2.1.2 (available: v2.4.0, requires Rust 1.88)
Adding icu_properties_data v2.1.2 (available: v2.4.0, requires Rust 1.88)
Adding icu_provider v2.1.1 (available: v2.4.0, requires Rust 1.88)
Adding idna_adapter v1.2.1 (available: v1.2.2, requires Rust 1.86)
Adding javascriptcore-rs v1.1.2 (available: v2.0.0)
Adding jni v0.21.1 (available: v0.22.4)
Adding libloading v0.8.9 (available: v0.9.0, requires Rust 1.88.0)
Adding sha2 v0.10.9 (available: v0.11.0)
Adding soup3 v0.5.0 (available: v0.8.0)
Adding time v0.3.45 (available: v0.3.55, requires Rust 1.88.0)
Adding time-core v0.1.7 (available: v0.1.9, requires Rust 1.88.0)
Adding time-macros v0.2.25 (available: v0.2.32, requires Rust 1.88.0)
Adding toml v0.8.2 (available: v0.8.23)
Adding toml_datetime v0.6.3 (available: v0.6.11)
Adding toml_edit v0.20.2 (available: v0.20.7)
Adding wasip2 v1.0.1+wasi-0.2.4 (available: v1.0.4+wasi-0.2.12, requires Rust 1.87.0)
Adding wayland-protocols v0.32.12 (available: v0.32.13, requires Rust 1.86)
Adding wgpu v23.0.1 (available: v26.0.1)
Adding windows-core v0.62.2 (available: v0.100.0, requires Rust 1.95)
Adding windows-version v0.1.7 (available: v0.100.0, requires Rust 1.95)
Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
Loaded 1430 security advisories (from /home/runner/.cargo/advisory-db)
Updating crates.io index
Scanning Cargo.lock for vulnerabilities (429 crate dependencies)
Crate: paste
Version: 1.0.15
Warning: unmaintained
Title: paste - no longer maintained
Date: 2024-10-07
ID: RUSTSEC-2024-0436
URL: https://rustsec.org/advisories/RUSTSEC-2024-0436
Crate: proc-macro-error
Version: 1.0.4
Warning: unmaintained
Title: proc-macro-error is unmaintained
Date: 2024-09-01
ID: RUSTSEC-2024-0370
URL: https://rustsec.org/advisories/RUSTSEC-2024-0370
Crate: ttf-parser
Version: 0.25.1
Warning: unmaintained
Title: `ttf-parser` is unmaintained
Date: 2026-06-28
ID: RUSTSEC-2026-0192
URL: https://rustsec.org/advisories/RUSTSEC-2026-0192
Crate: glib
Version: 0.18.5
Warning: unsound
Title: Unsoundness in `Iterator` and `DoubleEndedIterator` impls for `glib::VariantStrIter`
Date: 2024-03-30
ID: RUSTSEC-2024-0429
URL: https://rustsec.org/advisories/RUSTSEC-2024-0429
warning: 4 allowed warnings found
790ca0d(#1846 by @bbmediaco) On Android, fix a crash when the main pipe receives a webview command message after the activity's destroyedeccc972(#1838 by @bbmediaco) On Android, fix a crash when reading cookies for a URL that has none.952c692(#1909 by @Legend-Master) On Android, fix a memory leak when runningevaluate_script/evaluate_script_with_callback.a665cc6(#1907 by @renovate) Updated dependencydom_queryto 0.29b3dc94a(#1913 by @LucaCappelletti94) On Android, keepRustWebView.getCookiesandRustWebView.clearAllBrowsingDatain the ProGuard rules soWebView::cookies_for_urlandWebView::clear_all_browsing_datadon't abort minified release builds.ba7e1da(#1881 by @alecraso) On macOS, cancel a file upload instead of panicking whenNSOpenPanelcan't be created, for example after the app bundle was replaced on disk while the app was running.9f351c5(#1915 by @coldsmirk) Fix incorrect coordinates and JavaScript errors for synthetic back/forward mouse events on zoomed pages on macOS and Linux.5006b49(#1914 by @Legend-Master) On Windows, skip dettaching parent subclass when the webview's built withnew_as_child.ec9f76d(#1922 by @TheZAbides) On Windows, accept files dropped from File Explorer when any path is 260 characters or longer.ec9f76d(#1922 by @TheZAbides) On Windows, prevent a refused drag that follows an accepted drag from emittingOverand emptyDropevents.a52412f(#1910 by @Legend-Master) On Windows, fix moving the window blurs and re-focuses the webview.e776bbb(#1857 by @legenddcr) Fix macOS panics whenWKWebView.URL()or the navigation request URL is nil:url_from_webview()now returns an error instead of unwrapping, andnavigation_policy()cancels navigations with no URL.
713aee4(#1891 by @LucaCappelletti94) On Android WebViews supportingWEB_MESSAGE_LISTENER, take the IPC request URL from the WebView for main-frame messages and from the sender's origin for iframes, so a page's first IPC call no longer arrives asabout:blank.6e1e9cc(#1911 by @lyrixx) On Linux, with thelinux-bodyfeature, read the whole body of custom protocol requests: a short read no longer ends it, which cut multipart bodies with a file (<input type="file">uploads) after their first part.
Updating crates.io index
Packaging wry v0.57.2 (/home/runner/work/wry/wry)
Updating crates.io index
Packaged 84 files, 881.7KiB (217.2KiB compressed)
Uploading wry v0.57.2 (/home/runner/work/wry/wry)
Uploaded wry v0.57.2 to registry `crates-io`
note: waiting for wry v0.57.2 to be available at registry `crates-io`
help: you may press ctrl-c to skip waiting; the crate should be available shortly
Published wry v0.57.2 at registry `crates-io`
v0.12.0
This release reworks some foundations of Topcoat. Most apps will need many small edits. We are sorry for the churn, but we believe these changes make Topcoat simpler and more extensible. The upgrade guide at the end lists the required changes.
Topcoat used to keep app context and request context apart, each with its own functions. They are now one context, read with context, try_context and the new iter_context. Adding a value with cx.with(value) shadows older values of the same type instead of replacing them. The router can now provide a default that a layer, layout or page changes for its own part of the app.
use topcoat::context::{Cx, context};
struct Greeting(&'static str);
let router = module_router!().with(Greeting("Hi")).build();
#[layer("/formal")]
async fn formal(cx: &Cx, body: Body, next: Next<'_>) -> Result<Response> {
next.run(&cx.with(Greeting("Good day")), body).await
}
#[page]
async fn home(cx: &Cx) -> Result<impl View> {
let Greeting(greeting) = context::<Greeting>(cx);
Ok(view! { <p>(greeting)</p> })
}
Shadowed values stay available. iter_context::<T>(cx) visits every value of a type, closest first, which is useful for values that several scopes add to, such as breadcrumbs. #[memoize] now also tracks values set on the router, so a function that reads a shadowed value runs again for the child context only.
Migrating is mostly a rename:
-module_router!().app_context(PageViews::default())
+module_router!().with(PageViews::default())
-let views = app_context::<PageViews>(cx);
-let user = try_request_context::<User>(cx);
+let views = context::<PageViews>(cx);
+let user = try_context::<User>(cx);
See context.
Routes, pages, layouts and layers can now attach values with with(...). When a request matches, the router adds the values of every layer, layout and the route itself to the context before any of them run. For example, a page could use this to tell its outer layout which <title> to show:
struct Title(&'static str);
#[layout("/", with(Title("My shop")))]
async fn shell(cx: &Cx, slot: Slot<'_>) -> Result<impl View> {
let Title(title) = context::<Title>(cx);
Ok(view! {
<!DOCTYPE html>
<html>
<head><title>(title)</title></head>
<body>(slot)</body>
</html>
})
}
#[page("/products", with(Title("Products")))]
async fn products(cx: &Cx) -> Result<impl View> {
Ok(view! { <h1>"Products"</h1> })
}
Any type can be route context, so apps and libraries can define their own per-route settings without new router APIs. Here, a layer enforces a role that a page declares:
struct RequireRole(Role);
#[layer]
async fn roles(cx: &Cx, body: Body, next: Next<'_>) -> Result<Response> {
if let Some(RequireRole(role)) = try_context::<RequireRole>(cx) {
if !current_user(cx).await?.has_role(*role) {
return Err(forbidden().into());
}
}
next.run(cx, body).await
}
#[page(with(RequireRole(Role::Admin)))]
async fn settings(cx: &Cx) -> Result<impl View> { ... }
Values follow the module tree. A layout's values apply to every page below it, and a layer's values apply to every route and page under its path. Inner values shadow outer ones.
The values are built once with the router, so they cannot read the request. For values that depend on it, store a BoxCxFn, an async function of cx that you call when you need the value. The admin demo uses this for breadcrumbs, where each page adds a Crumb and the outer layout collects them with iter_context.
See route context.
Some router settings that had their own builder methods are now context values. You set them for the whole app with .with(...) on the router builder, and for part of the app with with(...) on a route, page, layout or layer. Features that wrap requests, such as cookies and the browser runtime, are added as layers.
module_router!()
- .compression(Compression::new().brotli(false))
- .origin_policy(OriginPolicy::new().trust_origins(["https://accounts.example.com"]))
- .base_url("https://example.com")
- .prefetch(PrefetchMode::Viewport)
- .suspense(SuspenseMode::Wait)
- .cookies()
- .sessions(SessionConfig::default())
- .runtime()
+ .with(Compression::default().brotli(false))
+ .with(OriginPolicy::trust_origins(["https://accounts.example.com"]))
+ .with(BaseUrl::new("https://example.com")?)
+ .with(PrefetchMode::Viewport)
+ .with(SuspenseMode::Wait)
+ .layer(CookieLayer::new())
+ .layer(RuntimeLayer::new())
.build()
Per-route settings replace BodyLimit::at and OriginPolicy::exempt_paths:
#[route(POST "/upload", with(BodyLimit::max(32 * 1024 * 1024)))]
async fn upload(cx: &Cx, bytes: Bytes) -> Result<()> { ... }
#[route(POST "/webhook", with(OriginPolicy::dangerous_disable()))]
async fn webhook(cx: &Cx) -> Result<()> { ... }
#[route(GET "/export.zip", with(Compression::disable()))]
async fn export(cx: &Cx) -> Result<Response> { ... }
Sessions only need the CookieLayer now. Change their defaults with .with(SessionLifetime(duration)) and .with(SessionTokenStore::new(store)). RuntimeLayer::new().max_runs_per_connection(n) replaces the builder method of the same name.
The new metadata module renders the page title, description, canonical URL, robots, theme color, Open Graph and X tags. It is built on route context. Layouts set defaults, pages override single fields, and topcoat::metadata::tags() renders the result at the top of <head>.
use topcoat::metadata::{Metadata, OpenGraph};
#[layout("/", with(
Metadata::new()
.title("Acme")
.description("Everything you need for tea.")
.open_graph(OpenGraph::new().site_name("Acme").image(asset!("./preview.png")))
))]
async fn shell(cx: &Cx, slot: Slot<'_>) -> Result<impl View> {
Ok(view! {
<!DOCTYPE html>
<html>
<head>topcoat::metadata::tags()</head>
<body>(slot)</body>
</html>
})
}
#[page("/products", with(Metadata::new().title("Products")))]
async fn products(cx: &Cx) -> Result<impl View> { ... }
t! and asset! values can be passed directly. For values that need a database lookup, use Metadata::from_fn:
#[page("/product", with(Metadata::from_fn(async |cx| {
let product = find_product(cx).await?;
Ok(Metadata::new().title(product.name.clone()))
})))]
Canonical and Open Graph URLs must be absolute, so add .with(BaseUrl::new(...)?) to the router when you use relative paths. The metadata feature is enabled by default. See page metadata and examples/metadata.
Topcoat's macros were added one at a time and drifted apart. Some took context and some did not, and options used = in some places and : in others. A macro is only worth having when it does something plain Rust cannot, like checking HTML at compile time or bundling an asset. So we gave the remaining macros the same rules and removed macros that added little value over a plain builder. Almost all of the resulting changes are caught by the compiler, and we think a smaller set of consistent macros is worth it.
Functions with #[component], #[page], #[route], #[layout], #[layer], #[shard], #[procedure] and #[memoize] must now take cx: &Cx as their first parameter, even when they do not use it.
#[page]
-async fn home() -> Result<impl View> {
+async fn home(cx: &Cx) -> Result<impl View> {
#[layout]
-async fn shell(slot: Slot<'_>) -> Result<impl View> {
+async fn shell(cx: &Cx, slot: Slot<'_>) -> Result<impl View> {
#[route(POST)]
-async fn save(Form(input): Form<Input>, cx: &Cx) -> Result<Response> {
+async fn save(cx: &Cx, Form(input): Form<Input>) -> Result<Response> {
view!, live!, emit! and attributes! no longer support the cx => prefix. Instead, they use the cx variable in scope, so to change the context of a view, shadow cx first.
let cx = cx.with(PrefetchMode::Never);
-view! { cx =>
+view! {
link(href: href!(reports), "Reports")
}
view! moves cx into the view like any other captured variable and does not clone it. If a view must outlive the current function, for example in a stream, add let cx = cx.clone(); before it.
Attribute macros take options as key = value, like #[serde(rename = "...")]. Function-like macros take key: value, like component props in view!.
-t!(greeting, name = user.name)
+t!(greeting, name: user.name)
-segment!(kind = CatchAll, rename = "path");
+segment!(kind: CatchAll, rename: "path");
path_param! and module_param! already use : for the parameter type, so their error handler moves to an else clause.
-module_param!(pub post_id: u64, error = bad_request);
+module_param!(pub post_id: u64 else bad_request);
href! took path parameters as wrapper types in path order. It now takes them as name: value pairs, in any order.
-href!(post, PostId(42))
+href!(post, post_id: 42)
The name refers to the parameter like a normal Rust path. When post_id is in scope, write post_id: 42. Otherwise, import it or write its path, such as posts::post_id: 42. See links.
Component calls used to accept a missing comma between the last prop and the first child, as in card(title: name "child"). This was a bug, and the comma is now required.
Topcoat macros now handle incomplete code much better, which makes rust-analyzer work more reliably inside them. For example, a half-typed user. in a component body or a prop no longer breaks the rest of the macro, so rust-analyzer can still complete it. Option names in function-like macros also complete, and a misspelled option is reported on the option itself.
topcoat fmt now formats every Topcoat macro, including attributes such as #[page(...)] and macros such as href!, asset! and path_param!. Run it once after upgrading. See topcoat fmt.
To support this, asset! is now a procedural macro. Its path must be a string literal, and a missing local file is a compile error. Two new prefixes are available. {mod}/ points at the module's own directory, so src/about.rs can use asset!("{mod}/hero.png") for src/about/hero.png. {out_dir}/ points at the build script output.
cookie! and mail! turned into the same builder calls you can write yourself. Plain builders give you completions, normal type errors and rustfmt, and they work with if and loops.
-cookies(cx).add(cookie!("theme" = theme));
-cookies(cx).add(cookie! { "session" = token; Path = "/"; Secure; HttpOnly; SameSite = Lax });
+cookies(cx).add(("theme", theme));
+cookies(cx).add(
+ Cookie::build(("session", token))
+ .path("/")
+ .secure(true)
+ .http_only(true)
+ .same_site(SameSite::Lax),
+);
-let mail = mail! {
- from: "welcome@example.com",
- to: "ada@example.com",
- subject: "Welcome!",
- html: { <h1>"Welcome!"</h1> },
-}?;
+let mail = Mail::builder()
+ .from(Mailbox::new("welcome@example.com")?)
+ .to([Mailbox::new("ada@example.com")?])
+ .subject("Welcome!")
+ .html(cx, view! { <h1>"Welcome!"</h1> })
+ .await?
+ .build()?;
send(cx, mail).await?;
path_param! and module_param! now generate an accessor function named after the parameter. It returns the parsed value, which is still parsed only once per request. The accessor has the visibility you give the macro, so other modules can import it like any other function. The generic path_param::<T>(cx) function and the generated wrapper types such as PostId are removed.
module_param!(pub post_id: u64 else bad_request);
#[page]
async fn post(cx: &Cx) -> Result<impl View> {
- let id = path_param::<PostId>(cx)?;
+ let id = post_id(cx)?;
See path parameters.
Mail is configured with a Mailer in the context, which also makes it easy to swap the transport in tests.
-module_router!().mail(MailConfig::builder().transport(transport).build())
+module_router!().with(Mailer::new(transport))
MailBuilder::build() now returns a Result and checks the sender, recipients, body, attachments and headers. A built Mail always has these, so its accessors no longer return Option. The Message-ID and date are set when the mail is built and the Message-ID no longer contains the machine's hostname. Mailboxes are created with Mailbox::new, Mailbox::named or by parsing a string. See mail.
- Props and local variables can have the same name as a component.
topcoat l10n check,topcoat asset listand the other commands that build now respectdefault-runin packages with several binaries.- The Tailwind CLI download is verified against checksums shipped with Topcoat.
accept_languageno longer requires thel10n-fluentfeature.FileTransportno longer writes theBccheader, matching delivered mail.
The compiler reports most of these changes. Each item links to the section with a full example.
- Add
cx: &Cxas the first parameter of every#[component],#[page],#[route],#[layout],#[layer],#[shard],#[procedure]and#[memoize]function. It must be named exactlycx. (details) - Remove
cx =>fromview!,live!,emit!andattributes!. Where you passed a different context, shadowcxbefore the macro. (details) - Replace
app_context,request_contextand theirtry_versions withcontextandtry_context, and.app_context(value)with.with(value). (details) - Set compression, origin policy, base URL, prefetch mode and suspense mode with
.with(...)on the router. (details) - Replace
.cookies()with.layer(CookieLayer::new())and.runtime()with.layer(RuntimeLayer::new()), and remove.sessions(...). (details) - Replace
BodyLimit::atandOriginPolicy::exempt_pathswithwith(...)on the routes they covered. (details) - Change the options of
t!andsegment!from=to:. (details) - Change
error = ...inpath_param!andmodule_param!toelse .... (details) - Change
href!parameters such asPostId(42)topost_id: 42. (details) - Add a comma between the last prop and the first child in component calls. (details)
- Use a string literal path in
asset!. (details) - Replace
cookie!withCookie::buildandmail!withMail::builder(). (details) - Replace
path_param::<PostId>(cx)withpost_id(cx). (details) - Replace
.mail(...)with.with(Mailer::new(transport)), and handle theResultfromMailBuilder::build(). (details) - Run
topcoat fmt. (details)
| Before | After |
|---|---|
CxTestBuilder::new().app_context(a).request_context(b).build() |
Cx::new().with_many((a, b)) |
Cx::new(app_context) |
Cx::new().with_shared(map) |
RouterBuilder::get_app_context::<T>() |
RouterBuilder::try_context::<T>() |
.layer(BodyLimit::max(n)) |
.with(BodyLimit::max(n)) |
Compression::new() |
Compression::default() |
Compression::off() |
Compression::disable() |
OriginPolicy::new() |
OriginPolicy::default() |
SessionConfig::builder().token_store(s).lifetime(d) |
.with(SessionTokenStore::new(s)).with(SessionLifetime(d)) |
RuntimeLayer |
RuntimeLayer::new() |
href!(POSTS) for a Path constant |
href!((POSTS)) |
asset!(path, rename) |
asset!(path, rename: rename) |
topcoat_asset::asset!, asset_options! |
topcoat::asset::asset! |
SendError::delivery(err) |
SendError::new(err) |
These still compile, so check them by hand:
- Adding the same type to the router twice no longer panics. The later value wins.
- A type that was in both app context and request context now has one lookup, and the request value wins.
MailBuilder::htmlrenders the view right away and panics on live views, since mail cannot stream.
rpi v0.21.3-preview.1042 (preview)
- feat(tui): align @ file completion with native Pi by @bigfish1913 in https://github.com/bigfish1913/pi-rust/pull/295
Full Changelog: https://github.com/bigfish1913/pi-rust/compare/v0.21.3-preview.1033...v0.21.3-preview.1042
v4.9.10
A patch release focused on correctness and stability across SQL code generation, pagination, interceptors, transactions, and CRUD helpers.
- Fixed
py_sql/html_sqltemplate handling for multiple string arguments and correct statement selection by function id. - Fixed comparison (
<=,>=), nullable/expression attributes,<bind>parsing, and<foreach>separator handling. - Improved pagination: safer count-query rewriting, correct argument cleanup, and fixed
Page::make_pages. - Fixed interceptor
Action::Returnresult handling and avoided deadlocks when interceptors are modified during execution. - Improved transaction cleanup so guards do not commit after an explicit commit or rollback.
- Improved batch inserts, cross-row column discovery, decode error reporting, and integer overflow/divide-by-zero behavior.
insert_batch(..., 0)inserts all rows in one statement. Use a positivebatch_sizefor large inputs to stay within database parameter and packet limits.- Integer arithmetic now avoids debug/release-dependent overflow behavior by widening or saturating where needed.
- A new
PageRequeststarts withtotal = 0; the total is filled by the count query whendo_countis enabled.
v4.9.9
A patch release focused on correctness and stability across SQL code generation, pagination, interceptors, transactions, and CRUD helpers.
- Fixed
py_sql/html_sqltemplate handling for multiple string arguments and correct statement selection by function id. - Fixed comparison (
<=,>=), nullable/expression attributes,<bind>parsing, and<foreach>separator handling. - Improved pagination: safer count-query rewriting, correct argument cleanup, and fixed
Page::make_pages. - Fixed interceptor
Action::Returnresult handling and avoided deadlocks when interceptors are modified during execution. - Improved transaction cleanup so guards do not commit after an explicit commit or rollback.
- Improved batch inserts, cross-row column discovery, decode error reporting, and integer overflow/divide-by-zero behavior.
insert_batch(..., 0)inserts all rows in one statement. Use a positivebatch_sizefor large inputs to stay within database parameter and packet limits.- Integer arithmetic now avoids debug/release-dependent overflow behavior by widening or saturating where needed.
- A new
PageRequeststarts withtotal = 0; the total is filled by the count query whendo_countis enabled.
Thanks to everyone who reported and tested these issues.
v0.14.5
- ci: Update
cargo clippyto 1.95 by @caspermeijn in https://github.com/tokio-rs/prost/pull/1436 - build(deps): bump actions/checkout from 6 to 7 by @dependabot[bot] in https://github.com/tokio-rs/prost/pull/1438
- build(deps): update itertools requirement from >=0.10, <=0.14 to >=0.10, <=0.15 by @dependabot[bot] in https://github.com/tokio-rs/prost/pull/1439
- fix(prost-derive): avoid UTF-8 panic for enumeration names by @SAY-5 in https://github.com/tokio-rs/prost/pull/1425
- fix: correct packed encoding default for proto3 fields with options by @bingyanglin in https://github.com/tokio-rs/prost/pull/1399
- fix: Prevent panic for service generator in empty module by @caspermeijn in https://github.com/tokio-rs/prost/pull/1442
- Update prost-build's format feature to prettyplease 0.3 and syn 3 by @tsimonq2 in https://github.com/tokio-rs/prost/pull/1461
- chore: Release version 0.14.5 by @caspermeijn in https://github.com/tokio-rs/prost/pull/1468
- ci: Choose macOS latest by @caspermeijn in https://github.com/tokio-rs/prost/pull/1472
- @bingyanglin made their first contribution in https://github.com/tokio-rs/prost/pull/1399
- @tsimonq2 made their first contribution in https://github.com/tokio-rs/prost/pull/1461
Full Changelog: https://github.com/tokio-rs/prost/compare/v0.14.4...v0.14.5
rpi v0.21.3-preview.1033 (preview)
- ci: cache sherpa-onnx compatibility assets by @bigfish1913 in https://github.com/bigfish1913/pi-rust/pull/293
Full Changelog: https://github.com/bigfish1913/pi-rust/compare/v0.21.3-preview.1029...v0.21.3-preview.1033