minimal go bindings for msdf-atlas-gen.
note: I'm making these bindings for my own personal use. This doesn't include bindings for the entirity of the
msdf-atlas-genlibrary. Contributions are welcome though.
If you're building this, you will need to install zig 0.15.2
make build-all should place the shared libraries in the ./msdf/libs/ dirs.
run:
git submodule update --init --recursiveThere is a wrapper that converts some of the functions in msdf-atlas-gen to something more C friendly.
Then we use zig to statically compile that wrapper (and a few other dependencies) into a new binary.
The functions from the newly produced binary can then be re-implemented in Golang using purego.
Thanks to purego, any users of this library would not need a C compiler or have to deal with any of the hassle of having to use cgo.
Thanks to zig we can fairly easily cross-compile. (which i hope to do in a github action)
Go can embed those binaries at build time.