Skip to content

josephg/pachys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pachys

A multi-target reactive UI framework for Rust. Renders to web (HTML/DOM), macOS (AppKit), iOS (UIKit), and Linux (GTK4).

Forked from Leptos, adopting the generic Render<R: Renderer> design that lets a single view tree target any of the supported platforms.

use pachys::prelude::*;

fn main() {
    mount_to_window("Counter", (320.0, 200.0), || {
        let count = RwSignal::new(0);
        view! {
            <vstack padding=16.0 gap=12.0>
                <label>{move || format!("Count: {}", count.get())}</label>
                <hstack gap=8.0>
                    <button on:click=move |_| count.update(|n| *n -= 1)>"-1"</button>
                    <button on:click=move |_| count.set(0)>"Reset"</button>
                    <button on:click=move |_| count.update(|n| *n += 1)>"+1"</button>
                </hstack>
            </vstack>
        }
    });
}

The same view! macro and RwSignal reactive primitives work across all backends — pick a backend with pachys = { features = ["cocoa"] } (or uikit/gtk/web).

See CLAUDE.md for architecture, conventions, and the build matrix per backend.

Status

Working today: counter example builds end-to-end on all four backends. The Render<R> design is validated.

Not yet ported (greenfield-minimal scope; pulled in piece by piece as apps need them): full HTML/SVG/MathML element libraries on web, SSR + hydration, leptos_router, leptos_meta, server_fn, advanced components (Show/For/Suspense/ErrorBoundary/etc.), the typed-attribute system, bind: two-way bindings.

This is a fork in active early development. Expect API churn.

About

Leptos port with native app development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages