zerodds-ffi-loader v1.0 — Spec Coverage

Source: docs/specs/zerodds-ffi-loader-1.0.md

Implementation:

§1 Conformance levels

§1 L1-L3 conformance matrix

Spec: §1 — three levels (ABI/loader/pub-sub-live-wire); L1 mandatory per language binding, L2+L3 mandatory per publishable crate.

Repo: —

Tests: —

Status: n/a (informative) — assignment of the levels; the requirements are the items §2 to §5.

§2 ABI surface

§2.1 Versioning MAJOR/MINOR/PATCH/ABI_REVISION

Spec: §2.1 — ZERODDS_VERSION_MAJOR/MINOR/PATCH + ZERODDS_ABI_REVISION; zerodds_abi_revision() checkable at runtime.

Repo: crates/zerodds-c-api/include/zerodds.h, crates/zerodds-c-api/src/lib.rs.

Tests: crates/zerodds-c-api/tests/abi_compat.rs::deployment_1_2_the_header_macro_and_the_exported_revision_agree, crates/zerodds-c-api/tests/abi_compat.rs::capi_10_1_abi_snapshot_matches, crates/zerodds-c-api/tests/abi_compat.rs::ffiloader_2_1_extract_symbols_finds_known_functions.

Status: done

§2.2 Symbol naming scheme extern “C” + zerodds_*

Spec: §2.2 — all symbols extern "C", snake_case, no C++/Rust mangling, -fvisibility=hidden.

Repo: crates/zerodds-c-api/src/{factory_ffi.rs,participant_ffi.rs,publisher_ffi.rs,subscriber_ffi.rs,topic_ffi.rs,qos_ffi.rs,condition_ffi.rs,listener_ffi.rs,builtin_ffi.rs,extra_ffi.rs,xcdr2.rs}.

Tests: crates/zerodds-c-api/tests/abi_compat.rs::ffiloader_2_1_extract_symbols_finds_known_functions, crates/zerodds-c-api/tests/abi_compat.rs::capi_10_1_abi_snapshot_matches — the snapshot file lists every exported symbol by name; a new or renamed export breaks the comparison.

Status: done

§2.3 Header excerpt zerodds.h

Spec: §2.3 — a header with runtime, topic, writer, reader, qos opaque types; result_t/bytes_t/time_t/instance_handle_t/sample_t structs; functions runtime_create/destroy/qos_/topic_/writer_/reader_/strerror.

Repo: crates/zerodds-c-api/include/zerodds.h, crates/zerodds-c-api/include/zerodds_xcdr2.h.

Tests: crates/zerodds-c-api/tests/xcdr2_c_codegen.rs, ::xcdr2_c_compile (compile-time check).

Status: done

§2.4 Lifetime rules runtime > topic > writer/reader

Spec: §2.4 — lifetime hierarchy; *_destroy idempotent + null-safe; bytes_t.data from _take valid only until the next call.

Repo: crates/zerodds-c-api/src/{factory_ffi.rs,participant_ffi.rs,topic_ffi.rs,publisher_ffi.rs,subscriber_ffi.rs}, crates/zerodds-c-api/src/entities.rs.

Tests: crates/zerodds-c-api/tests/smoke_ffi.rs::capi_11_1_ffi_pub_sub_roundtrip, crates/zerodds-c-api/tests/smoke_ffi.rs::deployment_1_2_ffi_handles_null_safely, crates/zerodds-c-api/tests/smoke_ffi.rs::ffiloader_2_4_ffi_take_into_null_safe, crates/zerodds-c-api/tests/smoke_ffi.rs::ffiloader_2_4_ffi_runtime_create_domain_too_large_returns_null, crates/zerodds-c-api/tests/waitset_event_driven.rs::ffiloader_2_4_waitset_wait_null_and_timeout_safe.

Status: done

§2.5 Thread safety

Spec: §2.5 — all ABI functions thread-safe; listener callbacks on dedicated threads.

Repo: —

Tests: —

Status: open — no test calls the ABI from more than one thread. Send/Sync are in the type system; the concurrency itself is not measured. ### §2.6 Callback API listener

Spec: §2.6 — zerodds_data_available_cb + zerodds_reader_set_listener with user_data.

Repo: crates/zerodds-c-api/src/listener_ffi.rs.

Tests: crates/zerodds-c-api/src/listener_ffi.rs::tests::capi_14_5_dp_set_get_listener_roundtrip, ::ffiloader_2_6_poll_listeners_returns_count_and_clears_state, ::ffiloader_2_6_poll_fires_data_available_and_data_on_readers, ::ffiloader_2_6_poll_fires_inconsistent_topic_for_topic_and_participant, ::ffiloader_2_6_dw_set_listener_clear_via_null.

Status: done

§3 Per-language loader patterns

§3.1 Python (ctypes)

Spec: §3.1 — a loader with ENV override ZERODDS_LIB, a wheel-internal _lib/, a system-linker fallback; Runtime/Writer/Reader classes.

Repo: crates/py/python/zerodds/loader.py (load_library with the three-step resolution ZERODDS_LIB → package-internal _lib/ → system linker; Runtime, Writer, Reader, DomainParticipantFactory), examples/tutorials/dds-chat/ports/python-cli/src/dds_chat_tutorial/{__init__.py,main.py,live_pubsub.py,message.py}.

Tests: crates/py/python/tests/test_loader_smoke.py (py_1_3_4_loader_resolves_library and the three that follow it; 4 passed against ZERODDS_LIB=target/release/libzerodds.dylib), examples/tutorials/dds-chat/ports/python-cli/tests/{test_fixtures.py,test_live_pubsub.py}.

Status: done

§3.2 Java (pure-Java)

Spec: §3.2 — a pure-Java DDS-Java-PSM without a native library on the Java side (no System.loadLibrary, no JNI adapter). An earlier JNI bridge was removed.

