dmjio
Projects like lynx and react-native automate this process using something akin to node-gyp, exposing kotlin / swift libraries via C ABI w/ a JS API. Miso accesses the kotlin / swift native modules by FFI'ing into the JS that exposes them.
The JS doesn't get compiled, but on Android it does get JIT'd. So it's "native" in the sense that the views drawn are native (not WebViews), and the device APIs are native, but not "native" in the sense that it's compiled.
Building native applications for iOS, Android and Huawei devices in Haskell.
https://github.com/haskell-miso/miso-lynx
It's a way to build truly native iOS, Android and HarmonyOS applications in Haskell using https://lynxjs.org and https://github.com/dmjio/miso, it uses a similar approach to react-native.
miso-lynx - A Haskell mobile framework
Show HN: ArrayFire Haskell
[0] Project Homepage: https://haskell-miso.org
[1] Github: https://github.com/haskell-miso/miso
Synopsis: Elm arch. in Haskell, but supports isomorphic js
Show HN link: https://news.ycombinator.com/item?id=14685677
Status: Still kickin', ~17k views, top 15 repo globally on GH (for a day)
1) Code reuse - The ability to share types on both client and server.
2) Hackage - by using Haskell you have access to 90% of Hackage on the frontend (this means nice lens and json libraries).
3) Types - Haskell's type system can express higher-kinded and poly-kinded types (something which Elm cannot afaik), this gives the user flexibility, expressivity and safety.
The code is quite performant, but for the fast stuff miso FFIs into hand-written js.
In regards to output size, the generated js can be very large. But, the generated code is in a state where it can use the closure compiler's ADVANCED optimizations. That combined with caching the rts.js and gzipping, you can probably get down to a few hundred kbs (which is large by a lot of people's standards), but workable