{"id":16334337,"url":"https://github.com/junaire/brandy","last_synced_at":"2026-03-05T07:01:41.119Z","repository":{"id":44400037,"uuid":"512451909","full_name":"junaire/brandy","owner":"junaire","description":"Compiler hacks based on bril IR","archived":false,"fork":false,"pushed_at":"2023-08-27T08:48:21.000Z","size":527,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T23:36:25.689Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/junaire.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-07-10T14:11:11.000Z","updated_at":"2023-11-20T05:10:49.000Z","dependencies_parsed_at":"2025-04-10T11:35:46.847Z","dependency_job_id":"508d6af8-560b-42d2-8ad3-dfc4d0d8b669","html_url":"https://github.com/junaire/brandy","commit_stats":null,"previous_names":["junaire/brandy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/junaire/brandy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junaire%2Fbrandy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junaire%2Fbrandy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junaire%2Fbrandy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junaire%2Fbrandy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junaire","download_url":"https://codeload.github.com/junaire/brandy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junaire%2Fbrandy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30113111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-10-10T23:38:07.968Z","updated_at":"2026-03-05T07:01:40.693Z","avatar_url":"https://github.com/junaire.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e🐱 Brandy\u003c/code\u003e\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003cstrong\u003eC++ implementation of Bril compiler\u003c/strong\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003e “What I cannot create, I do not understand”\n\n## About\n\nI want to learn about compiler internals, specifically IR analysis and optimization. Although LLVM is a valuable resource, it can be quite complex. Therefore, I have decided to develop my own compiler because hands-on experience is the most effective way to learn.\n\nTo keep things as simple as possible, my compiler does not currently have a frontend, and it may never have one. Also, I prefer not to write the IR frontend and the serialization framework.\nBrandy uses Bril, which is an educational IR used in Cornel CS 6120. Bril's canonical representation is JSON so all Instructions in Brandy is just a thin wrapper of a JSON object, which makes things a lot easier so I can focus on the analysis and optimization part.\n\nBelow is the official introduction about Bril language:\n\u003e Bril (the Big Red Intermediate Language) is a compiler IR made for teaching CS 6120, a grad compilers course.\n\u003e \n\u003e It is an extremely simple instruction-based IR that is meant to be extended.\nIts canonical representation is JSON, which makes it easy to build tools from scratch to manipulate it.\n\n* [docs](https://capra.cs.cornell.edu/bril/)\n* [langref](https://capra.cs.cornell.edu/bril/lang/index.html)\n\n## Build\n```bash\nmkdir build \u0026\u0026 cd build\ncmake ../ \u0026\u0026 make\n```\n\n## Install the parser\n```bash\npip3 install --user flit\ncd bril-txt\nflit install --symlink --user\n```\n## Install the IR interpreter (optional)\n\nFirst install [deno](https://deno.com/)\n```bash\ndeno install brili.ts\n```\nThen add deno to your $PATH\n\n## Run the compiler\n```bash\ncat test/loop-ssa.bril | bril2json | build/bin/brandy | bril2txt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaire%2Fbrandy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunaire%2Fbrandy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaire%2Fbrandy/lists"}