Repo: crates/java-omgdds/java/src/main/java/org/omg/dds/** (the pure-Java PSM: domain/, pub/, sub/, topic/, core/) and crates/java-omgdds/java/src/main/java/org/zerodds/** (InProcessBus, cdr/, rtps/, bridge/GrpcBridgeClient); crates/java-omgdds/java/pom.xml builds a portable JAR with no .so/.dylib/.dll, examples/tutorials/dds-chat/ports/java-cli/src/main/java/io/zerodds/chat/Main.java, examples/tutorials/dds-chat/ports/java-cli/pom.xml.

Tests: crates/java-omgdds/java/src/test/java/org/omg/dds/QuickstartApiTest.java::javapsm_7_3_1_the_service_environment_is_created_from_the_class_named_by_the_system_property, crates/java-omgdds/java/src/test/java/org/omg/dds/QuickstartApiTest.java::javapsm_7_8_2_a_byte_array_topic_moves_the_octets, crates/java-omgdds/java/src/test/java/org/omg/dds/PubSubLoopbackTest.java::javapsm_2_a_reader_takes_the_samples_of_a_writer_in_their_order, crates/java-omgdds/java/src/test/java/org/omg/dds/Xcdr2CodecTest.java::javaomgdds_1_3_xcdr2codec_writes_and_reads_the_primitives_with_the_octets_of_xtypes_7_4; run: mvn -o test in crates/java-omgdds/java — 103 tests, 1 skipped.

Status: done

§3.3 C# (DllImport)

Spec: §3.3 — [DllImport("zerodds")], a NuGet runtimes/<rid>/native/ layout, an IDisposable wrapper.

Repo: crates/cs/csharp/ZeroDDS/src/Native.cs (78 [DllImport("zerodds", EntryPoint = …)] declarations with an explicit EntryPoint, NativeAOT-compatible) under crates/cs/csharp/ZeroDDS/src/{Domain,Topic,Pub,Sub,Qos,Conditions,Listener}.cs as IDisposable wrappers; crates/cs/csharp/ZeroDDS/ZeroDDS.csproj carries the NuGet metadata, examples/tutorials/dds-chat/ports/csharp-cli/src/Program.cs, examples/tutorials/dds-chat/ports/csharp-cli/test/FixturesTests.cs.

Tests: crates/cs/csharp/ZeroDDS.Tests/BindingTests.cs::ffiloader_3_3_a_participant_a_topic_and_a_reader_are_created_through_dllimport, crates/cs/csharp/ZeroDDS.Tests/BindingTests.cs::ffiloader_3_3_a_byte_sample_is_written_and_taken_through_the_c_api, crates/cs/csharp/ZeroDDS.Tests/BindingTests.cs::ffiloader_3_3_a_typed_sample_is_written_and_taken_with_its_type_support (xUnit over libzerodds, in the job merge-cs), and examples/tutorials/dds-chat/ports/csharp-cli/test/FixturesTests.cs.

Status: done

§3.4 C++

Spec: §3.4 — header <zerodds/Runtime.hpp>, RAII wrapper, linker -lzerodds.

Repo: crates/cpp/include/, examples/tutorials/dds-chat/ports/cpp-tui/src/{main.cpp,live_pubsub.cpp}, examples/tutorials/dds-chat/ports/cpp-tui/test/live_pubsub_test.cpp, examples/tutorials/dds-chat/ports/cpp-tui/CMakeLists.txt.

Tests: crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_participant_lifecycle, crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_topic_creation, crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_publisher_subscriber_lifecycle, crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_writer_reader_lifecycle, crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_take_on_empty_returns_empty, crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_status_getters; driven by crates/cpp/CMakeLists.txt::dds_psm_cxx_smoke.

Status: done

§3.5 TypeScript/JavaScript Node N-API + WASM

Spec: §3.5 — Node via the koffi FFI in crates/ts-node/; WASM via wasm-bindgen in crates/ts-wasm/; the WASM build uses the WS bridge as a daemon.

Repo: crates/ts-node/src/{native.ts,index.ts,dds.ts,qos.ts} (koffi declarations over zerodds.h, library resolution with a ZERODDS_LIB override), crates/ts-wasm/src/lib.rs (CdrEncoder/CdrDecoder via wasm-bindgen over zerodds-wire; the earlier form bound against zerodds-cdr, which the rebuild removed) and crates/ts-wasm/src/{index.ts,dcps/} (the DCPS-over-WebSocket facade onto the crates/websocket-bridge/ daemon), examples/tutorials/dds-chat/ports/ts-node/src/live_pubsub.ts, examples/tutorials/dds-chat/ports/ts-browser/src/live_pubsub.ts.

Tests: crates/ts-wasm/src/lib.rs::tests::xtypes_7_4_3_2_2_xcdr2_caps_the_alignment_at_four_as_the_vendors_write_it, ::xtypes_7_4_3_2_2_xcdr1_aligns_eight_octet_values_to_eight_as_the_vendors_write_it (against the vendors’ octets in tests/interop-corpus/expected-bytes.tsv) and six more, crates/ts-wasm/tests/contract_wire.rs::xtypes_7_4_3_2_2_with_max_align_eight_and_four_are_the_two_encoding_versions (crate tier); npm test in crates/ts-wasm/ — test/smoke.test.mjs against the pkg-node/ the wasm-bindgen CLI generates, and test/dcps.test.ts — in the job integration-ts-wasm (tests/integration/ts_wasm.sh, 7 tests, pipeline 8879); examples/tutorials/dds-chat/ports/ts-node/test/live_pubsub.test.ts, examples/tutorials/dds-chat/ports/ts-browser/test/live_pubsub.test.ts.

Status: done

§3.6 Flutter (dart:ffi)

Spec: §3.6 — DynamicLibrary.open() per platform; lookup + function cast.

Repo: examples/tutorials/dds-chat/apps/flutter-mobile/lib/native/loader.dart, examples/tutorials/dds-chat/apps/flutter-mobile/lib/native/live_pubsub.dart (cluster-C dart:ffi loader fully wired).

Tests: examples/tutorials/dds-chat/apps/flutter-mobile/test/live_pubsub_test.dart — "zerodds-ffi-loader 3.6: two Dart processes exchange samples through libzerodds" (the loader opens libzerodds, looks up the functions of zerodds.h and casts them; a subscriber and a publisher process exchange three samples on a leased domain). The Dart tests carry sentences rather than identifiers; the citation is the sentence flutter test prints. They run in the weekly job integration-flutter (tests/integration/flutter_chat.sh).

Status: done

§4 Per-language convention for the pub/sub sample

§4.1 Sample lifecycle Open Runtime → write/take → Close

Spec: §4.1 — a 6-step lifecycle (Runtime/QoS/Topic/Writer/loop encode+write/Close).

Repo: per-language loaders (see §3.x), crates/zerodds-c-api/src/ (zerodds_runtime_create, zerodds_writer_create, zerodds_reader_create, zerodds_writer_write, zerodds_reader_take, zerodds_buffer_free).

Tests: crates/zerodds-c-api/tests/smoke_ffi.rs::capi_11_1_ffi_pub_sub_roundtrip walks exactly the six steps: zerodds_runtime_create, zerodds_writer_create/zerodds_reader_create with topic and type name, five zerodds_writer_write, zerodds_reader_take with zerodds_buffer_free, then the *_destroy chain. crates/zerodds-c-api/tests/smoke_ffi.rs::ffiloader_4_1_ffi_pub_sub_roundtrip_via_take_into (take into a caller-provided buffer), crates/zerodds-c-api/tests/smoke_ffi.rs::deployment_1_2_ffi_pub_sub_roundtrip_via_loan (the loan path). tools/traceability/tests/ffi_loader_packaging.rs::the_shipped_header_declares_the_lifecycle_entry_points checks that zerodds.h declares those entry points. Gate: the three roundtrip tests are #[ignore] on macOS (multicast loopback) and run in the default run on Linux; the header test has no gate.

Status: done

§4.2 CDR encoding per language

Spec: §4.2 — the CDR codec per language: the wire runtime in runtime/<language> with the code zerodds-idlc generate emits.

Repo: Rust crates/wire/src/{writer.rs,reader.rs}; C runtime/c/include/zerodds_wire.h + code from zerodds-idlc generate --lang c, with <stem>_typesupport.h holding one zerodds_typesupport_t per topic type (tools/idlc/src/c_support.rs) for the typed dispatch of crates/zerodds-c-api/include/zerodds_xcdr2.h, with no codec of its own; C++ runtime/cpp/include/zerodds/wire.hpp + code from zerodds-idlc generate --lang c++ (crates/cpp/include/dds/topic/{xcdr2.hpp,xcdr2_md5.hpp} removed); C# runtime/csharp/src/{Writer.cs,Reader.cs}; Java runtime/java/src/main/java/org/zerodds/wire/; TS/Node runtime/typescript/src/; WASM the wasm-bindgen codec crates/ts-wasm/src/lib.rs, itself over zerodds-wire (no codec of its own — the former directory crates/ts-wasm/src/cdr duplicated it and is removed); Python runtime/python/zerodds_wire/.

Tests: crates/zerodds-c-api/tests/xcdr2_wire_vectors.rs (13 cases: ffiloader_4_2_v1_empty_final_struct, ffiloader_4_2_v2_plain_primitives_final, ffiloader_4_2_v3_mixed_primitives_final, ffiloader_4_2_v4_string_final, ffiloader_4_2_v5_sequence_int32_final, ffiloader_4_2_v6_sequence_string_final, ffiloader_4_2_v7_nested_modules_final, ffiloader_4_2_v8_keyed_struct_final, ffiloader_4_2_v9_appendable_struct, ffiloader_4_2_v10_mutable_struct, ffiloader_4_2_v11_optional_member_some, ffiloader_4_2_v11_optional_member_none, ffiloader_4_2_v12_mutable_no_explicit_sentinel) is the reference set. The same vectors per language: C# in the self-test of the runtime (runtime/csharp/run-tests.sh, job integration-bindings-dotnet); crates/lang-rules/tests/java_runtime_selftest.rs::the_java_runtime_selftest_passes; crates/ts-node/test/xcdr2-wire-vectors.test.ts — "V-1 Empty Final Struct: encode → 0 bytes; roundtrip"; WASM crates/ts-wasm/src/lib.rs::tests::xtypes_7_4_3_2_2_xcdr2_caps_the_alignment_at_four_as_the_vendors_write_it against the vendors’ octets in tests/interop-corpus/expected-bytes.tsv; crates/py/python/tests/test_loader_smoke.py::py_1_3_4_loader_resolves_library.

Status: done

§5 Cross-language live test

§5 tests/cross_lang_live/ per-language script + Rust pub subprocess

Spec: §5 — conftest.py spawns the Rust pub; per-language sub scripts test_<lang>_sub.{py,sh}; a common shared_topic.idl; the run on every push that changes the C API or a binding, and weekly.

Repo: tests/integration/tests/bindings_ffi.rs (the Rust publisher as the role publisher of the same test program, RELIABLE and KEEP_ALL, XCDR2), tests/integration/peers/ffi/ (one subscriber per binding: tests/integration/peers/ffi/sub.c through zerodds_reader_*, tests/integration/peers/ffi/sub.cpp through zerodds::Reader of crates/cpp/include/zerodds/dds.hpp, tests/integration/peers/ffi/sub.py through the ctypes loader crates/py/python/zerodds/loader.py, tests/integration/peers/ffi/sub.mts through the koffi binding crates/ts-node, tests/integration/peers/ffi/csharp/Program.cs through DllImport in crates/cs), tests/integration/ffi_peers.sh (builds libzerodds and the subscribers before the tests), ci/integration_scenarios.py (the entry merge_beside of the job integration-bindings-ffi: the merge lane starts it beside the job of the touched area). The tests are in the integration package, not under tests/cross_lang_live/; there is no shared IDL file, the type @final struct FfiSample { unsigned long seq; string text; } is stated at the head of the test file.

Tests: tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_c_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_cpp_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_python_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_typescript_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_csharp_subscriber_takes_the_samples_of_a_rust_publisher_in_order (job integration-bindings-ffi). Per binding the test starts the subscriber and the Rust publisher as separate processes on a leased domain, waits for EVENT matched from both and compares the 16 bodies the subscriber prints in hex with the bodies DDS-XTypes 1.3 §7.4.3.5 gives for the fixed samples, which the test states before the run: count, content and order. The job runs on every push that changes the C API or a binding (zerodds-c-api, zerodds-cpp, zerodds-py, crates/cs, crates/ts-node): the merge lane starts it beside the job of the touched area (merge_beside in ci/integration_scenarios.py, checked by ci/test_integration_scenarios.py), and weekly in the integration pillar. Java (§3.2, a pure-Java implementation of its own without libzerodds), WASM through the WebSocket bridge (§3.5) and Flutter (§3.6) are the next item.

Status: done

§5 Java, WASM and Flutter against the Rust publisher

Spec: §5 — test_java_sub.sh, test_wasm_sub.sh, test_flutter_sub.sh against the Rust publisher.

Repo: tests/integration/peers/ffi/java/FfiSub.java (a DataReader of the Java PSM on the RTPS path, zerodds.rtps.enable, built by tests/integration/java_psm_peer.sh), tests/integration/peers/ffi/sub_wasm.mts (the DCPS client of crates/ts-wasm/src/dcps/ through the daemon zerodds-ws-bridged with the binary frames of zerodds-ws-bridge-1.0 §4.3, a connection per topic on the path of §4.2/§5.1, and the WebAssembly codec of pkg-node/ reading every body), tests/integration/peers/ffi/sub.dart (the dart:ffi loader examples/tutorials/dds-chat/apps/flutter-mobile/lib/native/loader.dart over libzerodds).

Tests: tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_java_subscriber_takes_the_samples_of_a_rust_publisher_in_order (job integration-java-psm), tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_wasm_subscriber_takes_the_samples_of_a_rust_publisher_in_order (job integration-ts-wasm), tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_dart_subscriber_takes_the_samples_of_a_rust_publisher_in_order (job integration-flutter). The oracle of the item before; the WASM subscriber also prints seq and text as the WebAssembly codec reads them from each body, and the test holds them to the stated values. In the WASM case the Rust publisher starts once the subscriber’s connection is open: the daemon forwards to the connections open when a sample arrives (VOLATILE). WASM runs in Node without a browser: the wasm-bindgen glue for Node and the WebSocket client ws in place of the browser’s WebSocket.

Status: done

§6 Packaging

§6 Library + header + per-language packages

Spec: §6 — libzerodds.{so,dylib,dll} + zerodds.h in system paths; PyPI/Maven Central/NuGet/npm-ESM/pub.dev.

Repo: crates/zerodds-c-api/Cargo.toml (cdylib), crates/zerodds-c-api/include/zerodds.h, packaging/linux/{deb,rpm}/, packaging/macos/{homebrew,pkg}/, packaging/windows/{msi,scoop,chocolatey}/, packaging/linux/rpm/zerodds.pc.

Tests: tools/traceability/tests/ffi_loader_packaging.rs::the_shipped_header_declares_the_lifecycle_entry_points, tools/traceability/tests/ffi_loader_packaging.rs::the_linux_packages_install_the_library_and_resolve_the_prefixes (the SONAME chain libzerodds.so.1.0.0 → .so.1 → .so plus zerodds.pc with includedir/libdir/-lzerodds), tools/traceability/tests/ffi_loader_packaging.rs::the_macos_packages_install_the_header_and_the_dylib (the Homebrew formula and the .pkg build under /usr/local), tools/traceability/tests/ffi_loader_packaging.rs::the_python_wheel_carries_the_distribution_name_of_the_clause. No gate; all four run in the default run.

Status: partial — library, header and pkg-config are in the Linux and macOS packages and are checked against the clause; the PyPI distribution carries the name the clause gives it. The Windows half and three of the six per-language packages are not met; both are tracked as §6b.

§6b Windows header/library and the missing per-language packages

Spec: §6 — %PROGRAMFILES%\ZeroDDS\include\zerodds.h, bin\zerodds.dll, lib\zerodds.lib; NuGet ZeroDDS with runtimes/<rid>/native/, npm @zerodds/sdk and @zerodds/wasm, pub.dev zerodds, Maven Central eu.ifyna:zerodds-java-omgdds.

Repo: —

Tests: —

Status: open — packaging/windows/msi/zerodds.wxs removed the Devel feature explicitly, so no Windows package ships the header, the DLL or the import library. Of the per-language packages only the PyPI wheel exists in the tree under the name the clause gives; the npm package is called @zerodds/wire rather than @zerodds/sdk/@zerodds/wasm, there is no NuGet and no pub.dev package, and the Maven module carries the coordinates org.zerodds:omgdds instead of eu.ifyna:zerodds-java-omgdds.

§7 Versioning + ABI compat promise

§7 Patch/minor/major rules + abi_revision

Spec: §7 — patch=no ABI changes, minor=additive symbols, major=breaking + ABI_REVISION bump.

Repo: crates/zerodds-c-api/src/lib.rs::zerodds_abi_revision (the exported function) + ZERODDS_ABI_REVISION (the Rust constant); crates/zerodds-c-api/include/zerodds.h (#define ZERODDS_ABI_REVISION, from the cbindgen preamble in crates/zerodds-c-api/cbindgen.toml).

Tests: crates/zerodds-c-api/tests/abi_compat.rs::deployment_1_2_the_header_macro_and_the_exported_revision_agree (the header macro, the Rust constant and the function’s return value carry the same number, and zerodds_abi_revision is in the symbol surface), crates/zerodds-c-api/tests/abi_compat.rs::capi_10_1_abi_snapshot_matches (additive yes, removal or rename no).

Status: done

§8 Testing

§8.1 Unit tests per symbol family

Spec: §8.1 — runtime, qos, topic, writer, reader, error, thread-safety, ≥ 5 tests each in crates/zerodds-c-api/tests/.

Repo: crates/zerodds-c-api/src/{factory_ffi.rs,participant_ffi.rs,publisher_ffi.rs,subscriber_ffi.rs,topic_ffi.rs,qos_ffi.rs,condition_ffi.rs,listener_ffi.rs,builtin_ffi.rs,extra_ffi.rs}.

Tests: crates/zerodds-c-api/tests/smoke_ffi.rs, crates/zerodds-c-api/tests/xcdr2_c_codegen.rs, ::xcdr2_c_compile, ::xcdr2_wire_vectors.

Status: done

§8.2 ABI compat test abi.snapshot.json

Spec: §8.2 — tests/abi_compat.rs compares the current symbol list against abi.snapshot.json, fails on unintended changes.

Repo: crates/zerodds-c-api/tests/abi_compat.rs, crates/zerodds-c-api/tests/abi.snapshot.json (185 symbols baseline).

Tests: cargo test -p zerodds-c-api --test abi_compat — capi_10_1_abi_snapshot_matches + ffiloader_2_1_extract_symbols_finds_known_functions, 2/2 green. Regenerate via ZERODDS_ABI_REGENERATE=1.

Status: done

§8.3 Per-language loader tests + cross-language live test

Spec: §8.3 — per language crate ≥ 5 loader tests + a cross-language live test in tests/cross_lang_live/.

Repo: per-language test trees crates/py/python/tests/, crates/cpp/tests/, crates/cs/csharp/ZeroDDS.Tests/, crates/java-omgdds/java/src/test/java/, crates/ts-node/test/, crates/ts-wasm/test/, examples/tutorials/dds-chat/ports/*/test*/.

