{"id":18106728,"url":"https://github.com/deathlesz/brainfuck","last_synced_at":"2026-05-13T12:36:03.174Z","repository":{"id":259076480,"uuid":"873284917","full_name":"deathlesz/brainfuck","owner":"deathlesz","description":"Brainfuck parser, interpreter, JIT compiler and LLVM frontend all-in-one.","archived":false,"fork":false,"pushed_at":"2024-11-06T20:05:44.000Z","size":97,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T12:25:57.898Z","etag":null,"topics":["brainfuck","compiler","interpreter","jit","llvm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deathlesz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2024-10-15T22:57:52.000Z","updated_at":"2024-11-06T20:05:48.000Z","dependencies_parsed_at":"2024-11-06T21:19:10.987Z","dependency_job_id":"208bb9c9-9b45-4ffe-905b-20877fb46d32","html_url":"https://github.com/deathlesz/brainfuck","commit_stats":null,"previous_names":["deathlesz/brainfuck"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathlesz%2Fbrainfuck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathlesz%2Fbrainfuck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathlesz%2Fbrainfuck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathlesz%2Fbrainfuck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deathlesz","download_url":"https://codeload.github.com/deathlesz/brainfuck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445650,"owners_count":20939953,"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":["brainfuck","compiler","interpreter","jit","llvm"],"created_at":"2024-10-31T23:07:51.474Z","updated_at":"2025-10-28T20:06:52.201Z","avatar_url":"https://github.com/deathlesz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Brainfuck\n\nAn optimizing interpreter, JIT compiler and LLVM frontend all-in-one for [Brainfuck](https://brainfuck.org/brainfuck.html).\n## Installation\n\nI hate GitHub Actions, so you can only build it yourself. ¯\\\\\\_(ツ)_/¯ \n\n### Building\n- Clone this repository using `git`:\n```sh\n$ git clone https://github.com/deathlesz/brainfuck.git\n```\n- Build it using `cargo` in either debug or release mode\n```sh\n# For release mode\n$ cargo build --release # to build all subprojects (interpreter, jit, llvm)\n$ cargo build -p [project_name] --release # build specific subproject\n# For debug mode, remove --release\n```\n- The compiled binary should be in `./target/release` or `./target/debug`.\n- Alternatively, you can run the binary using `cargo run` with the same arguments as `cargo build`\n## Usage\n\nAll subprojects except for parser are CLIs. `Interpreter` and `JIT` binaries have the same interface.\n\n### `Interpreter/JIT`\n```\nRuns brainfuck using interpreter/JIT compiler.\n\nUsage: interpreter [SOURCE]\n\nArguments:\n  [SOURCE]  Path to file with source code\n\nOptions:\n  -h, --help     Print help\n  -V, --version  Print version\n```\nFor example, `./interpreter src.b`.\n### `LLVM`\n```\nCompiles brainfuck into object files/LLVM IR.\n\nUsage: llvm [OPTIONS] [SOURCE]\n\nArguments:\n  [SOURCE]\n          Path to file with source code\n\nOptions:\n  -o, --output \u003cOUTPUT\u003e\n          Path to output file\n\n  -t, --target \u003cTARGET\u003e\n          Target to compile for (e.g. x86_64-pc-linux-gnu)\n\n  -f, --features \u003cFEATURES\u003e\n          Features to enable (e.g. +sse2,+cx16,+sahf,-tbm). You can use 'native' to enable all features that current machine supports\n\n  -r, --run\n          Use JIT compiler and run program\n\n  -e, --emit \u003cEMIT\u003e\n          [default: object]\n\n          Possible values:\n          - object:   Emit object file\n          - llvm-ir:  Emit generated LLVM IR\n          - assembly: Emit generated assembly\n\n  -s, --safe\n          Enable bounds check on \u003e/\u003c. Can be really slow\n\n  -O\n          Enable optimization passes\n\n  -h, --help\n          Print help (see a summary with '-h')\n\n  -V, --version\n          Print version\n```\nFor example, `./llvm src.b`, `./llvm src.b -o out.o`, `./llvm src.b -e llvm-ir -o out.ll`, etc.\n### Live mode\n`Interpreter`, `JIT` and `LLVM` subprojects all have live mode. You can use it by running the binary without `SOURCE`. You'll be prompted with the following:\n```\n! Live mode. Press ^D to finish\n```\nYou can enter any brainfuck code and then press Ctrl+D to interpret/compile it. You can also pipe files into live mode, e.g. \n```sh\n$ echo \"+++++[-\u003e++++++++++\u003c]\u003e.\" | ./llvm -o out.ll -e llvm-ir -O\n```\n## Acknowledgements\n- [Brainfuck archive](https://sange.fi/esoteric/brainfuck)  by Jeff Johnston and Panu Kalliokoski\n- [Some brainfuck fluff](https://brainfuck.org) by Daniel Cristofani\n- And many other resources \u003c3\n## License\n\nThis project is distributed under the terms of both the MIT license and the Apache License (Version 2.0).\n\nSee [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeathlesz%2Fbrainfuck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeathlesz%2Fbrainfuck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeathlesz%2Fbrainfuck/lists"}