Skip to content

Commit

Permalink
add documentation on cross compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Pelland committed Jan 24, 2019
1 parent 89c06d9 commit 5f7bf37
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ E.g. if you are on Ubuntu18.04, please run
sudo apt install python3-dev python-dev
```

### Cross Compiling

Cross compiling Pyo3 modules requires setting the following environment
variables:

- `PYO3_XC`: This variable must be set to indicate a cross compilation
environment. The value does not matter.
- `PYO3_XC_PYTHON_INCLUDE_DIR`: This variable must be set to the directory
containing the headers for the target's python interpreter.
- `PYO3_XC_PYTHON_LIB_DIR`: This variable must be set to the directory
containing the target's libpython DSO.

## Using rust from python

Pyo3 can be used to generate a native python module.
Expand Down

0 comments on commit 5f7bf37

Please sign in to comment.