Tried compiling https://github.com/rizsotto/Bear from source, was slightly painful so decided why not re-write in rust
- hook into various sys calls
execve,posix_spawnetc usingLD_PRELOAD - host server listening on Unix Domain Socket
- syscall hooks send args to server with
protobufformat - generate compile_commands.json file at end
git clone git@github.com:scopreon/rust-bear.git
cargo build --release
./target/release/server <command>
e.g. ./target/release/server make build-production
Tada! compile_commands.json generated.
Was fun