Kconfig is a language that describes configuration options for the linux Kernel. The syntax looks like this: ```bash
config EFI bool "UEFI runtime support" depends on MMU default y select EFI_STUB help This option provides support for runtime services provided by UEFI firmware. ```
config
entry: We define a config named EFI
. The next lines are the attributes of this entry.EFI
is a boolean config.EFI
depends on the config MMU
.y
.EFI
is equals to true
then it enables EFI_STUB
.help
attribute defines a help text for the end user.There are plenty of other keywords in the Kconfig language, check out the official documentation for more details.
Features
source
is met, it reads and parses the specified configuration file.clone()
a lot. Do not expect amazing performances.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