folk-runtime-fork 0.1.17

Fork-based worker runtime for Folk — prefork master with warm OPcache
Documentation

folk-runtime-fork

Fork-based PHP worker runtime for Folk: warm OPcache via prefork.

A prefork master PHP process boots the framework once, then forks per-worker children that inherit its OPcache. Worker recycling re-uses the master (no re-bootstrap).

Platform

This crate is Unix-only (#![cfg(unix)]). SCM_RIGHTS FD passing is Linux primary, macOS experimental.

Usage

use folk_runtime_fork::{ForkConfig, ForkRuntime};

# async fn example() -> anyhow::Result<()> {
let runtime = ForkRuntime::new(ForkConfig {
    php: "php".into(),
    script: "vendor/bin/folk-worker".into(),
    boot_timeout: std::time::Duration::from_secs(30),
}).await?;
# Ok(())
# }