We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
tauri::version
getTauriVersion
1 parent fb485d2 commit 7c23720Copy full SHA for 7c23720
.changes/add-tauri-get-version.md
@@ -0,0 +1,5 @@
1
+---
2
+"tauri": "patch"
3
4
+
5
+Added `tauri::version` function to retrieve Tauri's version from Rust.
core/tauri/src/lib.rs
@@ -326,6 +326,11 @@ pub trait Runtime: runtime::Runtime<EventLoopMessage> {}
326
327
impl<W: runtime::Runtime<EventLoopMessage>> Runtime for W {}
328
329
+/// Returns Tauri version.
330
+pub fn version() -> &'static str {
331
+ env!("CARGO_PKG_VERSION")
332
+}
333
334
/// Reads the config file at compile time and generates a [`Context`] based on its content.
335
///
336
/// The default config file path is a `tauri.conf.json` file inside the Cargo manifest directory of
0 commit comments