nanozlog: An ultra-low latency, lock-free asynchronous logging library for Zig

nanozlog:


Hello! This is my first post in the community. I’m glad to introduce my small zig library: nanozlog. It is basically porting from the famous C++ logging library: fmtlog. It is mainly focusing on the frontend logging speed. It could achieve 6-7ns per message which will cause the smallest blocking on your main working process.

I’m a newbie in Zig, so this is the first project I’m trying to work on after learning Zigling. Through Zig’s greatest comptime machanism, it is so convenient to translate those complicated C++ template code. And to my surprise, nanozlog is even slightly faster than fmtlog (7.3ns->6.8ns), maybe that is just benchmark error.

I’m looking forward to your commits and PRs. And also please no hesitate to criticise any stupid faults.

Supported Zig versions

zig-0-16

5 Likes