This repository contains Loro CRDT bindings for Go. Contains pre-built binaries for MacOS (ARM64, AMD64) and Linux (ARM64, AMD64).
go get github.com/aholstenson/loro-go
When building your binary you will likely want statically linking to avoid a dependency on libgcc:
go build -ldflags '-linkmode external -extldflags "-static"'
doc := loro.NewLoroDoc()
loroMap := doc.GetMap(loro.AsContainerID("test"))
loroMap.Insert("test", loro.AsStringValue("test"))
updates, err := doc.ExportUpdates(loro.NewVersionVector())
status, err := doc.Import(updates)