1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/// Module providing macro functionality for PyWatt SDK.
///
/// This module provides basic macro support for PyWatt modules.
/// Full proc-macro functionality is available in the separate `pywatt_macros` crate.
/// Basic module setup functionality.
///
/// This function provides the core module initialization that would
/// typically be wrapped by the `#[pywatt::module]` macro.
///
/// When proc_macros feature is disabled, users should call this
/// function manually at the start of their module's main function.
///
/// # Usage
///
/// ```ignore
/// async fn main() -> Result<(), Box<dyn std::error::Error>> {
/// pywatt_sdk::module_init().await?;
/// // Your module code here
/// Ok(())
/// }
/// ```
pub async
/// Re-export for compatibility when proc_macros feature is enabled.
pub use module;
/// Placeholder module function when proc_macros feature is disabled.
///
/// When the proc_macros feature is not enabled, this provides a
/// compile-time placeholder. Users should manually call `module_init()`
/// or use the functions from the main SDK instead.