This repository contains the Go SDK for integrating with Lore.
Lore is an open source version control system that is designed for unprecedented scalability of both data and teams. It is optimized for projects that combine code with large binary assets, including games and entertainment, and caters to the needs of developers and artists alike.
For full Lore documentation, architecture details, and contribution guidelines, visit the main Lore repository.
go get github.com/EpicGames/lore-go@latestThe Go SDK binds against the Lore C library (liblore.so / liblore.dylib / lore.dll). Run fetch-lore-lib once per build to install the matching version next to your application binary:
go run github.com/EpicGames/lore-go/cmd/fetch-lore-lib-o <output_dir>— destination directory (defaults to the current directory)-os <target_os>and-arch <target_arch>— fetch the library for a different platform (e.g.-os linux -arch amd64for cross-compilation)
To automate this, add a directive to your main.go so go generate ./... installs the library:
//go:generate go run github.com/EpicGames/lore-go/cmd/fetch-lore-libSource priority for fetch-lore-lib:
LORE_LIB_PATH— if set, the file at that path is copied. This env var is also honored by the SDK at runtime (point it at a.so/.dylib/.dllfile and both fetch-time and runtime use it).- Otherwise the library is downloaded from
LORE_RELEASE_BASE_URL, falling back to the URL baked into the SDK at build time (see Generate the Go bindings). The URL is constructed as<base>/<versionTag>/<artifactName>.
At runtime the SDK also searches next to the compiled executable, so a go generate-installed library is found automatically.
The default package (github.com/EpicGames/lore-go) exposes the high-level fluent API. A low-level, C-like wrapper around the underlying FFI is also available under github.com/EpicGames/lore-go/native for advanced use cases.
import (
"fmt"
"github.com/EpicGames/lore-go"
"github.com/EpicGames/lore-go/types"
)
lore.LogConfigure(&types.LoreLogConfigFFI{
File: true,
FilePath: "/path/to/log/directory",
Level: types.LoreLogLevel_DEBUG,
})
globals := types.LoreGlobalArgsFFI{
RepositoryPath: "/path/to/local/repository",
}
args := types.LoreRepositoryStatusArgsFFI{
Staged: true,
Scan: true,
}
_, err := lore.RepositoryStatus(&globals, &args).
Callback(func(event types.LoreEvent) {
if event.Tag == types.LoreEventTag_REPOSITORY_STATUS_FILE {
fmt.Println(event.Data)
}
}).
Wait()For comprehensive examples, see examples/fluent/fluent.go (fluent) and examples/native/native.go (low-level).
- Clone the Lore Go SDK repository:
git clone https://github.com/EpicGames/lore-go- (Optional) Create a Python virtual environment for the binding generator:
uv venv .venv
source .venv/bin/activate- Install the Python modules used by the binding generator:
uv pip install jinja2 pycparserThe SDK binds against the Lore C library. Pick one of the two options below depending on whether you're also modifying the Lore core.
Use this when you're changing the Lore C/Rust core alongside the Go SDK.
- Clone Lore's repository and build it:
cargo build --releaseUse this when you only need to develop the Go SDK against an existing Lore version.
- Download the header and binaries from the Lore repository release page.
- Point
LORE_BUILD_PATHat the library directory from the previous section:
export LORE_BUILD_PATH="<path-to>/lore/"- (Optional) Set
LORE_RELEASE_BASE_URLandLORE_VERSIONto bake a default download base URL intocmd/fetch-lore-lib/version.go. End users of the published SDK will use this URL when runningfetch-lore-libwithout overriding it themselves. If unset, generation falls back to the public Lore release URL.
export LORE_RELEASE_BASE_URL="https://github.com/EpicGames/lore/releases/download"
export LORE_VERSION="0.8.2"- Generate the bindings and build the SDK:
uv run python find_lorelib.py
uv run python generator/generate.py
go build -C lore_go- Any edits you now make under
lore_go/are picked up by re-runninggo build. If you change anything undergenerator/templates/or pull a new Lore pre-built binary, re-run step 3 to regenerate the bindings.
With the dev environment set up, a Lore library available, and the Go bindings generated, run an example from the repository root:
export LORE_LIB_PATH="lore/lib/lorelib-arm64-apple-darwin.dylib"
go generate -C examples ./...
go build -C examples -o fluent ./fluent
examples/fluent/fluentTo run the low-level native example instead, swap fluent for native.
go test -C lore_go ./... -v