Native UI from JSX + CSS

Write web code.
Ship native apps.

Morph compiles .mx files into lightweight native binaries with OpenGL rendering. No browser. No Electron. Under 1 MB.

A compiler, not an interpreter — Oxc + lightningcss → Tera C++ → native OpenGL binary.

$curl -fsSL https://morph.levizr.com/install.sh | sh
See the download page for more options →
Get Started
App.mx
import { CSS, morphState } from 'morph'
CSS.load("./style.css")
export const windowConfig = {
title: "Counter",
width: 400,
height: 300,
}
export default function App() {
const [count, setCount] = morphState(0);
return (
<body>
<div className="counter">
<div className="count">{count}</div>
<button onClick={() => setCount(count + 1)}>
Clicked {count} times
</button>
</div>
</body>
);
}
<0 MB
Binary size
0
Runtime deps
0+
Tailwind utils
0.0
OpenGL core

Rust 1.85+ · C++23 · Linux x64/arm64 · macOS arm64 · Windows x64

Why Morph

Everything you love about the web.
Everything you need for native.

Native Binaries

Compile to standalone native binaries under 1 MB. No browser runtime, no Electron, no WebView — just raw OpenGL.

Full CSS + Tailwind

Write styles with standard CSS or 500+ Tailwind utilities. Flexbox, animations, transforms, transitions — all supported.

Instant Hot Reload

Dev mode watches your files, recompiles only the logic, and hot-swaps it via dlopen. Window never restarts.

JSX + TypeScript

Build UIs with familiar JSX syntax and TypeScript logic. Your JS is translated to C++ at compile time.

C++ Interop

Import C++ functions directly into your JSX. Full access to native libraries with zero-cost FFI.

Dead Code Elimination

Feature-based tree-shaking at compile time. Only link what you use — text, flex, animation, transforms.

Under the Hood

From JSX to native.
No runtime required.

.mx Files

JSX + TypeScript + CSS

Parse

Tree-sitter AST

Style

CSS + Tailwind resolve

Layout

Box model + Flexbox

Codegen

C++ via Jinja2

Binary

Native OpenGL app

Dev Mode

File changes trigger incremental recompilation. The IR is sent over a Unix socket to a pre-compiled dev runtime. Only the logic shared library is recompiled and hot-swapped via dlopen — signals and effects are re-wired in place.

morph dev

Build Mode

Full compilation to a standalone native binary. TypeScript is translated to C++ via tree-sitter. Jinja2 templates emit optimized C++ code with feature-based dead code elimination. Optional UPX compression.

morph build --static --upx
Code Examples

Familiar syntax.
Native power.

import { CSS, morphState } from 'morph'
CSS.load("style.css")
export const windowConfig = {
title: "Counter",
width: 400,
height: 300,
}
export default function App() {
const [count, setCount] = morphState(0);
return (
<body>
<div className="counter">
<div className="count">{count}</div>
<div className="actions">
<button
className="btn btn-primary"
onClick={() => setCount(count + 1)}
>
+1
</button>
<button
className="btn btn-secondary"
onClick={() => setCount(0)}
>
Reset
</button>
</div>
</div>
</body>
);
}

CLI

One CLI to rule them all.

From scaffolding to production builds, everything you need is one command away.

Terminal
$morph new my-app
Scaffold a new project
$morph install
Download the C++ runtime
$morph dev
Dev window with hot reload
$morph run
Build and run the binary
$morph build --static
Self-contained release binary

Full reference: morph check, update, cache and file morphing →

Open Source

Shape the future of
native UI development.

Morph is a Rust-based compiler and native UI framework in early development. Your contribution to the compiler, renderer, or docs directly shapes what developers will use.

The Rust Compiler

Work on morphc — the morph CLI (new, dev, build, run, check, doctor). Parsing, IR, codegen, and build system all need contributors right now.

TS → C++ Translator

Work on morpher — intent-based codegen that turns everyday JavaScript into native C++. Escape analysis, native types, broader builtin coverage.

Parser, IR & Cache

Oxc JSX/TSX parsing, lightningcss + Tailwind resolution, the typed IR, and the global cache under ~/.morph/cache.

Layout & Rendering

Help build the OpenGL-based layout and rendering pipeline in C++. Flexbox, text shaping, animations — the works.

Bug Fixes & Testing

Morph is honest about being buggy. Find and squash bugs, or confirm reported ones — a found bug is half-fixed.

Docs & Examples

Write tutorials, build example apps, expand the docs — help new developers get up to speed with the framework fast.

Learn How to Contribute

First-time contributor? Clone the repo, run cargo build --workspace, and find an issue to fix.

Want the internals first? Read the dev docs →

Ready to go native?

Install Morph, scaffold a project, and build your first native app in under a minute.

$curl -fsSL https://morph.levizr.com/install.sh | sh
See the download page for more options →