Skip to content
lab-002WIP

Elephc × Laravel

Laravel 13 compiled ahead of time into native Elephc binaries, with every PHP compatibility rewrite kept as a reviewable patch.

question
How much of a real framework survives native compilation?
stack
Elephc, Laravel 13, Blade, Vite
started
2026
status
WIP

Overview

An experimental port that turns a clean Composer installation of Laravel 13 into finite native Elephc binaries: one for the web, one for Artisan. Every rewrite the compiler still needs lives in a patch corpus that can be reviewed file by file.

The corpus shrinks as the compiler grows: retesting against Elephc main has already retired more than half of the original file-level patches. The web binary serves the real Laravel welcome page from a deterministic Blade and Vite snapshot; the Artisan binary implements list, --version and inspire.

These are narrow ahead-of-time profiles, not full Laravel compatibility and not a production-ready application. Framework internals stress the compiler (reflection, container bindings, dynamic class loading), and that is the point: finding out how far a real framework can go.

Highlights

  • Laravel 13 and its production packages pinned by composer.lock
  • Every compatibility rewrite kept as a reviewable patch
  • Separate native binaries for the web and for Artisan
  • Deterministic Blade and Vite snapshot, identical across clean builds
  • More than half of the original patches already retired by compiler progress