Skip to content

Separate Python & Rust modules, or one repo? #3065

Discussion options

You must be logged in to vote

Personally, I would recommend having both in the same repository as this makes it easier to evolve them in parallel. This does not really imply much on the code organization though as one can have multiple completely independent Rust crates and Python packages in a single Git repository by just placing them in separate folders. (When installing a crate from such a repository via cargo install, Cargo will traverse it from the root to find the desired crate so ergonomics do not really suffer.)

I also like having the Python bindings behind a Cargo feature of the Rust crate and then possibly use a mixed project layout. There are sometimes complications due to how the PyO3 macros need to be us…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jamesturk
Comment options

Answer selected by jamesturk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants