portable-README.md (2626B)
Relocatable native embedding prototype
This Linux x86-64 transfer artifact contains the archive-linked full Haskell
host, non-glibc native dependencies, include/tricu.h, and the Python binding
under share/tricu/. Keep this directory layout together. Each bundled ELF
uses $ORIGIN to resolve its dependencies. Runtime needs system glibc and the
embedding application's own language runtime; Nix and GHC are build-time tools.
After extracting tricu-linux-x86_64.tar.gz on the destination:
PYTHONPATH="$PWD/tricu/share/tricu" python3 - <<'PY'
from tricu import Library
with Library().context() as ctx:
value = ctx.number(42)
print(ctx.to_number(value))
PY
The binding finds lib/libtricu-haskell.so relative to its installed location.
C consumers include include/tricu.h and load/link that same library. Use one
copy per process and preserve the ordinary embedding lifecycle and ownership
contract. Programs execute with OS process authority. External supervision is
required for hard execution and memory limits.
share/tricu/portable.json records the library inventory, SHA-256 hashes,
DT_NEEDED names, system-provided sonames and maximum required GLIBC symbol
version. The hashes identify the packaged library bytes.
The current symbol floor is glibc 2.38. Python/userspace acceptance covers
Ubuntu 24.04 (glibc 2.39), Debian 13 (2.41) and Fedora 44 (2.43), with no
/nix/store; Ubuntu 22.04 (2.35) is the expected GLIBC rejection control.
VM acceptance covers Ubuntu 24.04.5 with kernel 6.8.0-147-generic and
Python 3.12.3, Node 22.22.0/Koffi 2.16.2 and PHP CLI/FFI 8.3.6. Existing loaded
libraries in an embedding process can affect ELF symbol resolution. Validate
the target application's actual runtime.
Applications supply their own compiled Arboricx bundles. The acceptance workload separately packages the filecheck worker and tests complete hashes, repeated use, ordinary errors, a 1-MiB input, CLI record/verify/mutation, ABI/scopes and compiled binary copying at two relocated paths. Removing bundled GMP must cause loading to fail.
The included ISC license covers tricu. Third-party texts and the component index
are under share/tricu/notices/ and share/tricu/THIRD-PARTY-NOTICES.md.
Distribute this runtime with tricu-source-materials.tar.gz and release.json
from the same build. The source archive carries matching upstream inputs,
patches, Cabal revisions and build recipes; the release receipt hashes both
archives. Read share/tricu/REDISTRIBUTION.md for source delivery, license
choices, modification notices and compatible-library replacement instructions.