Skip to content

Conversation

@wojtekmach
Copy link
Contributor

@wojtekmach wojtekmach commented Dec 30, 2025

Already publishing as separate nightly builds: https://github.com/livebook-dev/livebook/releases/tag/nightly

TODO:

  • icons


@impl true
def init(_) do
{:ok, pid} = ElixirKit.start()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to link those two processes anyway... also, what happens if ElixirKit is called multiple times?

Another option is for you to automatically start the ElixirKit process when ElixirKit starts and implement a pubsub using Elixir's Registry...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I'll revisit this soon. I even wanna rename ElixirKit.publish to ElixirKit.send exactly because I don't think we wanna build pubsub (one could fan out off ElixirKit listener process I suppose though)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think the Rust -> Elixir side could be a pubsub (i.e. Rust publishes, Elixir subscribes), but Elixir -> Rust should be a send/receive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I think the idea behind starting Elixir tcp client on ElixirKit.start, as opposed to on elixirkit app supervision tree start, was if desktop app immediately starts sending messages there might not be a listener yet to receive those. One way would be to buffer those messages but then its arbitrary whether to flush the buffer on first listener vs any other listener which doesn't sound great.

So Elixir side could send a ready event and then Rust side would know to only start sending events then (which Livebook Desktop in fact does for another reason, sending the URL with token) but I thought that ElixirKit.start being a synchronization point out of the box was kinda nice.

For now I have introduced ElixirKit.start_link() and simplified internals so it's clearer there's just one process. I think we can implement Elixir side pubsub if and when someone asks for it. WDYT?

@aayushmau5
Copy link
Contributor

Gave the nightly build a try.
When ran, It logged the following error and didn't open:

2025-12-30T20:08:22.345160Z ERROR cat: /Applications/Livebook.app/Contents/Resources/rel/releases/COOKIE: No such file or directory

@wojtekmach
Copy link
Contributor Author

@aayushmau5 thank you for checking! As you can see this is still being developed however that bug should be fixed now in nightly.

Copy link
Contributor

@josevalim josevalim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the remaining comments are addressed, LGTM!

@wojtekmach wojtekmach merged commit 1ba65f0 into main Jan 7, 2026
4 checks passed
@wojtekmach wojtekmach deleted the wm-tauri branch January 7, 2026 12:50
@wojtekmach
Copy link
Contributor Author

I went ahead and merged this in, note we're still building the "current" Livebook Desktop and the "new" one. I'd like to do more testing before we retire the previous implementation for good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants