What Native Shell is
Native Shell (CLI name nsh) is an open-source, Rust-first native UI framework from the Longbridge team. Its promise is "build once, native everywhere": one set of components, state and business logic that compiles down to each platform's own UI foundation, rather than a custom-drawn engine or a WebView shell.
- Each backend uses the platform's own primitives: UIKit + CoreText on iOS, Android View + StaticLayout on Android, AppKit on macOS, Win32 + Direct2D / DirectWrite on Windows, GTK 4 + Pango on Linux, and plain HTML + CSS on the web. Text input, selection, input methods and accessibility all come from the system, so the app looks and behaves like a native one.
- Interaction matches the device: built-in Menu, ContextMenu and NavStack cover both desktop and phone idioms. The same Menu opens as a popup at its trigger with a pointer and as a sheet from the bottom on a phone; a ContextMenu opens on right click, or when a finger holds the trigger. The app writes the menu once.
- Layouts that reshape: Flexbox and Grid laid out by Taffy, with Tailwind breakpoints (
md:,lg:) and the window's size available in Rust viawindow(). A chat app can show sidebar, conversations and messages side by side in a wide window, and one screen at a time on a phone. - Retained views at 120 FPS: every element is a view the platform keeps. A change runs only the expressions that read the changed signal and sends only the touched views, in one batch per frame (MountBatch); everything else stays as it is, and native animations run without per-frame JS. Everyday screens sit near idle at rest, and scrolling holds 120 FPS on ProMotion displays.
- Behavior from NSH, the look from you:
nsh/baseships unstyled base components — navigation, dialogs, menus, popovers, tabs, checkboxes, sheets — that own state, focus, keyboard handling and accessibility. You style every part with Tailwind classes or typed styles. - Native components layer in: maps, web views, video players and any native view the host registers are just another subview in the same hierarchy, laid out with the rest of the app and clipping, scrolling and taking touches like any view (
nativeComponent).
One toolchain, for people and agents
A single nsh executable creates, builds, type-checks, runs with hot reload, tests, packages and signs apps for every target, with its own TSX bundler and TypeScript checker:
$ nsh init my-app --template rust
$ nsh run my-app --target macos
$ nsh test
$ nsh package my-app --target windows
# --template ts for TSX
# ios · android · macos · windows · linux · gpui · web
It is explicitly agent-friendly: every API has declarations generated from the Rust sources, and the docs are served as llms.txt, so an AI agent can run the whole loop — generate, run, test, fix, package — with the same commands.
Tested on every target
nsh test runs the app's tests headless, then runs the same tests inside macOS, Windows, Linux and GPUI windows, an iOS simulator, an Android device or a browser, using the platform's own input. Cross-platform behavior differences surface in CI instead of in user reports.
Extend the app after release
Embed an NshAppView (iOS), NshView (Android), AppView (desktop and GPUI apps) or createPlayer (a web page) on any screen, and load signed TSX modules into it at run time:
let app = NshAppView()
try app.grantCapabilities(grants)
let info = try await app
.loadPackage(at: file, trust: trust)
// verified, sandboxed, running
That means several modules on one screen, reuse of the host's own native components, and updates on your schedule. It also enables the pattern Native Shell emphasizes for AI: a model writes a module per request, your server checks and signs it, and the app shows it natively inside a sandbox — answering with an interface.
Who it is for
- Teams that want to write cross-platform apps in Rust without giving up native look, feel and accessibility.
- Small and mid-size products that need one codebase across mobile, desktop and web.
- Developers who want an AI agent to drive the build, test and packaging loop directly from the command line.
Getting started
- Visit https://nsh.dev/ for the framework's positioning and platform backend matrix.
- Follow https://nsh.dev/docs/getting-started to set up the toolchain.
- Initialize with
nsh init my-app --template rust(or--template ts), preview withnsh run, test across targets withnsh test, and produce installers or a static site withnsh package.
Note the minimum platform versions: iOS 15+, Android API 28+, macOS 14+, Windows 10 1809+, and Linux GTK 4.14+.