Tests: Per language: crates/py/python/tests/test_loader_smoke.py::py_1_3_4_loader_resolves_library, ::py_1_3_4_loader_runtime_create_participant_offline, ::py_1_2_1_loader_factory_singleton, ::py_1_3_4_loader_zerodds_error_is_runtime_error_subclass; crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_participant_lifecycle; crates/cs/csharp/ZeroDDS.Tests/BindingTests.cs::ffiloader_3_3_a_participant_a_topic_and_a_reader_are_created_through_dllimport; crates/java-omgdds/java/src/test/java/org/omg/dds/QuickstartApiTest.java::javapsm_7_3_1_the_service_environment_is_created_from_the_class_named_by_the_system_property; crates/ts-wasm/test/smoke.test.mjs — "wasm version string". The live test against a Rust process for C, C++, Python, TypeScript, C#, Java, WASM and Dart: tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_c_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_cpp_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_python_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_typescript_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_csharp_subscriber_takes_the_samples_of_a_rust_publisher_in_order (§5, job integration-bindings-ffi), tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_java_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_wasm_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_dart_subscriber_takes_the_samples_of_a_rust_publisher_in_order (§5, jobs integration-java-psm, integration-ts-wasm, integration-flutter).

Status: done

§9 Cross-references

Spec: §9 — library crates/zerodds-c-api/, per-language bindings, the pure-Java implementation, wire format, packaging, the listener-callbacks spec.

