{"repo":"rizsotto/Bear","free":true,"listed":false,"github":"https://github.com/rizsotto/Bear","clone":"git clone https://github.com/rizsotto/Bear.git","description":"Generate compile_commands.json for any C or C++ build","language":"Rust","stars":6437,"topics":["compilation-database","clang","build-tool","build-systems","compile-commands-json"],"license":"GPL-3.0","category":"databases-storage","readme_excerpt":"ʕ·ᴥ·ʔ Build EAR =============== Bear gives you working code navigation, autocomplete, and diagnostics on any C/C++ project, whatever the build system. Prefix your build command with bear -- and it produces the compile commands.json file that Clang tooling (clangd, clang-tidy, and friends) needs to understand your code. The [JSON compilation database][JSONCDB] describes how each translation unit is compiled. Bear captures the compiler invocations while your build runs and writes the database for you - no changes to your build system required. [JSONCDB]: http://clang.llvm.org/docs/JSONCompilationDatabase.html When to use Bear ----------------- Bear is the tool of choice when the build system cannot produce a compilation database for you: - Make, autotools, or custom script builds - most of the C world. - A build you cannot or do not want to modify: a third-party project, a codebase you are just exploring, a CI job. - Unusual toolchains: embedded (ARM, TI, Microchip, QNX), HPC (Cray, Intel, NVIDIA, MPI wrappers), CUDA, cross-compilers, and compiler launchers such as ccache, distcc, and icecc. - A build you cannot run at all: parse make -n dry-run output or a saved build log instead. Bear can intercept the build as it runs, recording what the compiler was actually invoked with, including flags injected by wrappers and entries for generated sources. Bear can also interpret the commands a build system plans to run, formatting those into a compilation database as if they had execute","default_branch":null,"files":null,"tree":[],"storefront":"/r/rizsotto","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rizsotto/Bear/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}