Go-Ultralight provides unofficial bindings for the Ultralight UI library, endeavouring to match the original API as closely as possible. This project borrows heavily from the wonderful work of Raff found here.
Ultralight (https://ultralig.ht) is a HTML UI library, written in C++, that provides a performant and lightweight alternative to Electron, with JavaScript support.
While this wrapper is open-source, the Ultralight project is not. Use of the binaries downloaded either manually or using the tool must be in accordance with their licensing terms. Usage is free for non-commercial applications, with the full pricing hierarchy available on the website linked below:
[https://ultralig.ht/#pricing]()
You must have a working CGo installation and have the GOPATH set.
go get -d github.com/maneac/go-ultralight/...
go install github.com/maneac/go-ultralight/go-ultralight
go-ultralight [OPTIONS]
go-ultralight --help
).Download the Ultralight SDK for your system from https://ultralig.ht.
Locate your installation of Go-Ultralight (typically in $GOPATH/src/github.com/maneac/go-ultralight or $GOPATH/pkg/mod/github.com/maneac/go-ultralight), and extract the Ultralight SDK into an 'SDK' folder inside. Example structure:
github.com
|-maneac
|-go-ultralight
|-go-ultralight
|-examples
|-SDK
|-bin
|-AppCore.dll
|-AppCore.dylib
|-libAppCore.so
|-...
|-deps
|-include
...
Copy the binary files (.dylib, .dll, *.so) for your target system type from the 'SDK/bin' folder into your project directory. Example project directory:
exampleProject
|-AppCore.dll
|-main.go
|-Ultralight.dll
|-UltralightCore.dll
|-WebCore.dll
export CGO_LDFLAGS_ALLOW=-Wl,-rpath.*
After installation, use the setup utility go-ultralight
, or follow step 4 of the manual installation to copy the necessary binary files to your project directory. These files are required to run the compiled program.
Please build your project with go build
instead of using go run
, as run has been known to cause issues with the Browser example.
For examples, please see the 'examples' directory, which contains Go implementations of the sample projects provided with the Ultralight SDK.
Last updated: 17/05/2020