Repository navigation
nish v0.19.0
·
667 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Breaking changes
- crypto: TLS and QUIC one-shot key derivations take and answer Secret (#665)
- checker: A Secret may be a readonly field of a class whose wipe() wipes it (#685)
- tls: TlsServer and TlsRecordServer hold their secrets in Secret fields (#705)
- quic: QuicConnection holds its traffic secrets in Secret fields; quicKeys writes into a caller's slot (#706)
- checker: Switch on a union's tag, with exhaustiveness (#798)
Added
- checker: Warn when a loop drops an allocation on every pass (#533)
- net: Derive the TLS resumption master secret, completing RFC 8448 §3 (#539)
- crypto: Run Wycheproof for HMAC and HKDF, and wipe their state (#542)
- cli: Refuse retained arena memory with --deny-retention (#544)
- cli: Report where every allocation's memory goes with --emit-arena (#547)
- checker: Fixes for !xs.length and non-boolean && / || operands, and code-checked nofix cases (#550)
- crypto: A native-only helper that draws the key and serial for x509MintSelfSigned (#540)
- checker: Mutex, a lock that owns its data, in nish/threads (#562)
- checker: Channel of scalars, closed when its senders return, in nish/threads (#566)
- std: A JSON writer that writes into a byte buffer, in nish/json (#580)
- std: A streaming JSON tokenizer over u8[], in nish/json-tokenizer (#582)
- std: Decode JSON into a class and encode it back, with code the compiler writes (#593)
- runtime: Runtime-aes.c, AES-GCM on AES-NI/PCLMULQDQ and ARMv8 AES/PMULL (#594)
- checker: Accept
??on a nullable value (#596) - checker: Accept a
?.chain that ends in??(#603) - codegen: A builtin that makes a string from a byte range in one allocation (#606)
- std: Pretty-printed output and a strict non-finite mode for JsonWriter (#604)
- std: JsonValue, a dynamic JSON tree with lossless numbers, in nish/json-value (#617)
- codegen: U64, enum and Map fields, and key dispatch by length, in typed JSON (#622)
- codegen: Renamed and optional-with-default fields, and lossless number fields, in typed JSON (#630)
- checker: ParallelMap, parallelFrom and arrows that read the enclosing function's consts (#609)
- checker: Arrow tasks with captures, tasks without a destination, and a seeded Rng (#644)
- cli: --cpu x86-64-v3 links module and runtime at one CPU level (WP38 S2) (#660)
- checker: AtomicI32 and AtomicI64 in nish/threads (#654)
- checker: Enum member types such as Kind.Array (#655)
- checker: Strings and scalar arrays cross threads by copy-at-join (#669)
- net: HTTP/1.1 responses carry a Date header (#675)
- checker: Discriminated union types (#682)
- net: HTTP/2 and HTTP/3 responses carry a date field (#692)
- crypto: HKDF, TLS schedule and QUIC derivations into a held Secret (#684)
- checker: Guard helpers, thread diagnostics that say what to write, and --fix for them (#691)
- bench: POST /json-echo, a JSON request body through std/json (#689)
- bench: The cross-runtime HTTP twins under bench/http-twins (#677)
- interop: String parameters on declare function (#695)
- interop: Copy string results out of declare function (#701)
- interop: ReadCString in nish:unsafe and the literal-null CPtr parameter (#704)
- std: Read pre_shared_key and write NewSessionTicket in nish/net/tls (#683)
- std: Seal and open TLS session tickets under a Secret key in nish/net/tls/ticket (#680)
- std: Nish/bytes, endian reads and writes of integers and doubles in a byte array (#690)
- interop: U8[] buffer parameters on declare function, with the run-and-count rule (#709)
- std: Resume TLS 1.3 sessions with tickets in nish/net/tls (#712)
- net: TcpListenFlags, SO_REUSEPORT on a TCP listener (#733)
- net: An HTTP router in nish/net/router (#730)
- checker: Store null through a guard into a string | null slot (#736)
- bench: The nish HTTP twin registers its routes on nish/net/router (#741)
- interop: Pass u8[] buffers to C, with the count checked against the length (#738)
- runtime: TCP_NODELAY on accepted sockets, as tcpListenFlags flag 2 (#770)
- bench: A TechEmpower-shaped json and plaintext entry, measured against the HTTP twins (#785)
- std: Nish/net/url, percent-decoding and query-string parsing (#729)
- checker: Report the
unsafecapability for nish:unsafe calls (#773) - checker: Narrow a discriminated union by testing its tag (#716)
- runtime: Non-blocking spawn, kill, waitPid, availableParallelism and totalMemory (#742)
Fixed
- codegen: Do not hoist a loop's array header across a new whose constructor resizes it (#541)
- checker: A method of a non-exported class called from another module links (#543)
- checker: The diagnostic-fix-2 follow-ups — NL9007 wording, uncheckedGet in the range analysis, one-round migration (#548)
- checker: NL9007 and NL2457 offer only a guard that compiles and is credited (#552)
- cli: Check the owner of the run cache root and the package root, and take the first executable nish on PATH (#546)
- checker: Close the constructor hole in scope regions and admit a task's private writes (#590)
- checker: Admit a scope region's writes to a function's own Map, Set and array contents (#608)
- codegen: Give a hidden function a symbol C cannot spell (#616)
- build: Make the size report print the ceilings the runtime-budget gate applies (#636)
- checker: Let a scoped task read a shared Map or Set, and let only the first panic of a process print (#621)
- crypto: Wipe AES key schedules, H and ChaCha state with the volatile wipe (#639)
- checker: Refuse an exported function that takes a C symbol, and spell private ones apart (#640)
- checker: A moved secret's aliases are moved too (#642)
- tls: Wipe every key a TLS connection holds when it ends (#652)
- quic: Wipe a connection's packet keys and AES schedules when a level, generation or connection ends (#653)
- quic: Wipe the stateless-reset and Retry token keys and the listener seed when the server is released (#664)
- checker: Every thread refusal ends with the code to write (#702)
- interop: The wasi host turns off V8 fast API calls itself (#720)
- checker: Build thread refusal remedies from the program (#722)
- checker: Reclaim a frame that spawns into a scope, and accept an arena's array handed to its own scope (#745)
- checker: Refuse an exported function named memory in a wasm build (#765)
- codegen: Define the struct an imported generic's inferred result names (#771)
- checker: Refuse an object literal typed as a class with methods (#774)
- codegen: Keep field-initialiser stores in an empty explicit constructor (#781)
- checker: Warn NL8003 on a record copy reached through an alias or a helper (#782)
- checker: Follow aliases of an element reference in NL2290 (#769)
- net: Enforce QUIC's AEAD limits and detect optimistic ACKs (#784)
- bench: Prove OpenSSL's portable hash column on SHA-256 first, falling back to SHA-512 (#795)
Performance
- std: Skip JSON string bodies with a memchr search (#532)
- codegen: Release a loop pass whose own string goes to a parts + join callee (#549)
- cli: Cache the compiled runtime between links (#557)
- checker: Prove an offset index
xs[i + c]from a guard on the sum (#561) - checker: Warn on an offset index that keeps its bounds check (#565)
- checker: Prove a computed index from the range of values it can take (#581)
- runtime: A persistent FIFO worker pool, an affinity-aware core count and NISH_NUM_THREADS (#586)
- checker: Give a call the length of the fresh array its helper returns (#595)
- runtime: AES-GCM on AES-NI and PMULL, with the bitsliced path as fallback (#598)
- checker: Keep a helper's array length through a call that keeps it (#605)
- codegen: Retune the parallel map's grain for the worker pool (#607)
- std: Scan JSON string bodies, whitespace and numbers in bulk (#614)
- std: Test dst's length in parallelMapInto's loop condition, so the element loop vectorises (#645)
- bench: Measure S3's bar kernels without a nish:simd surface (WP38 S3a) (#658)
- crypto: P-256 multiplies the base point by a precomputed table (#663)
- std: Two system calls per keep-alive HTTP/1.1 request, and output buffers borrowed from a pool (#672)
- std: Pace HTTP/3 in microseconds so loopback responses stop waiting for the next millisecond (#694)
- runtime: A thread's arena adopts what a worker copied out, and keeps freed memory (#686)
- codegen: A frame that calls parallelMap reclaims its result when it does not escape (#703)
- std: A shared byte-buffer pool that zeroes what it takes back (#688)
- std: HTTP/2 connections borrow their frame buffers from the server's pool (#711)
- std: QUIC streams borrow their buffers on first use and give them back once acknowledged (#715)
- std: TLS record buffers are borrowed per connection and wiped when given back (#713)
- codegen: Free a string map handed to a callee that keeps none of it (#737)
- runtime: Claim a divided region's pieces as threads finish (#731)
- std: Build Http1Server's connections on first accept (#734)
- runtime: Keep the chunk a map element's body grew at one thread (#743)
- std: Build Http2TlsServer's connections on first accept (#767)
- std: Build Http3Server's slots on first accept (#779)
- std: Build TlsTcpServer's and Http1TlsServer's slots on first accept (#777)
- crypto: Invert P-256's nonce by constant-time safegcd instead of Fermat (#780)
- bench: Bind WebTransport on a slot's first accept, and record what each pool costs at start-up (#786)
Changed
- std: Give std/crypto/aes.ts four private seams, each called from one place (#592)
Documentation
- Record that WP38's --cpu bar is met once the noise is measured (#527)
- security: Record the readdirSync listing fixes from #520 in CG-5 (#529)
- Record that WP38's S4, the lexer on indexOfAny, is declined for now (#530)
- Record WP38 S1's bench/json measurement (#538)
- interop: Plan WP27 S3, strings across the C boundary (#545)
- security: Recount the README rows after the sweep (#551)
- Record six review lessons in CLAUDE.md (#553)
- Record the issue-sweep-2 review lessons and correct two stale records (#554)
- Name the wasi section, not the web filter, as the check that links src/ as nish.wasm (#556)
- Restate WP38's S3 bar after checking a portable-SIMD benchmark against LLVM 18 (#558)
- threads: Decide WP29 P3, the lock and the channel (#560)
- Record three review lessons from the runtime cache in CLAUDE.md (#563)
- threads: Mark WP29 P3 built, with a measured example (#568)
- Name the checker's recurring escape routes, and where a Measured figure comes from (#569)
- Plan the HTTP server beyond the relay, from a TechEmpower entry to every version (WP39) (#578)
- guide: Add the user guide skeleton and its Scalar config (#576)
- guide: Write the error handling, generics, modules and memory pages (#587)
- guide: Write the CLI, standard library, interop and threads pages (#583)
- Require the user guide to move with the language (#585)
- guide: Write the getting-started pages (#589)
- simd: Measure AES-GCM and write WP38's S5 row with its bar (#584)
- guide: Write the language basics pages (#588)
- Mark the optional-chain stage of the nullish plan completed (#623)
- bench: Re-record json-compare on main after the json-parity stages (#632)
- bench: Nish/threads against Rust and Go on the same parallel kernels (#615)
- simd: Plan S6, the JSON tokenizer on vectors and Eisel-Lemire (#634)
- Record the AES-GCM kernel run's conventions in CLAUDE.md (#633)
- wp38: Measure what reading every --cpu level costs, and recommend S2, S3a and S7 (#638)
- bench: Re-time the bitsliced AES fallback against the ce9d394 baseline (#637)
- Record the worker pool's ceiling, the AES fallback's drift caveat, and the moved-fact rule (#647)
- wp38: Take Q7 to Q9, record S7 as built by #561, and plan S3a and the --cpu flag (#650)
- crypto: P-256's share of a TLS 1.3 handshake, the baseline and the bar (#641)
- crypto: P-256's fixed-base table against the bar (#666)
- security: Anchor the P-256 comb's record at 6e11fa6 (#667)
- security: Threat model for TLS 1.3 session resumption (#635)
- perf: Measure a 64x64-to-128 multiply on Poly1305; the bar is missed on wasm32 (#687)
- guide: Which thread tool to reach for, and the finished thread surface (#697)
- bench: Every HTTP server through every scenario, interleaved (#698)
- security: Cite the link-test check by its template in QUIC-1 (#707)
- interop: Design u8[] buffers and owned handles across declare function (#679)
- WP42, a multi-core server from pre-forked processes (#726)
- interop: Point the WASI host's fast-call flag at its tracking issue (#735)
- Extend the guide-update rule in testing.md and ARCHITECTURE.md past constructs (#747)
- Design streaming file reads (WP44) (#764)
- WP45, name resolution for nish:net — getaddrinfo, a stub resolver, or both (#766)
- Write WP37's note, the OS sandbox (#755)
- plan: Stage WP33 R3 and R4, the runtime split by host and --emit-ts (#778)
- runtime: Weigh regions, arena reset and refcounting for long-running servers (#768)
- perf: Record the handshake-time baseline and the bar for P-256's scalar inversion (#772)
- perf: Read the P-256 inversion bar on main (#796)
- self: Trim CLAUDE.md to the rules every session needs (#804)
Tests
- ct: Hold the x25519 timing to its domain and re-measure CT-13 (#537)
- std: Compare indexOfAny's non-ASCII byte offset between native and --profile wasi (#536)
- std: Test262- and V8-derived JSON conformance, and the JSONTestSuite round trip through the writer (#600)
- std: JSON against serde_json, simdjson, yyjson, RapidJSON and Go on the same machine (#601)
- std: Hold the JSON conformance corpus's indented cases to JSON.stringify, and render the json-value cookbook entry (#631)
- checker: Pin that a guard on one array's length does not prove an offset access into another (#659)
- std: An h2load harness for HTTP/3 latency, and the cause of the 1 ms stalls (#676)
- interop: --slots sizes every pool, and the harness that measures memory and throughput (#693)
- bench: Time the bun-http-framework-benchmark routes, Elysia, Hono and startup (#723)
- checker: Pin every route by which sibling scopes share a lock, an atomic or a destination (#727)
- interop: Curl and Chromium resume a TLS 1.3 session (#725)
- bench: A --cores mode for bench/http.mjs and N-core twins (#728)
- interop: The loopback client sends nothing after a CONNECTION_CLOSE (#739)
- std: Pin Http2TlsServer's start-up bytes (#787)
- bench: Add the crypto twin harness with the hash kernels (#776)
- bench: Re-take the Rust and Go parallel table and add an atomic par-histogram (#746)
- self: Keep the checked goldens one file per module, with body-relative lines (#797)
- bench: Accept any crypto family's main.ts in the --only crypto forwarding check (#802)
- bench: Time one full TLS 1.3 and one QUIC handshake against the twins (#792)
- bench: Time X25519, P-256, Ed25519 and X.509 against the twins (#793)
- bench: Time AES-128/256-GCM and ChaCha20-Poly1305 against the twins (#794)
- ct: Settle the ladderStep (CT-13) and macEqual timing readings (#775)
Build
- Regenerate package-lock.json for v0.18.0 (#526)
CI
- test: Deal the test shards by measured cost (#724)
- Run runtime-net.c's Darwin branch on a macOS runner (#754)
- Add npm run sync-main and run CI in the merge queue (#801)
Internal
- Compact agent sessions at 200k and cut the calls a pull request spends (#648)