https://github.com/maneac/go-ultralight
Unofficial Golang bindings for the C++ Ultralight UI library
https://github.com/maneac/go-ultralight
go golang ui ultralight ultralight-ux
Last synced: 6 months ago
JSON representation
Unofficial Golang bindings for the C++ Ultralight UI library
- Host: GitHub
- URL: https://github.com/maneac/go-ultralight
- Owner: maneac
- License: mit
- Archived: true
- Created: 2019-08-19T12:26:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-17T18:01:57.000Z (about 6 years ago)
- Last Synced: 2024-06-20T11:55:43.461Z (about 2 years ago)
- Topics: go, golang, ui, ultralight, ultralight-ux
- Language: Go
- Homepage: https://ultralig.ht
- Size: 485 KB
- Stars: 32
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://goreportcard.com/report/github.com/maneac/go-ultralight)
[](http://godoc.org/github.com/maneac/go-ultralight)
[](https://travis-ci.org/maneac/go-ultralight)
[](https://codecov.io/gh/maneac/go-ultralight)
# Go-Ultralight
### Please read the installation instructions below
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](https://github.com/raff/ultralight-go).
#### What is Ultralight?
Ultralight (https://ultralig.ht) is a HTML UI library, written in C++, that provides a performant and lightweight alternative to Electron, with JavaScript support.
#### Licensing
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]()
# Installation
## Prerequisites
You must have a working CGo installation and have the GOPATH set.
## All Methods
1. Run:
`go get -d github.com/maneac/go-ultralight/...`
to download the project and the installation and setup utility. Then, install the optional utility:
`go install github.com/maneac/go-ultralight/go-ultralight`
## Automated
2. Navigate to your project's directory and execute:
`go-ultralight [OPTIONS]`
to automatically download the Ultralight SDK and copy the necessary binaries for running your application. For more information on the available options, please read the utility's help (`go-ultralight --help`).
3. That's it! Now you're ready to Go-Ultralight!
## Manual
2. Download the Ultralight SDK for your system from https://ultralig.ht.
3. 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
...
```
4. 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
```
# Use
### If you are a non-Windows user, run the following to enable detection of the binaries:
```bash
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.
# To Do
- Add support for inspector view
- Write tests
Last updated: 17/05/2020