Repo: —

Tests: —

Status: n/a (informative) — list of references.

§10 Versioning

§10 SemVer bump rules

Spec: §10 — patch=no ABI change, minor=additive symbols + a new language loader, major=breaking ABI.

Repo: —

Tests: —

Status: n/a (informative) — rule for assigning the version number, not a property of the library.


Audit status

19 done / 1 partial / 2 open / 0 blocked / 3 n/a (informative).

Test run: in CI, crate tier and pillar jobs; the cited tests with the latest result of each job in the pipelines 8501 to 9157 of main (python3 ci/coverage_results.py --document zerodds-ffi-loader-1.0.md):

  • cargo nextest run --profile merge -p zerodds-c-api --all-targets (job merge-rust-c-api) — 47 tests green.
  • cargo nextest run --profile merge -p zerodds-traceability --all-targets (job merge-rust-traceability) — 4 tests green.
  • cargo nextest run --profile merge -p zerodds-ts-wasm --all-targets (job merge-rust-ts-wasm) — 3 tests green.
  • python3 ci/run_integration.py merge-codegen-java (job merge-codegen-java) — 1 test green.
  • python3 ci/run_integration.py merge-cs (job merge-cs) — 3 tests green.
  • python3 ci/run_integration.py merge-java-gradle (job merge-java-gradle) — 1 test green.
  • python3 ci/run_integration.py merge-java-omgdds (job merge-java-omgdds) — 4 tests green.
  • python3 ci/run_integration.py integration-bindings-ffi (job integration-bindings-ffi) — 5 tests green.
  • python3 ci/run_integration.py integration-flutter (job integration-flutter) — 2 tests green.
  • python3 ci/run_integration.py integration-java-psm (job integration-java-psm) — 1 test green.
  • python3 ci/run_integration.py integration-python (job integration-python) — 4 tests green.
  • python3 ci/run_integration.py integration-sdk (job integration-sdk) — 7 tests green.
  • python3 ci/run_integration.py integration-ts-wasm (job integration-ts-wasm) — 2 tests green.
  • job ts-node-test — 1 test green.

85 cited tests green, 0 not green.

Open items: zerodds-ffi-loader-1.0.open.en.md.

zerodds-ffi-loader v1.0 — Spec-Coverage

Quelle: docs/specs/zerodds-ffi-loader-1.0.md

Implementation:

§1 Conformance-Levels

§1 L1-L3 Conformance-Matrix

Spec: §1 — drei Levels (ABI/Loader/Pub-Sub-Live-Wire); L1 Pflicht pro Sprach-Anbindung, L2+L3 Pflicht pro publishable Crate.

Repo: —

Tests: —

Status: n/a (informative) — Zuordnung der Levels; die Anforderungen stehen als Items §2 bis §5.

§2 ABI-Surface

§2.1 Versionierung MAJOR/MINOR/PATCH/ABI_REVISION

Spec: §2.1 — ZERODDS_VERSION_MAJOR/MINOR/PATCH + ZERODDS_ABI_ REVISION; zerodds_abi_revision() runtime-checkbar.

Repo: crates/zerodds-c-api/include/zerodds.h, crates/zerodds-c-api/src/lib.rs.

Tests: crates/zerodds-c-api/tests/abi_compat.rs::deployment_1_2_the_header_macro_and_the_exported_revision_agree, crates/zerodds-c-api/tests/abi_compat.rs::capi_10_1_abi_snapshot_matches, crates/zerodds-c-api/tests/abi_compat.rs::ffiloader_2_1_extract_symbols_finds_known_functions.

Status: done

§2.2 Symbol-Namensschema extern “C” + zerodds_*

Spec: §2.2 — alle Symbole extern "C", snake_case, kein C++/Rust- Mangling, -fvisibility=hidden.

