#converting compile-time detection to run-time detection
1 messages · Page 1 of 1 (latest)
This is a code that doesn't need libraries, it's runtime detection..
What is the way?
You could repeat this pattern if you move @cImport to build time with b.addTranslateC and then add it to your modules' imports
what happens when lib is not found? (on build)
Actually I misread, it won't be exactly this pattern because you create steps for your build graph in build.zig that are later executed by the build runner.
You have steps to check if things exist, not sure if it is sufficient for your use case. But:
https://ziglang.org/documentation/0.15.2/std/#std.Build.addCheckFile