Building Livebook Desktop by Wojtek Mach | ElixirConf EU 2023

Code Sync: Building Livebook Desktop by Wojtek Mach | ElixirConf EU 2023

Comments welcome! View the code-sync and elixirconf-eu tags for more Code Sync and ElixirConf EU talks!

5 Likes

Thanks for sharing those experiences @wojtekmach !

I see you had some PR’s in the burrito :burrito: project. Would you mind pointing out if there is any overlap between what you described here regarding Livebook, and burrito?

At first glance the way Livebook is packaged requires maintaining some native code (which you show in the talk), while burrito handles this transparently.

Or are these two approaches for two different problems?

I don’t think the ElixirKit code has been extracted into it’s own reusable library yet?

Thanks in advance for sharing some insights.

Yeah, I’d say Burrito is focused on CLIs and ElixirKit on desktop apps. The idea behind ElixirKit is you write your native code yourself (AppKit on macOS, Windows.Forms on Windows, etc) and it ships with APIs for both frontend and backend to talk to each other (over a TCP connection). I believe Burrito compiles NIFs for you so it’s easy to talk from Elixir to C/Zig but my understanding is it doesn’t have higher level APIs to do that built-in.

Burrito creates a single (self-extracting) binary whereas e.g. on macOS an app is an .app bundle, a folder, with particular structure. Commonly you distribute these as .dmg files that you need to code sign and ideally notarise too. ElixirKit ships with some simple scripts to automate these steps.

One of the biggest benefits of Burrito is cross-compilation. If there’s a cross-platform GUI toolkit in C/Zig then I believe it would be super compelling. I’m personally pretty wary of these toolkits though.

I think it’s totally possible to build a desktop app with Burrito and if someone tries that, I’m very much looking forward to the results.

ElixirKit is still maintained within Livebook repo. I plan to eventually extract it out as a standalone library but no ETA yet.

3 Likes