Warning
The Compiler is not fully implemented yet. Plus on its own it's probably not useful for any serious Software Development. It is fun for Recreational Programming though.
Logo by Strawberry 🍓
Compiler for the B Programming Language implemented in Crust.
$ make
$ ./build/b -run ./examples/hello_world.b
Also check out more examples at ./examples/. Find the project documentation at ./docs/.
Generally, to write programs for the three major contemporary platforms (Linux, Windows, Darwin) you need only these things:
- Rust - the compiler is written in it;
- GCC or Clang or mingw-w64 (whatever serves as the
cc
on your POSIX platform) - thex86_64
andaarch64
targets generate assembly and pass it tocc
to assemble and link.
If you feel like playing with our "spicy" targets, you will need to setup few additional things.
Uxn is a pretty cool small virtual machine designed to be simple and portable.
This compiler toolchain expects the uxnemu
and uxncli
executables to be available in the $PATH
environment variable. We recommend to build them from the source code available at https://git.sr.ht/~rabbits/uxn. Follow their build instructions and then copy the contents of the bin/
folder somewhere were the $PATH
points at.
MOS Technology 6502 is a legendary processor that was used in such systems as the Atari 2600, Atari 8-bit computers, Apple II, Nintendo Entertainment System, Commodore 64, Atari Lynx, BBC Micro and others.
Since "targeting 6502" doesn't really mean anything, given the diverse array of hardware, we created a special target called posix6502. It's a simple 6502 emulator that exposes some POSIX functionality to programs running on the 6502 processor, allowing them to operate in a POSIX environment. We use it as a testing and playground target for 6502 codegen. In the future, we may add more 6502-related targets.
It consist of a single posix6502
executable which is expected to be available to the compiler toolchain via the $PATH
environment variable. We recommend to build it from the source code:
$ git clone https://github.com/bext-lang/posix6502 && cd posix6502
$ cc -o nob nob.c
$ ./nob
Copy the build/posix6502
executable somewhere were the $PATH
points at.
Submit a PR to add yours to the list above here