Rust Python Template
A Rust-core + PyO3 + Python-wrapper monorepo template. maturin + uv build,
just task surface, abi3 wheels (one per OS/arch covers Python 3.10–3.14),
dual MIT / Apache-2.0.
Quick Start
- Create a repository from the template, then clone it
- Run
./setup.shto rename the project and make the initial commit - Run
just bootstrapto sync the venv and build the extension - Run
just checkto confirm everything passes
This block runs as a test on every commit, along with every other fenced
python block on this site — see Contributing.
Post-Setup
The documentation is published with mike,
which commits the built site to a gh-pages branch. Configure your repository
to serve from that branch — the deploy will silently publish nothing until
you do:
- Push to
mainonce and let thedeploy-docsjob run. It creates thegh-pagesbranch. - Navigate to Settings → Pages and set the source to Deploy from a
branch, then select
gh-pagesand the/(root) folder. Not "GitHub Actions" — that source is for artifact-based deploys, which this is not. - Check that Settings → Actions → General → Workflow permissions is set to Read and write permissions, so the deploy job can push that branch.
Once configured, main publishes under the latest alias and each release tag
publishes a <major>.<minor> version plus the stable alias, which the
version selector in the header exposes. The site root redirects to latest
until your first release tag, then to stable.
Where things are documented
This project has two public API surfaces, documented by two different tools:
| Surface | Audience | Where |
|---|---|---|
| Python wrapper | Most users | API reference on this site |
-core Rust crate |
Rust consumers | rustdoc, published to docs.rs |
New here? Start with the getting-started tutorial.