#build step for asset processing

1 messages · Page 1 of 1 (latest)

placid kestrel
#

I have some assets that I want to process before installing beside the binary (think images and 3d models that I wand to validate and optimize, etc) - how do I express that in the zig build system?

I could just run that logic at the start of pub fn build(b: *std.Build) void {... but then assets would get processed even if they haven't changed and I'd like to use zig's diffing/caching logic rather than reimplement my own.

#

Ideally There would be some way of expressing this in a makefile-like way: output file, input files, and a function for how to generate the output file

abstract mulch
#

See the documentation: https://ziglang.org/learn/build-system/ There's a node in hte TOC called "Producing Assets for @embedFile" which appears to match your query (only you'll install assets rather than embed them).

placid kestrel