# Elm on mobile platforms

**URL:** <https://discourse.elm-lang.org/t/elm-on-mobile-platforms/5281>\
**Category:** Request Feedback\
**Created:** [March 7, 2020, 4:35pm UTC](https://discourse.elm-lang.org/t/elm-on-mobile-platforms/5281 "2020-03-07T16:35:00Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![justgook](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/justgook/32/2315_2.png) [@justgook](https://discourse.elm-lang.org/u/justgook)\
**Post date:** [March 16, 2020, 9:21am UTC](https://discourse.elm-lang.org/t/elm-on-mobile-platforms/5281/9 "2020-03-16T09:21:11Z")

</div>

Regarding native stuff - i had successfully build elm into native app for mobile using Ejecta ([https://impactjs.com/ejecta](https://impactjs.com/ejecta)) - works great - problem it is webgl based,  
Same stuff was done for desktop - using `glfw-raub`, `image-raub`, `webgl-raub` and [`pkg`](https://www.npmjs.com/package/pkg)  
[Example](https://github.com/justgook/elm-native) of pkg way

**Pros:**

- All works in native view (OpenGL)
- There is no visible JS code

**Cons:**

- Requires some mock code - to wrap DOM in node
- Works only with WebGL based apps

# Suggestion:

We can make in the same way wrapper around “native” components, just by using `Html.node`.  
Then just use some build DOM wrapper (like Ejecta) - that will capture all events / element creation from elm - and just do native stuff based on that. With that way you will not need to use any custom `Elm -> Targed View Builder` - just bare elm, with UI lib, that can target customElements in a browser, and other stuff in mobile apps

---

_[View the full topic](https://discourse.elm-lang.org/t/elm-on-mobile-platforms/5281)._
