feat(release): attach C consumer bundles to tagged releases #325
No reviewers
Labels
No labels
area/ci-release
area/cli
area/docs
area/dungeon
area/ftl
area/graphics
area/gui
area/music
area/saves
area/tooling
port/amiga
port/dos
port/fm-towns
port/mac
port/pc98
port/sega-cd
priority/high
priority/low
priority/medium
type/bug
type/chore
type/docs
type/feature
type/research
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jqueuniet/dm2-tools!325
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/c-dev-bundle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
dm2-ffihas no binary distribution today: a C consumer has to clone theworkspace and run cargo, which is exactly the toolchain a prebuilt library
exists to avoid. This attaches two bundles to tagged releases.
Contents
dm2-ffi-<ver>-x86_64-linux-gnu.tar.gzanddm2-ffi-<ver>-x86_64-windows-gnu.zip,each with:
The README is in there deliberately — it carries the
Dm2Bufferownershipcontract, which is the part a C caller has to get right and the part the header
alone doesn't spell out.
No new jobs
The Windows DLL is already cross-built for the wheel, and the Linux library
piggybacks on the manylinux job. That placement is the point: glibc there is
2.28, and
objdump -Ton the result showsGLIBC_2.28as its highestrequirement, so it loads on RHEL 8, Debian 10 and Ubuntu 18.10 upward. Built in
rust:1-trixieit would demand 2.41 and be useless to most people.Why no static archive
libdm2_ffi.ais 30-40 MB depending on target, and including it takes thecompressed Linux bundle from 0.8 MB to 9.5 MB — an elevenfold increase to
duplicate code the shared library already provides. Anyone linking statically
can run
cargo build -p dm2-ffi --release. Measured, not assumed:Verification
Both packaging steps were run verbatim in their real images —
docker.io/rust:1-trixiefor Windows,quay.io/pypa/manylinux_2_28_x86_64forLinux — producing a 3.4 MB zip and a 0.8 MB tarball with the layouts above.
MSVC consumers need to generate a
.libfrom the DLL or load it at runtime;mingw's import library links directly. macOS and aarch64 remain unbuilt, the
same gap the wheels have.