Skip to main content

Crate folk_ext

Crate folk_ext 

Source
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::Value and ext-php-rs Zval.

Structs§

Server

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