Yjsgo: Running yjs from golang via v8


I wanted to share with the community something I just started working on. It’s a way to run yjs from a golang process, without having to port any yjs code. It works by loading yjs inside a v8 javascript context inside of the go process.

As you can tell from the repository age and number of commits it’s a very new project, very alpha.

I came up with this as a way to add support for realtime editing of text documents to an existing application, where there is already a live server goroutine at all times for collaborative sessions and presence is already implemented. Clients will be able to send update events to the server, as well as provide state vectors and receive updates.

As I only need the CRDT while the collaborative editing session is live, it’s my intention when the collaborative session ends to just render the CRDT as text and store the text in the database as it is now.

Sharing this to solicit feedback as well as to share an alternate approach for golang users.



Hi @tom,

thank you so much for sharing!

This is exactly what I was looking for a few years back. Really nice :slight_smile:

1 Like

Thanks for the kind words Kevin, and thanks for the great project!

Since my first post I fixed the obvious memory leaks and have deployed it to my server, it is now powering some live coding features on my audio/video platform https://sequencer.party. Smooth so far.


1 Like