Thin C ABI bridge for calling redeem-properties from OpenMS.
This crate is intended to be consumed as a prebuilt staticlib, not as a direct
dependency inside the OpenMS build. OpenMS can either download the matching
prebuilt bundle automatically or use a manual archive path through the
REDEEM_FFI_LIBRARY CMake cache variable.
The OpenMS build uses the minimal redeem-properties feature set:
- RT inference via
rt_cnn_tf - CCS inference via
ccs_cnn_tf - MS2 intensity inference via
ms2_bert - optional fine-tuning from local TSV data via the same three model families
- local-file model loading only
That means the prebuilt OpenMS FFI bundle intentionally excludes the pretrained-model download helpers and the legacy RT/CCS LSTM variants.
The C ABI now exposes two main workflows:
- batch prediction for RT, CCS, and MS2 intensities
- optional fine-tuning from a local TSV before prediction, with per-model
enable flags and optional
.safetensorsoutput checkpoints
OpenMS expects a prebuilt static library:
- Linux/macOS:
libredeem_openms_ffi.a - Windows (MSVC):
redeem_openms_ffi.lib
When possible, keep a metadata file next to the archive:
redeem-openms-ffi.native-static-libs.txt
That file should contain the raw output of:
cargo rustc -p redeem-openms-ffi --release -- --print native-static-libsOpenMS can use it to refine the native link libraries required by the Rust archive on each platform.
On Unix-like systems, you can build and stage a local bundle with:
./redeem-openms-ffi/package-prebuilt.shOr for a specific target:
./redeem-openms-ffi/package-prebuilt.sh x86_64-unknown-linux-gnu /tmp/redeem-openms-ffi-bundleThe script creates a directory containing:
lib/with the static archivelib/redeem-openms-ffi.native-static-libs.txtREADME.mdLICENSE
By default, OpenMS can auto-download the matching bundle for the current platform:
cmake -S /path/to/OpenMS -B build \
-DWITH_REDEEM=ONTo pin a specific release instead of using the latest published bundle:
cmake -S /path/to/OpenMS -B build \
-DWITH_REDEEM=ON \
-DREDEEM_FFI_VERSION=v0.1.0For local development or manual packaging, you can still point OpenMS at the extracted archive directly:
cmake -S /path/to/OpenMS -B build \
-DWITH_REDEEM=ON \
-DREDEEM_FFI_LIBRARY=/path/to/redeem-openms-ffi-bundle/lib/libredeem_openms_ffi.aThe Release OpenMS FFI GitHub Actions workflow can be run manually without
creating a new GitHub release.
- Leave
release_tagempty to build workflow artifacts only. - Set
release_tagto an existing tag such asv0.1.0to upload the rebuilt bundles to that release. - Set
release_tagtolatestto upload to the latest published release.
The optional ref input controls which commit/tag/branch is built. This lets
you test the workflow against a branch while still attaching assets to an
existing release tag if needed.