Skip to content

dfirebaugh/msdf

Repository files navigation

msdf

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-gen library. Contributions are welcome though.

Building

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.

git submodule

run:

git submodule update --init --recursive

How does this work?

There 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.

About

minimal go bindings for msdf-atlas-gen

Resources

Stars

Watchers

Forks

Packages

No packages published