{"id":16405682,"url":"https://github.com/umut-sahin/c-examples","last_synced_at":"2025-07-10T05:33:15.509Z","repository":{"id":145635104,"uuid":"222772099","full_name":"umut-sahin/c-examples","owner":"umut-sahin","description":"Collection of examples in C to show how to get things done in an idiomatic way","archived":false,"fork":false,"pushed_at":"2019-11-19T19:25:34.000Z","size":17,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-23T19:24:51.955Z","etag":null,"topics":["c","examples","idiomatic"],"latest_commit_sha":null,"homepage":null,"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/umut-sahin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-19T19:22:32.000Z","updated_at":"2021-03-27T02:15:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"750f5cbb-597a-492a-b01a-cd10da59f3b2","html_url":"https://github.com/umut-sahin/c-examples","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/umut-sahin/c-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umut-sahin%2Fc-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umut-sahin%2Fc-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umut-sahin%2Fc-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umut-sahin%2Fc-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umut-sahin","download_url":"https://codeload.github.com/umut-sahin/c-examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umut-sahin%2Fc-examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264535990,"owners_count":23624404,"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","examples","idiomatic"],"created_at":"2024-10-11T06:06:58.300Z","updated_at":"2025-07-10T05:33:15.466Z","avatar_url":"https://github.com/umut-sahin.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eC Examples\u003c/h1\u003e\n  Various code examples in C to show how to get things done in an idiomatic way\n\u003c/div\u003e\n\n## Installing\n\nYou need to have a **C compiler**, which supports the [C11] standard, and [CMake] **v3.9** or higher installed in order to run the examples.\n\nSome examples depend on external libraries. \nThose external libraries' availability are checked by [CMake] before the build. \nSo if you got a [CMake] error, it's probably because of a missing library.\nAnyway, to install run the examples, just clone the repository using the following commands, and you are good to go.\n\n```\n$ git clone https://github.com/umut-sahin/c-examples.git\n$ cd c-examples\n```\n\n## Building\n\nYou can use the following command to build every single example.\n\n```\n$ make build verbose=1\n```\n\n## Running a specific example\n\n```\n$ make run target=\u003cexample-name\u003e\n```\n\nAlso, you can pass arguments like so\n\n```\n$ make run target=\u003cexample-name\u003e args=\"[arguments...]\"\n```\n\nNote that there are some examples, which are in the form of a library, therefore, does not come with an executable. \nFor those examples, you may use the test command like so\n\n```\n$ make test target=\u003cexample-name\u003e\n```\n\n## Available examples\n\n- [command-line-arguments]\n- [http-hello-world-server]\n- [memory-mapped-io]\n- [parking-pthreads]\n- [pthreads]\n- [read-from-console]\n- [signalfd-with-epoll]\n- [tcp-echo-server-with-epoll]\n- [write-to-console]\n\n## Changelog\n\nSee [CHANGELOG].\n\n## License\n\nThis repository is released under [MIT license].\nPlease see the [LICENSE] for further information.\n\n## Contributing\n\nContributions are welcome!\nPlease see [CONTRIBUTING] for guidance.\n\n## Authors\n\nSee [AUTHORS].\n\n\n[//]: # (Links)\n\n[AUTHORS]:\n  https://github.com/umut-sahin/c-examples/blob/master/AUTHORS.md\n[C11]:\n  https://en.wikipedia.org/wiki/C11_(C_standard_revision)\n[CHANGELOG]:\n  https://github.com/umut-sahin/c-examples/blob/master/CHANGELOG.md\n[CMake]:\n  https://cmake.org/\n[command-line-arguments]:\n  https://github.com/umut-sahin/c-examples/tree/master/command-line-arguments\n[CONTRIBUTING]:\n  https://github.com/umut-sahin/c-examples/blob/master/CONTRIBUTING.md\n[http-hello-world-server]:\n  https://github.com/umut-sahin/c-examples/tree/master/http-hello-world-server\n[LICENSE]:\n  https://github.com/umut-sahin/c-examples/blob/master/LICENSE\n[memory-mapped-io]:\n  https://github.com/umut-sahin/c-examples/tree/master/memory-mapped-io\n[MIT License]:\n  https://tldrlegal.com/license/mit-license\n[parking-pthreads]:\n  https://github.com/umut-sahin/c-examples/tree/master/parking-pthreads\n[pthreads]:\n  https://github.com/umut-sahin/c-examples/tree/master/pthreads\n[read-from-console]:\n  https://github.com/umut-sahin/c-examples/tree/master/read-from-console\n[signalfd-with-epoll]:\n  https://github.com/umut-sahin/c-examples/tree/master/signalfd-with-epoll\n[tcp-echo-server-with-epoll]:\n  https://github.com/umut-sahin/c-examples/tree/master/tcp-echo-server-with-epoll\n[write-to-console]:\n  https://github.com/umut-sahin/c-examples/tree/master/write-to-console\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumut-sahin%2Fc-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumut-sahin%2Fc-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumut-sahin%2Fc-examples/lists"}