Skip to content

Commit bd5e107

Browse files
committed
align: Rust 1.99 bump log, README pin pointer, 1.99 C-ABI findings
AllTests 612 + consumers 153 green on JDK 28 against a 1.99-built .so; lgj-abi clippy -D warnings clean. The UnsafeCell guarantee does not change the writable-lane soundness argument (recorded in abi-ownership-and-handles). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017YPZhKpSxN7eSxk7VH2vzB
1 parent 138e672 commit bd5e107

3 files changed

Lines changed: 43 additions & 1 deletion

File tree

‎.claude/knowledge/abi-ownership-and-handles.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,38 @@ the `Arena`/segment lifetime as nested *inside* the resource's own lifetime,
6666
so Java's own bookkeeping fails fast on a use-after-close even before the
6767
call reaches Rust (belt-and-braces, not a substitute for the Rust-side
6868
check).
69+
70+
## Rust 1.99 (2026-10-10): what the C-ABI changes do and do not buy here
71+
72+
MEASURED on 1.99.0 / LLVM 23. lgj-abi is clippy-clean with `-D warnings`. All
73+
four Java suites pass (`AllTests` 612, consumers 70 + 68 + 3 + 12) against a
74+
`liblgj_abi.so` built by 1.99. lgj-abi's graph contains no lance, lancedb or
75+
arrow, so the lance 13 move does not reach this crate.
76+
77+
- **`UnsafeCell` contents may be accessed without `get` (newly guaranteed).**
78+
This does NOT change the soundness of the writable mask lane.
79+
- `lgj_mask_describe` hands Java the address of `MaskWords.words`. That is
80+
a boxed heap buffer, not the inside of the lock's `UnsafeCell`. Java writes
81+
to it through the segment, outside the lock.
82+
- It is sound today because no Rust reference to those words is live while
83+
Java writes. The one production writer, `RowStore.importRows`, writes a
84+
mask whose handle has not been returned to anyone yet. Every Rust op
85+
re-borrows through the lock.
86+
- A concurrent Java writer would still be a data race, and the guarantee
87+
does not make a race defined. That needs `AtomicU64` words plus a
88+
documented protocol, which this ABI deliberately does not define.
89+
- Possible hardening, not done: take the address under the write guard
90+
(`as_mut_ptr`), so it carries write provenance. Not done because
91+
`write_mask` also invalidates `resolved_carving`, so every describe would
92+
drop the carving cache. That is a behaviour change for no reachable
93+
defect.
94+
- **C-variadic definitions / `VaList` (stabilized):** not applicable. The ABI
95+
is fixed-arity and bulk-only (`docs/abi.md` §6), and `no-c-ever.md` holds.
96+
- **`no_mangle` on generic items is now a hard error:** the 30 `#[no_mangle]`
97+
exports are all non-generic.
98+
- **Extern statics no longer promoted:** none are referenced.
99+
- **`Box::into_non_null` / `Vec::from_parts`:** no site here. Handles are
100+
registry ids, never raw boxes.
101+
102+
REVISIT WHEN: the ABI grows a concurrent-writer protocol (then: atomic word
103+
lanes), or a Java writer other than `importRows` appears.

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ no `cbindgen`, no `jextract`, no JNI. See `docs/abi.md` §1 and
7171

7272
## Toolchains
7373

74-
- Rust: **1.97.1** stable, matching `ndarray`/`lance-graph`'s pin.
74+
- Rust: stable, pinned in `native/lgj-abi/rust-toolchain.toml` (the version
75+
lives there only, matching `ndarray`/`lance-graph`'s pin).
7576
- Production JDK: **JDK 28** (`/opt/jdks/jdk-28+16`). Panama FFM is final
7677
there and needs no flag; Valhalla (JEP 401) is preview-gated and production
7778
uses it, so `--enable-preview` is required — for the value classes, never

‎native/lgj-abi/rust-toolchain.toml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ components = ["clippy", "rustfmt"]
1111
# carried by ndarray / lance-graph / OGAR. Forced, not
1212
# optional: ndarray 0.17.2 now declares rustc 1.98, so
1313
# a 1.97.1 build of this crate fails to resolve at all.
14+
# 1.98.1 → 1.99.0 2026-10-10: workspace-wide sweep (lance-graph #1437).
15+
# Must merge BEFORE the ndarray / lance-graph bumps: CI
16+
# checks the siblings out at main, and once they declare
17+
# rust-version 1.99 a 1.98 build here no longer resolves.
18+
# Measured: clippy -D warnings clean; AllTests 612 +
19+
# consumers 153 green against a 1.99-built .so.
1420
#
1521
# This is THE toolchain file for this repo. A second one briefly existed at
1622
# the repository root; it was removed rather than kept in sync, because two

0 commit comments

Comments
 (0)