{"id":17027089,"url":"https://github.com/linbreux/cpp-basic-template","last_synced_at":"2026-05-05T02:34:22.203Z","repository":{"id":210214998,"uuid":"726021433","full_name":"Linbreux/Cpp-Basic-Template","owner":"Linbreux","description":"A basic C++ template that uses nix","archived":false,"fork":false,"pushed_at":"2023-12-03T14:41:27.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-01T22:04:34.131Z","etag":null,"topics":["catch2","cpp","getting-started","nix","template"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Linbreux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-12-01T11:15:10.000Z","updated_at":"2025-01-06T11:06:19.000Z","dependencies_parsed_at":"2023-12-01T13:30:59.721Z","dependency_job_id":"2f5ffc79-0bb0-45c5-92eb-bd88b1229be3","html_url":"https://github.com/Linbreux/Cpp-Basic-Template","commit_stats":null,"previous_names":["linbreux/cpp-basic-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Linbreux/Cpp-Basic-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linbreux%2FCpp-Basic-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linbreux%2FCpp-Basic-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linbreux%2FCpp-Basic-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linbreux%2FCpp-Basic-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Linbreux","download_url":"https://codeload.github.com/Linbreux/Cpp-Basic-Template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linbreux%2FCpp-Basic-Template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32633302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"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":["catch2","cpp","getting-started","nix","template"],"created_at":"2024-10-14T07:46:02.042Z","updated_at":"2026-05-05T02:34:22.187Z","avatar_url":"https://github.com/Linbreux.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\" id=\"madewithlua\"\u003e\n    \u003cimg src=\".github/cpp_template_logo.png\" width=\"110\", height=\"100\"\u003e\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003eC++ Simple Template\u003c/h1\u003e\n\nThis project is meant to be a starting point, to quickly start working on a C++ program. \nThis can be ether way, *with* or *without* using *Nix*.\n\nThere are some libraries that are by default available:\n- boost\n- spdlog\n- yaml-cpp\n- nlohmann_json\n- protobuf\n\n## How to get started\n\nLike already mentioned, you have two ways to run the program.\n\n### Nix\n\n\u003e *(optional)* You can use [direnv](https://direnv.net/) to drop you instantly in a nix-shell session \n\u003e when opening the project folder\n\u003e Just run `direnv allow .` one time in the project after installing `direnv`.\n\nOpen the `default.nix` file and edit `project_name` to the name you want.\nThis is also the main file where you would at libraries, change the compiler version, etc.\n\nYou should of course still add the libraries that you added to your `CMakeLists.txt` file.\n\nTo build the program, run:\n\n```\nnix-build\n```\n\n`nix-build` will create a new symbolic link, containing a link the program. \nTo run the program:\n\n```\n./result/bin/\u003cproject_name\u003e\n```\n\nYou could also start a shell by running `nix-shell`. This will create a shell that has links to all the \nlibraries/programs defined in `default.nix`. From there it's also possible to compile the program yourself.\n\n\u003e By doing this, you should set the `CMAKE_PROJECT_NAME` in the `CMakeLists.txt` to the project name you want.\n\n```\nmkdir build \u0026\u0026 cd build\ncmake ../src/. . \u0026\u0026 cmake --build .\n```\n\n### Without Nix\n\nIf you are not using nix, you should first make sure that you have all the libraries and compilers you need.\n\n\u003e You can change the project name by changing `CMAKE_PROJECT_NAME` in the `CMakeLists.txt`.\n\nAfter that you can just build the project manually:\n\n```\nmkdir build \u0026\u0026 cd build\ncmake ../src/. . \u0026\u0026 cmake --build .\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinbreux%2Fcpp-basic-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinbreux%2Fcpp-basic-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinbreux%2Fcpp-basic-template/lists"}