Skip to main content
Native Shell (nsh)

Native Shell (nsh) - A Rust-First UI Framework That Renders Natively on Six Platforms

RustCross-platformUI FrameworkNative AppsAI Coding

Native Shell (nsh) is an open-source Rust-first native UI framework from Longbridge. Write one app for iOS, Android, macOS, Windows, Linux and the web, with each platform's own native views, text input and interaction conventions, plus a toolchain built for AI agents.

★ 9 Last Updated: 2026-11-05 nsh.dev
Visit Website

Detailed Introduction

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 via window(). 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/base ships 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

  1. Visit https://nsh.dev/ for the framework's positioning and platform backend matrix.
  2. Follow https://nsh.dev/docs/getting-started to set up the toolchain.
  3. Initialize with nsh init my-app --template rust (or --template ts), preview with nsh run, test across targets with nsh test, and produce installers or a static site with nsh package.

Note the minimum platform versions: iOS 15+, Android API 28+, macOS 14+, Windows 10 1809+, and Linux GTK 4.14+.

Jules - Google's AI Coding Assistant for Automating Development Tasks

Jules is Google's AI-powered coding assistant designed to automate routine development tasks such as bug fixes and version updates. Integrated with GitHub and powered by Gemini 2.5 Pro, Jules operates asynchronously to enhance developer productivity

aiagentgoogle

Open Lovable – Open Source AI-Powered Website-to-React Converter

Open Lovable is an open-source project by Mendable AI that lets developers clone any website and convert it into a React app using AI, powered by Firecrawl, Groq/Moonshot AI, and E2B sandbox. Free, self-hosted, and privacy-friendly.

open lovableopen-lovablewebsite to React

Kiro – Agentic AI‑powered IDE for Spec‑Driven Development

Kiro is an agentic AI-powered IDE from AWS that uses spec-driven workflows, agent hooks, multimodal context, and transparent diffs to help developers move from prototype to production efficiently. Preview is now available.

AI IDEaiIDE

Lingma by Alibaba Cloud – AI-Powered Coding with IDE and Plugin Support

Lingma is an AI-powered coding assistant developed by Alibaba Cloud. It supports both plugin-based integration with VS Code/JetBrains and a newly launched standalone IDE for Windows and macOS. With intelligent code generation, error debugging, cross-file refactoring, and enterprise-level deployment, Lingma helps developers write better code faster—especially in Chinese-language development environments.

aifreealibaba

OpenRouter - A unified interface for LLMs

OpenRouter is a unified interface that provides access to a wide range of large language models (LLMs) from various providers, including both proprietary and open-source models. It offers better prices, improved uptime, and does not require a subscription.

ai

OpenAI Platform

Playground is an online interactive tool provided by OpenAI for testing and exploring the capabilities of its language models (such as GPT-3.5, GPT-4, GPT-4o). It is particularly suitable for developers, content creators, product managers, and anyone who wishes to interact with AI models without writing code.

aideveloper