kconfig-linux 0.1.1

WIP crate for the KConfig DSL in the Linux kernel
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::time::Instant;
use crate::parser::kconfig_parser::KconfigParser;

#[test]
pub fn basic() {
    let basic_src = include_str!("Kconfig.basic");

    let time = Instant::now();
    let kconfig = KconfigParser::new()
        .allow_sourcing(false)
        .set_kconfig_source(basic_src.to_string())
        .parse()
        .take_result().unwrap();

    // LMAO
    println!("Childrens: {:#?}", kconfig.children.children.len());
    println!("Took {} ms for basic", time.elapsed().as_millis())
}