diff --git a/.changes/config-package-info-getters.md b/.changes/config-package-info-getters.md new file mode 100644 index 00000000000..26c1dc48e44 --- /dev/null +++ b/.changes/config-package-info-getters.md @@ -0,0 +1,5 @@ +--- +"tauri": patch +--- + +Adds `config` and `package_info` getters to the `App` and `AppHandle` structs. diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 24e1f5bb2dc..29827367f08 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -216,6 +216,16 @@ macro_rules! shared_app_impl { package_info: self.manager.package_info().clone(), } } + + /// Gets the app's configuration, defined on the `tauri.conf.json` file. + pub fn config(&self) -> Arc { + self.manager.config() + } + + /// Gets the app's package information. + pub fn package_info(&self) -> &PackageInfo { + self.manager.package_info() + } } }; }