r2x_python/lib.rs
1//! Python-Rust bridge for plugin execution
2//!
3//! This bridge provides a minimal, focused interface for:
4//! 1. Loading plugin package metadata via entry points
5//! 2. Executing plugins with configuration
6//!
7//! Plugin discovery uses AST-based analysis instead of runtime inspection,
8//! making it more efficient and reducing Python interpreter overhead.
9//!
10//! ## PYTHONHOME Configuration
11//!
12//! PYTHONHOME is resolved from the venv's `pyvenv.cfg` file to ensure
13//! compatibility with PyO3 (which is linked at build time). This avoids
14//! version mismatches between the discovered Python and the compiled binary.
15
16pub mod errors;
17pub mod plugin_invoker;
18mod plugin_kwargs;
19mod plugin_regular;
20mod plugin_upgrader;
21pub mod python_bridge;
22pub mod utils;
23
24#[cfg(test)]
25mod tests {
26 #[test]
27 fn test_bridge_module_exports() {
28 // Verify that key types are exported
29 // Bridge and configure_python_venv should be publicly accessible
30 }
31}