Skip to content

Repository files navigation

clay

GoDoc

This is a Go port of the C layout library (Clay).

Goals

  • Be entirely Go (no Cgo)
  • Idiomatic Go public API
  • No unsafe in the public API
  • Be fast

Renderers

Clay includes multiple prebuilt renderers:

Updating clay

Clay's C source (clay.h) is compiled to WebAssembly with clang and translated to Go with wasm2go. The Go types and bindings in clay.go are generated from clang's AST of clay.h. To update clay, replace clay.h and run:

go generate

This requires a clang that can target WebAssembly, like wasi-sdk. It is looked up in tools/wasi-sdk, $WASI_SDK_PATH, or PATH; set CLANG to override.

License

This project is governed by the zlib/libpng license, the same license as clay, which it contains and generates code from. See LICENSE for full description.

About

Go port of the C layout library (Clay)

Resources

Stars

51 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages