rez_next_common/
lib.rs

1//! # Rez Core Common
2//!
3//! Common utilities and types shared across Rez Core components.
4//!
5//! This crate provides:
6//! - Error handling types
7//! - Configuration management
8//! - Utility functions
9//! - Shared data structures
10
11#[cfg(feature = "python-bindings")]
12use pyo3::prelude::*;
13
14pub mod config;
15pub mod error;
16pub mod utils;
17
18// Re-export commonly used types
19pub use config::RezCoreConfig;
20#[cfg(not(feature = "python-bindings"))]
21pub use error::RezCoreError;
22#[cfg(feature = "python-bindings")]
23pub use error::{PyRezCoreError, RezCoreError};
24
25/// Python module for rez_core.common
26#[cfg(feature = "python-bindings")]
27#[pymodule]
28pub fn common_module(m: &Bound<'_, PyModule>) -> PyResult<()> {
29    // Configuration
30    m.add_class::<RezCoreConfig>()?;
31
32    // Error types
33    m.add("RezCoreError", m.py().get_type::<PyRezCoreError>())?;
34
35    Ok(())
36}