#kconfig #cargo

app cargo-menuconfig

Cargo sub-command for configuring cargo projects using Kconfig and menuconfig

2 releases

0.1.1 Aug 18, 2025
0.1.0 Aug 16, 2025

#577 in Configuration

37 downloads per month

Custom license

12KB
198 lines

cargo-menuconfig

Scans the current package and its dependencies for Kconfig files and runs menuconfig on them.

Usage

From within the tree of a Cargo workspace or package, run:

$ cargo menuconfig

If the workspace has multiple packages, you have to specify the package to be built.

$ cargo menuconfig -p <package>

The utility will scan the entire dependency tree for packages providing Kconfig-based configuration options. It looks for packages declaring the following metadata key in their Cargo.toml:

[package.metadata.kconfig]
root = <path-to-Kconfig>

For each package declaring the kconfig metadata key, it reads the Kconfig file specified by the root field and flattens it until all the source directives have been replaced. Next, the set of Kconfig files is aggregated under a master Kconfig which defines a menu entry for each package. Finally, menuconfig is executed on the master Kconfig file.

The resulting .config file is saved in the root directory of the built package.

Contributing

Please send feature requests and bug reports to alexandru at onea dot ro.

Dependencies

~9–16MB
~288K SLoC