Skip to main content

max / goingson

800 B · 23 lines History Blame Raw
1 //! Application metadata commands.
2 //!
3 //! Exposes static, app-level information to the frontend. The changelog is
4 //! embedded at compile time via `include_str!` so the "What's New" dialog can
5 //! surface release notes after an OTA update without shipping a separate
6 //! resource file or reading from disk at runtime.
7
8 use tracing::instrument;
9
10 /// The project changelog, baked into the binary at build time.
11 const CHANGELOG: &str = include_str!("../../../CHANGELOG.md");
12
13 /// Return the raw `CHANGELOG.md` contents.
14 ///
15 /// The frontend parses out the section for the freshly-installed version and
16 /// renders it in the "What's New" dialog. Infallible — the changelog is part
17 /// of the binary.
18 #[tauri::command]
19 #[instrument]
20 pub async fn get_changelog() -> String {
21 CHANGELOG.to_string()
22 }
23