Repo: crates/zerodds-c-api/src/{factory_ffi.rs,participant_ffi.rs,publisher_ffi.rs,subscriber_ffi.rs,topic_ffi.rs,qos_ffi.rs,condition_ffi.rs,listener_ffi.rs,builtin_ffi.rs,extra_ffi.rs,xcdr2.rs}.

Tests: crates/zerodds-c-api/tests/abi_compat.rs::ffiloader_2_1_extract_symbols_finds_known_functions, crates/zerodds-c-api/tests/abi_compat.rs::capi_10_1_abi_snapshot_matches — die Snapshot-Datei listet jedes exportierte Symbol namentlich, ein neuer oder umbenannter Export bricht den Vergleich.

Status: done

§2.3 Header-Auszug zerodds.h

Spec: §2.3 — Header mit runtime, topic, writer, reader, qos opaque- Types; result_t/bytes_t/time_t/instance_handle_t/sample_t Structs; Funktionen runtime_create/destroy/qos_/topic_/writer_/reader_/ strerror.

Repo: crates/zerodds-c-api/include/zerodds.h, crates/zerodds-c-api/include/zerodds_xcdr2.h.

Tests: crates/zerodds-c-api/tests/xcdr2_c_codegen.rs, ::xcdr2_c_compile (compile-time-Check).

Status: done

§2.4 Lifetime-Regeln runtime > topic > writer/reader

Spec: §2.4 — Lifetime-Hierarchie; *_destroy idempotent + null- safe; bytes_t.data aus _take nur bis zum nächsten Call gültig.

Repo: crates/zerodds-c-api/src/{factory_ffi.rs,participant_ffi.rs,topic_ffi.rs,publisher_ffi.rs,subscriber_ffi.rs}, crates/zerodds-c-api/src/entities.rs.

Tests: crates/zerodds-c-api/tests/smoke_ffi.rs::capi_11_1_ffi_pub_sub_roundtrip, crates/zerodds-c-api/tests/smoke_ffi.rs::deployment_1_2_ffi_handles_null_safely, crates/zerodds-c-api/tests/smoke_ffi.rs::ffiloader_2_4_ffi_take_into_null_safe, crates/zerodds-c-api/tests/smoke_ffi.rs::ffiloader_2_4_ffi_runtime_create_domain_too_large_returns_null, crates/zerodds-c-api/tests/waitset_event_driven.rs::ffiloader_2_4_waitset_wait_null_and_timeout_safe.

Status: done

§2.5 Thread-Safety

Spec: §2.5 — alle ABI-Funktionen thread-safe; Listener-Callbacks auf dedizierten Threads.

Repo: —

Tests: —

Status: open — kein Test ruft die ABI aus mehreren Threads. Send/Sync stehen im Typsystem, gemessen ist die Nebenläufigkeit nicht. ### §2.6 Callback-API Listener

Spec: §2.6 — zerodds_data_available_cb + zerodds_reader_set_ listener mit user_data.

Repo: crates/zerodds-c-api/src/listener_ffi.rs.

Tests: crates/zerodds-c-api/src/listener_ffi.rs::tests::capi_14_5_dp_set_get_listener_roundtrip, ::ffiloader_2_6_poll_listeners_returns_count_and_clears_state, ::ffiloader_2_6_poll_fires_data_available_and_data_on_readers, ::ffiloader_2_6_poll_fires_inconsistent_topic_for_topic_and_participant, ::ffiloader_2_6_dw_set_listener_clear_via_null.

Status: done

§3 Per-Sprach-Loader-Patterns

§3.1 Python (ctypes)

Spec: §3.1 — Loader mit ENV-Override ZERODDS_LIB, Wheel-internes _lib/, System-Linker Fallback; Runtime/Writer/Reader-Klassen.

Repo: crates/py/python/zerodds/loader.py (load_library mit der Drei-Stufen-Auflösung ZERODDS_LIB → paketinternes _lib/ → System-Linker; Runtime, Writer, Reader, DomainParticipantFactory), examples/tutorials/dds-chat/ports/python-cli/src/dds_chat_tutorial/{__init__.py,main.py,live_pubsub.py,message.py}.

Tests: crates/py/python/tests/test_loader_smoke.py (py_1_3_4_loader_resolves_library und die drei folgenden; 4 passed gegen ZERODDS_LIB=target/release/libzerodds.dylib), examples/tutorials/dds-chat/ports/python-cli/tests/{test_fixtures.py,test_live_pubsub.py}.

Status: done

§3.2 Java (Pure-Java)

Spec: §3.2 — Pure-Java DDS-Java-PSM ohne Native-Library auf der Java-Seite (kein System.loadLibrary, kein JNI-Adapter). Eine frühere JNI-Bridge wurde entfernt.

