Skip to content

Fixes#1

Merged
singaraiona merged 4 commits into
masterfrom
fixes
Jun 30, 2026
Merged

Fixes#1
singaraiona merged 4 commits into
masterfrom
fixes

Conversation

@birrgrrim

Copy link
Copy Markdown
Collaborator

No description provided.

birrgrrim and others added 3 commits June 26, 2026 19:09
The engine added a 5th argument (timeout_ms) to ray_ipc_connect after
commit a7294066; the binding still called it with four, which broke the
build. Pass 0 (block) to restore compilation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A RAY_SYM vector cell is a *position* in the vector's symbol domain, not a
runtime intern id. For the runtime domain the LUT is NULL and positions
pass through, but for FILE domains (e.g. a column loaded from a splayed
table) positions must be mapped to runtime ids via
ray_sym_domain_runtime_lut. The previous code passed the raw position to
ray_sym(), so symbols loaded from disk resolved to garbage (e.g. "+").

Add raw::sym_domain() (mirroring the engine's static-inline
ray_sym_vec_domain, which bindgen does not emit) and map position ->
runtime id in Value::get(). Regression test splayed_sym_values_roundtrip
covers a SYM column through a splayed save/load; the existing
splayed_roundtrip only checked an i64 column, so it never exercised this.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a synchronous KDB+ client so the binding can pull from kdb+ servers
(e.g. a legacy FIX RDB) — the engine itself speaks only the Rayforce wire
protocol. The C client (csrc/kdb_ipc.c) performs the KDB+ handshake,
serialize/deserialize and decompression, decoding responses straight into
rayforce v2 objects, and depends only on the public rayforce.h. It is
exposed as plain-C rkdb_connect/rkdb_send/rkdb_close, compiled by build.rs
(linked before librayforce so its undefined ray_* symbols resolve) and
wrapped by rayforce::kdb::KdbConnection (connect / execute -> Value /
close on drop).

Verified two ways: tests/kdb.rs drives a hermetic mock kdb server (raw TCP
speaking the kdb wire format); tests/kdb_real.rs runs against a real q
server when RAYFORCE_KDB_ADDR is set (a no-op otherwise). No q binary or
Python is needed for the default test run.

Staged in rayforce-sys until it moves into the engine proper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Apply rustfmt to the three preceding fix commits so `cargo fmt --all --check`
passes in CI. No functional change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@singaraiona singaraiona merged commit 06a1881 into master Jun 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants