pub extern "C" struct)Open and answer this issue on GitHub.
targets, blocked · opened 2026-09-30 · updated 2026-10-06 · 0 comments
Record: ADR-127, all of it. pub extern "C" struct has C’s layout (declaration order, C padding, #[repr(C)] below) and crosses by value, in, out and as a field; a Vec of them is an array in and the caller’s buffer out, counted in elements; T? of one is the NONE status. Fields are numbers, bool, char, payload-free enums and other such structs, every field pub; anything else is NK1145, naming the handle as the shape. No lock around its methods: it is the caller’s memory. The layout is in the ledger, so --locked catches a change.
Order (§5): the parser; the field check and NK1145; the emitter’s repr(C), passing, array and buffer; the header’s typedef struct and the ledger’s field record; an example beside the library’s. Plus §4’s [f64; 3] field (ADR-152 step 4): Array[T, N] is built, so what is left is a repr(C) struct to put one in and the test that it is laid out as C lays it out.