{"id":15398401,"url":"https://github.com/ototot/cppbundler","last_synced_at":"2025-12-28T18:41:01.304Z","repository":{"id":83335739,"uuid":"456191265","full_name":"oToToT/CppBundler","owner":"oToToT","description":"A LLVM/Clang based tool to bundle C++ codes into a single file.","archived":false,"fork":false,"pushed_at":"2024-08-30T10:10:57.000Z","size":20,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-16T01:51:39.079Z","etag":null,"topics":["bundler","clang-tooling","competitive-programming","cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oToToT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-06T15:33:18.000Z","updated_at":"2024-08-30T10:11:01.000Z","dependencies_parsed_at":"2024-10-19T05:31:49.747Z","dependency_job_id":null,"html_url":"https://github.com/oToToT/CppBundler","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":"0.36363636363636365","last_synced_commit":"849cb7a8b8461bd3331599504d0d1007a187a620"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oToToT/CppBundler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oToToT%2FCppBundler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oToToT%2FCppBundler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oToToT%2FCppBundler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oToToT%2FCppBundler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oToToT","download_url":"https://codeload.github.com/oToToT/CppBundler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oToToT%2FCppBundler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268248522,"owners_count":24219555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bundler","clang-tooling","competitive-programming","cpp"],"created_at":"2024-10-01T15:43:10.975Z","updated_at":"2025-12-28T18:41:01.299Z","avatar_url":"https://github.com/oToToT.png","language":"C++","readme":"CppBundler\n===\n\nA tool to bundle custom headers into one single `.cpp` file.\n\n## Dependencies\n\nThis tool is based on LLVM/Clang. You can either use system libraries or build strictly against a custom LLVM version.\n\n### Option 1: System Dependencies (Dynamic Build)\nOn Ubuntu/Debian:\n```bash\n$ sudo apt install llvm-dev libclang-dev build-essential cmake ninja-build\n```\n\n### Option 2: Custom LLVM (Dynamic \u0026 Static Build)\nFor a fully static binary, you need to build LLVM from source or use a static distribution.\n```bash\n# Example: Build LLVM 21.1.0 from source\ngit clone https://github.com/llvm/llvm-project.git\ncd llvm-project\ngit checkout llvmorg-21.1.0 \ncmake -S llvm -B build -G Ninja \\\n    -DCMAKE_INSTALL_PREFIX=$HOME/llvm-install \\\n    -DCMAKE_BUILD_TYPE=Release \\\n    -DLLVM_ENABLE_PROJECTS=\"clang\" \\\n    -DLLVM_ENABLE_ZSTD=OFF \\\n    -DBUILD_SHARED_LIBS=OFF\ncmake --build build --target install\n```\n\n## Build\n\n### Dynamic Build\n**System Dependencies:**\n```bash\ncmake -S . -B build -G Ninja\ncmake --build build\n```\n\n**Custom LLVM:**\nIf you have a custom LLVM installed (e.g. in `~/llvm-install`) but want to link dynamically:\n```bash\ncmake -S . -B build -G Ninja \\\n    -DLLVM_DIR=$HOME/llvm-install/lib/cmake/llvm \\\n    -DClang_DIR=$HOME/llvm-install/lib/cmake/clang\n\ncmake --build build\n```\n\n### Static Build\nIf you built LLVM manually as above:\n```bash\ncmake -S . -B build -G Ninja \\\n    -DBUILD_STATIC=ON \\\n    -DUSE_STATIC_CRT=ON \\\n    -DLLVM_DIR=$HOME/llvm-install/lib/cmake/llvm \\\n    -DClang_DIR=$HOME/llvm-install/lib/cmake/clang\n\ncmake --build build\n```\n\n## Usage\n\n```bash\n$ ./build/cpp-bundle FILE [OPTIONS]...\n```\n\n## Options\n\nSince this tool is based on LLVM/Clang preprocessor, you could use the same options to bundle your code.\n\n## Example Use Case\n\nIt is common to use a library in online competitive programming contests like Codeforces, AtCoder, etc. However, this kind of contest only allows you to submit a single C++ code. Therefore, if we modularize our library, we need to bundle them.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fototot%2Fcppbundler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fototot%2Fcppbundler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fototot%2Fcppbundler/lists"}