Lovable rewrites Vite in Rust – Reduces memory usage by 10x
12 hours ago
- OJ is a Rust-based developer server that replaces Vite to run apps instantly with hot reloading.
- Vite's design for one developer at a time becomes inefficient at scale, leading to slow cold starts and high memory usage in previews.
- OJ reimplements Vite's functionality in Rust, reading existing configs and plugins via a compatibility bridge, without a JavaScript runtime.
- It is built for agent editing, coalescing bursts of edits into single consistent updates.
- Benchmarks show OJ is ~4x faster in cold starts and uses a fraction of Vite's memory (hundreds of MB vs gigabytes).
- Real apps like Excalidraw and Twenty run unchanged on OJ, though Vite's numbers include a type-checker OJ doesn't support yet.
- Production tests on Lovable previews show total load time halved and sandbox acquisition nearly 5x faster.
- Builders need no action; OJ is rolled out gradually to ensure compatibility, and it's now open source on Lovable's GitHub.