Skip to content

What is niso

Checked against ebe8d96 on 2026-11-10 by Capy (drift after the docs-site merge). The files it covers are unchanged since.

niso is a real DOM (HTML, CSS, selectors, layout, events) whose output is each platform’s native UI: SwiftUI on every Apple platform, Compose on Android, and iced on desktop Linux, with WinUI on Windows planned. Any language drives it through one API over node ids, generated from the DOM’s WebIDL: JavaScript pages through an embedded engine (QuickJS, Porffor) or through Node, Deno and Bun, and native code in Rust, C, Zig, Go or Java through the same calls.

Two kinds of apps follow from that:

  • Web apps. A Svelte or plain HTML page runs without a niso adapter, as far as niso implements the APIs it uses (Real apps tracks how far that is). Buttons, switches, sliders and text fields are the platform’s own controls, text uses the platform’s fonts and settings, and the page can publish home screen widgets, Live Activities and CarPlay screens from plain HTML.
  • Native apps. A Rust, C or Java program builds its UI with document.createElement and CSS, and gets the same native rendering and the same platform APIs (storage, fetch, timers) as a page. The timer app in examples/lang is the same app in five languages.

One known bug breaks Svelte 5 apps on QuickJS. Svelte keeps an element’s event handlers as properties on the element itself, and niso loses a property set on an element whose JavaScript wrapper was freed before the element was in the document. QuickJS frees a wrapper as soon as no script holds it, so in TodoMVC, edit and delete do nothing (Real apps). The getting-started page works because Svelte puts its elements in the document while it still holds them, and an element in the document keeps its properties. Node and Bun free wrappers later, so they pass.

The core is blitz’s DOM, used as a normal dependency, with Servo’s build of stylo for CSS. Firefox uses stylo too, but some CSS is built only into Firefox’s build (accent-color, the prefers-reduced-motion and prefers-contrast queries), so niso doesn’t have it (Differences). It uses Taffy for block, flex and grid layout and Parley for text. The core owns style, layout and event dispatch, and runs on the main thread next to the native toolkit.

Each frame, the core sends the host a render stream: what changed in the laid-out box tree, with glyph runs already shaped and positioned. The host keeps one native view per box and puts it exactly where the core says, so layout is niso’s on every platform. In the screen test cases (tests/screens/cases.txt), every element’s box is checked to be within a pixel of Chrome’s, apart from the known differences in tests/screens/expectations.json. Whole apps are further off: see Real apps for TodoMVC’s screenshots next to Chrome’s. The host sends input back (taps, keys, scrolls, control changes) through the C API. Scrolling is native; text is laid out by niso and drawn by the platform. See Hosts and Text.

  • Not a browser or a WebView. There’s no browser engine underneath, no navigation between documents, no tabs, no extensions, and no same-origin sandbox between a page and its app: a page has its host’s trust (Security). An app is a single-page app.
  • Not usable with a screen reader yet. There’s no accessibility tree: VoiceOver and TalkBack can’t read a niso page’s text, and a native button’s label isn’t exposed to them (Accessibility).
  • Not complete. niso implements a measured part of the web platform. The web platform support table says, per web feature, how much of its test suite passes, and many features have no number yet. Plan for gaps and check the features your app needs.
  • Not a component library. niso’s controls are the platform’s: a <button> is drawn as SwiftUI’s button on Apple platforms and as Material 3’s on Android, in the stock style unless the page restyles it within the control’s property set. There are no components that turn into something different per platform.
  • Not released. There are no packages yet: you build from a checkout with the repository’s scripts (Getting started).

niso compared puts it next to Electron, React Native and Flutter. The design is in Decisions; the repository’s layout is in The repository.