Repo: crates/java-omgdds/java/src/main/java/org/omg/dds/** (Pure-Java-PSM: domain/, pub/, sub/, topic/, core/) und crates/java-omgdds/java/src/main/java/org/zerodds/** (InProcessBus, cdr/, rtps/, bridge/GrpcBridgeClient); crates/java-omgdds/java/pom.xml baut ein portables JAR ohne .so/.dylib/.dll, examples/tutorials/dds-chat/ports/java-cli/src/main/java/io/zerodds/chat/Main.java, examples/tutorials/dds-chat/ports/java-cli/pom.xml.

Tests: crates/java-omgdds/java/src/test/java/org/omg/dds/QuickstartApiTest.java::javapsm_7_3_1_the_service_environment_is_created_from_the_class_named_by_the_system_property, crates/java-omgdds/java/src/test/java/org/omg/dds/QuickstartApiTest.java::javapsm_7_8_2_a_byte_array_topic_moves_the_octets, crates/java-omgdds/java/src/test/java/org/omg/dds/PubSubLoopbackTest.java::javapsm_2_a_reader_takes_the_samples_of_a_writer_in_their_order, crates/java-omgdds/java/src/test/java/org/omg/dds/Xcdr2CodecTest.java::javaomgdds_1_3_xcdr2codec_writes_and_reads_the_primitives_with_the_octets_of_xtypes_7_4; Lauf: mvn -o test in crates/java-omgdds/java — 103 Tests, 1 übersprungen.

Status: done

§3.3 C# (DllImport)

Spec: §3.3 — [DllImport("zerodds")], NuGet runtimes/<rid>/ native/-Layout, IDisposable-Wrapper.

Repo: crates/cs/csharp/ZeroDDS/src/Native.cs (78 [DllImport("zerodds", EntryPoint = …)]-Deklarationen mit explizitem EntryPoint, NativeAOT-tauglich) über crates/cs/csharp/ZeroDDS/src/{Domain,Topic,Pub,Sub,Qos,Conditions,Listener}.cs als IDisposable-Wrapper; crates/cs/csharp/ZeroDDS/ZeroDDS.csproj trägt die NuGet-Metadaten, examples/tutorials/dds-chat/ports/csharp-cli/src/Program.cs, examples/tutorials/dds-chat/ports/csharp-cli/test/FixturesTests.cs.

Tests: crates/cs/csharp/ZeroDDS.Tests/BindingTests.cs::ffiloader_3_3_a_participant_a_topic_and_a_reader_are_created_through_dllimport, crates/cs/csharp/ZeroDDS.Tests/BindingTests.cs::ffiloader_3_3_a_byte_sample_is_written_and_taken_through_the_c_api, crates/cs/csharp/ZeroDDS.Tests/BindingTests.cs::ffiloader_3_3_a_typed_sample_is_written_and_taken_with_its_type_support (xUnit über libzerodds, im Job merge-cs), und examples/tutorials/dds-chat/ports/csharp-cli/test/FixturesTests.cs.

Status: done

§3.4 C++

Spec: §3.4 — Header <zerodds/Runtime.hpp>, RAII-Wrapper, Linker -lzerodds.

Repo: crates/cpp/include/, examples/tutorials/dds-chat/ports/cpp-tui/src/{main.cpp,live_pubsub.cpp}, examples/tutorials/dds-chat/ports/cpp-tui/test/live_pubsub_test.cpp, examples/tutorials/dds-chat/ports/cpp-tui/CMakeLists.txt.

Tests: crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_participant_lifecycle, crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_topic_creation, crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_publisher_subscriber_lifecycle, crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_writer_reader_lifecycle, crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_take_on_empty_returns_empty, crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_status_getters; gefahren über crates/cpp/CMakeLists.txt::dds_psm_cxx_smoke.

Status: done

§3.5 TypeScript/JavaScript Node N-API + WASM

Spec: §3.5 — Node via koffi-FFI in crates/ts-node/; WASM via wasm-bindgen in crates/ts-wasm/; WASM-Build nutzt WS-Bridge als Daemon.

Repo: crates/ts-node/src/{native.ts,index.ts,dds.ts,qos.ts} (koffi-Deklarationen über zerodds.h, Library-Auflösung mit ZERODDS_LIB-Übersteuerung), crates/ts-wasm/src/lib.rs (CdrEncoder/CdrDecoder per wasm-bindgen über zerodds-wire; die frühere Fassung band gegen das im Rebuild entfallene zerodds-cdr) und crates/ts-wasm/src/{index.ts,dcps/} (DCPS-über- WebSocket-Fassade zum crates/websocket-bridge/-Daemon), examples/tutorials/dds-chat/ports/ts-node/src/live_pubsub.ts, examples/tutorials/dds-chat/ports/ts-browser/src/live_pubsub.ts.

Tests: crates/ts-wasm/src/lib.rs::tests::xtypes_7_4_3_2_2_xcdr2_caps_the_alignment_at_four_as_the_vendors_write_it, ::xtypes_7_4_3_2_2_xcdr1_aligns_eight_octet_values_to_eight_as_the_vendors_write_it (gegen die Oktette der Hersteller in tests/interop-corpus/expected-bytes.tsv) und sechs weitere, crates/ts-wasm/tests/contract_wire.rs::xtypes_7_4_3_2_2_with_max_align_eight_and_four_are_the_two_encoding_versions (Krate-Ebene); npm test in crates/ts-wasm/ — test/smoke.test.mjs gegen die vom wasm-bindgen-CLI erzeugte pkg-node/ und test/dcps.test.ts — im Job integration-ts-wasm (tests/integration/ts_wasm.sh, 7 Tests, Pipeline 8879); examples/tutorials/dds-chat/ports/ts-node/test/live_pubsub.test.ts, examples/tutorials/dds-chat/ports/ts-browser/test/live_pubsub.test.ts.

Status: done

§3.6 Flutter (dart:ffi)

Spec: §3.6 — DynamicLibrary.open() per Platform; Lookup + Function-Cast.

Repo: examples/tutorials/dds-chat/apps/flutter-mobile/lib/native/loader.dart, examples/tutorials/dds-chat/apps/flutter-mobile/lib/native/live_pubsub.dart (Cluster-C dart:ffi-Loader voll wired).

Tests: examples/tutorials/dds-chat/apps/flutter-mobile/test/live_pubsub_test.dart — "zerodds-ffi-loader 3.6: two Dart processes exchange samples through libzerodds" (der Loader öffnet libzerodds, sucht die Funktionen von zerodds.h und castet sie; ein Subscriber- und ein Publisher-Prozess tauschen drei Samples auf einer geleasten Domain aus). Die Dart-Tests tragen Sätze statt Bezeichner; zitiert wird der Satz, den flutter test ausgibt. Sie laufen im Wochenjob integration-flutter (tests/integration/flutter_chat.sh).

Status: done

§4 Per-Sprach-Convention für Pub/Sub-Sample

§4.1 Sample-Lifecycle Open Runtime → write/take → Close

Spec: §4.1 — 6-Schritt-Lifecycle (Runtime/QoS/Topic/Writer/Loop encode+write/Close).

Repo: Per-Sprach-Loader (siehe §3.x), crates/zerodds-c-api/src/ (zerodds_runtime_create, zerodds_writer_create, zerodds_reader_create, zerodds_writer_write, zerodds_reader_take, zerodds_buffer_free).

Tests: crates/zerodds-c-api/tests/smoke_ffi.rs::capi_11_1_ffi_pub_sub_roundtrip läuft genau die sechs Schritte: zerodds_runtime_create, zerodds_writer_create/zerodds_reader_create mit Topic- und Typnamen, fünf zerodds_writer_write, zerodds_reader_take mit zerodds_buffer_free, dann die *_destroy-Kette. crates/zerodds-c-api/tests/smoke_ffi.rs::ffiloader_4_1_ffi_pub_sub_roundtrip_via_take_into (Take in einen vom Aufrufer gestellten Puffer), crates/zerodds-c-api/tests/smoke_ffi.rs::deployment_1_2_ffi_pub_sub_roundtrip_via_loan (Loan-Pfad). tools/traceability/tests/ffi_loader_packaging.rs::the_shipped_header_declares_the_lifecycle_entry_points prüft, dass zerodds.h diese Einstiegspunkte deklariert. Gate: die drei Roundtrip- Tests sind auf macOS #[ignore] (Multicast-Loopback), auf Linux laufen sie im Default-Lauf; der Header-Test hat kein Gate.

Status: done

§4.2 CDR-Encoding pro Sprache

Spec: §4.2 — der CDR-Codec je Sprache: die Wire-Laufzeit in runtime/<Sprache> mit dem Code, den zerodds-idlc generate erzeugt.

Repo: Rust crates/wire/src/{writer.rs,reader.rs}; C runtime/c/include/zerodds_wire.h + Code aus zerodds-idlc generate --lang c, dazu <stem>_typesupport.h mit einer zerodds_typesupport_t je Topic-Typ (tools/idlc/src/c_support.rs) für den Typed-Dispatch aus crates/zerodds-c-api/include/zerodds_xcdr2.h, ohne eigenen Codec; C++ runtime/cpp/include/zerodds/wire.hpp + Code aus zerodds-idlc generate --lang c++ (crates/cpp/include/dds/topic/{xcdr2.hpp, xcdr2_md5.hpp} entfernt); C# runtime/csharp/src/{Writer.cs,Reader.cs}; Java runtime/java/src/main/java/org/zerodds/wire/; TS/Node runtime/typescript/src/; WASM der wasm-bindgen-Codec crates/ts-wasm/src/lib.rs, selbst über zerodds-wire (kein eigener Codec — das ehemalige Verzeichnis crates/ts-wasm/src/cdr duplizierte ihn und ist entfernt); Python runtime/python/zerodds_wire/.

Tests: crates/zerodds-c-api/tests/xcdr2_wire_vectors.rs (13 Fälle: ffiloader_4_2_v1_empty_final_struct, ffiloader_4_2_v2_plain_primitives_final, ffiloader_4_2_v3_mixed_primitives_final, ffiloader_4_2_v4_string_final, ffiloader_4_2_v5_sequence_int32_final, ffiloader_4_2_v6_sequence_string_final, ffiloader_4_2_v7_nested_modules_final, ffiloader_4_2_v8_keyed_struct_final, ffiloader_4_2_v9_appendable_struct, ffiloader_4_2_v10_mutable_struct, ffiloader_4_2_v11_optional_member_some, ffiloader_4_2_v11_optional_member_none, ffiloader_4_2_v12_mutable_no_explicit_sentinel) ist der Referenz-Satz. Pro Sprache dieselben Vektoren: C# im Selbsttest der Laufzeit (runtime/csharp/run-tests.sh, Job integration-bindings-dotnet); crates/lang-rules/tests/java_runtime_selftest.rs::the_java_runtime_selftest_passes; crates/ts-node/test/xcdr2-wire-vectors.test.ts — "V-1 Empty Final Struct: encode → 0 bytes; roundtrip"; WASM crates/ts-wasm/src/lib.rs::tests::xtypes_7_4_3_2_2_xcdr2_caps_the_alignment_at_four_as_the_vendors_write_it gegen die Oktette der Hersteller in tests/interop-corpus/expected-bytes.tsv; crates/py/python/tests/test_loader_smoke.py::py_1_3_4_loader_resolves_library.

Status: done

§5 Cross-Lang-Live-Test

§5 tests/cross_lang_live/ Per-Sprach-Skript + Rust-Pub-Subprocess

Spec: §5 — conftest.py spawnt Rust-Pub; Per-Sprach-Sub-Skripte test_<lang>_sub.{py,sh}; gemeinsame shared_topic.idl; der Lauf bei jedem Push, der die C-API oder eine Bindung ändert, und wöchentlich.

Repo: tests/integration/tests/bindings_ffi.rs (der Rust-Publisher als Rolle publisher desselben Testprogramms, RELIABLE und KEEP_ALL, XCDR2), tests/integration/peers/ffi/ (je Bindung ein Subscriber: tests/integration/peers/ffi/sub.c über zerodds_reader_*, tests/integration/peers/ffi/sub.cpp über zerodds::Reader aus crates/cpp/include/zerodds/dds.hpp, tests/integration/peers/ffi/sub.py über den ctypes-Loader crates/py/python/zerodds/loader.py, tests/integration/peers/ffi/sub.mts über die koffi-Bindung crates/ts-node, tests/integration/peers/ffi/csharp/Program.cs über DllImport in crates/cs), tests/integration/ffi_peers.sh (baut libzerodds und die Subscriber vor den Tests), ci/integration_scenarios.py (der Eintrag merge_beside des Jobs integration-bindings-ffi: die Merge-Lane startet ihn neben dem Job des berührten Bereichs). Die Tests liegen im Integrations-Paket und nicht unter tests/cross_lang_live/; einen gemeinsamen IDL-Text gibt es nicht, der Typ @final struct FfiSample { unsigned long seq; string text; } steht im Kopf der Testdatei.

Tests: tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_c_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_cpp_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_python_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_typescript_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_csharp_subscriber_takes_the_samples_of_a_rust_publisher_in_order (Job integration-bindings-ffi). Je Bindung startet der Test den Subscriber und den Rust-Publisher als getrennte Prozesse auf einer geleasten Domäne, wartet auf EVENT matched beider Seiten und vergleicht die 16 Bodies, die der Subscriber hex druckt, mit den Bodies, die DDS-XTypes 1.3 §7.4.3.5 für die festen Samples ergibt und die der Test vor dem Lauf aufschreibt: Anzahl, Inhalt und Reihenfolge. Der Job läuft bei jedem Push, der die C-API oder eine Bindung ändert (zerodds-c-api, zerodds-cpp, zerodds-py, crates/cs, crates/ts-node): die Merge-Lane startet ihn neben dem Job des berührten Bereichs (merge_beside in ci/integration_scenarios.py, geprüft von ci/test_integration_scenarios.py), dazu wöchentlich in der Integrations-Säule. Java (§3.2, eine eigene Implementierung in reinem Java ohne libzerodds), WASM über die WebSocket-Bridge (§3.5) und Flutter (§3.6) führt das folgende Item.

Status: done

§5 Java, WASM und Flutter gegen den Rust-Publisher

Spec: §5 — test_java_sub.sh, test_wasm_sub.sh, test_flutter_sub.sh gegen den Rust-Publisher.

Repo: tests/integration/peers/ffi/java/FfiSub.java (ein DataReader des Java-PSM auf dem RTPS-Pfad, zerodds.rtps.enable, gebaut von tests/integration/java_psm_peer.sh), tests/integration/peers/ffi/sub_wasm.mts (der DCPS-Client von crates/ts-wasm/src/dcps/ über den Daemon zerodds-ws-bridged mit den Binärrahmen von zerodds-ws-bridge-1.0 §4.3, je Topic eine Verbindung auf dem Pfad von §4.2/§5.1, und der WebAssembly-Codec aus pkg-node/, der jeden Body liest), tests/integration/peers/ffi/sub.dart (der dart:ffi-Loader examples/tutorials/dds-chat/apps/flutter-mobile/lib/native/loader.dart über libzerodds).

Tests: tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_java_subscriber_takes_the_samples_of_a_rust_publisher_in_order (Job integration-java-psm), tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_wasm_subscriber_takes_the_samples_of_a_rust_publisher_in_order (Job integration-ts-wasm), tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_dart_subscriber_takes_the_samples_of_a_rust_publisher_in_order (Job integration-flutter). Orakel wie im vorigen Item; der WASM-Subscriber druckt dazu seq und text, wie der WebAssembly-Codec sie aus jedem Body liest, und der Test hält sie an die festgelegten Werte. Der Rust-Publisher startet im WASM-Fall erst, wenn die Verbindung des Subscribers offen ist: der Daemon leitet nur an Verbindungen weiter, die beim Eintreffen eines Samples bestehen (VOLATILE). WASM läuft in Node ohne Browser: die Glue von wasm-bindgen für Node und der WebSocket-Client ws an Stelle des WebSocket des Browsers.

Status: done

§6 Packaging

§6 Library + Header + Per-Sprach-Packages

Spec: §6 — libzerodds.{so,dylib,dll} + zerodds.h in System- Pfaden; PyPI/Maven Central/NuGet/npm-ESM/pub.dev.

Repo: crates/zerodds-c-api/Cargo.toml (cdylib), crates/zerodds-c-api/include/zerodds.h, packaging/linux/{deb,rpm}/, packaging/macos/{homebrew,pkg}/, packaging/windows/{msi,scoop,chocolatey}/, packaging/linux/rpm/zerodds.pc.

Tests: tools/traceability/tests/ffi_loader_packaging.rs::the_shipped_header_declares_the_lifecycle_entry_points, tools/traceability/tests/ffi_loader_packaging.rs::the_linux_packages_install_the_library_and_resolve_the_prefixes (SONAME-Kette libzerodds.so.1.0.0 → .so.1 → .so plus zerodds.pc mit includedir/libdir/-lzerodds), tools/traceability/tests/ffi_loader_packaging.rs::the_macos_packages_install_the_header_and_the_dylib (Homebrew-Formula und .pkg-Build unter /usr/local), tools/traceability/tests/ffi_loader_packaging.rs::the_python_wheel_carries_the_distribution_name_of_the_clause. Kein Gate; alle vier laufen im Default-Lauf.

Status: partial — Library, Header und pkg-config sind für Linux und macOS in den Paketen und werden gegen die Klausel geprüft; die PyPI-Distribution heißt wie die Klausel sie nennt. Nicht erfüllt sind der Windows-Anteil und drei der sechs Per-Sprach-Packages; beides als §6b geführt.

§6b Windows-Header/-Library und die fehlenden Per-Sprach-Packages

Spec: §6 — %PROGRAMFILES%\ZeroDDS\include\zerodds.h, bin\zerodds.dll, lib\zerodds.lib; NuGet ZeroDDS mit runtimes/<rid>/native/, npm @zerodds/sdk und @zerodds/wasm, pub.dev zerodds, Maven Central eu.ifyna:zerodds-java-omgdds.

Repo: —

Tests: —

Status: open — packaging/windows/msi/zerodds.wxs hat das Devel-Feature ausdrücklich entfernt, also liefert kein Windows-Paket Header, DLL oder Import-Library aus. Von den Per-Sprach-Packages existiert im Baum nur das PyPI-Wheel unter dem genannten Namen; das npm-Paket heißt @zerodds/wire statt @zerodds/sdk/@zerodds/wasm, ein NuGet- und ein pub.dev-Package gibt es nicht, und das Maven-Modul trägt die Koordinaten org.zerodds:omgdds statt eu.ifyna:zerodds-java-omgdds.

§7 Versioning + ABI-Compat-Promise

§7 Patch/Minor/Major-Regeln + abi_revision

Spec: §7 — Patch=keine ABI-Änderungen, Minor=additive Symbole, Major=Breaking + ABI_REVISION-Bump.

Repo: crates/zerodds-c-api/src/lib.rs::zerodds_abi_revision (exportierte Funktion) + ZERODDS_ABI_REVISION (Rust-Konstante); crates/zerodds-c-api/include/zerodds.h (#define ZERODDS_ABI_REVISION, aus dem cbindgen-Preamble in crates/zerodds-c-api/cbindgen.toml).

Tests: crates/zerodds-c-api/tests/abi_compat.rs::deployment_1_2_the_header_macro_and_the_exported_revision_agree (Header-Macro, Rust-Konstante und Rückgabewert der Funktion tragen dieselbe Zahl, und zerodds_abi_revision steht in der Symbol-Surface), crates/zerodds-c-api/tests/abi_compat.rs::capi_10_1_abi_snapshot_matches (additiv ja, Entfernen/Umbenennen nein).

Status: done

§8 Testing

§8.1 Unit-Tests pro Symbol-Familie

Spec: §8.1 — runtime, qos, topic, writer, reader, error, thread-safety je ≥ 5 Tests in crates/zerodds-c-api/tests/.

Repo: crates/zerodds-c-api/src/{factory_ffi.rs,participant_ffi.rs,publisher_ffi.rs,subscriber_ffi.rs,topic_ffi.rs,qos_ffi.rs,condition_ffi.rs,listener_ffi.rs,builtin_ffi.rs,extra_ffi.rs}.

Tests: crates/zerodds-c-api/tests/smoke_ffi.rs, crates/zerodds-c-api/tests/xcdr2_c_codegen.rs, ::xcdr2_c_compile, ::xcdr2_wire_vectors.

Status: done

§8.2 ABI-Compat-Test abi.snapshot.json

Spec: §8.2 — tests/abi_compat.rs vergleicht aktuelle Symbol- Liste gegen abi.snapshot.json, fail bei unbeabsichtigten Änderungen.

Repo: crates/zerodds-c-api/tests/abi_compat.rs, crates/zerodds-c-api/tests/abi.snapshot.json (185 Symbole baseline).

Tests: cargo test -p zerodds-c-api --test abi_compat — capi_10_1_abi_snapshot_matches + ffiloader_2_1_extract_symbols_finds_known_functions, 2/2 grün. Regenerate via ZERODDS_ABI_REGENERATE=1.

Status: done

§8.3 Per-Sprach-Loader-Tests + Cross-Lang-Live-Test

Spec: §8.3 — pro Sprach-Crate ≥ 5 Loader-Tests + Cross-Lang-Live- Test in tests/cross_lang_live/.

Repo: Per-Sprach-Testbäume crates/py/python/tests/, crates/cpp/tests/, crates/cs/csharp/ZeroDDS.Tests/, crates/java-omgdds/java/src/test/java/, crates/ts-node/test/, crates/ts-wasm/test/, examples/tutorials/dds-chat/ports/*/test*/.

