https://codewiki.google/github.com/samoylenkodmitry/rs-compose
WIP.webm
Compose-RS is a Jetpack Compose–inspired declarative UI framework. The repository accompanies the architectural proposal documented in docs/ARCHITECTURE.md and provides crate scaffolding for the core runtime, procedural macros, UI primitives, and example applications.
The demo showcases the full RS-Compose framework running in the browser via WebAssembly and WebGL2.
Run the interactive desktop example:
cargo run --bin desktop-appBuild and run the Android demo app:
-
Install prerequisites:
cargo install cargo-ndk rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
-
Set environment variables:
export ANDROID_HOME=$HOME/Android/Sdk export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/26.1.10909125
-
Build and install:
cd apps/android-demo/android ./gradlew installDebug
For detailed Android build instructions, see apps/android-demo/README.md.
Build and run the demo in your browser using WebGL2:
-
Install prerequisites:
rustup target add wasm32-unknown-unknown cargo install wasm-pack
-
Build and run:
cd apps/desktop-demo ./build-web.sh python3 -m http.server 8080 -
Open http://localhost:8080 in any modern browser (Chrome, Firefox, Edge, Safari)
For detailed web build instructions, see apps/desktop-demo/README.md.
use compose_app::AppLauncher;
fn main() {
let _ = env_logger::try_init();
AppLauncher::new()
.with_title("My Compose App")
.with_size(800, 600)
.run(my_app);
}
#[composable]
fn my_app() {
Text("Hello, Compose!");
}use compose_app::AppLauncher;
#[no_mangle]
fn android_main(app: android_activity::AndroidApp) {
AppLauncher::new()
.with_title("My Compose App")
.run(app, my_app);
}
#[composable]
fn my_app() {
Text("Hello, Compose!");
}use compose_app::AppLauncher;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub async fn run_app() -> Result<(), JsValue> {
AppLauncher::new()
.with_title("My Compose App")
.with_size(800, 600)
.run_web("canvas-id", my_app)
.await
}
#[composable]
fn my_app() {
Text("Hello, Compose!");
}The desktop demo (apps/desktop-demo) demonstrates running the same codebase on all three platforms (Desktop, Android, and Web). See apps/desktop-demo/README.md for detailed build instructions for each platform.
See docs/ROADMAP.md for detailed progress tracking, implementation status, and upcoming milestones.
This repository is currently a design playground; issues and pull requests are welcome for discussions, experiments, and early prototypes that move the Jetpack Compose–style experience forward in Rust.
This project is available under the terms of the Apache License (Version 2.0). See LICENSE-APACHE for the full license text.