tduccuong

tduccuong

Desktop GUI app with Elixir?

Hi,

is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single self-executable binary. When run, the Phoenix webserver will serve locally to a lightweight rendering engine like this one.

Thanks!

Marked As Solved

hauleth

hauleth

Default Erlang distribution comes with Erlang bindings to WxWidgets (this is used by Wings3D - 3D modeller written in Erlang by @bjorng), this is what is used for example by observer application, so you can use this instead of launching full fledged HTTP server to mock the GUI application. Alternatively you can check out Scenic.

Also Liked

evadne

evadne

I think for most use cases you can consider spawnfest/bakeware which packs a single executable which contains a launcher and an embedded archive.

I’ve indeed been toying with the idea of building an entirely independent Mac app bundle that is compatible with Sandboxing etc and around the existing Elixir releases concept. Since I don’t know how to write applications well for Linux / Windows I’ve focused on Macs. A particular concern that came up pretty quickly was handling of dynamically linked libraries, which I have had to manually relocate and then rewrite the entries in shared libraries within the release via a build script. So far the solution works for OpenSSL and I am sure will work with most libraries, but it has been quite an ugly experience so more thinking and studying is required to simplify it.

I have tried this approach with a Phoenix app and a Scenic app and more or less things work and I could put the app bundle on another machine and it works properly. (Usually Erlang is installed on top of OpenSSL installed via Homebrew on Macs so a simple Elixir release won’t work on other Macs without Homebrew / OpenSSL.)

For Windows, the same technique which was used to build portable apps could probably be used. I’ve not studied how though.

axelson

axelson

Scenic Core Team

You will probably find this Proof of Concept relevant to your interests: GitHub - fazibear/elixir_desktop_application: Code for story: https://puddleofcode.com/story/how-to-create-desktop-application-with-elixir · GitHub (the startup instructions, although default are correct)

Which is powered by GitHub - nerves-web-kiosk/webengine_kiosk: Qt WebEngine-based kiosk · GitHub which runs with qt webengine. Of course that is different than electron, and may be more difficult to install. But on a machine that has qt installed, running mix phx.server will bring up a desktop window that loads http://localhost:4000

It would be interesting to see if someone could create a new Proof of Concept by adding bakeware to the above.

und0ck3d

und0ck3d

Lot of work to be done but you can give this a try:

https://github.com/crqra/webview

I can work on it if there’s interest.

Where Next?

Popular in Questions Top

New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
dotdotdotPaul
Okay, I’m having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I’m sure I’...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 47930 226
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 126479 1222
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New

We're in Beta

About us Mission Statement