Raised the minimum Rust version to the toolchain the Flatpak now builds with (#1223)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-23 15:43:20 +01:00
1 parent 6e94a93c70
commit 6154f65e78
6 files changed
+20 -21

No files matched your search

+10 -10
View File
@@ -103,17 +103,17 @@ macOS lets an app become active only when the active app allows it. Therefore:
- Call `own_restart::restart` outside the main thread only. On the main thread, Tauri restarts the app at
once, without `RunEvent::Exit`, and therefore in the background.
**The runtime builds with the Rust of the Flatpak, too.** Flathub builds the Flatpak with its own Rust,
the extension `org.freedesktop.Sdk.Extension.rust-stable` of the branch named by
`FLATPAK_FREEDESKTOP_VERSION` in the pipeline, and only after a release. That Rust often lags behind the
toolchain in `metadata.txt` by a version or two. Therefore:
**Every build uses the Rust toolchain of `metadata.txt`.** Line 6 names it for the pipeline, the cloud
sessions, and, since MindWorkAI/Flatpak#41, the Flatpak as well, which installs that toolchain instead of
the extension `org.freedesktop.Sdk.Extension.rust-stable` of Flathub, which lagged behind by several
versions. Therefore:
- `rust-version` in `Cargo.toml` names the Rust of the Flatpak, not our toolchain. Clippy refuses every
API of the standard library which is newer (`incompatible_msrv`), so the quality gate catches it before
the release does.
- Raise `rust-version` only once Flathub ships the newer Rust on that branch, never together with
`metadata.txt`. Keep the minor version only, such as `1.98`: the branches of Flathub differ in the patch.
- Never silence `incompatible_msrv`. Write the code the way the older Rust allows instead.
- `rust-version` in `Cargo.toml` names the minor version of line 6, such as `1.100`. Clippy refuses every
API of the standard library which is newer (`incompatible_msrv`).
- Raise both together when you upgrade Rust. The build script writes line 6 from the local `rustc` but
leaves `rust-version` alone. Never raise `rust-version` above line 6: Cargo then refuses the toolchain
of line 6, and the pipeline and the Flatpak fail.
- Never silence `incompatible_msrv`. When the code needs a newer API, upgrade Rust first.
## IPC Communication Flow
1. Rust runtime starts and generates TLS certificate
+6 -7
View File
@@ -3,13 +3,12 @@ name = "mindwork-ai-studio"
version = "26.11.1"
edition = "2024"
# Not our toolchain, which metadata.txt names, but the oldest Rust which still has to build the runtime: Flathub
# builds the Flatpak with the extension org.freedesktop.Sdk.Extension.rust-stable of the branch named by
# FLATPAK_FREEDESKTOP_VERSION in the pipeline, which lags behind. Clippy refuses every API of the standard library
# which is newer (incompatible_msrv), and Cargo prefers versions of crates which still build with it. Keep the
# minor version only: patch releases add no APIs, and the branches of Flathub differ in the patch. Raise it only
# once Flathub ships a newer Rust, see runtime/AGENTS.md.
rust-version = "1.98"
# The minor version of our toolchain, which line 6 of metadata.txt names. Every build of AI Studio uses that
# toolchain, the Flatpak included, which installs it from the same line since MindWorkAI/Flatpak#41. Clippy refuses
# every API of the standard library which is newer (incompatible_msrv), Cargo prefers versions of crates which still
# build with it, and a contributor with an older Rust learns right away why the runtime does not build. Raise it
# together with line 6 when we upgrade Rust, see runtime/AGENTS.md.
rust-version = "1.100"
description = "MindWork AI Studio"
authors = ["Thorsten Sommer"]
+1 -1
View File
@@ -1191,7 +1191,7 @@ fn enterprise_source_key_suffix<'a>(key_name: &'a str, prefix: &str) -> Option<&
}
fn normalize_enterprise_slot_suffix(raw_suffix: &str) -> Option<&str> {
let suffix = raw_suffix.strip_prefix('_').unwrap_or(raw_suffix);
let suffix = raw_suffix.trim_prefix('_');
if is_enterprise_slot_suffix(suffix) {
Some(suffix)
} else {
+1 -1
View File
@@ -734,7 +734,7 @@ impl QdrantEdgeDatabase {
}
fn store_directory_name(store_name: &str) -> String {
let stable_id = store_name.strip_prefix("rag_").unwrap_or(store_name);
let stable_id = store_name.trim_prefix("rag_");
format!("store_{stable_id}")
}