From 00f4888ed822e7784ad6c61e07c326d80e4d178f Mon Sep 17 00:00:00 2001 From: tmtenbrink <64082573+tmtenbrink@users.noreply.github.com> Date: Fri, 17 Sep 2021 00:16:41 +0200 Subject: [PATCH] Create README.md --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..96d0408 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# rustfrc + +## Installation + +### Wheel (Windows) + +There is a Windows-compatible .whl file available in releases. Use `pip install <.whl filename>` in your Python environment, for example: `pip install rustfrc-0.1.0-cp39-none-win_amd64.whl`, to install it. Then, use `import rustfrc` in your Python script to be able to use the Rust functions. + +### From source (using maturin) + +`rustfrc` uses [`poetry`](https://github.com/python-poetry/poetry) as its Python dependency manager. For best results, create a `poetry` virtualenv with the `pyproject.toml` and run `poetry update` to install the required packages. +Otherwise, installing [`maturin`](https://pypi.org/project/maturin/) manually should also work. + +Build a wheel file like this: + +``` +maturin build --release +``` + +This generates a `.whl` file in `\target\wheels`. Then, create a Python environment of your choosing (with `numpy ^1.18` and `python ^3.7`), drop the `.whl` file in it and run `pip install <.whl filename>`, for example: `pip install rustfrc-0.1.0-cp39-none-win_amd64.whl`. Then, use `import rustfrc` in your Python script to be able to use the Rust functions. Building for Linux is a bit more challenging, take a look at the maturin page. + +Take a look at [PyO3](https://github.com/PyO3/pyo3) for other installation options as the only true requirement for building is using a tool that understands PyO3 bindings, as those are used in the Rust code.