lumenize 0.2.5

Laravel integration for Claviron hosts, independent of their server boot
docs.rs failed to build lumenize-0.2.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

Lumenize

Laravel integration for applications hosted by Claviron.

Keep your Laravel routes, controllers, models and notifications. Lumenize connects them to a native application host, with optional shared cache, sessions, queues and broadcasting. You do not need to write Rust to use the PHP integration.

Start with Laravel

For a local checkout, try the Laravel and SQLite example. It uses this repository's PHP and Rust packages directly; no release is required.

Install the PHP adapters in your application:

composer require claviron/laravel:0.1.3

Composer installs the Laravel integration and its claviron/sapi dependency. It does not install the native host or the lumenize executable; those are prepared separately. Once the executable is installed, run Artisan commands from your application directory:

lumenize list

Your application's configuration and authorization remain yours. Enable only the services your host provides; installing the package does not start a server or replace your existing application. Start with the PHP guide.

What a runner is

Lumenize is a runner: it hosts one Laravel application from that application's own project. The project owns the process. Its configuration is one launch file, lumenize.yaml, beside composer.json, and its sections (listeners, TLS, cache, Redis, database pools, broadcasting, logging) use the same schemas those parts use everywhere in Claviron.

A runner is not the opposite of an edge. It serves a single host because one application needs no more; an application that needs virtual hosts or per-host policy is served through a Claviron edge, with Lumenize behind it over Orbit Link. claviron-runner describes the role in full: What a runner is.

Packages

The library separates framework integration from its optional application runner. An application may use the integration APIs while retaining its own Claviron boot, Edge hosts, configuration, providers and process lifecycle.

Package Responsibility
lumenize Laravel integration, Artisan API, and opt-in runner and cli capabilities
lumenize-cli Thin lumenize Artisan console binary; no HTTP Runner dependency
claviron/laravel (Composer) Laravel drivers, Octane receive/respond adapter, providers, queue and event integration

The Rust packages share one release version. Install lumenize-cli for the Artisan executable or add lumenize to your own Rust host.

PHP integration

Install the companion Composer package claviron/laravel. Its PHP integration classes use Lumenize\, independently of the engine's Claviron\ classes. Driver names, event topics and native functions are unchanged. The package continues to consume claviron/sapi, supplied by Claviron PHP Embed.

Update imports, explicit providers and Composer discovery metadata together; there is no old-namespace alias. Regenerate autoload/provider/config caches and drain or migrate queued payloads containing the former PHP class names before switching running workers. Native Claviron\Runtime envelopes stay unchanged.

Laravel owns its container, models, authorization, notifications, queues and request semantics. The host may run an ordinary front controller in Script mode or select the package's Octane adapter in Application mode. See the integration guide and Composer documentation.

Extend with Rust (optional)

Rust lets you add native services or build a host tailored to your application. Start with the ready-made Runner below when you want the supplied server composition. Direct integration is for applications that already own a host: it adds Laravel support without starting a second server.

Use the library without the runner

The library has no default features. Configuration evaluation and artisan::run are available directly; auth enables the auth-event adapter and broadcast enables the native broadcast adapter. These features compile capabilities; they do not register services or start an application.

For a Claviron Edge, enable edge and call lumenize::edge::register in the host bootstrap after Edge has registered its host registry. It installs the Laravel PHP config parser. With broadcast, it also registers the native broadcaster and its Edge routes. Select webtransport for WebTransport sessions. Registration does not start a PHP application.

Hosts can also register individual adapters before configuration preparation and PHP execution:

use claviron::runtime::{AppState, Register, registry};
use lumenize::broadcast::LaravelBroadcastProvider;
use lumenize::congif::LaravelConfigProvider;

// Requires lumenize's `auth` and `broadcast` features. The host has already
// declared its PHP engine/INI and event transport. The broadcast provider
// registers the broadcast service from `broadcast.yaml` unless the host has.
fn register_laravel(state: &AppState) -> registry::Result<()> {
    LaravelConfigProvider::register(state)?;
    LaravelBroadcastProvider::register(state)?;
    lumenize::auth::register(state)
}

The host owns credential admission, guards, authorization, route selection and runtime resources. It chooses which registrations to perform and in what order. Lumenize introduces no second AppState, PHP engine, supervisor, listener or boot sequence. Claviron does not depend on Lumenize.

Configuration evaluation uses trusted PHP and the host's existing SAPI; it is not a sandbox. Auth events are successful state-transition facts, not a new authentication mechanism. Broadcasting retains the existing claviron_laravel_broadcast function and protocol behavior.

Ready-made application composition

Enable runner when the application wants lumenize::{Options, Runner} instead of composing its own Edge. The downstream application still owns its main.rs. See the Runner guide for socket/Orbit ingress, routing and workers.

lumenize = { version = "0.2", features = ["runner", "cli", "axum"] }

runner and cli are independent. cli alone provides lumenize::cli::run() for Artisan without a server or supervisor; runner + cli also enables Options::from_args(). Neither is enabled by default. The separate executable package selects only cli and does not own the reusable Runner API.

License

MIT. This independent project is not affiliated with or endorsed by Laravel or its official components.

In PHP application mode, a Link receiver runs as many exchanges as php.application.instances. Declare its waiting capacity with orbit.link.max_queued (zero disables waiting). For socket-only applications, php.application.max_queued configures the engine's queue.