Tests: Per Sprache: crates/py/python/tests/test_loader_smoke.py::py_1_3_4_loader_resolves_library, ::py_1_3_4_loader_runtime_create_participant_offline, ::py_1_2_1_loader_factory_singleton, ::py_1_3_4_loader_zerodds_error_is_runtime_error_subclass; crates/cpp/tests/smoke_dds_psm.cpp::psmcxx_2_1_participant_lifecycle; crates/cs/csharp/ZeroDDS.Tests/BindingTests.cs::ffiloader_3_3_a_participant_a_topic_and_a_reader_are_created_through_dllimport; crates/java-omgdds/java/src/test/java/org/omg/dds/QuickstartApiTest.java::javapsm_7_3_1_the_service_environment_is_created_from_the_class_named_by_the_system_property; crates/ts-wasm/test/smoke.test.mjs — "wasm version string". Der Live-Test gegen einen Rust-Prozess für C, C++, Python, TypeScript, C#, Java, WASM und Dart: tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_c_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_cpp_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_python_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_typescript_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_csharp_subscriber_takes_the_samples_of_a_rust_publisher_in_order (§5, Job integration-bindings-ffi), tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_java_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_wasm_subscriber_takes_the_samples_of_a_rust_publisher_in_order, tests/integration/tests/bindings_ffi.rs::ffiloader_5_a_dart_subscriber_takes_the_samples_of_a_rust_publisher_in_order (§5, Jobs integration-java-psm, integration-ts-wasm, integration-flutter).

