miso-lynx is maintained in a separate repository from the miso core: github.com/haskell-miso/miso-lynx. The miso core package does not need to change to support mobile targets.Supported platforms
iOS
Native iOS applications via LynxJS.
Android
Native Android applications via LynxJS.
HarmonyOS
Huawei HarmonyOS device support.
What is LynxJS?
LynxJS is a cross-platform rendering engine that allows JavaScript/Haskell logic to drive native UI components on iOS, Android, and HarmonyOS. Instead of a browser DOM, LynxJS provides a native rendering pipeline that maps declarative view trees to platform widgets. Miso’s virtual DOM abstraction maps cleanly onto LynxJS’s component model: the sameview function and update loop you write for the web can be reused for mobile with a different renderer underneath.
Architecture
Miso’s rendering is decoupled from any specific DOM implementation through a renderer abstraction. The relevant pieces are:SomeComponent— a type-erased component wrapper used by the runtime- Renderer — the piece that translates miso’s virtual DOM patch operations into actual DOM (or native UI) mutations
- GHC JS backend — miso-lynx uses the GHC JavaScript backend (
javascript-unknown-ghcjs-ghc) to compile Haskell to JavaScript, which is then loaded by the LynxJS runtime on the device
native dev shell in miso’s flake targets this configuration:
Building
Inside thenative dev shell, build with the GHC JS backend:
Writing mobile views
Miso-lynx apps are written in the same style as web miso apps. Thecomponent function, Effect monad, and view function work identically. Only the set of available elements and properties differs — instead of HTML elements you use LynxJS component types.
Relationship to miso core
| miso (core) | miso-lynx | |
|---|---|---|
| Targets | Web (WASM, GHCJS, GHC) | iOS, Android, HarmonyOS |
| Renderer | Browser DOM | LynxJS native renderer |
| Repository | dmjio/miso | haskell-miso/miso-lynx |
| Compiler | GHC WASM or GHCJS | GHC JS backend (GHCJS) |
| Architecture | Isomorphic (client + server) | Mobile-native |
Effect, component, and virtual DOM types come from miso core. miso-lynx only replaces the renderer and element vocabulary.