Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trimorphdev/brainhecc
A Brainheck compiler written in Rust.
https://github.com/trimorphdev/brainhecc
Last synced: about 1 month ago
JSON representation
A Brainheck compiler written in Rust.
- Host: GitHub
- URL: https://github.com/trimorphdev/brainhecc
- Owner: trimorphdev
- Created: 2021-10-28T00:07:30.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-28T00:22:51.000Z (about 3 years ago)
- Last Synced: 2024-10-07T08:47:17.069Z (3 months ago)
- Language: Rust
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Brainhecc
A compiler for Brain[hecc] programs, written in Rust with Cranelift.It compiles any valid Brainhecc program into an executable binary.
## Installation
### Prerequisites
- Cargo/Rust, to install & build the Brainhecc program.
- GCC (or any other linker), required to link Brainhecc programs.> Note: to compile Brainhecc programs, any linker may be used, *but* Brainhecc programs must be linked with the C standard library, otherwise compiled programs won't work.
### Setting Up
Cargo can automatically download and build the Brainhecc program:```
cargo install brainhecc
```### Hello World
The Hello, World! example can be compiled an ran with the following commands:```
brainhecc examples/hello_world.brainhecc hello_world.o # compile the program
gcc hello_world.o -o hello_world # link the program with the C standard library
./hello_world # run the program
# => Hello, world!
```