Skip to content

yggdrasil-engine: add build-yggdrasil-engine.yml for riscv64 wheels - #1867

Merged
luhenry merged 1 commit into
mainfrom
yggdrasil-engine
Sep 14, 2026
Merged

luhenry merged 1 commit into
mainfrom
yggdrasil-engine

Conversation

@luhenry

@luhenry luhenry commented Sep 12, 2026

Copy link
Copy Markdown
Member

Compiles Unleash's yggdrasilffi Rust cdylib and wraps it via ctypes for evaluating Unleash feature flags. Upstream publishes no riscv64 wheel.

Mirrors upstream's own build-python.yml and build.sh/tox.ini/repair_wheel.py.

Differs from upstream

  • Builds yggdrasilffi natively in-container instead of downloading a prebuilt binary - none published for riscv64
  • Musllinux dropped - rustup ships no riscv64 musl host toolchain
  • Stages LICENSE.md beside pyproject.toml - upstream's own published wheel carries no licence file either

Matrix: single cp312-abi3 build, tested on cp312/cp313/cp314; cp314t dropped - abi3 wheels aren't compatible with free-threaded interpreters, and upstream ships no cp3XXt wheel either

Testing

  • runs upstream's own python-engine/tests suite (incl. the client-specification fixtures) against the built binary before packaging
  • adds a per-interpreter install/import smoke test of the packaged wheel itself

License: OK

Built on cp312; 24 passed, 0 skipped.

yggdrasil-engine is Unleash's ctypes binding to their yggdrasilffi Rust
cdylib (github.com/Unleash/yggdrasil-bindings), not Google's Yggdrasil
Decision Forests despite the name. Upstream downloads a prebuilt binary
per platform instead of compiling it, and ships none for riscv64, so
this workflow builds the cdylib natively in the manylinux_2_39_riscv64
container, runs upstream's own pytest suite against it, and retags the
resulting wheel with upstream's own repair_wheel.py.

compat_glibc.rs's hand-rolled gettid/statx syscall shim only defines
its syscall numbers for x86_64 and aarch64 but compiles unconditionally,
so the crate fails to build on riscv64 with two cannot-find-value
errors; the added patch supplies the same numbers for riscv64, which
uses the identical generic syscall table as aarch64.
@luhenry
luhenry merged commit 3f42893 into main Sep 14, 2026
9 checks passed
@luhenry
luhenry deleted the yggdrasil-engine branch September 14, 2026 09:28
@luhenry luhenry linked an issue Sep 14, 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.

yggdrasil-engine riscv64 support

1 participant