{"id":19338170,"url":"https://github.com/jserv/mazucc","last_synced_at":"2025-04-05T11:09:39.458Z","repository":{"id":146557280,"uuid":"182575670","full_name":"jserv/MazuCC","owner":"jserv","description":"A minimalist C compiler with x86_64 code generation","archived":false,"fork":false,"pushed_at":"2020-10-09T03:11:18.000Z","size":55,"stargazers_count":524,"open_issues_count":6,"forks_count":64,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-03-29T10:09:19.874Z","etag":null,"topics":["c","compiler","gcc-complier","gnu","x86-64"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jserv.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}},"created_at":"2019-04-21T19:45:22.000Z","updated_at":"2025-03-27T06:22:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"efd95810-d3bb-4804-8a58-e8eb70350390","html_url":"https://github.com/jserv/MazuCC","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/jserv%2FMazuCC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2FMazuCC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2FMazuCC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2FMazuCC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jserv","download_url":"https://codeload.github.com/jserv/MazuCC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"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","compiler","gcc-complier","gnu","x86-64"],"created_at":"2024-11-10T03:16:33.174Z","updated_at":"2025-04-05T11:09:39.438Z","avatar_url":"https://github.com/jserv.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MazuCC\n\nMazuCC is a minimalist C compiler with x86_64 code generation.\nIt is intended to support partial C99 language features while keeping the code\nas small and simple as possible.\n\n\n## Build\n\nRun make to build:\n```shell\n$ make\n```\n\nMazuCC comes with unit tests. To run the tests, give \"check\" as an argument:\n```shell\n$ make check\n```\n\nMazuCC is known to work on both GNU/Linux and macOS.\n\nUse MazuCC to compile C source:\n```shell\n$ ./mzcc  sample/nqueen.c\n```\n\nAlternatively, MazuCC accepts the stream from standard input. The equivalent\n form for the above command is:\n\n ```shell\n $ cat sample/nqueen.c | ./mzcc -\n ```\n\nYou will get the generated x86_64 assembly in AT\u0026T syntax. The output can be\nassembled and linked into a valid executable:\n```shell\n$ ./mzcc -o sample/nqueen.s sample/nqueen.c\n$ gcc -no-pie -o sample/nqueen sample/nqueen.s\n```\n\nIf MazuCC is compiled and executed on macOS, the above argument `-no-pie`\nshould be eliminated.\n\nReference output of MazuCC-compiled `sample/nqueen`:\n```\nQ . . . . . . .\n. . . . Q . . .\n. . . . . . . Q\n. . . . . Q . .\n. . Q . . . . .\n. . . . . . Q .\n. Q . . . . . .\n. . . Q . . . .\n```\n\nAlternatively, you can dump internal abstract syntax tree:\n```shell\necho 'struct {int x; char y; struct { int t; } z; } a;' | ./mzcc --dump-ast -\n```\n\nThe expected output in S-expression form:\n```\n(decl (struct (int)\n              (char)\n              ((struct (int)))) a)\n```\n\n## Acknowledge\n\nMazuCC is heavily inspired by [8cc](https://github.com/rui314/8cc).\n\n## License\n\nMazuCC is freely redistributable under the BSD 2 clause license. Use of\nthis source code is governed by a BSD-style license that can be found in the\nLICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjserv%2Fmazucc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjserv%2Fmazucc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjserv%2Fmazucc/lists"}