Conversation
|
✅ CI green — run
Two issues surfaced and fixed during the loop (both reinforced back into
|
|
Same comment as @justeph on #280 - the docs tweaks should be separate to the More importantly, since fastuuid is built with maturin, it makes sense for us to try submitting a riscv64 build (including runner setup instructions) directly to the upstream repository first. We'd probably still need to merge this and trigger the workflow at least once until there's a new release upstream, but it'd be good to see what their position on riscv64 support is first. @luhenry do you want to do that, or should I? |
|
@threexc please go ahead with the upstreaming. I'll separate the CLAUDE.md changes. Does the workflow file looks good? I won't change that otherwise. |
The workflow looks good, but when peeking at the upstream version I noticed that they don't build for Looking into it. |
I'll remove the build then. |
Alright. It might be something we can add in upstream too, so a future build may have it again. |
Add build-fastuuid.yml to build fastuuid 0.14.0 wheels for riscv64 and publish them to pypi.riseproject.dev. fastuuid is a PyO3/Rust extension built with maturin, with no C native dependencies (pure-Rust: pyo3, uuid, rand). We build our own sdist from an upstream checkout on ubuntu-latest, then build the riscv64 bdist from that sdist with cibuildwheel on the manylinux_2_39_riscv64 image. fastuuid gitignores Cargo.lock, so a fresh dependency resolve floats the `uuid` crate to the newest 1.x. uuid >=1.21 deprecated the `uuid::Context` alias (renamed to `ContextV1`), and the crate compiles under `#![deny(warnings)]`, so that deprecation is a hard compile error. We pin uuid to 1.18.1 (the version upstream released 0.14.0 against) before maturin captures Cargo.lock into the sdist, which restores a clean build. The sdist also carries the `.cargo/config.toml` that sets `--cfg uuid_unstable` (required by the uuid crate's v1/v7 features). The Rust toolchain is installed in-container with rustup (CIBW_BEFORE_ALL_LINUX) and put on PATH (CIBW_ENVIRONMENT_LINUX), since fastuuid ships no [tool.cibuildwheel] config of its own. Each wheel is tested the way upstream does, running its pytest suite (tests/test_uuid.py + test_benchmarks.py) inside the container against the matching interpreter. All test deps (pytest, hypothesis, pytest-benchmark, uuid7) are pure-Python wheels on public PyPI. Matrix cp312/cp313/cp314/cp314t: fastuuid is not abi3 (upstream ships per-interpreter wheels), so every Python version needs its own build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What
Adds
.github/workflows/build-fastuuid.ymlto build fastuuid 0.14.0 riscv64 wheels and publish them topypi.riseproject.dev. fastuuid ships no riscv64 wheel on public PyPI.Relates to #290
Approach
fastuuid is a PyO3/Rust extension built with maturin, with no C native dependencies (pure-Rust:
pyo30.26,uuid,rand). Wheels build directly from an upstream checkout via cibuildwheel on themanylinux_2_39_riscv64image — the same shape asbuild-tiktoken.yml.[tool.cibuildwheel], so rustup is installed viaCIBW_BEFORE_ALL_LINUXand put onPATHviaCIBW_ENVIRONMENT_LINUX. (Verified locally under QEMU: rustup provisions a nativeriscv64gc-unknown-linux-gnutoolchain inside the container.).cargo/config.tomlin the checkout sets--cfg uuid_unstable, required to compile theuuidcrate's v1/v7 features. cibuildwheel copies the whole tree in, so it's picked up automatically.cp312/cp313/cp314/cp314t: fastuuid is not abi3 (upstream ships per-interpreter wheels), so every Python version needs its own build.Testing (mirrors upstream)
Each wheel is tested inside the container against the matching interpreter by running fastuuid's own pytest suite (
tests/test_uuid.py+tests/test_benchmarks.py) viaCIBW_TEST_COMMAND. Upstream's tox also runsblack/isort, but those are dev-only lint, not wheel tests, so they're skipped. All test deps (pytest,hypothesis,pytest-benchmark,uuid7) are pure-Python wheels on public PyPI — no registry plumbing needed.Locally validated by building the wheel with maturin on aarch64 and running the full suite: 96 passed.
Notes
build-tiktoken.ymlskips it).publish-wheelsaction dry-runs on non-mainbranches, so it's safe on this PR.🤖 Generated with Claude Code