Skip to content

pekim/go-skia

Repository files navigation

go-skia

PkgGoDev

github.com/pekim/go-skia is a package that provides generated Go bindings for some of skia's C++ api.

To add it to a Go module, go get github.com/pekim/go-skia.

License

go-skia is licensed under the terms of the MIT license.

platforms

go-skia has been developed on linux amd64. Libraries for darwin amd64 and arm64 are included and it may work on macOS, but it's untested.

development

pre-requisites

  • version 1.23.0 or later of Go
  • version 15 or later of clang

build

The build script does the following

  • rust-skia repo
    • clone repo (if not present) to _skia dir
    • check out desired tag (if not currently checked out)
    • copy required header files to skia dir
  • skia-binaries repo
    • if desired release not present in lib dir
      • download releases for platforms
      • extract the platform releases in to lib dir
  • generate Go bindings
  • run tests to verify that the generated bindings result in a package that builds
./build.sh

upgrade skia

To upgrade skia, update some variables in build.sh.

_skia dir

The leading underscore in the dir name is to prevent the directory appearing in godoc output in the "Subdirectories" section.

pre-commit hook

There are configuration files for linting and other checks. To use a git pre-commit hook for the checks

About

generated Go bindings for some of skia's API

Resources

License

Stars

Watchers

Forks