{"id":16906611,"url":"https://github.com/rsms/ckit","last_synced_at":"2025-03-22T10:31:15.177Z","repository":{"id":66105763,"uuid":"367728001","full_name":"rsms/ckit","owner":"rsms","description":"The little C kit","archived":false,"fork":false,"pushed_at":"2021-10-17T20:18:58.000Z","size":462,"stargazers_count":44,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T21:17:04.154Z","etag":null,"topics":["c","ckit","cmake"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rsms.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":"2021-05-15T20:54:58.000Z","updated_at":"2024-09-15T18:03:29.000Z","dependencies_parsed_at":"2023-07-30T11:16:23.045Z","dependency_job_id":null,"html_url":"https://github.com/rsms/ckit","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/rsms%2Fckit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fckit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fckit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fckit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsms","download_url":"https://codeload.github.com/rsms/ckit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244198351,"owners_count":20414443,"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","ckit","cmake"],"created_at":"2024-10-13T18:43:34.030Z","updated_at":"2025-03-22T10:31:15.167Z","avatar_url":"https://github.com/rsms.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# ckit\n\nThe little C kit\n\n- `bin/ckit` — tool for building and testing projects (calls cmake \u0026 ninja)\n- `pkg/rbase` — common functionality for C projects (optional to use)\n- `example/hello/` — an example project\n- `ckit.cmake` — CMake routines\n\nQuick install: (see [Installing](#installing) for details and options)\n\n```sh\ngit clone https://github.com/rsms/ckit.git ~/ckit\ncat \u003c\u003c EOF \u003e\u003e ~/`[[ $SHELL == *\"/zsh\" ]] \u0026\u0026 echo .zshrc || echo .bashrc`\nexport CKIT_DIR=\\$HOME/ckit\nexport PATH=\\$PATH:\\$CKIT_DIR/bin\nEOF\n```\n\n\n## `bin/ckit`\n\nThis multitool provides a few convenience commands:\n\n- `ckit build` or `ckit` — build project of current directory\n- `ckit test` — build \u0026 run tests\n- `ckit watch` — build \u0026 run as sources files change\n- `ckit init` — generate `cmakelists.txt` file for a project\n\nSee `ckit -help` for details or [have a look at an example project](example/hello)\n\n\n## Installing\n\nckit can be installed in two ways:\n- Placed in a shared location, for example `~/ckit`\n- \"Vendored\" as a subfolder in a project, for example `myproject/ckit`\n\nExample of ckit installed in a shared location:\n\n```sh\ngit clone https://github.com/rsms/ckit.git ~/ckit\nexport CKIT_DIR=$HOME/ckit\nexport PATH=$PATH:$CKIT_DIR/bin\nmkdir ~/myproject\ncd ~/myproject\necho \"int main() { return 0; }\" \u003e hello.c\nckit init                # generate cmakelists.txt\nckit build               # build all targets\n./out/debug/myproject    # run example program\nckit test                # build \u0026 run tests\nckit watch -r myproject  # build \u0026 run as sources change\n```\n\n\nExample of ckit as a subdirectory:\n\n```sh\nmkdir ~/myproject\ncd ~/myproject\ngit clone https://github.com/rsms/ckit.git\necho \"int main() { return 0; }\" \u003e hello.c\n./ckit/bin/ckit init                # generate cmakelists.txt\n./ckit/bin/ckit build               # build all targets\n./out/debug/myproject               # run example program\n./ckit/bin/ckit test                # build \u0026 run tests\n./ckit/bin/ckit watch -r myproject  # build \u0026 run as sources change\n```\n\nDependencies:\n- modern C shell like zsh, bash, ash or hush\n- modern C compiler like clang 10 or GCC 10 (one that supports C11)\n- [ninja](https://ninja-build.org)\n- [cmake](https://cmake.org) \u003e=3.12\n\nAdditionally, the `ckit watch` command requires:\n- [ninja](https://ninja-build.org) version \u003e=1.9 (for `ninja -t deps`)\n- [fswatch](https://github.com/emcrisostomo/fswatch)\n  OR [inotify-tools](https://github.com/inotify-tools/inotify-tools)\n\nNote that you don't have to use `bin/ckit`.\nckit packages are plain CMake projects and thus you can just use CMake if you want.\n\n\n## Notes\n\nSome CMake reading:\n- [Modern CMake](https://cliutils.gitlab.io/modern-cmake/)\n- [Effective Modern CMake](https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsms%2Fckit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsms%2Fckit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsms%2Fckit/lists"}