pytauri_core/plugins/
mod.rs

1#[cfg(feature = "plugin-dialog")]
2mod dialog;
3#[cfg(feature = "plugin-notification")]
4mod notification;
5
6use pyo3::prelude::*;
7
8/// See also: [tauri-apps/plugins-workspace](https://github.com/tauri-apps/plugins-workspace)
9///
10/// You can access this module in Python via `pytuari.EXT_MOD.pytauri_plugins`.
11#[pymodule(submodule, gil_used = false)]
12pub mod pytauri_plugins {
13    #[allow(unused_imports)] // if none of pymodule exported
14    use super::*;
15
16    /// Whether the `plugin-notification` feature is enabled.
17    #[pymodule_export]
18    pub const PLUGIN_NOTIFICATION: bool = cfg!(feature = "plugin-notification");
19
20    /// Whether the `plugin-dialog` feature is enabled.
21    #[pymodule_export]
22    pub const PLUGIN_DIALOG: bool = cfg!(feature = "plugin-dialog");
23
24    #[cfg(feature = "plugin-notification")]
25    #[pymodule_export]
26    pub use notification::notification;
27
28    #[cfg(feature = "plugin-dialog")]
29    #[pymodule_export]
30    pub use dialog::dialog;
31}