writeonce/compiler/src
shoney.arickathil 6d6c810695 feat(tls): net.connect_tls/read_tls/write_tls builtins (rv2 9 F3c-net)
The outbound TLS 1.3 client wired into the VM (ids 115-117, WO_B_MAX->117):

- net.connect_tls(host,port)->Int: DNS + non-blocking connect+poll bounded
  by WO_TLS_HANDSHAKE_MS (decision 5), then a blocking, SO_*TIMEO-bounded
  hand-rolled handshake over the sans-io driver, then wo_tls_verify_chain
  (chain + host + validity + basicConstraints/EKU) against the shard's
  lazily-loaded read-only CA bundle (decision 4). Any failure traps WO_T_IO
  loudly (decision 3). Returns the fd.
- net.read_tls / net.write_tls: application data over the parked data plane
  (decision 1) — O_NONBLOCK + park on POLLIN/POLLOUT like net.read/write,
  with record reassembly + leftover-plaintext + in-flight-record buffers in
  the per-fd slot so a park/retry never re-seals or loses progress.
- per-shard wo_tls_conn slot table keyed by fd, no locks (one thread per
  shard, the wo_child pattern; decision 2); net.close frees the slot;
  wo_vm_destroy reaps all slots + the CA bundle. getrandom ephemeral.
- driver keeps the whole Certificate message + wo_tls_client_chain() so the
  trust walk sees the full chain, not just the leaf.
- wiring: wob.h, loader.c arities, builtin.c dispatch (second net range),
  types.ml (net.connect_tls/read_tls/write_tls), sysio.c impl.

Builds; full runtime suite 0 fail; woc builds. Live behaviour is the
Phase-4 gate (next commit).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 9a922b3245eaa9134efb60bfd46521952ed12a39)
2026-09-15 01:15:31 +02:00
..
ast.ml feat(woc): @table durable/resident arguments, defaults preserve behaviour 2026-08-26 23:03:36 +02:00
CODE-LOGIC.md feat(serve+view): file serving, downloads, supported systems; rename 2026-08-25 04:41:00 +02:00
diag.ml feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00
disasm.ml feat(wob): v7 — class descriptor carries durability and residency 2026-08-26 23:22:26 +02:00
dump.ml feat(woc): @table durable/resident arguments, defaults preserve behaviour 2026-08-26 23:03:36 +02:00
dune refactor(compiler): inference is one library pass, Gcinfer.infer 2026-08-18 19:00:11 +02:00
emit.ml feat(crypto): AES-GCM via AES-NI + PCLMULQDQ (rv2 8 phase B, ids 113/114) 2026-09-15 01:15:31 +02:00
gcinfer.ml feat: spawn / send / actor M — the unified actor surface (arc T3) 2026-08-20 07:21:24 +02:00
lexer.ml feat(lang+wo-html): raw text literals, component layer, MVC samples 2026-08-25 03:58:41 +02:00
owner.ml feat: monitor + time.after (ids 89/90) — the lifecycle slice completes 2026-08-23 08:56:48 +02:00
parser.ml feat(wob): v7 — class descriptor carries durability and residency 2026-08-26 23:22:26 +02:00
token.ml feat(lang+wo-html): raw text literals, component layer, MVC samples 2026-08-25 03:58:41 +02:00
types.ml feat(tls): net.connect_tls/read_tls/write_tls builtins (rv2 9 F3c-net) 2026-09-15 01:15:31 +02:00