{"id":13599878,"url":"https://github.com/sampsyo/bril","last_synced_at":"2025-05-14T20:08:11.945Z","repository":{"id":38274155,"uuid":"185107499","full_name":"sampsyo/bril","owner":"sampsyo","description":"an educational compiler intermediate representation","archived":false,"fork":false,"pushed_at":"2025-03-12T11:50:12.000Z","size":6603,"stargazers_count":648,"open_issues_count":30,"forks_count":280,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-04-06T13:04:56.637Z","etag":null,"topics":["bril","compiler","programming-language"],"latest_commit_sha":null,"homepage":"https://capra.cs.cornell.edu/bril/","language":"Rust","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/sampsyo.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}},"created_at":"2019-05-06T02:06:57.000Z","updated_at":"2025-03-29T11:14:21.000Z","dependencies_parsed_at":"2024-04-05T23:41:52.875Z","dependency_job_id":"e76d9b87-9bb2-4040-a259-8b3a4b27df6f","html_url":"https://github.com/sampsyo/bril","commit_stats":{"total_commits":1402,"total_committers":97,"mean_commits":14.45360824742268,"dds":"0.48502139800285304","last_synced_commit":"88e6947325c291ebdc916ebaf5a6814cc02d24d7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampsyo%2Fbril","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampsyo%2Fbril/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampsyo%2Fbril/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampsyo%2Fbril/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sampsyo","download_url":"https://codeload.github.com/sampsyo/bril/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741195,"owners_count":21154252,"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":["bril","compiler","programming-language"],"created_at":"2024-08-01T17:01:15.254Z","updated_at":"2025-04-13T15:58:34.793Z","avatar_url":"https://github.com/sampsyo.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"Bril: A Compiler Intermediate Representation for Learning\n=========================================================\n\nBril (the Big Red Intermediate Language) is a compiler IR made for teaching [CS 6120][cs6120], a grad compilers course.\nIt 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\nThis repository contains the [documentation][docs], including the [language reference document][langref], and some infrastructure for Bril.\nThere are some quick-start instructions below for some of the main tools, but\ncheck out the docs for more details about what's available.\n\n[docs]: https://capra.cs.cornell.edu/bril/\n[langref]: https://capra.cs.cornell.edu/bril/lang/index.html\n[brilts]: https://github.com/sampsyo/bril/blob/master/bril-ts/bril.ts\n\n\nInstall the Tools\n-----------------\n\n### Reference Interpreter\n\nYou will want the IR interpreter, which uses [Deno][].\nJust type this:\n\n    $ deno install -g brili.ts\n\nAs Deno tells you, you will then need to add `$HOME/.deno/bin` to [your `$PATH`][path].\nYou will then have `brili`, which takes a Bril program as JSON on stdin and executes it.\n\n[deno]: https://deno.land\n[path]: https://unix.stackexchange.com/a/26059/61192\n\n### Text Format\n\nThe parser \u0026 pretty printer for the human-editable text form of Bril are in Python.\nA good way to install them is using [uv][].\n[Install uv][uv-install], then go to the `bril-txt` directory and type:\n\n    $ uv tool install .\n\nThe tools are called `bril2json` and `bril2txt`.\nThey also take input on stdin and produce output on stdout.\n\n\nTests\n-----\n\nThere are some tests in the `test/` directory.\nThey use [Turnt][], which lets us write the expected output for individual commands.\nInstall it with [uv][]:\n\n    $ uv tool install turnt\n\nThen run all the tests by typing `make test`.\n\n[pip]: https://packaging.python.org/tutorials/installing-packages/\n[cs6120]: https://www.cs.cornell.edu/courses/cs6120/2020fa/\n[turnt]: https://github.com/cucapra/turnt\n[uv]: https://docs.astral.sh/uv/\n[uv-install]: https://docs.astral.sh/uv/getting-started/installation/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsampsyo%2Fbril","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsampsyo%2Fbril","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsampsyo%2Fbril/lists"}