Livewire for Rust
Server-rendered reactive components for Laravel for Rust. This crate is
the server half of a port of Livewire 4.x, pinned to the upstream
commit e8ffabe; the browser runtime under js/ and dist/ is Livewire's own and is reused
unchanged.
The documentation site is at https://localdev.it/livewire-rust/, and its source is docs/. A deployed example plays
through every capability at https://livewire-rust-example.bruder.com.br/. What is tested is in STATUS.md; the release notes — features, known
shortcomings, the path to parity, and what differs from PHP by design — are in CHANGELOG.md.
Install
# with model references and pagination, plus one database driver:
The crate is livewire-rust; the library it provides is livewire, so the first line of a file
that uses it is use livewire::…. The manifest pins the framework at =0.2.0.
use ;
Register the components once, in the provider:
use LivewireServiceProvider;
configure.with_providers;
A page then renders it with {{ livewire("counter", {"count": 5}) }}, and the response carries the
styles and scripts. The runtime posts each interaction back to /livewire-<hash>/update, where the
server verifies the signed snapshot, runs the component, and answers with new markup and effects.
../laravel-rust is a working application with a counter component on /livewire/counter;
tests/livewire.rs there exercises every protocol path.
Features
database adds model synths, paginators, and persistent middleware, and needs a driver beside it:
database-sqlite, database-mysql, or database-postgres. The framework's database feature
alone leaves its connection enum empty, so enabling it without one cannot compile.
What works, and what does not
STATUS.md lists each area with the test or command that proves it, and each gap
without one. It is the only current list: this file does not duplicate it.
Development
&&
AGENTS.md records the conventions these gates enforce, and .github/workflows/ci.yml runs the same
checks for every push.
dist/ is committed, so an application that depends on this crate never runs Node.
License
MIT, as LICENSE.md records. The vendored runtime and the protocol it speaks are
Livewire's, copyright Caleb Porzio, under the same license.