Repolode
longbridge

longbridge/nsh

A Rust engine for native cross-platform UI, letting you write apps in Rust or TSX and render with each platform's own widgets.

Stars
518
Forks
31
Open issues
20
Last commit
2 hours ago

What is it?

NSH (Native Shell) is a Rust engine for building cross-platform apps and AI-generated UI. You can write an app in Rust, in TSX, or mix the two with shared components. Each platform renders with its own UI toolkit: UIKit on iOS, Android views, AppKit on macOS, Win32 and Direct2D on Windows, GTK 4 on Linux, GPUI for GPUI apps, and HTML on the web.

NSH can be embedded in an existing native app alongside components such as maps and web views, or packaged as a standalone app or static website. Hosts can also load TSX modules at run time as plugins, delivered as signed packages and run in a sandbox whose capabilities the host configures.

The project provides a reactive engine, flexbox and grid layout, a base layer of unstyled UI components, Tailwind-style classes, and a single `nsh` CLI for creating, running and packaging apps. TSX projects support hot updates that preserve state.

Key features

  • 01Write apps in Rust, TSX, or both, sharing one reactive engine and layout system.
  • 02Renders with each platform's native UI on iOS, Android, macOS, Windows, Linux, GPUI and the web.
  • 03Embeds in existing native apps or ships as standalone apps and static websites.
  • 04Loads signed TSX modules at run time inside a host-configured sandbox.
  • 05Provides an unstyled base component layer and Tailwind-style classes for custom design.
  • 06Offers TSX hot updates and a single `nsh` CLI for building and packaging.

Use cases

  • Adding a native-looking screen or plugin to an existing iOS or Android app without rewriting it.
  • Shipping one app codebase that runs with native widgets on several desktop and mobile platforms.
  • Delivering UI updates to a running app as signed TSX packages.
  • Generating and running AI-produced screens with TSX and Tailwind classes.

Quick start

  1. 1

    Install nsh with Homebrew

    brew install longbridge/tap/nsh
  2. 2

    Create a TSX app

    nsh init my-app --template ts
  3. 3

    Run the app on macOS

    nsh run my-app --target macos

Things to know

  • The project is at an early 0.1.x version, so breaking changes are possible.
  • iOS, Android and other targets need extra toolchains such as Xcode or the Android SDK.

Topics

FAQ

What is nsh?
A Rust engine for native cross-platform UI, letting you write apps in Rust or TSX and render with each platform's own widgets. NSH (Native Shell) is a Rust engine for building cross-platform apps and AI-generated UI. You can write an app in Rust, in TSX, or mix the two with shared components. Each platform renders with its own UI toolkit: UIKit on iOS, Android views, AppKit on macOS, Win32 and Direct2D on Windows, GTK 4 on Linux, GPUI for GPUI apps, and HTML on the web.
Is nsh free to use? What license does it have?
nsh is open source under the Other license. Check the license terms before using it in commercial products.
Is nsh still maintained?
Actively maintained. The last commit to nsh was on Oct 21, 2026.
What can I use nsh for?
Adding a native-looking screen or plugin to an existing iOS or Android app without rewriting it. Shipping one app codebase that runs with native widgets on several desktop and mobile platforms. Delivering UI updates to a running app as signed TSX packages. Generating and running AI-produced screens with TSX and Tailwind classes.
How do I install nsh?
Install nsh with Homebrew: brew install longbridge/tap/nsh Create a TSX app: nsh init my-app --template ts Run the app on macOS: nsh run my-app --target macos
Where can I get nsh?
The source code and installation instructions are on GitHub: https://github.com/longbridge/nsh

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects