Skip to content
프로젝트

소개

Crust로 구현한 B 프로그래밍 언어 컴파일러입니다.

프로그래밍 언어 및 런타임

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
+3
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

B Programming Language

[!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.

Quick Start

$ make
$ ./build/b -run ./examples/hello_world.b

Also check out more examples at ./examples/. Find the project documentation at ./docs/.

Dependencies

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) - the x86_64 and aarch64 targets generate assembly and pass it to cc to assemble and link.

If you feel like playing with our "spicy" targets, you will need to setup few additional things.

uxn

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.

6502-posix

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.

Thirdparty Codegens in the Wild

Submit a PR to add yours to the list above here

References

관련 프로젝트 살펴보기

불러오는 중…