{"id":27734948,"url":"https://github.com/hez2010/brainfly","last_synced_at":"2025-10-29T02:08:17.498Z","repository":{"id":275047004,"uuid":"924902017","full_name":"hez2010/Brainfly","owner":"hez2010","description":"A high-performance Brainfuck JIT and AOT compiler built on top of C# type system","archived":false,"fork":false,"pushed_at":"2025-10-16T12:22:42.000Z","size":936,"stargazers_count":46,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-17T15:04:19.993Z","etag":null,"topics":["brainfuck","compiler","csharp","dotnet","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"C#","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/hez2010.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-30T21:03:26.000Z","updated_at":"2025-10-16T13:02:30.000Z","dependencies_parsed_at":"2025-04-28T13:52:39.281Z","dependency_job_id":"a8e97ab3-d68b-46cc-bbfc-1f7974f7d52a","html_url":"https://github.com/hez2010/Brainfly","commit_stats":null,"previous_names":["hez2010/typedbfsharp","hez2010/brainfly"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hez2010/Brainfly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hez2010%2FBrainfly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hez2010%2FBrainfly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hez2010%2FBrainfly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hez2010%2FBrainfly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hez2010","download_url":"https://codeload.github.com/hez2010/Brainfly/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hez2010%2FBrainfly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281544195,"owners_count":26519554,"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","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["brainfuck","compiler","csharp","dotnet","hacktoberfest"],"created_at":"2025-04-28T13:44:59.237Z","updated_at":"2025-10-29T02:08:17.468Z","avatar_url":"https://github.com/hez2010.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Brainfly\r\n\r\nA Brainf**k JIT and AOT compiler built on top of C# type system.\r\n\r\nLeveraged .NET generic type system and abstract static interface methods to achieve great performance.\r\n\r\nSee [Introduction](Intro.md) for details.\r\n\r\n## Build\r\n\r\n```bash\r\ndotnet build -c Release\r\n```\r\n\r\n## Usage\r\n\r\n```bash\r\ndotnet run -c Release -- build \u003cmemory_size\u003e \u003cfile\u003e\r\ndotnet run -c Release -- run \u003cmemory_size\u003e \u003cfile\u003e\r\ndotnet run -c Release -- bench \u003cmemory_size\u003e \u003cfile\u003e\r\n```\r\n\r\nFor example,\r\n\r\n```bash\r\ndotnet run -c Release -- build 1024 a.bf # produce a self-contained a.cs so that you can run it directly with .NET or build it with .NET NativeAOT\r\ndotnet run -c Release -- run 1024 a.bf # running directly from source file a.bf\r\ndotnet run -c Release -- bench 1024 a.bf # benchmark directly from source file a.bf\r\n```\r\n\r\n## Benchmarks\r\n\r\n### Mandelbrot\r\n\r\n| Name | Time (ms) | Rank | Ratio | Binary size | Description |\r\n| --- | --- | --- | --- | --- | --- |\r\n| Interpreter in C | 4,874.6587 | 5 | 5.59 | N/A | A Brainfuck interpreter written in C |\r\n| GCC | 901.0225 | 3 | 1.03 | **52 KB** | Translate to C, then build with `gcc -O3 -march=native` |\r\n| Clang | 881.7177 | 2 | 1.01 | 56 KB | Translate to C, then build with `clang -O3 -march=native` |\r\n| .NET JIT | 925.1596 | 4 | 1.06 | N/A | Use JIT to generate the type and then instantiate it for running |\r\n| .NET AOT | **872.2287** | 1 | 1.00 | 1732 KB | Use .NET NativeAOT to build the exe that runs the compiled type directly |\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhez2010%2Fbrainfly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhez2010%2Fbrainfly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhez2010%2Fbrainfly/lists"}