there is this in ainclude code for loading libmagic's magic database:
// this attempts to find the path for the magic db file dynamically
// through some paths i have found around the systems i have.
//
// libmagic's build process enables you to override the default
// path to the magic file, which means that doing a static build of it
// means it won't work on a separate system since it doesn't have
// that one hardcoded in.
//
// a future iteration might bundle the magic database with the
// executable through possibly, @embedFile, then dump that into a
// temporary file for super compatibility with windows and macos
this is useful enough to be turned into its own zig library.
there is this in
ainclude
code for loading libmagic's magic database:this is useful enough to be turned into its own zig library.