top | item 46692372

Show HN: A C library written in Rust for querying kernel configuration file

1 points| synalice | 1 month ago |github.com

This is a rather simple library that allows you to locate the config of the running kernel.

Doing this manually is rather tedious because some systems leave the config as a gzip-compressed file at /proc/config.gz (NixOS), while others distribute it as a plaintext file at /boot/config-$(uname -r). Some systems may have it in a completely different location all together.

What's really interesting about this project is that it is not only a Rust library, but a C libkconfq.so as well! You can opt-in into generating libkconfq.so, kconfq.h and kconfq.pc files during the build. This means you can use this library from any language that supports C FFI.

discuss

order

No comments yet.