Download the PHP package folk/sdk without Composer
On this page you can find all versions of the php package folk/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package sdk
folk-sdk
PHP SDK for Folk -- worker dispatch loop, HTTP handler, and request/response types.
Version: 0.2.0
Installation
Requires the folk.so PHP extension (built by folk-ext).
WorkerLoop
WorkerLoop is the PHP-side dispatch loop. It auto-detects the dispatch mode:
| Mode | How it works | Serialization |
|---|---|---|
| Direct (preferred) | Rust calls PHP handler via call_user_function with zval arrays |
None -- zero-copy |
| Extension | folk.so extension bridges Rust and PHP | Minimal |
| Pipe (legacy) | stdin/stdout msgpack-RPC | Full encode/decode |
Direct dispatch (zero-copy)
When running inside folk.so, Rust passes request data as native PHP arrays (zvals) directly to the handler function. No JSON or msgpack encode/decode is needed. This is the fastest path.
Quick start
Key classes
WorkerLoop-- main dispatch loop, auto-detects mode, calls registered handlersHttpRequest-- fields:method,uri,headers,bodyHttpResponse-- fields:status,headers,bodyHttpModeHandler-- interface withhandle(HttpRequest): HttpResponse
Requirements
- PHP 8.2+
folk.soextension (ZTS build)
License
MIT — see LICENSE.
All versions of sdk with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.2
ext-json Version *
ext-json Version *
The package folk/sdk contains the following files
Loading the files please wait ...