Status: done

§9 Cross-References

§9 Verwandte Crates + Wire-Format + Packaging-Spec

Spec: §9 — Library crates/zerodds-c-api/, Per-Sprach-Bindings, Pure-Java-Implementation, Wire-Format, Packaging, Listener-Callbacks-Spec.

Repo: —

Tests: —

Status: n/a (informative) — Verweisliste.

§10 Versioning

§10 SemVer-Bump-Regeln

Spec: §10 — Patch=ohne ABI-Change, Minor=additive Symbole + neuer Sprach-Loader, Major=Breaking-ABI.

Repo: —

Tests: —

Status: n/a (informative) — Regel für die Vergabe der Versionsnummer, keine Eigenschaft der Bibliothek.


Audit-Status

19 done / 1 partial / 2 open / 0 blocked / 3 n/a (informative).

Test-Lauf: in CI, Krate-Ebene und Säulen-Jobs; die zitierten Tests mit dem letzten Ergebnis jedes Jobs in den Pipelines 8501 bis 9157 von main (python3 ci/coverage_results.py --document zerodds-ffi-loader-1.0.md):

  • cargo nextest run --profile merge -p zerodds-c-api --all-targets (Job merge-rust-c-api) — 47 Tests grün.
  • cargo nextest run --profile merge -p zerodds-traceability --all-targets (Job merge-rust-traceability) — 4 Tests grün.
  • cargo nextest run --profile merge -p zerodds-ts-wasm --all-targets (Job merge-rust-ts-wasm) — 3 Tests grün.
  • python3 ci/run_integration.py merge-codegen-java (Job merge-codegen-java) — 1 Test grün.
  • python3 ci/run_integration.py merge-cs (Job merge-cs) — 3 Tests grün.
  • python3 ci/run_integration.py merge-java-gradle (Job merge-java-gradle) — 1 Test grün.
  • python3 ci/run_integration.py merge-java-omgdds (Job merge-java-omgdds) — 4 Tests grün.
  • python3 ci/run_integration.py integration-bindings-ffi (Job integration-bindings-ffi) — 5 Tests grün.
  • python3 ci/run_integration.py integration-flutter (Job integration-flutter) — 2 Tests grün.
  • python3 ci/run_integration.py integration-java-psm (Job integration-java-psm) — 1 Test grün.
  • python3 ci/run_integration.py integration-python (Job integration-python) — 4 Tests grün.
  • python3 ci/run_integration.py integration-sdk (Job integration-sdk) — 7 Tests grün.
  • python3 ci/run_integration.py integration-ts-wasm (Job integration-ts-wasm) — 2 Tests grün.
  • Job ts-node-test — 1 Test grün.

85 zitierte Tests grün, 0 nicht grün.

Offene Punkte: zerodds-ffi-loader-1.0.open.md.