#How do I make a library for the zig build system?

1 messages · Page 1 of 1 (latest)

ivory depot
#

I would like to write a library for the build system that pulls in typst's compiler and has functionality to compile typst code, how do I expose this library to the client programmer?

#

(I should clarify that this code will be called in a build.zig)

#

I guess putting a public function in the build.zig is enough for the user to do something like @import("typst").do_something()?

trim forum
ivory depot
#

okay another question, how will dependencies work? my module pulls tarballs from typst's github

trim forum
#

That's a good question. I think you'd have to find a way to import them.

ivory depot
#

yeah okay the build.zig.zon is not recognized

#

that is the difficult part of this

#

yeah i need to forward this module's build.zig.zon's dependencies to the consumer

ivory depot
#

i kinda see why, it's using a completely different build graph, arghhh

ivory depot
#

yeah im stumped, the only other solution is just instruct the user to use extra zig fetch commands