Zebra - A simple, fast, all-in-one config loader for Zig

Hello dear Zig buddies,

I’ve recently built this library called Zebra: GitHub - omkar-foss/zebra: A simple, fast, all-in-one config loader for Zig. · GitHub

It’s a simple, fast, all-in-one config loader for Zig projects and currently supports reading dotenv, toml, yaml, os env into a map and writing entire merged config to json. Heavily inspired by Viper, a tried and tested Go config loader (and one of my favorite libs).

Tested on Zig 0.15.2 and I’m looking to support future Zig versions of course.

What needs more work:

  1. toml/yaml full spec compliance - need to further improve support
  2. memory leaks as and when we find - i’ve resolved many during branch testing but i think there could be more

Would be lovely to have you all try it out. Pull requests and bug reports are most welcome. Thank you! :grin: :zebra:

8 Likes

Hi Zig buddies,

I think keeping credentials secure has now become more important than ever, in light of recent security events in foss (trivy, litellm, axios, etc.)

With that in mind, I’m updating Zebra to mask identified sensitive credentials as XXXX by default. It’ll load them unmasked only when unmask=true is explicitly specified. Refer issue #4 for more info.

I’ve raised PR #5 for this, would appreciate your review or feedback on it, thanks!

1 Like