Skip to content

unicode-segmentation-rs: add build-unicode-segmentation-rs.yml for riscv64 wheels - #1448

Merged
luhenry merged 3 commits into
mainfrom
unicode-segmentation-rs
Sep 8, 2026
Merged

unicode-segmentation-rs: add build-unicode-segmentation-rs.yml for riscv64 wheels#1448
luhenry merged 3 commits into
mainfrom
unicode-segmentation-rs

Conversation

@luhenry

@luhenry luhenry commented Sep 7, 2026

Copy link
Copy Markdown
Member

Compiles a pyo3/maturin extension binding the unicode-segmentation, unicode-width, and unicode-linebreak crates for grapheme/word/sentence segmentation, line-break, and display-width calculation. Upstream publishes no riscv64 wheel.

Mirrors upstream's ci.yml linux job.

Differs from upstream

  • Rust toolchain installed via CIBW_BEFORE_ALL_LINUX - upstream's build images ship it, ours don't.

Matrix: cp310, cp314t, cp315t (not cp312/cp313/cp314/cp314t) - Cargo.toml enables pyo3's abi3-py310 unconditionally so one wheel serves cp310+, cp314t gets its own per-interpreter wheel since abi3 is disabled under free threading, and cp315t opts into the abi3t Cargo feature for the forward-compatible cp315-abi3.abi3t tag - matching the exact three wheels upstream publishes to PyPI.

Testing

  • same as upstream

License: OK

Verified the crate compiles cleanly (cargo check --features abi3t) on aarch64 macOS, local; the actual manylinux_riscv64 wheel build and pytest run are left to CI (no local riscv64/maturin toolchain).

maturin builds unicode_segmentation_rs as a package wrapping a
same-named compiled submodule (the .pyi stub at the repo root triggers
maturin's implicit mixed-mode layout), not a flat module -- the top-level
package's __file__ is __init__.py, not the extension.
…ositive

abi3audit doesn't yet recognize the PyModExport_ multi-phase-init entry
point name pyo3 emits for the cp315-abi3.abi3t wheel; the symbol is
defined in the extension itself (not imported from libpython), and the
same finding reproduces auditing upstream's own published wheel.
@luhenry
luhenry merged commit c5a873e into main Sep 8, 2026
8 checks passed
@luhenry
luhenry deleted the unicode-segmentation-rs branch September 8, 2026 08:35
@luhenry luhenry linked an issue Sep 8, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unicode-segmentation-rs riscv64 support

1 participant