longbridge / nsh
git clone https://github.com/longbridge/nsh.git
v0.1.1 · 2d ago
NSH runs modules written in TSX — natively on iOS, Android, macOS, Windows, Linux, GPUI and the web
—
stars, 24h
+471
stars, 7 days · #129
+471
stars, 30 days · #590
471
★ total · +471% this week
27
forks · 17 open issues
Star history starts 2026-10-20; the chart appears after the second daily snapshot.
LanguageRust
License—
Created2026-10-14 (6d ago)
Last pushtoday
Watchers2
OwnerOrganization
GitHub topics
Links
- GitHub: github.com/longbridge/nsh
- Homepage: https://nsh.dev
- Releases · Issues · Hacker News mentions
README excerpt
# Native Shell (NSH) **Native UI in Rust and TSX, embedded in your app or shipped on its own.** Native Shell is a Rust engine for cross-platform apps and AI-generated UI. Write your app in Rust, use TSX for dynamically delivered screens, or combine both with shared Rust components. Each platform renders with its own UI: native views on iOS, Android, macOS, Windows and Linux, GPUI in GPUI apps and HTML on the web. Embed NSH in an existing app or package it as a standalone app. Hosts can load TSX modules at run time as plugins, delivered as signed packages and run in a sandbox the host configures. Documentation, guides and live demos: **nsh.dev**. ## Features - Write apps in Rust, TSX, or both, and render with each platform's own UI, sharing the same reactive engine, flexbox and grid layout, system text, input and accessibility. - Give your app its own look: NSH provides the primitives, Tailwind classes, a theme and an unstyled UI foundation (`nsh/base`: navigation, safe areas, dialogs, the keyboard, the status bar), and your app draws its components from them in TSX or Rust. - Embed in existing native apps alongside components such as maps and web views, or package as standalone apps and static websites. - Deliver TSX screens at run time with signed packages and host-controlled sandbox capabilities. - Build AI-generated screens with TSX and Tailwind, generated TypeScript declarations and model-readable documentation. - Iterate with TSX hot updates, headless tracing and a single Rust-built `nsh` CLI for building and packaging. ### Platforms | Platform | Drawn with | Embed with | Requires | |---|---|---|---| | iOS | UIKit, CoreText | `NshAppView` (Swift, `NativeShell.xcframework`) | iOS 15+ | | Android | Android views, `StaticLayout` | `NshView` (Java / Kotlin, `nsh.aar`) | Android 9 (API 28)+ | | macOS | AppKit, Core Animation, CoreText | `AppView` (Rust, `nsh-platform-macos`) | macOS 14+ | | Windows | Win32, Direct2D, DirectWrite | `AppView` (Rust, `nsh-platform-windows`) | Windows 10 1809+ | | Linux | GTK 4, Pango | `AppView` (Rust, `nsh-platform-linux`) | GTK 4.14+ | | GPUI (macOS, Windows, Linux) | GPUI (GPUI Fast) | `AppView` (Rust, a GPUI view, `nsh-platform-gpui`) | macOS, Windows; Linux with Vulkan | | Web | HTML, CSS | `createPlayer` (JavaScript) or an iframe | Modern browsers | Each desktop runs and packages apps with its own backend (AppKit, Win32, GTK 4). The GPUI backend draws with GPUI on all three desktops and embeds NSH in GPUI and GPUI Kit apps; `nsh run --target gpui` shows an app as they do. The web platform (`nsh run --target web`, `nsh package --target web`) publishes apps as static sites and runs the website's live demos. ## Quick start Install the `nsh` command (other ways): macOS / Linux [code] Build and install the latest `main` from source (Git, Rust and the platform build dependencies required): [code] Re-run to update. The checkout stays in `~/.nsh/source` for runtime builds. Homebrew [code] Windows (Powe