{"id":21027324,"url":"https://github.com/bynect/bflc","last_synced_at":"2025-07-11T22:03:08.532Z","repository":{"id":58996515,"uuid":"363264214","full_name":"bynect/bflc","owner":"bynect","description":"A modular compiler framework for Brainfuck-like languages","archived":false,"fork":false,"pushed_at":"2024-12-04T21:12:25.000Z","size":298,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T07:43:10.038Z","etag":null,"topics":["assembly","assembly-x86-64","backend","brainfuck","brainfuck-asm","brainfuck-compiler","brainfuck-language","compiler","compiler-backend","compiler-design","compiler-frontend","compiler-optimization","frontend","intel-nasm-syntax","jit","jit-compiler","machine-code"],"latest_commit_sha":null,"homepage":"","language":"C","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/bynect.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}},"created_at":"2021-04-30T21:35:21.000Z","updated_at":"2024-12-22T07:18:35.000Z","dependencies_parsed_at":"2023-01-18T06:31:01.129Z","dependency_job_id":null,"html_url":"https://github.com/bynect/bflc","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bynect%2Fbflc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bynect%2Fbflc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bynect%2Fbflc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bynect%2Fbflc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bynect","download_url":"https://codeload.github.com/bynect/bflc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254323071,"owners_count":22051708,"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":["assembly","assembly-x86-64","backend","brainfuck","brainfuck-asm","brainfuck-compiler","brainfuck-language","compiler","compiler-backend","compiler-design","compiler-frontend","compiler-optimization","frontend","intel-nasm-syntax","jit","jit-compiler","machine-code"],"created_at":"2024-11-19T11:49:30.740Z","updated_at":"2025-07-11T22:03:08.515Z","avatar_url":"https://github.com/bynect.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The bflc framework\n\n## Overview\n\nThe BrainFuck-like Languages Compiler (bflc) is a compiler framework that targets\n[Brainfuck][brainfuck] and closely [related languages][family].\n\n## Build\n\nBefore building, get the source code by cloning the repository.\n```sh\ngit clone --recurse https://github.com/bynect/bflc.git\n```\n\nBuild the project using CMake.\n```sh\ncmake -B _build\nmake -C _build\n```\n\n### Note\n\nGuaranteed to work for Linux, requires the Unix Makefile generator for CMake.\n\n## Compiler\n\nThe compiler is a terminal interface for the [blfc library](#library).\n\n### Options\n\n- `--debug` Set debug output\n- `--verbose` or `-v` Set verbose output\n- `--help` or `-h` Print help message\n- `--version` Print version message\n- `--frontend=STRING` Set one of the [available frontends](#supported-frontends). The default is `brainfuck`\n- `--backend=STRING` Set one of the [available backends](#supported-backends). The default is `amd64_asm`\n- `--front=STRING` Alternative name for `--frontend` option\n- `--back=STRING` Alternative name for `--backend` option\n- `-o` Set output file path. The default is `output`\n- `-fread` Use read syscall (not available in all backends)\n- `-fwrite` Use write syscall (not available in all backends)\n- `-fsyscall` Equivalent to `-fread` and `-fwrite`\n- `-fcell=INT` Set the number of cells (default is `30000`)\n\n### Example\n\n```sh\n# Compile echo.bf to x86_64 nasm assembly\nbflc echo.bf -o echo.asm\n```\n\n### Note\n\nThe `amd64` backend is not supported at the moment.\nTo create x86\\_64 executables assemble the output of `amd64_asm`.\n\n## Library\n\nThe framework is by default built as a standalone static library `libbflc.a`,\nthat can be easily linked with your projects.\nThe frontends and backends are not included in the static library,\nso you must compile them separately.\n\n### Supported frontends\n\n- [Brainfuck][brainfuck] frontend ([`brainfuck`](/front/brainfuck.c))\n- [FuckbeEs][fuckbees] frontend ([`fuckbees`](/front/fuckbees.c))\n\n### Supported backends\n\n- [X86\\_64 assembly](x64-asm) backend, uses NASM syntax ([`amd64_asm`](/back/amd64_asm.c))\n- [X86\\_64 machine code](x64-mach) backend, only for JIT-ing ([`amd64`](/back/amd64.c))\n\n### Jit integration\n\nBackends may generate machine code (for example `amd64`).\nSince you can use the framework as a library you can create a JIT quite easily.\nA practical [integration example](/jit/example.c) is also available.\n\n## Contributing\n\nContributions are welcome.\nPlease open an issue first for major changes.\n\nBefore pushing contributions, please check for errors, memory leaks and other\nproblems with either [Asan][asan] or [Valgrind][valgrind].\n\n## License\n\nThe bflc framework is licensed under the terms and conditions of the\n[Apache-2.0 License](LICENSE).\n\n[family]: https://esolangs.org/wiki/Trivial_brainfuck_substitution\n[brainfuck]: https://en.wikipedia.org/wiki/Brainfuck\n[fuckbees]: https://esolangs.org/wiki/FuckbeEs\n[x64-asm]: https://en.wikipedia.org/wiki/X86_assembly_language\n[x64-mach]: https://www.felixcloutier.com/x86\n[asan]: https://en.wikipedia.org/wiki/AddressSanitizer\n[valgrind]: https://valgrind.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbynect%2Fbflc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbynect%2Fbflc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbynect%2Fbflc/lists"}