Can a liveview phoenix project be converted to serve many platforms?

H everyone,

I was wondering if Phoenix Liveview can be build to many platforms like:
Mac Linux Windows Ios and Android?

Something similar how electron can be deployed to many platforms.


I haven’t tried this but, you could properly just include it in your (Electron) binary. I done something similiar with opencv in


Thanks @Schultzer, for the suggestion.

I’m sure you can have an electron app that starts your (LiveView-based) application and then connects to it. I don’t see why not. I’ve considered it for some things. But I’d rather avoid Electron if I can. But that’s another issue entirely.

The only thing that I’d say is a gotcha is packaging and compiling for your targets. Throwing an Elixir release in with the Electron app is probably fairly straight-forward but the app would need to be built for the different target environments separately, one Windows, one Mac, one Linux. Seems manageable to me, but afaik releases aren’t more portable than that.

1 Like

In my post I was asking for something similar not necessarily Electron, I am always open for new ideas and technology stacks.
So @lawik, if you have any other suggestions, please share them.
I am not fan person that use only one tool, I would use any tool that does the job better then the one I was thinking about previously.

My issue with Electron is that it is a very heavy runtime environment (being basically a full Chromium instance afaik). So when using it one is making a fairly heavy trade-off for developer convenience vs the user’s computing resources (disk, memory, CPU). I think that is becoming a bit too common and that it’s not the trend I want to see.

I’m sure there are slightly more lightweight options but overall, to run live view it would be a browser of some sort. So I don’t really have a better option than Electron, I’d imagine that it is basically the most mature desktop web app solution right now.

I’ve been meaning to see how hard it would be to work with the wx libraries for UI that Erlang already has. Those render UI with native widgets through platform-specific bindings. But then we are leaving LiveView behind.

Honestly I’d love to dig into building a convenient layer on top of wx, as Scenic does on top of OpenGL.

But desktop apps are not the hottest field right now. They have purpose, but bot much mindshare.


Maybe running a GUI app from a docker container is an option?

1 Like

Interesting idea @lawik to use what scenic does with Liveview.

It seems that docker has some cool features, definitely worth learning. Thanks @egze for sharing this possibility.

Hehe, that was not exactly what I meant. I meant, LiveView would not be my solution to an ideal desktop app. Mostly because of the browser. LiveView is a way to avoid javascript for browser development. I mostly don’t want to bring the web and JS into my desktop apps so there isn’t a real need for LiveView from what I see.

Some of the ideas may be useful to translate though.

I have considered writing a Scenic driver that outputs to WebGL or something like that.

1 Like