Xu 0.13.1: standard library hardening, zero-stub audit, networking upgrades, and Cond/WSAPoll semantics
Xu 0.13.1 delivers comprehensive engineering hardening across the standard library, establishing full zero-stub compliance, precision condition variable notification semantics, major enhancements to networking and HTTP/HTTPS protocol stacks, and cross-platform streaming process pipes and signal dispatching.
Standard Library Hardening & Zero-Stub Compliance
compress/zstd: Corrects frame header content size encoding and parsing; strictly validates final block completeness to trap truncated input; cross-verified againstbsdtarlibzstd 1.5.7.sync.Cond: Re-engineers notification semantics onto an ordered registered waiter queue. Guarantees thatsignal()wakes exactly one waiter, andbroadcast()wakes all waiters (verified with 4,097 concurrent coroutines), eliminating unobserved notification leakage when no waiters are present.os/exec: Implements cross-platform bidirectional streaming pipes (stdin_pipe,stdout_pipe,stderr_pipe) across Windows and Unix platforms, configuring handle inheritance and recycling descriptors on process spawn failures.os/signal: Traps native operating system console signals (using Windows SRWLock+Event and Unix signal hooks), strictly validating signal numbers and preserving channel ownership on invalid inputs.time: Removes Windows hardcoded timezone bypasses, adding dynamic loading and parsing of external IANA TZif databases via$env:ZONEINFO.crypto/cipher&encoding/json: Adds AES-CFB and AES-OFB streaming cipher modes; expands JSON parser buffers up to 64 MiB with dynamic capacity viaparse_max.
Networking & I/O Multiplexing Upgrades
- HTTPS Connection Pooling & Reuse:
net/httpclient pools connections partitioned by Host/SNI and TLS configurations, automatically evicting connections marked withConnection: close, providing an explicitclose_idle_connections()hook, and supporting idempotent retries. - Native Windows
WSAPollBatch Detection: Thenet/pollerremoves sleep latency and bridges directly onto persistentEventSetbackends, using WindowsWSAPollfor sub-millisecond batch socket event dispatching. - HTTP/2 HPACK Huffman Decoding:
net/http2implements the RFC 7541 HPACK Huffman decoder (decode_huffman), enabling header decompression for responses from standard HTTP/2 servers. - Real
SOCK_RAW& IPv6 Datagrams:netsupports true raw IP socket creation (dial_ip,listen_ip,listen_packet) with protocol dispatching, alongside IPv6 UDP datagram support.
WebAssembly & Mobile Platform Linking
- WebAssembly Top-Level Exports: Added the
--wasm-exportcompiler flag to export top-level functions directly to the WebAssembly host for JavaScript invocation. - ARM64 Mobile Game Linking: Added native archive and C bridge linking for ARM64 iOS and Android application objects.
Upgrade the full SDK
All six native platform SDKs (Linux x64/arm64, macOS arm64/x64, Windows x64/arm64) passed full self-host fixed-point verification, runtime protocol tests, and the standard library zero-stub regression suite.