https://github.com/geeksilva97/brainjuck
A tiny Brainfuck compiler targeted to Java Virtual Machine
https://github.com/geeksilva97/brainjuck
brainfuck compilers java jvm
Last synced: 4 months ago
JSON representation
A tiny Brainfuck compiler targeted to Java Virtual Machine
- Host: GitHub
- URL: https://github.com/geeksilva97/brainjuck
- Owner: geeksilva97
- Created: 2025-02-09T16:26:56.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-08-21T16:41:03.000Z (11 months ago)
- Last Synced: 2025-08-21T17:08:27.540Z (11 months ago)
- Topics: brainfuck, compilers, java, jvm
- Language: JavaScript
- Homepage:
- Size: 11.6 MB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BrainJuck: The Ultra Master Brainfuck JVM Compiler
A Brainfuck-to-JVM bytecode compiler written in JavaScript (Node.js). This project enables you to compile Brainfuck source code into JVM bytecode, allowing Brainfuck programs to run on the Java Virtual Machine (JVM).

## Features
- Compiles Brainfuck source code to executable JVM `.class` files
- Supports all standard [Brainfuck commands](https://github.com/sunjay/brainfuck/blob/master/brainfuck.md) (`+`, `-`, `>`, `<`, `[`, `]`, `.`, `,`)
- Command-line interface for compiling and running Brainfuck programs
- Cross-platform: runs anywhere the JVM is available
## Getting Started
### Prerequisites
- Java 8 or higher installed
- Node.js v22 or higher installed
Clone the repository:
```sh
git clone https://github.com/geeksilva97/brainjuck.git
cd brainjuck
```
Demo, video below:

### Usage
#### Compile a Brainfuck Program
```sh
./brainjuck your-brainfuck-file.bf []
```
- `your-brainfuck-file.bf`: The Brainfuck source file you want to compile.
- ``: Optional. The name of the output class file (default is `CompiledBrainfuck`).
#### Run the Generated Class
```sh
java OutputClassName
```
## Examples
Compile and run the classic "Hello, World!":
```sh
./brainjuck samples/helloworld.bf HelloWorld
java HelloWorld
```
---
Made with ❤️ by [geeksilva97](https://github.com/geeksilva97)