A Config.in parser written in rust.

Rust version Minimum supported rust version: 1.56.0 or plus crates.io Version

This parser is not actively maintained since it has been replaced by Kconfig. This library has been tested from linux kernel 1.0 to 2.5.44 (542 versions).

A Config.in file looks like this:

```

2.5.0/arch/i386/config.in

mainmenu_name "Linux Kernel Configuration"

definebool CONFIGX86 y definebool CONFIGISA y definebool CONFIGSBUS n

definebool CONFIGUID16 y

mainmenuoption nextcomment comment 'Code maturity level options' bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL endmenu ```

Getting started

bash cargo add nom-config-in `````` rust use nomconfigin::{parseconfigin, ConfigInFile, ConfigInInput}; use std::path::PathBuf;

// curl https://cdn.kernel.org/pub/linux/kernel/v2.5/linux-2.5.0.tar.xz | tar -xJ -C /tmp/ fn main() -> Result<(), Box> { let configinfile = ConfigInFile::new( PathBuf::from("/tmp/linux/"), PathBuf::from("/tmp/linux/arch/i386/config.in"), ); let input = configinfile.readtostring().unwrap(); let configin = parseconfigin(ConfigInInput::newextra(&input, configinfile)); println!("{:?}", config_in); Ok(()) } ```

Resources