Compile-Time Configuration For Zig Libraries

from blog openmymind.net, | ↗ original
If you're writing a Zig library, you might find yourself wishing to expose a compile-time configuration option to application developers. One of the reasons you might want to do this for performance reasons, preferring to do something at compile-time versus runtime. Consider this example using my PostgreSQL library: var result = try...