0

Many python packages have their performance-critical parts written in Rust and binded to python using, e.g. pyo3. Within the same repo, both .py and .rs files residing in different directories, e.g. in Polars, the rust parts are in polars and the python parts are in py-polars. Note that, within py-polars's pyproject.toml I do not see any reference to polars being a dependency.

Suppose one has his rust-python bindings written for a certain #[pyclass] and would like to implement higher level logics in python, like how it is done in here.

Is it a must for such a library writer to have a dependency for his main python library? e.g. If your python-rust bindings is called pyrsmymodule and your higher level python logics are in pymymodule, is it a must to import pyrsmymodule in pymymodule? If the answer is no, how is the pure python library pymymodule assessing the rust-python bindings?

Jim
  • 450
  • 2
  • 10

0 Answers0