From 2f28d8112970960dbb9b6b582a3c6cd259337d21 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 3 Aug 2026 01:05:57 +0900 Subject: feat(php-rpc): rework the RPC channel into the tagged plugin protocol 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 --- crates/shirabe-php-src/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/shirabe-php-src/src/lib.rs') diff --git a/crates/shirabe-php-src/src/lib.rs b/crates/shirabe-php-src/src/lib.rs index 1e2c2a0f..a5682e24 100644 --- a/crates/shirabe-php-src/src/lib.rs +++ b/crates/shirabe-php-src/src/lib.rs @@ -1,5 +1,6 @@ //! Rust port from the original C implementation in php-src. //! See `LICENSE.md` at the repository root. +#![allow(special_module_name)] //! //! Rules for this crate: //! @@ -16,4 +17,9 @@ //! /// php-src: ext/standard/strnatcmp.c `strnatcmp_ex` (PHP 8.5.2) //! ``` +// The module mirrors php-src's `main/` directory; it is not a binary entry point (autobins is +// disabled in Cargo.toml). `special_module_name` is allowed crate-wide because the item-level +// attribute does not reach this early-pass lint. +pub mod main; pub mod standard; +pub mod zend; -- cgit v1.3.1