diff --git a/.changes/config-mut-getter.md b/.changes/config-mut-getter.md new file mode 100644 index 000000000..93a24dd5a --- /dev/null +++ b/.changes/config-mut-getter.md @@ -0,0 +1,5 @@ +--- +"tauri": patch +--- + +Adds a mutable `config` getter on the `Context` struct. diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 3a13ffff2..c0593099e 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -142,6 +142,12 @@ impl Context { &self.config } + /// A mutable reference to the config the application was prepared with. + #[inline(always)] + pub fn config_mut(&mut self) -> &mut Config { + &mut self.config + } + /// The assets to be served directly by Tauri. #[inline(always)] pub fn assets(&self) -> Arc {