This repo is a demonstration of interoperability between Ray's Python Interface and Rust libraries. This is a demo only, both Rust and Ray code are not optimized.
- Clone the repo
- Get Rust lang (as of writing recent stable rust release is 1.76. but nothing is fancy, so most should workd)
- Get Ray (version 2.9.3)
- Python 3.8+
- Follow the commands below to create a new directory containing a new Python virtualenv, and install maturin into the virtualenv using Python's package manager. Also this will install Ray:
# (replace string_sum with the desired package name)
$ mkdir string_sum
$ cd string_sum
$ python -m venv .env
$ source .env/bin/activate
$ pip install maturin
$ pip install ray
- Run
maturin dev
, this will compile the Rust lib into a python shared lib - Start the python interpreter and verify the
prover
module can be imported. useimport prover
- Start Ray head node with
ray start --head
- run
python3 distributed_proving.py
and see results - shutdown ray with
ray stop