{"id":21068427,"url":"https://github.com/ghaerr/ncc","last_synced_at":"2025-07-18T05:33:07.611Z","repository":{"id":210325611,"uuid":"726274900","full_name":"ghaerr/ncc","owner":"ghaerr","description":"A small self-compiling arm/x86-64 C compiler, linker, C library and ELF loader for command line or library use on macOS, Linux or bare metal","archived":false,"fork":false,"pushed_at":"2024-05-13T05:25:05.000Z","size":778,"stargazers_count":30,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-15T18:03:22.797Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghaerr.png","metadata":{"files":{"readme":"README","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":"2023-12-01T23:18:15.000Z","updated_at":"2025-07-08T02:55:53.000Z","dependencies_parsed_at":"2024-05-11T21:23:37.797Z","dependency_job_id":"a592805e-46fe-4b7f-89cc-229c44fb0944","html_url":"https://github.com/ghaerr/ncc","commit_stats":null,"previous_names":["ghaerr/ncc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ghaerr/ncc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghaerr%2Fncc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghaerr%2Fncc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghaerr%2Fncc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghaerr%2Fncc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghaerr","download_url":"https://codeload.github.com/ghaerr/ncc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghaerr%2Fncc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265705323,"owners_count":23814424,"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":[],"created_at":"2024-11-19T18:21:00.565Z","updated_at":"2025-07-18T05:33:07.589Z","avatar_url":"https://github.com/ghaerr.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"The NCC Project\n===============\n\nNCC is an experimental project combining the amazing work of Ali Rudi's\nneatcc C compiler, neatld ELF linker, and neatlibc C library with an ELF\nloader for macOS, allowing tiny binaries to be created for direct execution\non macOS or Linux, and eventually bare metal.\n\nThis project is a combined fork of Ali's separate repos to eventually\nallow the system to be used as a library for extending the functionality\nof programs by compiling and linking into a running process, or used as\na tiny self-compiling language system for bare metal.\n\nThe C compiler supports a large subset of ANSI C, but most importantly\nlacks support for bitfields, inline assembly and floating point types.\n\nThe compiler supports direct optimized compilation into ELF object\nfiles for Aarch64 and Intel x86-64, and uses a tiny linker to create\nstatic ELF binaries for macOS or Linux. Since the output format is\nELF, macOS requires an ELF loader. The application code, data, heap\nand stack segments can be configured for execution in various parts\nof the 64-bit address space.\n\nThe included C library is self-hosted and makes direct system calls\nto macOS or Linux, producing binaries with no dependencies on any\nshared libraries. Shared libraries are purposely not supported, for\nsimplification of compiler output and speed.\n\nFor now, the startup and syscall parts of the C library are assembled\nusing nasm for x86-64, and the included neatas assembler for Aarch64.\nThe compiler output itself is direct to ELF object, no need for assembly.\n\n\nBUILDING\n========\n\nSince development has just started and is being done on macOS,\ncurrently only macOS has been tested (that should change soon).\n\nTo build for use on a hosted system:\n\n$ make neat                 # build neatcc, ncc, nld, neatas, libc.a and runs demo/test.c\n$ make test                 # run compiler test suite\n\nDIRECTORY STRUCTURE\n===================\n\nneatrun/            Compiler driver 'neatcc'\nneatcc/             Compiler 'ncc'\nneatld/             Linker 'nld'\nneatas/             Aarch64 assembler 'neatas'\nneatlibc/           C startup and library for Linux and macOS 'start.o/libc.a'\nneatdbg/            Debug tools\ndemo/               Demo programs\ntest/               Compiler test suite\nldelf/              ELF loader for non-ELF systems\n\nLICENSE\n=======\nISC License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghaerr%2Fncc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghaerr%2Fncc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghaerr%2Fncc/lists"}