Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v7
- uses: PyO3/maturin-action@v1
with:
args: --release --out dist -i python3.10 -i python3.11 -i python3.12 -i python3.13
args: --profile dist --out dist -i python3.10 -i python3.11 -i python3.12 -i python3.13
manylinux: auto
- uses: actions/upload-artifact@v7
with:
Expand Down
16 changes: 11 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,21 @@ path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]

[profile.release]
lto = false
codegen-units = 16

[profile.release.package.mdhtml-crate]
incremental = true

[profile.dist]
inherits = "release"
lto = true
incremental = false
codegen-units = 1
strip = true

[profile.play]
inherits = "release"
lto = false
incremental = true
codegen-units = 16
[profile.dist.package.mdhtml-crate]
incremental = false

[dependencies]
base64 = "0.23.0"
Expand Down
12 changes: 2 additions & 10 deletions DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,10 @@
For local development, build and install the extension into your environment:

```bash
maturin develop
maturin develop --release
```

For performance-sensitive iteration, use the incremental optimized profile:

```bash
maturin develop --profile play
```

Its first build creates a separate cache; subsequent crate rebuilds retain
optimization but skip release LTO. Use `--release` only for final production
measurements and wheels.
The `release` profile is optimized and incremental for fast local iteration. CI builds wheels with `dist`, which enables full LTO with one codegen unit, disables incremental compilation, and strips the result. Use `maturin develop --profile dist` to reproduce that artifact locally.

`ship-rs-build` builds the distributable wheel. The `md2mdhtml` and `md2html` commands are Python console scripts (`python/mdhtml/__main__.py` and `python/mdhtml/md2html.py`, sharing `_cli.py`) over the `md2mdhtml` and `mdhtml2html` APIs; there is no separate Rust binary.

Expand Down