{"id":27935591,"url":"https://github.com/rezigned/hello-world-sizes","last_synced_at":"2025-05-07T06:49:45.012Z","repository":{"id":291530535,"uuid":"977620675","full_name":"rezigned/hello-world-sizes","owner":"rezigned","description":"📦 Comparing static binary sizes of \"Hello, World!\" programs across languages using ❄️ Nix + Flakes.","archived":false,"fork":false,"pushed_at":"2025-05-05T16:17:44.000Z","size":355,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T06:49:40.614Z","etag":null,"topics":["flakes","hello-world","nix","static-binaries"],"latest_commit_sha":null,"homepage":"","language":"Nix","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/rezigned.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}},"created_at":"2025-05-04T16:10:54.000Z","updated_at":"2025-05-05T16:17:22.000Z","dependencies_parsed_at":"2025-05-05T07:40:34.551Z","dependency_job_id":"a7a8d0eb-3b0f-4c43-b8a2-8e6d39e14438","html_url":"https://github.com/rezigned/hello-world-sizes","commit_stats":null,"previous_names":["rezigned/hello-world-sizes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezigned%2Fhello-world-sizes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezigned%2Fhello-world-sizes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezigned%2Fhello-world-sizes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezigned%2Fhello-world-sizes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rezigned","download_url":"https://codeload.github.com/rezigned/hello-world-sizes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252831190,"owners_count":21810780,"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":["flakes","hello-world","nix","static-binaries"],"created_at":"2025-05-07T06:49:44.474Z","updated_at":"2025-05-07T06:49:45.004Z","avatar_url":"https://github.com/rezigned.png","language":"Nix","readme":"# Hello World Sizes\n\n📦 Compare the static binary size of a **\"Hello, World!\"** program across programming languages.\n\n\u003e [!NOTE]\n\u003e This project automatically builds and records binary sizes of \"Hello, World!\" implementations for various languages like C, C++, Rust, Go, Zig, Nim, V, and more — all **statically linked**!\n\n![Latest size comparison](.github/reports/binary_size_latest.png)\n\n![Latest size comparison](.github/reports/memory_usage_latest.png)\n\n---\n\n## 📝 Rules\n\nTo ensure fair and meaningful comparisons:\n\n* ✅ Each \"Hello, World!\" program must be idiomatic in its language (e.g. no inline assembly, etc.).\n* ✅ Output must be a simple \"Hello, World!\" to stdout.\n* ✅ Only statically linked binaries are allowed.\n* ✅ Standard toolchains only (no exotic or size-optimized forks).\n* ✅ Compiler optimizations (e.g. -Os, -s) are allowed and noted.\n\n---\n\n## 🧩 How to add a new language\n\n1. Copy the [src/_template](src/_template) directory and and rename it to match the language name (e.g. `src/go`, `src/rust`).\n2. Update `src/{lang}/flake.nix` to build a statically linked `hello` binary in that language.\n3. Add the new language to the `inputs` and `langs` list in the top-level [flake.nix](flake.nix).\n4. Run `nix run` to build the new language and generate a report.\n\n---\n\n## 🎯 Goals\n\nThe goal of this project is to help me learn ❄️ [Nix](https://nixos.org/) + [Flakes](https://nixos.wiki/wiki/Flakes) by creating reproducible builds and comparing static binary sizes across languages.\n\n---\n\n## 📊 Reports\n\nView historical reports under [`./.github/reports/`](./.github/reports/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezigned%2Fhello-world-sizes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frezigned%2Fhello-world-sizes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezigned%2Fhello-world-sizes/lists"}