This project demonstrates the integration of Rust with Python for performance-critical tasks. The code utilizes a hybrid approach, combining Rust for heavy computations, Python's asyncio for asynchronous programming, and multiprocessing for parallelism.
- Clone the repository:
git clone https://github.com/yourusername/rust-python-integration.git
Install dependencies:
pip install -r requirements.txt
Run the code:
python main.py
Overview
main.py: The main Python script orchestrating the Rust integration, async IO, and multiprocessing.
rust_module: Rust code for heavy computation, compiled as a shared library.
RustPythonIntegration: A Python class encapsulating the integration logic.
Requirements
Python 3.x
Rust (for compiling the Rust module)
Usage
Modify the Rust code in rust_module to suit your specific heavy computation requirements.
Adjust the Python code in main.py and RustPythonIntegration as needed.
Contributing
Feel free to contribute by opening issues or submitting pull requests.