| Crates.io | uvconvertor |
| lib.rs | uvconvertor |
| version | 1.0.1 |
| created_at | 2025-07-13 12:28:23.418386+00 |
| updated_at | 2025-07-16 08:52:37.23118+00 |
| description | A tool generate compile_commands.json from keilMDKs' .uvprojx file |
| homepage | |
| repository | https://github.com/a3750/uvconvertor.git |
| max_upload_size | |
| id | 1750473 |
| size | 4,326,408 |
This project is a reimplementation of uvConvertor in Rust from vankubo/uvConvertor, with many additional features. It can parse one or more Keil MDK project's engineering files .uvprojx and the .dep files generated by this project, read the compilation commands of the source files in them, then combine the compilation commands of each project and generate a compile_commands.json file. This file can make Keil MDK's projects be indexed by clangd, which can help editors that support Language Service Protocol (e.g. VSCode, NeoVim, CLion) implement functions such as code hints and code error diagnosis.
Install by cargo
$ cargo install uvconvertor
Install by homebrew
$ brew tap J3750/homebrew-tools git@gitee.com:J3750/homebrew-tools.git
$ brew update
$ brew install uvconvertor
Install by scoop
$ scoop bucket add J3750 git@gitee.com:J3750/scoop-bucket.git
$ scoop update
$ scoop install uvconvertor
$ git clone git@gitee.com:J3750/uvconvertor.git
$ cd uvconvertor
$ cargo build
$ cargo run -- -f <path to .uvprojx>[:<target name>] -o <output directory of compile_commands.json>
$ uvconvertor --file <FILE_WITH_TARGETS>... \
[--output <OUTPUT_DIRECTORY>] \
[--extopts <ARGS>...] \
[--rmopts <ARGS>...] \
[--pattern <PATTERN>] \
[--no-sysinc]
-f, --file <FILE_WITH_TARGETS>...
One or more input uvprojx files with names of targets, such as "--file 1.uvprojx 2.uvprojx,t1,t2"
-o, --output <OUTPUT_DIRECTORY>
The directory where the output file compile_commands.json is located, default export to stdout
-e, --extopts [<ARG>...]
Additional arguments to include, e.g. "--extopts=-I/path/to/include,-std=c11"
-r, --rmopts [<ARG>...]
arguments to remove
-p, --pattern <PATTERN>
This pattern will be used to replace disk icon of all absolute paths
e.g. pattern "/mnt/$disk" can replace "C:/.../incldue" to "/mnt/c/.../incldue"
-n, --no-sysinc
Remove sysroot include path from compile commands