
Instant runtime rendering Jetpack Compose source without compilation — parses and interprets code live, binds to real Compose APIs, enabling millisecond previews, editable snippets, IDE and CLI integration.
An instant runtime for Jetpack Compose code. No compiler, no build, no waiting.
Write Compose code, see it render in milliseconds, on Android, iOS, desktop and the web.
Jetpack Compose is a joy to write and a pain to iterate on. Every change, even a padding value, has to go through the full toolchain before you see a single pixel:
On a device: edit ─▶ compile (Kotlin + Compose compiler plugin) ─▶ dex ─▶ package APK ─▶ install ─▶ run ─▶ see it
In a preview: edit ─▶ compile (Kotlin + Compose compiler plugin) ─▶ render in a JVM ─▶ see it
Hot reload tools shorten the loop by skipping the restart, but not the compiler:
Hot reload: edit ─▶ compile the changed code ─▶ swap the new classes into the running app ─▶ recompose ─▶ see it
Previews, Live Edit and Compose Hot Reload all still need a compiler, a build and a JVM or device behind them. None of them can run inside a web page, a documentation site or a lightweight editor.
Fast Compose skips the compiler entirely. It reads Compose source code like a browser reads HTML:
flowchart LR
A["Kotlin source<br/>(a String)"] --> B["Parser<br/>pure Kotlin"]
B --> C["Syntax tree"]
C --> D["Interpreter<br/>runs inside composition"]
D --> E["Bindings<br/>Text, Column, Button, …"]
D --> G["Library code<br/>JVM, through reflection"]
E --> F["Real Jetpack Compose<br/>real pixels"]
G --> Fremember, state,
recomposition, effects and coroutines are the real Compose runtime, not a simulation.Text(...) or Modifier.padding(...), a binding calls the real Compose API with
the evaluated arguments. What you see is exactly what Compose draws.There is no code generation, no bytecode and no server. Edits re-render after a 150 ms typing pause; parsing runs in the background, and only the changed program is interpreted again.
See docs/PERFORMANCE.md for measured speed, recomposition and the time limit.
dependencies {
implementation("io.github.fast-compose:fast-compose:x.y.z")
}Replace x.y.z with the latest version, shown above.
Pass Compose code as text, and every @Preview in it is rendered:
@Composable
fun App() {
val code = rememberComposeCode("""
@Preview
@Composable
fun Hello() {
Text("Hello, Fast Compose!")
}
""".trimIndent())
FastComposePreview(code)
}See docs/LIBRARY.md for every composable and option: FastComposePreview,
BasicComposePreview, FastComposeContent, FastComposeLogs, registries and your own components, resources,
network images and multiple files.
Fast Compose Playground runs composables on the web, desktop and mobile. Write Compose, see it live: no install, no compile server, no waiting.
Plugins for Android Studio and IntelliJ IDEA and
VS Code render @Preview functions as you type, with no Kotlin
compiler, no Compose compiler plugin and no JVM preview process.
compose-script embeds live, editable Compose snippets in any static page: documentation, blogs, tutorials and design system catalogs.
Add one script to the page:
<script src="https://cdn.jsdelivr.net/npm/@fast-compose/compose-script/compose-script.js"></script>Then write Compose anywhere in the page:
<script type="text/compose-content">
Column {
Text("Hello from Compose!")
Button(onClick = {}) {
Text("Click me")
}
}
</script>Fast Compose CLI checks and renders @Preview functions from the
terminal, in CI, or as an MCP server that AI agents call while they write UI code. No Gradle, no compiler, no Android
Studio.
fast-compose check -r app/src
fast-compose render HomeScreen.kt --dark --size tablet -o previewsAdd it to an AI agent, such as Claude Code:
claude mcp add --scope user fast-compose -- fast-compose mcpDownload it for Windows, macOS or Linux from the releases; it includes its own Java runtime.
Fast Compose is published as one artifact, io.github.fast-compose:fast-compose, for Android, iOS, JVM, JS and Wasm.
Its sources in fast-compose are grouped by package, in layers:
flowchart BT
parser --> interpreter
interpreter --> bindings
bindings --> uiPackage ma7moud3ly.fast.compose.*
|
Contents |
|---|---|
parser |
Kotlin lexer and parser: source code to syntax tree |
interpreter |
Runs the syntax tree inside composition; Registry, BindingPack, multi-file loading, ExternalResolver
|
interpreter.jvm |
JVM only: JarResolver, running library code and composables through reflection; GradleJars
|
project |
For hosts: project files (ProjectFiles, DiskFiles), KotlinSources, FolderSources, GradleLayout
|
bindings.foundation |
Layouts, text, state, modifiers, drawing, effects, gestures, animation |
bindings.material3 |
Material 3 components, theming and defaults |
bindings.icons |
Material icons (Icons.Default.*, Icons.Filled.*, Icons.Outlined.*, Icons.AutoMirrored.*) |
bindings.resources |
R/Res, painterResource, stringResource, colorResource, resource providers |
bindings.coil |
Network images: Coil AsyncImage and rememberAsyncImagePainter
|
ui |
FastComposePreview, BasicComposePreview, FastComposeContent, FastComposeLogs, presets |
Not published: binding-check checks every binding against the AndroidX API files and measures
coverage, and app is the demo app.
See docs/BUILDING.md for requirements, running the demo app, tests, benchmarks and releases.
| Document | About |
|---|---|
| docs/LIBRARY.md | Every composable and option of the library, and library code on the JVM |
| docs/BINDINGS.md | Writing bindings and packs, network images, the binding check |
| docs/RESOURCES.md | Images and strings from R/Res, and where their files come from |
| docs/MULTIPLE_FILES.md | Previews that use other files of a project |
| docs/PERFORMANCE.md | Interpreter speed, recomposition, time limit and benchmarks |
| docs/COVERAGE.md | What it can run, limitations and Compose API coverage |
| docs/BUILDING.md | Building, testing, benchmarks and releases |
Fast Compose is licensed under the Apache License 2.0.
An instant runtime for Jetpack Compose code. No compiler, no build, no waiting.
Write Compose code, see it render in milliseconds, on Android, iOS, desktop and the web.
Jetpack Compose is a joy to write and a pain to iterate on. Every change, even a padding value, has to go through the full toolchain before you see a single pixel:
On a device: edit ─▶ compile (Kotlin + Compose compiler plugin) ─▶ dex ─▶ package APK ─▶ install ─▶ run ─▶ see it
In a preview: edit ─▶ compile (Kotlin + Compose compiler plugin) ─▶ render in a JVM ─▶ see it
Hot reload tools shorten the loop by skipping the restart, but not the compiler:
Hot reload: edit ─▶ compile the changed code ─▶ swap the new classes into the running app ─▶ recompose ─▶ see it
Previews, Live Edit and Compose Hot Reload all still need a compiler, a build and a JVM or device behind them. None of them can run inside a web page, a documentation site or a lightweight editor.
Fast Compose skips the compiler entirely. It reads Compose source code like a browser reads HTML:
flowchart LR
A["Kotlin source<br/>(a String)"] --> B["Parser<br/>pure Kotlin"]
B --> C["Syntax tree"]
C --> D["Interpreter<br/>runs inside composition"]
D --> E["Bindings<br/>Text, Column, Button, …"]
D --> G["Library code<br/>JVM, through reflection"]
E --> F["Real Jetpack Compose<br/>real pixels"]
G --> Fremember, state,
recomposition, effects and coroutines are the real Compose runtime, not a simulation.Text(...) or Modifier.padding(...), a binding calls the real Compose API with
the evaluated arguments. What you see is exactly what Compose draws.There is no code generation, no bytecode and no server. Edits re-render after a 150 ms typing pause; parsing runs in the background, and only the changed program is interpreted again.
See docs/PERFORMANCE.md for measured speed, recomposition and the time limit.
dependencies {
implementation("io.github.fast-compose:fast-compose:x.y.z")
}Replace x.y.z with the latest version, shown above.
Pass Compose code as text, and every @Preview in it is rendered:
@Composable
fun App() {
val code = rememberComposeCode("""
@Preview
@Composable
fun Hello() {
Text("Hello, Fast Compose!")
}
""".trimIndent())
FastComposePreview(code)
}See docs/LIBRARY.md for every composable and option: FastComposePreview,
BasicComposePreview, FastComposeContent, FastComposeLogs, registries and your own components, resources,
network images and multiple files.
Fast Compose Playground runs composables on the web, desktop and mobile. Write Compose, see it live: no install, no compile server, no waiting.
Plugins for Android Studio and IntelliJ IDEA and
VS Code render @Preview functions as you type, with no Kotlin
compiler, no Compose compiler plugin and no JVM preview process.
compose-script embeds live, editable Compose snippets in any static page: documentation, blogs, tutorials and design system catalogs.
Add one script to the page:
<script src="https://cdn.jsdelivr.net/npm/@fast-compose/compose-script/compose-script.js"></script>Then write Compose anywhere in the page:
<script type="text/compose-content">
Column {
Text("Hello from Compose!")
Button(onClick = {}) {
Text("Click me")
}
}
</script>Fast Compose CLI checks and renders @Preview functions from the
terminal, in CI, or as an MCP server that AI agents call while they write UI code. No Gradle, no compiler, no Android
Studio.
fast-compose check -r app/src
fast-compose render HomeScreen.kt --dark --size tablet -o previewsAdd it to an AI agent, such as Claude Code:
claude mcp add --scope user fast-compose -- fast-compose mcpDownload it for Windows, macOS or Linux from the releases; it includes its own Java runtime.
Fast Compose is published as one artifact, io.github.fast-compose:fast-compose, for Android, iOS, JVM, JS and Wasm.
Its sources in fast-compose are grouped by package, in layers:
flowchart BT
parser --> interpreter
interpreter --> bindings
bindings --> uiPackage ma7moud3ly.fast.compose.*
|
Contents |
|---|---|
parser |
Kotlin lexer and parser: source code to syntax tree |
interpreter |
Runs the syntax tree inside composition; Registry, BindingPack, multi-file loading, ExternalResolver
|
interpreter.jvm |
JVM only: JarResolver, running library code and composables through reflection; GradleJars
|
project |
For hosts: project files (ProjectFiles, DiskFiles), KotlinSources, FolderSources, GradleLayout
|
bindings.foundation |
Layouts, text, state, modifiers, drawing, effects, gestures, animation |
bindings.material3 |
Material 3 components, theming and defaults |
bindings.icons |
Material icons (Icons.Default.*, Icons.Filled.*, Icons.Outlined.*, Icons.AutoMirrored.*) |
bindings.resources |
R/Res, painterResource, stringResource, colorResource, resource providers |
bindings.coil |
Network images: Coil AsyncImage and rememberAsyncImagePainter
|
ui |
FastComposePreview, BasicComposePreview, FastComposeContent, FastComposeLogs, presets |
Not published: binding-check checks every binding against the AndroidX API files and measures
coverage, and app is the demo app.
See docs/BUILDING.md for requirements, running the demo app, tests, benchmarks and releases.
| Document | About |
|---|---|
| docs/LIBRARY.md | Every composable and option of the library, and library code on the JVM |
| docs/BINDINGS.md | Writing bindings and packs, network images, the binding check |
| docs/RESOURCES.md | Images and strings from R/Res, and where their files come from |
| docs/MULTIPLE_FILES.md | Previews that use other files of a project |
| docs/PERFORMANCE.md | Interpreter speed, recomposition, time limit and benchmarks |
| docs/COVERAGE.md | What it can run, limitations and Compose API coverage |
| docs/BUILDING.md | Building, testing, benchmarks and releases |
Fast Compose is licensed under the Apache License 2.0.