Expand description
Folk PHP extension core — server lifecycle + worker bridge.
Uses std::sync channels for worker communication (no tokio dependency
on the worker thread side). Supports multi-worker via ZTS threads.
Re-exports§
pub use folk_core;
Modules§
- bridge
- PHP bridge: thread-local worker state for channel communication.
- registry
- In-process plugin method registry.
- runtime
- Extension runtime: workers via channels.
- worker
- ZTS worker threads — each thread runs an independent PHP context.
- zts
- ZTS (Thread-Safe) PHP FFI wrappers.
- zval_
convert - Convert between
serde_json::Valueand ext-php-rsZval.
Structs§
Functions§
- call_
method - ext_
php_ rs_ describe_ module - folk_
call - folk_
is_ worker_ thread - Returns true if the current thread is a ZTS worker thread (has bridge state initialized by the runtime).
- folk_
version - folk_
worker_ ready - folk_
worker_ recv - folk_
worker_ run - Run the zero-copy dispatch loop.
- folk_
worker_ send - folk_
worker_ send_ error - join_
zts_ workers - Join all ZTS worker threads. Called before main thread exits.
- register_
zts_ worker - Register a ZTS worker thread handle for graceful shutdown.
- start_
server - Start the server with plugins. Non-blocking.
- version