flux-ffi 0.1.0

Unified C FFI layer for fleet math functions
Documentation
  • Coverage
  • 90%
    9 out of 10 items documented0 out of 9 items with examples
  • Size
  • Source code size: 28.45 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 305.07 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • SuperInstance/flux-ffi
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SuperInstance

flux-ffi

Unified C FFI layer for fleet math functions.

Provides C-compatible bindings (#[no_mangle] extern "C") to core constraint-theory and geometry primitives used across the Cocapn fleet ecosystem.

Functions

Function Description
flux_eisenstein_norm Eisenstein integer norm: a² - ab + b²
flux_laman_edges Laman graph edge count: 2n - 3
flux_is_rigid Laman rigidity check
flux_holonomy_check Holonomy triviality via zero-sum
flux_manhattan_distance L1 distance between integer vectors
flux_pythagorean48_encode 48-cell lattice index encoding
flux_constraint_check Count violated constraints
flux_spline_interpolate Linear interpolation along control points
flux_deadband_filter Deadband noise filter

Building

cargo build --release

This generates include/flux_ffi.h via cbindgen and produces both static and shared libraries.

Using from C

#include "flux_ffi.h"

int64_t norm = flux_eisenstein_norm(2, 3);  // = 7

Running Tests

cargo test

License

MIT