{"id":20644434,"url":"https://github.com/neoeno/toy-c-project-template","last_synced_at":"2025-10-13T12:19:57.523Z","repository":{"id":251190329,"uuid":"836673053","full_name":"neoeno/toy-c-project-template","owner":"neoeno","description":"Want to play around with C but aren't sure where to start? This project template will help.","archived":false,"fork":false,"pushed_at":"2024-11-02T16:40:06.000Z","size":8,"stargazers_count":95,"open_issues_count":1,"forks_count":30,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T21:03:14.463Z","etag":null,"topics":["c","project-template"],"latest_commit_sha":null,"homepage":"","language":"C","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/neoeno.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-01T10:16:53.000Z","updated_at":"2025-02-23T03:37:34.000Z","dependencies_parsed_at":"2025-01-16T07:09:26.535Z","dependency_job_id":"efcfe931-66a6-4bce-9cf3-47380463aefc","html_url":"https://github.com/neoeno/toy-c-project-template","commit_stats":{"total_commits":8,"total_committers":3,"mean_commits":"2.6666666666666665","dds":0.25,"last_synced_commit":"fa9e0c9e79d880351fe232eee7067f34c6e57969"},"previous_names":["neoeno/toy-c-project-template"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoeno%2Ftoy-c-project-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoeno%2Ftoy-c-project-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoeno%2Ftoy-c-project-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoeno%2Ftoy-c-project-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neoeno","download_url":"https://codeload.github.com/neoeno/toy-c-project-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406085,"owners_count":20933803,"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","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":["c","project-template"],"created_at":"2024-11-16T16:16:21.938Z","updated_at":"2025-10-13T12:19:57.400Z","avatar_url":"https://github.com/neoeno.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Toy C Project Template\n\nThis is a very simple template for a C project.\n\nIt prioritises having the fewest elements and easiest setup. As a result, it cuts\na few corners that you probably wouldn't want to cut in a professional C project.\n\nBut if you're using C as a learning or hobby tool, this should suit you well.\n\n## Quickstart\n\nYou will need `make`, `clang` and `lldb` installed. \nThese are present by default on macOS, and on Ubuntu can be installed with\n`sudo apt install clang lldb`.\n\n```shell\n# Clone the repo, download a zip, or run...\n; mkdir my-c-project \u0026\u0026 cd my-c-project\n; npx degit neoeno/toy-c-project-template\n\n# Check `make`, `clang` and `lldb` are installed\n; make check\n\n# To build and run `src/main.c`\n; make run\n\n# To run the tests in `src/test.c`\n; make test\n\n# To start `src/main.c` in the debugger\n; make debug\n\n# To start `src/test.c` in the debugger\n; make debug-test\n```\n\nNote that a professional project would probably not use Make for all of these tasks.\n\n## How to write code\n\nThe project is structured as three files:\n\n* `src/main.c`, whose `main` function gets run as the executable, and should probably mostly call functions in `lib.c`.\n* `src/lib.c` where most of your implementation code should go.\n* `src/test.c`, whose `main` function gets run as the tests.\n\nMy suggested workflow is:\n\n* Add functions to `lib.c`, verifying with tests in `test.c`.\n* Add code to `main.c` which calls functions in `lib.c`.\n\nThere is already some example code along these lines.\n\n## Tests\n\nThis project uses a very basic set of C macros to facilitate tests. You can see\nexamples of this in `src/test.c`.\n\nMy intention is that you use these tests just as a way to run bits of your code\nin your development workflow.\n\nYou may want to experiment with creating more test macros that suit your project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoeno%2Ftoy-c-project-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneoeno%2Ftoy-c-project-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoeno%2Ftoy-c-project-template/lists"}