| Crates.io | compiledb |
| lib.rs | compiledb |
| version | 1.1.1 |
| created_at | 2025-04-25 13:12:49.508876+00 |
| updated_at | 2025-09-21 12:43:31.164552+00 |
| description | Clang's Compilation Database generator for make-based build systems |
| homepage | |
| repository | https://github.com/a5ehren/compiledb-rs |
| max_upload_size | |
| id | 1648980 |
| size | 118,284 |
A fast Rust implementation of Clang's JSON Compilation Database generator for GNU make-based build systems. This is a Rust rewrite of compiledb-go for even better performance and safety.
cargo install compiledb
git clone https://github.com/yourusername/compiledb-rs
cd compiledb-rs
cargo install --path .
Generate compilation database from make output:
# Using the make wrapper
compiledb make
# Using make output directly
make -Bnwk | compiledb
USAGE: compiledb [options] command [command options] [args]...
OPTIONS:
-p, --parse <file> Build log file to parse compilation commands
-o, --output <file> Output file [default: compile_commands.json]
-d, --build-dir <path> Path to be used as initial build dir
-e, --exclude <pattern> Regular expressions to exclude files
-n, --no-build Only generates compilation db file
-v, --verbose Print verbose messages
-S, --no-strict Do not check if source files exist
-m, --macros <macro> Add predefined compiler macros
-c, --command-style Use command string format instead of arguments list
--full-path Write full path to compiler executable
--regex-compile <re> Regular expressions to find compile commands
--regex-file <re> Regular expressions to find source files
COMMANDS:
make Run make and generate compilation database
help Print this message or help for a command
compiledb make
compiledb --parse build.log
compiledb --command-style make
PATH=/opt/gcc/bin:$PATH compiledb --full-path make
compiledb make -f custom.mk -j8 target
This Rust implementation offers several performance improvements over the original Go version:
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
GNU GPLv3 - See LICENSE for details