working in the embedded domain, some sort of external “loader” is invariably required within the build-flow… while OSS tools like OpenOCD often fill this role, i sometimes must rely upon tooling specific to some silicon vendor…
while i don’t necessarily have sources for these tools, silicon vendors will generally let you re-distribute their (free) tools in a binary form… to that end, i’ve often used npm
as a package manager for this purpose – simply collecting the tool’s runtime artifacts into a package which would then install its content in a well-known place…
[ nodejs
was fundamental in my prior (non-Zig) world, hence leveraging npm
was a no-brainer… ]
starting with clean(er) slate in Zig, how should i best package/deliver these 3rd party binaries in a build.zig
flow – the idea being that installation of (say) a loader tool would be an infrequently executed step, whereas invocation of the loader would happen repeatedly when building/running a program…
while i can probably figure out how to specify these steps in a build.zig
file, i’m equally interested in HOW y’all might distribute such binary artifacts… would i make it an “official” package described in build.zon
; or would i simply bundle my artifacts in a more ad-hoc way known to my build.zig
file…
there’s an almost limitless choice of approaches here… if there is a “best practice” for handling 3rd-party binaries in the world of zig, i’m glad to follow suit…
any suggestions or links to existing zig projects???