{"id":21343592,"url":"https://github.com/xavier-maruff/bft","last_synced_at":"2026-04-12T05:31:24.230Z","repository":{"id":169902410,"uuid":"414886128","full_name":"Xavier-Maruff/bft","owner":"Xavier-Maruff","description":"An optimizing multi-target brainf*ck transpiler","archived":false,"fork":false,"pushed_at":"2021-12-02T09:58:02.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T15:47:55.447Z","etag":null,"topics":["ada","brainfuck","brainfuck-transpiler","c","compiler","cpp","fortran90","js","rust","transpiler"],"latest_commit_sha":null,"homepage":"","language":"Brainfuck","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/Xavier-Maruff.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":"2021-10-08T07:19:44.000Z","updated_at":"2023-05-26T23:21:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9fbade8-c736-45f7-a2e9-7c6d3e98275c","html_url":"https://github.com/Xavier-Maruff/bft","commit_stats":null,"previous_names":["xavier-maruff/bft"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xavier-Maruff%2Fbft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xavier-Maruff%2Fbft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xavier-Maruff%2Fbft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xavier-Maruff%2Fbft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xavier-Maruff","download_url":"https://codeload.github.com/Xavier-Maruff/bft/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243818199,"owners_count":20352629,"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":["ada","brainfuck","brainfuck-transpiler","c","compiler","cpp","fortran90","js","rust","transpiler"],"created_at":"2024-11-22T01:13:54.289Z","updated_at":"2025-12-30T22:15:35.173Z","avatar_url":"https://github.com/Xavier-Maruff.png","language":"Brainfuck","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠 bft\n## A multi-target brainf*ck transpiler\nbft is an optimizing modular brainf*ck transpiler which currently has backends for:\n* C (`--target=c`)\n* JavaScript for the NodeJS runtime (`--target=js`)\n* Rust (`--target=rust`)\n* Ada (`--target=ada`)\n* Fortran 90 (`--target=fortran`)\n\n## Command line options\nbft accepts the following command-line arguments:\n* `--target={target lang}, -t {target lang}` → the transpilation target langauge\n* `positional, --source={source file}, -s {source file}` → the source brainf*ck file\n* `--verbose, -v` → increases the logging verbosity\n* `--output={output file}, -o {output file}` → the transpiled output file\n* `--help, -h` → displays the options guide\n* `--optimize={0 - 3}, -O {0 - 3}` → how aggressively the transpiler should optimize the brainf*ck. If not specified, defaults to `3`\n\n## Building\nDependencies:\n* CMake\n* Make\n* Boost program options\n\nTo build bft, run `./build.sh {{Debug or Release}}`\n\n## Running\nTo transpile a brainf*ck program, simply run `bft {{input file}} -o {{output file}} --target={{target language}}`\nExamples:\n```bash\nbft input.bf -o output.js --target=js\nbft input.bf -o output.c --target=c\nbft input.bf -o output.rs --target=rust\nbft input.bf -o output.adb --target=ada\nbft input.bf -o output.f90 --target=fortran\n```\n\n## Testing\nRun the `test.sh` script to run the C, JavaScript, Rust, Ada, and Fortran tests. DISCLAIMER: You will need to modify the `libc` crate path in the `test/rust/test.sh` script for rustc to correctly include it, see the *Rust notes* section below\n\n## Rust notes\nThe rust target references the `libc` crate, so to compile either create a Cargo project and add `libc` to the dependencies, or compile with `rustc` with `--extern libc={path to libc rlib}`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavier-maruff%2Fbft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxavier-maruff%2Fbft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavier-maruff%2Fbft/lists"}