Repository navigation
szn v0.11.0
84 commits since v0.10.0. 1,082 tests passing on both Zig 0.16.0 and Zig 0.17.0.
Headline: Dual Zig 0.16/0.17 Toolchain Support, Lifecycle Memory Reclamation (#542), Lao Script Reflow, Linux Packaging, and 61-Bug Stability Sweep
v0.11.0 is a major stabilization and portability release. It establishes verified dual-compiler support across both Zig 0.16.0 and Zig 0.17.0 from a unified source tree, overhauls session and pane memory lifecycles to eliminate unbounded arena accumulation (#542), expands advanced text reflow and cluster integrity to Lao script, introduces native Linux RPM packaging (Fedora / EL), modernizes the benchmarking suite, and resolves 61 bug tracker entries (#502–#562) spanning terminal emulation fidelity, alt-screen transitions, sixel graphics containment, and SafeAllocator memory safety.
Key Improvements & Features
1. Dual Zig 0.16.0 & 0.17.0 Toolchain Support
- Single Source Tree Compatibility: The entire codebase compiles and passes its full 1,082-test suite cleanly under both Zig 0.16.0 and Zig 0.17.0.
- Unified Standard Library Subset: Standardized on APIs present in both toolchains (
bufPrintSentinel,fieldNames,mem.zeroes,.empty) and confined release-specific shims strictly tosrc/compat.zigandbuild.zig. - SafeAllocator Hardening (Bug #562): Resolved subtle test use-after-free hazards that were exposed when Zig 0.17 transitioned
std.testing.allocatorfromDebugAllocatorto the unmappingSafeAllocator.
2. Lifecycle Memory Architecture Overhaul (Bug #542)
- Elimination of Vestigial Session Arena: Removed unbounded non-LIFO arena allocation in
Sessionandcmd/dispatch. - Dynamic Allocation Reclamation: Routed format expansions, option strings, and grid buffers through backing allocators with strict deallocation upon session and pane termination, preventing memory creeping during long-running sessions.
- Atomic Concurrency & Descriptor Safety (Bugs #504, #510): Synchronized lazy
libthailoading with atomic state transitions and made logging descriptor writes atomic.
3. Terminal Emulation Fidelity & VT Completeness (Bugs #523–#526, #546–#552)
- String Terminator (
ST) Compliance (#549): Implemented complete 7-bit (ESC \) and 8-bit (0x9C) ST termination handling across SOS, PM, APC, and OSC sequences. - PTY Keypad & Modifier Preservation (#551): Preserved extended keypad modes and modifiers in
writeKeyToPty. - Modal Escape Handling (#552): Armed
escape-timein modal views to ensure rapid, predictableEscapekey dispatch. - Origin Mode & Navigation Fixes (#523–#526): Wired
DECOMorigin mode with saturating coordinate clamping, corrected NEL (0x85) column resets, and guarded CBT modulo calculations. - Alt-Screen State Preservation (#546, #550): Preserved scroll regions (
DECSTBM) and saved main grid contents across alternate screen entries and exits.
4. Advanced Text Reflow, Thai & Lao Typography (Bugs #502–#505, #541, #559)
-
Lao Script Expansion: Extended syllable cluster integrity, zero-width mark attachment, and
$O(1)$ backtrack reflow to Lao script (U+0EB0–U+0ECD), including Lao SARA AM (U+0EB3) diff repair and Yamakkan width metrics. -
Compound Vowel Cluster Protection: Hardened Thai reflow boundaries around compound vowels (
เ-าะpatterns) and spacing marks (ๆ,ฯ,์). - Quote Protection Heuristics: Added boundary heuristics preventing dangling opening and closing quotes across pane reflows.
5. Packaging & Benchmarking Infrastructure
- Native RPM & COPR Packaging: Added
szn.spec, Copr build hooks, and multi-distro containerized build scripts (build_all.sh) for Fedora 44/45 and Enterprise Linux 9/10. - Hyperfine 2.0 Benchmarking & Report Extraction: Updated benchmark scripts for Hyperfine 2.0 shell syntax and extracted structured reporting into a typed, verified tool at
tools/bench_report.py.
Testing & Quality Assurance
| Metric | v0.9.1 | v0.10.0 | v0.11.0 |
|---|---|---|---|
| Total Passing Tests | 970 | 1,032 | 1,082 |
| New Regression Tests | 11 | 62 | 50 |
| Open Bugs in Tracker | 0 | 0 | 0 |
| Bugs Resolved in Cycle | 1 (#440) | 61 (#441–#501) | 61 (#502–#562) |
| Binary Size (stripped, x86_64 Linux) | ~831 KB | ~831 KB | 1,053,312 bytes (~1,029 KB) |
| Binary Size (stripped, aarch64 macOS) | ~685 KB | ~685 KB | 834,864 bytes (~815 KB) |
| Build Status | All passing | All passing | Clean under Zig 0.16.0 & 0.17.0 |