Skip to main content

Crate r2x_python

Crate r2x_python 

Source
Expand description

Python-Rust bridge for plugin execution

This bridge provides a minimal, focused interface for:

  1. Loading plugin package metadata via entry points
  2. Executing plugins with configuration

Plugin discovery uses AST-based analysis instead of runtime inspection, making it more efficient and reducing Python interpreter overhead.

§PYTHONHOME Configuration

PYTHONHOME is resolved from the venv’s pyvenv.cfg file to ensure compatibility with PyO3 (which is linked at build time). This avoids version mismatches between the discovered Python and the compiled binary.

Re-exports§

pub use errors::BridgeError;
pub use plugin_invoker::PluginInvocationResult;
pub use plugin_invoker::PluginInvocationTimings;

Modules§

errors
plugin_invoker
Plugin invocation and execution

Structs§

Bridge
The Python bridge for plugin execution
PythonEnvironment
Legacy compatibility struct for PythonEnvironment

Constants§

PYTHON_LIB_DIR
The name of the library directory in a Python venv (e.g., “Lib” on Windows, “lib” on Unix)

Functions§

configure_python_venv
Configure the Python virtual environment (legacy API compatibility)
resolve_python_path
resolve_site_package_path