{"id":17168789,"url":"https://github.com/sanix-darker/c-starter","last_synced_at":"2025-03-24T18:43:44.476Z","repository":{"id":109579341,"uuid":"262700601","full_name":"Sanix-Darker/c-starter","owner":"Sanix-Darker","description":"A small and lightweight C starter application(Cello, Clib, Unittests, etc...).","archived":false,"fork":false,"pushed_at":"2023-03-25T09:34:35.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T23:28:15.382Z","etag":null,"topics":["c","cello","clib","starter","starter-template","test"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sanix-Darker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-05-10T02:56:23.000Z","updated_at":"2023-03-24T12:30:58.000Z","dependencies_parsed_at":"2023-04-21T08:36:37.331Z","dependency_job_id":null,"html_url":"https://github.com/Sanix-Darker/c-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sanix-Darker%2Fc-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sanix-Darker%2Fc-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sanix-Darker%2Fc-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sanix-Darker%2Fc-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sanix-Darker","download_url":"https://codeload.github.com/Sanix-Darker/c-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245330905,"owners_count":20597863,"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","cello","clib","starter","starter-template","test"],"created_at":"2024-10-14T23:12:50.966Z","updated_at":"2025-03-24T18:43:44.444Z","avatar_url":"https://github.com/Sanix-Darker.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C-starter\n\nA small and lightweight C starter application.\n\n## Features\n\n- A Hight level programming based on [Cello](http://libcello.org/learn).\n- A package manager implemented with [CLib](https://github.com/clibs/clib).\n- A Basic unitTest with asserts.\n- A documentation template (not up to date).\n\n## Project tree\n\nThe project structure :\n```shell\n.\n├── build.sh\n├── cello_install.sh\n├── clib_install.sh\n├── doc\n│   └── index.html\n├── README.md\n├── run.sh\n├── run_tests.sh\n├── src\n│   ├── func.c\n│   ├── headers\n│   │   └── func.h\n│   └── main.c\n└── tests\n    ├── assert.h\n    └── tests.c\n```\n\n## To install\n\nWorks only for Linux users (Ubuntu/Debian), you just have to run : \n```shell\n# First install cello\nbash ./cello_install.sh\n\n# or\nmake install-cello\n\n# Then install clib\n# clib is a packet manager for c libraries\nbash ./clib_install.sh\n\n# or\nmake install-clib\n\n# To search a C-library\n# clib search [package-name]\n# -\n# To Install the C-library\n# clib install \u003cuser\u003e/\u003crepo\u003e\n```\n\n## To build and run\n\nTo build your app in `./src`, you just have to run :\n```shell\nsh ./build.sh\n\n# app.bin will be generated, now you can run it by hitting :\n./dist/app.bin\n\n# or make run, will build and execute it\nmake dev\n# replace dev by prod to have an optimized portable executable with no debug logs\n```\n\n## Documentation\n\nA Documentation template is in `./doc` and will be updated !\n\n\n## To run Tests\n\nI implemented a basic assert method in tests to performs some tests on methods in `./src/func.c`, you just have to run :\n```shell\nbash ./run_tests.sh\n\n# Expected ouutput :\n\n# [+] -----------------------------------------------\n# [+] Start tests...\n# [+] \n# [+] \u003e 'test_helloworld()' passed successfully,\n# [+] ===============================================\n# [+] Reports 1/1 tests passed !\n# [+] -----------------------------------------------\n```\n\nOtherwhise, you can use `cmocka`, an elegant unit testing framework for C with support for mock objects; install it by running:\n```shell\n# After installed clib\nclib install cmocka\n```\n\n## Bonus For building your own Clib\n\n**Note : You don't need this in this project, it just show you how to create a CLib if you want to !**\nIf you want to create a C-Lib library, you just have to put in the root of your repo a `package.json` file with this kind of structure : \n```json\n{\n  \"name\": \"repo\",\n  \"author\": \"darker\",\n  \"version\": \"0.0.1\",\n  \"repo\": \"\u003cuser\u003e/\u003crepo\u003e\",\n  \"description\": \"The description\",\n  \"keywords\": [\"some\", \"keywords\"],\n  \"license\": \"MIT\",\n  \"src\": [\"src/main.c\", \"src/main.h\"]\n}\n```\n\n## Author\n\n- Sanix-darker\n\n## LICENSE\n\n[MIT License](https://github.com/Sanix-Darker/c-starter/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanix-darker%2Fc-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanix-darker%2Fc-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanix-darker%2Fc-starter/lists"}