{"id":42820816,"url":"https://github.com/synalice/perfect-helloworld","last_synced_at":"2026-01-30T06:54:00.854Z","repository":{"id":329978371,"uuid":"1121079265","full_name":"synalice/perfect-helloworld","owner":"synalice","description":"A reference-grade C helloworld project","archived":false,"fork":false,"pushed_at":"2026-01-08T10:10:06.000Z","size":131,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-09T02:13:08.520Z","etag":null,"topics":["c","cross-compilation","meson","nix"],"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/synalice.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-22T12:02:35.000Z","updated_at":"2026-01-08T18:06:07.000Z","dependencies_parsed_at":"2025-12-24T03:01:20.977Z","dependency_job_id":null,"html_url":"https://github.com/synalice/perfect-helloworld","commit_stats":null,"previous_names":["synalice/perfect-helloworld"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/synalice/perfect-helloworld","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synalice%2Fperfect-helloworld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synalice%2Fperfect-helloworld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synalice%2Fperfect-helloworld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synalice%2Fperfect-helloworld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synalice","download_url":"https://codeload.github.com/synalice/perfect-helloworld/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synalice%2Fperfect-helloworld/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28907055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T06:42:00.998Z","status":"ssl_error","status_checked_at":"2026-01-30T06:41:58.659Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c","cross-compilation","meson","nix"],"created_at":"2026-01-30T06:54:00.044Z","updated_at":"2026-01-30T06:54:00.832Z","avatar_url":"https://github.com/synalice.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# perfect-helloworld\n\nA _(deliberately over-engineered)_ reference-grade C \"Hello World\" project.\n\nThis is what a modern, best practice-oriented C project might look like in 2026.\nThe project is aimed at developers looking for a opinionated and modern starting\npoint.\n\nFeedback and constructive criticism are welcomed!\n\n## Non-goals\n\n- Being the smallest or simplest C \"Hello World\" example\n- Avoiding modern tooling for portability\n\n## Features\n\n- Meson build system\n- Prioritizes Clang instead of GCC\n- Cross-compilation support\n- Nix flake for dependency management\n- MIT license\n- GitHub Actions CI\n- Standard project structure (`docs/`, `include/`, `src/`, `tests/`, `scripts/`)\n- Uses `llvm-vs-code-extensions.vscode-clangd` instead of `ms-vscode.cpptools`\n- Doxygen support\n- Pkg-config (generates `.pc` file)\n- Unit testing support via [Unity](https://www.throwtheswitch.org/unity) testing\n  framework\n\n### Pre-commit hooks\n\nThe following checks are enforced via [prek](https://github.com/j178/prek) (a\nlightweight alternative to [pre-commit](https://pre-commit.com/)):\n\n- `clang-format`\n- `clang-tidy`\n- `meson format`\n- `nix flake check`\n- `nix fmt`\n- [IWYU](https://include-what-you-use.org/)\n- [cppcheck](https://en.wikipedia.org/wiki/Cppcheck)\n- [REUSE](https://reuse.software/)\n- [jq](https://jqlang.org/) (for JSON formatting);\n\n## Building from source\n\n```bash\ngit clone https://github.com/synalice/perfect-helloworld\ncd perfect-helloworld\nmeson setup builddir/\nmeson compile -C builddir/\nmeson install -C builddir/\n```\n\n## Building with Nix\n\n```bash\ngit clone https://github.com/synalice/perfect-helloworld\ncd perfect-helloworld\nnix build .#default.out\nnix build .#default.dev\nnix build .#default.doc\n```\n\n## Using Nix `devShell`\n\nNix can automatically install all dependencies, toolchain and setup the whole\ndevelopment environment. To do that run\n\n```bash\nnix develop\n```\n\n## Cross-compilation\n\nTo cross-compile the project, run this script\n\n```bash\n./scripts/cross-compile.sh aarch64-multiplatform out\n```\n\n\u003e [!WARNING]\\\n\u003e Invoking it for the first time may take some time, because Nix will download\n\u003e or build some parts of the cross toolchain.\n\n\u003e [!TIP]\\\n\u003e To cross-compile for different host architectures, replace\n\u003e `aarch64-multiplatform` with `riscv64` or something else. [Read more\n\u003e here](https://nix.dev/tutorials/cross-compilation.html#choosing-the-host-platform-with-nix).\n\n\u003e [!TIP]\\\n\u003e To build the `dev` or `doc` derivation, replace `out` with `dev` or `doc`.\n\n## AddressSanitizer aka ASan aka Sanitizers\n\nTo build the project with AddressSanitizer configure the project like this\n\n```bash\nmeson setup --reconfigure -Db_sanitize=address,undefined,leak -Db_lundef=false builddir/\n```\n\n\u003e [!NOTE]\\\n\u003e Without `-Db_lundef=false` Meson complains with the following warning message:\n\u003e\n\u003e ```text\n\u003e WARNING: Trying to use ['address', 'undefined', 'leak'] sanitizer on Clang with b_lundef.\n\u003e This will probably not work.\n\u003e Try setting b_lundef to false instead.\n\u003e ```\n\n## License\n\nThis project is under the [MIT](https://opensource.org/license/mit) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynalice%2Fperfect-helloworld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynalice%2Fperfect-helloworld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynalice%2Fperfect-helloworld/lists"}