wireform-core: Shared FFI primitives for wireform format packages

[ bsd3, codec, data, ffi, library ] [ Propose Tags ] [ Report a vulnerability ]

Cross-format SWAR / SIMD-accelerated primitives used by every wireform-* format package. . Modules: . * Wireform.FFI -- C FFI surface: packed-varint pre-scan + decode, SWAR UTF-8 validation, SIMD NUL byte ASCII / whitespace scanners, SIMD JSON escape scanner, SIMD Iceberg bounds compare, Arrow IPC buffer validation, endianness helpers. * Wireform.Encode.Direct -- shared direct-write encode buffer used by the per-format encoders. * Wireform.Hash -- SIMD-accelerated hashing helpers. . Pulls in C sources (cbits/fast_decode.c, cbits/fast_scan.c, cbits/wireform_hash_simd.c) and the vendored simde headers. Contains no format-specific code.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.2.0.0, 0.2.0.1
Change log CHANGELOG.md
Dependencies base (>=4.18 && <5), bytestring (>=0.11 && <0.13), containers, ghc-prim, template-haskell, text (>=2.0 && <2.2), vector (>=0.13 && <0.14) [details]
Tested with ghc ==9.6.4, ghc ==9.8.4
License BSD-3-Clause
Copyright 2026 Ian Duncan
Author Ian Duncan
Maintainer ian@iankduncan.com
Uploaded by IanDuncan at 2026-07-16T08:44:10Z
Category Data, Codec, FFI
Home page https://github.com/iand675/wireform-
Bug tracker https://github.com/iand675/wireform-/issues
Source repo head: git clone https://github.com/iand675/wireform-
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 16 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2026-07-16 [all 1 reports]

Readme for wireform-core-0.2.0.1

[back to package description]

wireform-core

BSD-3-Clause

[!CAUTION] wireform is in heavy development and has not been published to Hackage yet. APIs may change.

Shared SWAR / SIMD-accelerated primitives used by every wireform-* format package. Format-agnostic; the C sources live in cbits/ and the vendored simde headers in include/simde/.

What's in here

Module Role
Wireform.Builder High-performance byte builder (vendored fast-builder engine).
Wireform.Builder.FastBuilder Builder internals: DataSink, StreamSink, BuildM, etc.
Wireform.FFI C FFI surface (varints, UTF-8 / ASCII / NUL / JSON scanners, …).
Wireform.Encode.Direct Shared direct-write encode buffer.
Wireform.Hash SIMD-accelerated hashing helpers.

Builder

Wireform.Builder is the shared byte builder used by all wireform format packages. It supports O(1) concatenation, direct Handle output without intermediate ByteString allocation, and streaming transforms (compression, encryption) that process chunks as the builder produces them.

Based on fast-builder by Takano Akio (public domain).

This package is intentionally small; it exists so the per-format packages can share the builder engine and the hottest C kernels (e.g. validateUtf8SWAR, countPackedVarints, findByte) without duplicating the __attribute__((target(...))) / simde-features.h plumbing.

License

BSD-3-Clause. Vendored simde headers carry their own MIT license under include/simde/simde/COPYING and friends.