Tux, the pinguin

A Kconfig parser written in rust.


Build status Rust version code coverage

Parsing relies on the nom library.

Getting started

bash cargo add nom-kconfig

```rust use std::path::PathBuf; use nomkconfig::{kconfig::parsekconfig, KconfigInput, KconfigFile};

// curl https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.4.9.tar.xz | tar -xJ -C /tmp/ fn main() -> Result<(), Box> { let kconfigfile = KconfigFile::new( PathBuf::from("/tmp/linux-6.4.9"), PathBuf::from("/tmp/linux-6.4.9/Kconfig") ); let input = kconfigfile.readtostring().unwrap(); let kconfig = parsekconfig(KconfigInput::newextra(&input, kconfig_file)); println!("{:?}", kconfig); Ok(()) } ```

Resources