Add C API (staticlib), release bundles, and README#3
Merged
cursor[bot] merged 8 commits intomasterfrom Apr 15, 2026
Merged
Conversation
- Bump version to 0.5.0; export stable C ABI via src/ffi.rs and include/rs_ctrl_os.h - Build staticlib only; document no official .so in releases - Add c_examples/minimal.c, FFI smoke test, .cargo CXX=g++ for zmq-sys - GitHub Actions: on v* tag build x86_64 and aarch64 glibc bundles with SHA256SUMS - README: C integration, linking (-lstdc++), glibc notes; fix doctest snippets with ignore Co-authored-by: LycanW <LycanW@users.noreply.github.com>
Co-authored-by: LycanW <LycanW@users.noreply.github.com>
Co-authored-by: LycanW <LycanW@users.noreply.github.com>
Co-authored-by: LycanW <LycanW@users.noreply.github.com>
…API guide - tutorial_node: poll get_dynamic_json, parse prefix/interval, publish_raw + try_recv_raw - CMake: rcos_tutorial_c target, link stdc++ for C programs, prefer gcc for C - README: integration order, dynamic hot-reload notes, two-example table, self-test steps Co-authored-by: LycanW <LycanW@users.noreply.github.com>
Co-authored-by: LycanW <LycanW@users.noreply.github.com>
- Replace serde_json with toml::to_string for C consumers so format matches config files - Rename API from get_dynamic_json to get_dynamic_toml; update header, smoke test, examples, README Co-authored-by: LycanW <LycanW@users.noreply.github.com>
… snapshot Co-authored-by: LycanW <LycanW@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change adds a stable C ABI for embedding
rs_ctrl_osfrom C/C++, shipslibrs_ctrl_os.a+rs_ctrl_os.honly (no official.so), bumps the crate to 0.5.0, and documents prebuilt glibc artifacts plus CI.What changed
src/ffi.rs:extern "C"entry points for logging,ConfigManager<toml::Value>(dynamic as JSON), discovery,PubSubManager(publish_raw/try_recv_rawwith heap-allocated outputs), time sync, error buffer.include/rs_ctrl_os.h: Public C contract and error codes.Cargo.toml:crate-type = ["lib", "staticlib"],libcdependency, version 0.5.0..cargo/config.toml:CXX=g++/CC=gccso bundledzmq-sysbuilds reliably when the defaultc++is clang without libstdc++ headers.c_examples/minimal.c: Minimal link example (-lzmq -lstdc++ -lpthread -ldl -lm).tests/c_ffi_smoke.rs: Smoke test calling FFI from Rust..github/workflows/release.yml: Onv*tags, build x86_64 and aarch64*-unknown-linux-gnu, packagelibrs_ctrl_os.a,include/rs_ctrl_os.h,SHA256SUMS, attach to GitHub Release.README.md: New C API section (prebuilt layout, glibc note, link line).src/config.rs: Doctest blocks markedignoresocargo testpasses.Notes for reviewers
libzmq; users still link-lzmq(and-lstdc++when using gcc against this staticlib due to bundled libzmq C++ objects).ubuntu-24.04-armrunner; adjust if your org uses a different label.