Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Apr 20, 2021
1 parent ac5a25c commit d03b559
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,25 @@ To create a mixed rust/python project, create a folder with your module name (i.
my-project
├── Cargo.toml
├── my_project
   ├── __init__.py
   └── bar.py
├── __init__.py
└── bar.py
├── Readme.md
└── src
   └── lib.rs
└── lib.rs
```

Alternatively, you can also put the python sources in a folder called `python_src`, which resembles the [src layout](https://hynek.me/articles/testing-packaging/#src) without conflicting with rust's `src` directory:

```
my-project
├── Cargo.toml
├── python_src
│ └── my_project
│ ├── __init__.py
│ └── bar.py
├── Readme.md
└── src
└── lib.rs
```

maturin will add the native extension as a module in your python folder. When using develop, maturin will copy the native library and for cffi also the glue code to your python folder. You should add those files to your gitignore.
Expand Down

0 comments on commit d03b559

Please sign in to comment.