keel-abi: Arrow C Data/Stream Interface and DLPack, no cbits

[ data, foreign, mit ] [ Propose Tags ] [ Report a vulnerability ]

Hand-written Storable bindings for the two frozen C ABIs of the data-science world: the Apache Arrow C Data / C Stream Interface and DLPack's DLManagedTensorVersioned — import and export directions. . The shipped library contains no C sources and needs no C toolchain beyond what GHC itself bundles: the structs are frozen ABIs, so their layouts are written out by hand for 64-bit pointers — the library refuses to build on any other architecture — and a test-suite-only C file of _Static_assert(offsetof(...)) checks fails CI if the hand layouts ever disagree with a real C compiler.


[Skip to Readme]

Modules

  • Keel
    • Abi
      • Keel.Abi.Arrow
        • Keel.Abi.Arrow.Raw
      • Keel.Abi.DLPack
        • Keel.Abi.DLPack.Raw

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0
Change log CHANGELOG.md
Dependencies base (>=4.20 && <4.23) [details]
Tested with ghc ==9.10.3 || ==9.12.4 || ==9.14.1
License MIT
Author Zhe Zhang
Maintainer Zhe Zhang
Uploaded by azng_0 at 2026-08-19T23:30:27Z
Category Foreign, Data
Home page https://github.com/skymanbp/keel
Bug tracker https://github.com/skymanbp/keel/issues
Source repo head: git clone https://github.com/skymanbp/keel
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1 total (1 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2026-08-19 [all 2 reports]

Readme for keel-abi-0.1.0.0

[back to package description]

keel-abi

Hand-written Storable bindings for the two frozen C ABIs of the data-science world:

  • the Apache Arrow C Data Interface and C Stream Interface (ArrowSchema / ArrowArray / ArrowArrayStream), and
  • DLPack's DLManagedTensorVersioned,

in both directions: import (consume a foreign producer's structs) and export (produce structs for a foreign consumer, e.g. pyarrow or numpy).

The shipped library contains no C sources and depends only on base. The struct layouts are written out by hand for 64-bit pointers — the library refuses to build on any other architecture — and a test-suite-only C file of _Static_assert(offsetof(...)) checks fails CI if the hand layouts ever disagree with a real C compiler.

The managed layer (Keel.Abi.Arrow, Keel.Abi.DLPack) enforces the protocols' ownership rules: release callbacks run exactly once, double-release is a no-op, exceptions never escape into the foreign caller, and consumption is exception-safe under bracket/finally. The raw layer (*.Raw) is exported for callers who need the bare structs.

Round-trips against real pyarrow (arrays and streams, both directions) and numpy (DLPack, both directions) are covered by the test suites.

Part of the keel workspace — see the project repository.