Comparison
OneJS uses Unity as a cross-platform runtime, giving you React development with GPU-accelerated rendering across desktop, mobile, web, consoles, and XR.
Bundle Sizes
OneJS bundle size varies by platform since it includes the Unity runtime:
| Platform | OneJS | Notes |
|---|---|---|
| WebGL | 3-5 MB | Browser handles JS execution |
| Android | ~35 MB | Includes IL2CPP runtime |
| iOS | ~40 MB | Similar to Android |
| Desktop | ~75 MB | Full standalone runtime |
Framework Comparison
| Electron | Tauri | Flutter | React Native | OneJS | |
|---|---|---|---|---|---|
| Bundle size | 100-150 MB | 3-10 MB | 5-40 MB | 4-25 MB | 3-75 MB |
| Rendering | CPU (Chromium) | System webview | Skia (GPU) | Native views | GPU (UI Toolkit) |
| Desktop | ✓ | ✓ | ✓ | Limited | ✓ |
| Mobile | ✗ | Beta | ✓ | ✓ | ✓ |
| Web | ✗ | ✗ | ✓ | ✗ | ✓ |
| Consoles | ✗ | ✗ | ✗ | ✗ | ✓ |
| VR/AR | ✗ | ✗ | ✗ | ✗ | ✓ |
| 3D support | WebGL only | WebGL only | Limited | Limited | Full engine |
| Language | JS/TS | JS/TS + Rust | Dart | JS/TS | JS/TS |
| Consistency | High | Varies | High | Varies | High |
When to Choose Each
Electron - Desktop-only apps where download size doesn't matter. Mature ecosystem.
Tauri - Smallest desktop bundles. Accept webview inconsistencies across platforms.
Flutter - Mobile-first apps. Willing to learn Dart.
React Native - Mobile apps with native UI components. Desktop is secondary.
OneJS - Cross-platform including consoles/XR. Need 3D capabilities. Want React with GPU rendering.
For Game Developers
Traditional game UI (C#/C++) means slow iteration and verbose code. OneJS brings:
Declarative components instead of imperative code:
// OneJS
function MainMenu() {
return <Button text="Play" onClick={handlePlay} />
}// Traditional C#
var button = new Button();
button.text = "Play";
button.clicked += OnPlayClicked;
container.Add(button);Hot reload - Change UI without recompiling or restarting play mode.
Modding - Players can modify JavaScript UI without touching compiled code.
Web developer onboarding - React developers contribute immediately.
Technical Details
JavaScript Engine
- Native platforms: QuickJS interpreter (works on iOS/consoles where JIT is prohibited)
- WebGL: Browser's V8/SpiderMonkey with full JIT optimization
UI Toolkit
Unity's retained-mode UI system with flexbox layout, CSS-like styling, and GPU rendering. React's reconciler maps directly to UI Toolkit elements.
Getting Started
- Quick Start - Add OneJS to your project and build your first UI
- Architecture - Understand the internals