React Compiler Ported to Rust: Fixing JSON Serialization for Flow Predicate Nodes
By
Joe Savona
A baker's-dozen of insight crammed into one ring.
Summary
This is a GitHub pull request by Joseph Savona that ports the React Compiler from JavaScript/Babel to Rust. The specific change described involves fixing a JSON serialization issue where Babel's parser emits `"predicate": null` on function-like nodes (FunctionDeclaration, ArrowFunctionExpression, etc.) for Flow's `%checks` predicate. The PR applies a custom `nullable_value` deserializer to handle the distinction between "absent" and "explicit null" values, ensuring round-tripped JSON remains byte-equivalent. This is an early, experimental work-in-progress shared for partner feedback before internal testing at Meta.
Key quotes
· 4 pulledThe Babel parser emits `"predicate": null` on function-like nodes (FunctionDeclaration, ArrowFunctionExpression, FunctionExpression, ObjectMethod, DeclareFunction) to signal "no Flow `%checks` predicate".
Plain `Option` deserialization collapses both "absent" and "explicit null" into `None`, and `skip_serializing_if = "Option::is_none"` then drops the field on the way back out, so round-tripped JSON loses the field and byte-equivalent comparison fails.
Apply the existing `crate::common::nullable_value` deserializer to all five predicate fields.
Work-in-progress - we are sharing early, prior to testing internally at Meta, to get feedback from partners...
You might also wanna read
RustRover 2026.2 Reduces False Positive Warnings by Up to 25%
RustRover 2026.2 introduces significant reductions in false positive warnings, cutting them by up to 25% in real projects. The article expla
GEPA: A Measurable Genetic-Pareto Approach to Prompt Engineering for Security Agents
SpecterOps' GhostWorks initiative explores a measurable approach to prompt engineering for LLM-based security agents. The post introduces GE
Practical Kotlin Deep Dive: A Comprehensive Guide to Kotlin Internals and Multiplatform Development
This article/book description provides a comprehensive overview of "Practical Kotlin Deep Dive," a resource that explores Kotlin programming
CheezyPizza: An Open Source Tool for Direct Browser-to-Browser File Transfers with No Size Limits
CheezyPizza is a free, open source tool that enables large file transfers directly between browsers using WebRTC technology. Unlike traditio
itsfoss.com·3h agoJqwik Library Author Defends Anti-AI Logging Code as Ethical Protest
The author of the jqwik testing library explains why they added logging code that detects and responds to AI coding agents. They describe it
CVE-2026-48800 Bypass: Path Traversal Vulnerability Discovered in Notepad++ v8.9.6.1
A security vulnerability (CVE-2026-48800 bypass) has been discovered in Notepad++ v8.9.6.1, the latest patched version. The vulnerability in
