aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-src/src/main/snprintf.rs
AgeCommit message (Collapse)Author
2026-08-10fix(php-src): assert php_gcvt's unported arguments up frontnsfisis
php_gcvt only ports the ndigit < 0 (dtoa mode 0) path and hardcodes the '.'/'E' separators of its sole caller into the placement logic, but it accepted any argument and silently produced a wrong string for the rest. Assert the supported combination instead, and turn the mode 2 bail-out into unreachable! now that the assert rules it out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-03feat(php-rpc): rework the RPC channel into the tagged plugin protocolnsfisis
Replace the name\0arg framing with the plugin wire protocol: tagged frames with corr_id multiplexing, a MAX_FRAME_LEN bound, a thread-ID based reentrant SessionLock, and the PluginValue codec (encoder plus the first recursive decoder, iterative with a 512-level depth cap). Float formatting is ported from php-src into shirabe-php-src so the encoder is byte-compatible with serialize() under serialize_precision=-1, which the spawned worker now pins. The worker gains a standing dispatch loop, CallRustMethod reentrancy, hand-written Event proxy stubs, and explicit-error answers for everything not implemented yet. The public query API (get_php_version and friends) is unchanged and now rides the new protocol; the codec is verified against real PHP by roundtrip oracle tests covering floats, non-UTF-8 bytes and deep nesting. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>