This release includes 1 breaking change for platform teams planning a safe upgrade.
✓ No known CVEs patched in this version
Topics
+5 more
Summary
AI summaryCentralized exhaustive HIR walker closes a major bug class, massively refactors compiler internals across performance, code size, and infrastructure.
Full changelog
Highlights
Largest cognitive-load reduction in the project's history (15 commits in the v0.5.329→v0.5.343 series): compile.rs shrunk −60%, lower.rs −44%, lower_call.rs −45%, and lower::lower_expr −91%. ~14k LOC reorganized into 19 focused sub-modules. Every baseline green throughout: workspace 434/0/5, gap 25/28, doc-tests 80/82.
Closes the recurring _ => {} HIR walker bug class (root cause of #167, #169, #212, #214) via a single exhaustive walker that turns enum-variant additions into compile errors instead of silent miscompiles.
Compiler internals (refactor)
- Centralize
Exprdescent inwalker.rs— exhaustive match, no_catch-all (closes #167/#169/#212/#214 bug class) - Centralize UI / system / i18n dispatch tables in new
perry-dispatchcrate — eliminates 4-site fan-out across LLVM/JS/WASM backends - Symbol-set strip-dedup via
llvm-nm— replaces fragile name-pattern matching that broke Linux generic monomorphizations (#181) - Split
compile.rs(9391→3783 LOC),lower.rs(13591→7554),lower_call.rs(7000+→3866) into focused sub-modules - Pilot + mass-extract
lower_exprarms (Cond/Update/Tpl/Seq/Yield/Await/SuperProp/MetaProp/Arrow/Fn/Object/Member/Assign/New/Call) intolower/expr_*.rsmodules
Performance
- Fuse 4 sequential module scans in inliner + 5 sequential rayon passes in compile pipeline
- Bound parse cache at 500 entries with FIFO eviction (was unbounded —
perry devcould leak 100+ MB of SWC AST) - Parallelize per-module
.llwrites - Wrap i18n table in
Arc<>to avoid per-rayon-worker clones - Combine three mutable-captures passes in HIR analysis
Fixes
- #214 SSO string-array crashes:
unbox_to_i64returns garbage for short-string-optimization values; converted 7 string-operand callsites (arr.join,obj[ssoKey],delete,string.match,process.env) to SSO-safeunbox_str_handle - #212 class-method captures: classes declared inside a function whose method body references enclosing-fn locals now compile + run via hidden
__perry_cap_<id>instance fields with full ctor + inheritance + setter-write-through support - #181 Linux GTK4 link: silent pkg-config fallback hole + strip-dedup over-pruning generic monomorphizations
- #220 Windows: add
secur32.libto link line - #219 doc-tests: empty
// platforms:directive opts out of host run phase - #167 stack eat: hoist
js_native_call_methodargs alloca to entry block (was leaking 16 bytes/iter inside loop bodies) - #169 Uint8Array params: missing inliner arms caused
_ => {}fallthrough → SIGTRAP - #216/#217/#218 GTK4: 7 missing FFIs (open_folder_dialog, widget tree ops, SplitView)
- #154 using/await using: ES2024 explicit resource management dispose hooks
- #106 watchOS: weak fallbacks for game-loop FFI hooks (unblocks runtime-only
--features watchos-game-loop) - #198 i18n FormatNumber: FP round-trip via Ryū algorithm (closes #207)
- #196 jsruntime: drop redundant test causing Linux V8 re-init segfault
- #197 benchmarks: portable
/usr/bin/timeflag detection on Linux - #185 macOS shadow: set
masksToBounds: NOso corner-radius widgets don't clip CALayer shadow - ui-slider FFI sig parity across all 7 backends
- Cross-compile from aarch64 macOS host (Linux/Windows codegen, iOS lib path)
Features
- #185 inline
style: {...}API (Phase A + B + C): styling matrix infrastructure + cross-platformwidgetSetShadow+ opacity / borders / text decoration + Phase C inlinestyle: { backgroundColor, border*, padding, shadow, gradient, ... }on every Widget-returning constructor (Button, Text, Toggle, Slider, ProgressView, VStack, HStack, …) — works on every platform that has the underlying setters wired - #98 background notifications:
notificationOnBackgroundReceiveon iOS (UIBackgroundFetchResult-gated) + Android (FCM) warm-path - #190 Canvas widget in LLVM codegen
- #191 CameraView widget wired through every codegen path
- #192 Table widget wired through every codegen path
- #189 perry/plugin codegen dispatch (#203)
- #193 11 stdlib helpers wired (#205, partial)
- #202 GTK4 4 styling FFIs (#206)
- #194 doc-tests
--app-bundle-idfor widget cross-compile (#200) - #195 HIR error on widget method-chain modifier syntax (#201)
- #188 perry/i18n format wrappers (Currency / Percent / FormatNumber / ShortDate / LongDate / FormatTime / Raw)
- #209
file:deps inside cwd no longer strip FFI imports on--target web
Infrastructure
- Drift-checked styling matrix integration test (
crates/perry-ui/tests/styling_matrix_drift.rs) across 8 native platforms + Web - Dispatch-table consistency test in
perry-dispatch(caught a pre-existing duplicatescrollViewSetOffsetrow) - New regression tests for the SSO unbox + class-method capture + loop-alloca bug classes
- Linux build fix: clang discovery + duplicate sqlite symbol resolution
- Sponsor button routes to Ko-fi
Breaking Changes
- Centralized exhaustive match in `walker.rs` removes the `_ => {}` catch‑all, turning enum variant additions into compile errors (closes #167/#169/#212/#214).
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About perry
A native TypeScript compiler written in Rust. Compiles TypeScript directly to executables using SWC and LLVM.
Related context
Beta — feedback welcome: [email protected]