#How do I make a library for the zig build system?
1 messages · Page 1 of 1 (latest)
(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()?
Yep! This will work.
Here's a tiny library I have that works in a similar vein if you want a basic example: gram
A simple Zig library to generate modules for assets and resources. - 00JCIV00/gram
okay another question, how will dependencies work? my module pulls tarballs from typst's github
That's a good question. I think you'd have to find a way to import them.
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
i kinda see why, it's using a completely different build graph, arghhh
yeah im stumped, the only other solution is just instruct the user to use extra zig fetch commands