Skip to content

bartma11/fstbridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fstbridge

C wrapper library around fstlib for use with Java's Project Panama Foreign Function Interface (FFI).

Purpose

This library (libfstbridge.so) exposes a flat C API that Java can call via Panama's MemorySegment / MethodHandle mechanism. Internally it uses fstlib's C++ FstStore to read .fst files — a fast, columnar binary format originating from the R ecosystem.

The bridge provides two main operations:

  • fst_read — read column data (all or selected columns, with optional row range)
  • fst_meta — read only metadata (column names, types, row count)

Building

Prerequisites

  • CMake ≥ 3.10
  • A C++11 compatible compiler (GCC, Clang)
  • OpenMP (optional, for parallel decompression)
  • fstlib source tree at ../fstlib (sibling submodule)

Build steps

mkdir -p build && cd build
cmake ..
make

This produces libfstbridge.so in the build/ directory. The parent Scala/Kotlin/Java project expects the library to be on java.library.path at runtime.

Third-Party Code

This project uses fstlib, which is licensed under the Mozilla Public License 2.0 (MPL-2.0). The fstlib source code retains its original license.

fstlib additionally bundles:

  • LZ4 (fstlib/ext/lz4) — BSD 2-Clause license
  • Zstandard (fstlib/ext/zstd) — BSD 3-Clause license

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors