🕸️ Meta
– This page is currently just a collection of unqualified info. It would be better if there was a clearer guide for people new to this area from someone who's worked through it. That might be you soon! If so, please come back later and
help refine this page with what you learn
.
Elm was designed for the web, but with a few modern tools that help bridge the gap between Web and Native, there are ways to get your Elm app working as a native app.
Contents:
Elm + Tauri
Elm + Tauri
Tauri is a toolkit for using web technologies to build desktop and mobile (in alpha) apps. It uses Rust for the backend and web technologies for the frontend. Elm can be used as the frontend technology.
Handling CORS and HTTP Requests
Handling CORS and HTTP Requests
Elm’s
elm/http
uses XHR, while Tauri prefers
fetch
. To manage CORS, developers proxy HTTP requests through Rust.
The
node-xhr2
polyfill may help bridge XHR gaps with
fetch
, but
it's not perfect
and flat out won't work for some features (i.e. FormData and Blob support).
Guides and Templates
Guides and Templates
•
Elm + Tauri (Scripta Desktop)
- by jxxcarlson
Examples Apps
Examples Apps
Elm + Capacitor
Elm + Capacitor
Capacitor is a cross-platform app runtime that makes it easy to build web apps that run natively on iOS, Android, Electron, and the web.
Unlike Tauri, Capacitor's philosophy is that past abstraction efforts over platforms (i.e. Cordova) failed because the platforms (Android, iOS, Desktop) are fundamentally different, so Capacitor seeks to expose first class access to underlying platforms, and doesn't trying hide away the full native project + build process.
Note: The team behind Capacitor also makes the Ionic UI framework and pushes it heavily, which can cause confusion. Ionic won't play nice with Elm (it relies on JS componentry and behaviours), but you don't need Ionic to use Capacitor!
•
elm-todomvc-capacitor
- by jmpavlick
Past Projects
Past Projects
Other projects that might be abandoned now, but could be worth looking into:
•
elm-native
- by hariroshan, early exploration of using Nativescript with Elm
•
elm-ios
- GSOC 2017 project by pzp1997, early exploration of using Elm with iOS
•