OJ: a Rust-native build tool for React apps that trades Vite's plugin surface for memory
An experimental Rust-native build tool for React apps.
At a glance
- What is it?
- OJ is an experimental Rust build tool from Lovable Labs that runs production React and TanStack Start apps without source changes. It wins on cold start and server memory, and it is honest about where it does not win.
- Who is it for?
- Adopt OJ if you run many React builds in CI, containers or multi-tenant agents and server memory is the line item you are actually paying for; the README's own numbers put oj --bundle at 43-115MB RSS against 361MB-1.75GB for Vite. Do not adopt it if your app depends on a deep Vite plugin ecosystem, since plugins only run through the persistent Node plugin host or through an existing vite.config.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.
Star history
- lovablelabs/oj645 ★ · +251
| Repository | 2026-09-17 | 2026-11-24 |
|---|---|---|
| lovablelabs/oj | 394 | 645 |
251 Stars in the last 68 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What OJ is for: many React builds, one small server
OJ is a Rust-native build tool for React apps, published as the oj CLI on crates.io under MIT. The README frames the target narrowly: it optimizes for memory and cold start, where running many builds (CI, agents, multi-tenant) under Vite gets expensive. That is a different goal from "make my dev server nicer". It is the goal of someone running ten preview environments, or an agent that boots a build per request, or a CI fleet where each job pays for a Node process that grows to hundreds of megabytes.
The README claims OJ is meant to run real production React apps without changes to their source. That claim is the interesting one, because the usual way to get a faster React dev server is to change how the app is written. OJ instead ships its own compiler pipeline (based on oxc_transformer, per the reference reading section) and its own dev server, and points them at an app that was written for Vite.
How OJ works: an oxc compiler, a module graph, and a Node plugin host
The repository is a Cargo workspace with nine crates: oj_compiler, oj_css, oj_env, oj_config, oj_resolver, oj_graph, oj_cache, oj_server and the oj CLI itself. That split tells you where the work happens. Parsing and transformation live in oj_compiler on top of oxc (the workspace pins oxc_parser, oxc_transformer, oxc_minifier and friends at 0.146.0). Module resolution is oj_resolver, backed by oxc_resolver 11.24.2. The module graph and its cache are separate crates, and oj_server is the axum-based dev server (axum 0.8.9 with the ws feature, tokio with full features, notify for file watching).
JavaScript plugins cannot run inside a Rust process, so OJ keeps a persistent Node plugin host. You either drop an oj.plugins.mjs at the app root that default-exports a plugin array, or let oj read the app's vite.config.{ts,js,mjs} and pick up its plugins array directly. A TypeScript config, including one that imports local .ts files, is loaded through Vite's own config loader when Vite is installed, or bundled with the app's esbuild otherwise. From a vite.config, oj also adopts base, server.port and host, define, and resolve.alias for any field its own config leaves unset, with alias entries resolving alongside tsconfig paths in both dev and build.
Server rendering has its own mechanism. In dev, server modules run in a small persistent Node process that uses vm.SourceTextModule and re-evaluates only what changed, instead of rebuilding a bundle per request. HTML streams out through renderToReadableStream rather than buffering, and the client hydrates through the normal dev pipeline so Fast Refresh and HMR keep working over a server-rendered page.
Installing oj and running it against a React app
The README's quickstart is three lines. Install the CLI from crates.io, then run oj in any app. The dev server listens on :5199 by default and the production build goes into ./dist.
cargo install oj # install the `oj` CLI
oj dev # dev server for the current app on :5199
oj build # production build into ./distIf you are working from a checkout of the repository rather than crates.io, the Misc section gives the equivalent cargo run invocations. The dev server for the ./playground app is the default target here, and --bundle switches to what the README calls registry-runtime bundle mode.
cargo run -p oj -- dev # dev server for ./playground on :5199
cargo run -p oj -- dev --bundle # registry-runtime bundle mode
cargo run -p oj -- dev --ssr src/entry-server.tsx # streaming SSR + hydration
cargo run -p oj -- build playground # production build into playground/distFor a TanStack Start app, point oj at the app directory instead of the current directory. The README's example uses a ./web folder, and states that OJ detects Start from the app itself, so no source changes are needed. Dev serves file-based routes with streaming SSR and client hydration, and applies the app's vite.config plugins. Build emits a Node server.mjs, a Cloudflare worker.mjs with nodejs_compat, content-hashed client assets, and prerendered routes.
oj dev web # dev server for the ./web Start app
oj build web # production buildOne thing to verify before you trust the default: the README does not document a rollback path or a way to make oj build emit something other than ./dist, so plan around the documented output location rather than assuming a flag exists.
The memory gap is the real claim, and it is measured against Vite's own experimental mode
The README's benchmark section is unusually specific and worth reading as written rather than as a headline. The setup: generated fanout-10 React component trees, save-to-paint measured with Playwright against Vite 8.2.1 (Rolldown-based) on an M-series Mac, in both Vite's default dev mode and its experimental bundled dev mode, p50/p95 over 5 cold plus warm restart cycles and 10 HMR edits. At 10,000 components, oj --bundle is listed at 1315/1333ms cold start, 232/237ms reload and 115MB server RSS, against Vite at 5693/6085ms cold start, 1781/1820ms reload and 1552MB RSS, and vite-fbm at 1528/2225ms cold start and 1751MB RSS.
The README's own summary is careful in a way that is worth copying: bundle-mode oj wins cold start, warm start and reload against Vite's default dev at every size, and also beats Vite's experimental bundled dev on those three. HMR is a wash across all four tools, within roughly 10ms. Production builds land at parity because both use Rolldown, with byte-identical output sizes.
Read that carefully before you repeat it. HMR is not faster. Production output is not smaller. The win is startup and reload time plus resident memory, and the memory gap (43-115MB against 361MB-1.75GB in the tables) widens as the app grows. If your bottleneck is something else, these numbers do not help you.
Where OJ is the wrong tool
The plugin story is the first constraint. Vite and Rollup-style plugins run through a persistent Node plugin host, which means every plugin you depend on still executes in Node. OJ's Rust pipeline speeds up the parts it owns, not the parts your plugins own. An app whose build is mostly custom Rollup plugin work will see much less of the documented gain.
Second, the project describes itself as experimental, and the version in the workspace manifest is 0.1.24. The README does not document rollback, a migration path off OJ, or what happens to apps that rely on Vite behaviours OJ does not adopt. Only base, server.port and host, define, and resolve.alias are listed as fields adopted from a vite.config, and only for fields OJ's own config leaves unset. Anything else in your Vite config is not described as carried over.
Third, the plugin host is Node. If your reason for wanting a Rust build tool is removing Node from the CI image entirely, OJ does not do that. It removes Node from the hot compile path; the plugin host and, in dev SSR, the module runner are still Node processes. The README also does not state platform support beyond the M-series Mac used for benchmarks, so treat other architectures as unverified.
OJ compared with Vite and with Vite's bundled dev mode
The closest alternative is the tool OJ benchmarks against: Vite 8.2.1, including its experimental bundled dev mode. The difference in approach is where the work happens. Vite's dev server serves modules largely unbundled by default, which is why its reload numbers grow with component count; vite-fbm bundles in dev to cut that, and lands much closer to oj --bundle on cold start while staying in the same memory range as Vite (976MB at 5,000 components, 1751MB at 10,000, per the README's tables).
OJ's approach is a Rust module graph and compiler with a Node plugin host bolted on for compatibility. That is why the memory numbers separate: the graph, resolver and cache live in Rust, so the resident set stays at 43-115MB across the benchmark sizes. The trade is that you inherit OJ's compatibility surface, not Vite's. If you are already on vite-fbm and your problem is cold start rather than memory, the README's tables put the two within a few hundred milliseconds at 5,000 components, and the migration may not be worth it.
Licence, maintenance and what an upgrade costs you
OJ is MIT-licensed, both in the repository metadata and in the Cargo.toml workspace.package section. MIT is permissive: you can ship it inside a commercial product, and the obligations are attribution and including the licence text. That is a statement about the licence file, not legal advice; if your organisation has a policy on build-tool dependencies, run it past whoever owns that policy.
On maintenance, the last push to the default branch was on 2026-09-16, and the repository is not archived. The workspace version is 0.1.24, and the README does not describe a stable API or a deprecation policy. Practically, that means upgrading OJ is an upgrade of a 0.x tool whose config surface is documented as a subset of Vite's. The upgrade cost that matters most is the compatibility surface: each new OJ release can change how much of a vite.config it adopts, and your plugins live in a Node host whose behaviour is described only at a high level. Pin the version in CI and read CHANGELOG.md before bumping.
Editorial conclusion
Adopt OJ if you run many React builds in CI, containers or multi-tenant agents and server memory is the line item you are actually paying for; the README's own numbers put oj --bundle at 43-115MB RSS against 361MB-1.75GB for Vite. Do not adopt it if your app depends on a deep Vite plugin ecosystem, since plugins only run through the persistent Node plugin host or through an existing vite.config. Before committing, verify that your own app builds unchanged, that your plugins load through oj.plugins.mjs or vite.config, and that the SSR path you need (oj dev --ssr or oj build --ssr) matches the entry file you actually have.
Frequently asked questions
What is OJ and who is it for?
OJ is a Rust-native build tool for React apps, distributed as the oj CLI and licensed MIT. The README says it optimizes for memory and cold start where running many builds, such as CI, agents or multi-tenant setups, gets expensive under Vite, and that it is meant to run real production React apps without source changes.
How do I install OJ?
The README's quickstart installs the CLI from crates.io with cargo install oj, then runs oj dev for a dev server on port 5199 or oj build for a production build into ./dist. From a repository checkout, the Misc section uses cargo run -p oj -- dev and cargo run -p oj -- build playground.
Does OJ work with TanStack Start?
Yes, according to the README. Pointing oj at a TanStack Start app runs the framework directly with no source changes; oj dev web serves file-based routes with streaming SSR and client hydration, and oj build web emits a Node server.mjs, a Cloudflare worker.mjs with nodejs_compat, content-hashed client assets and prerendered routes.
Can OJ use my existing Vite plugins and config?
Vite and Rollup-style plugins run through a persistent Node plugin host, either from an oj.plugins.mjs file at the app root or from the plugins array in an existing vite.config. From that config OJ also adopts base, server.port and host, define, and resolve.alias for fields its own config leaves unset.
Official sources
Where developers are discussing it
Posts on Hacker News, dev.to and Lobsters that link to this repository, found by our scan of those communities. 0 in the last 30 days; newest first.
- Show HN: OJ – A drop-in replacement for Vite in RustHacker News · Sep 17, 2026 · 18 points · 1 comments
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/lovablelabs-oj)Star history chart for your README
[](https://hysenlabs.com/projects/lovablelabs-oj)Was this useful?