You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-8Lines changed: 44 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,6 @@
13
13
14
14
Compiler for the [B Programming Language](https://en.wikipedia.org/wiki/B_(programming_language)) implemented in [Crust](https://github.com/tsoding/crust).
15
15
16
-
## Dependencies
17
-
18
-
-[Rust](https://www.rust-lang.org/) - the compiler is written in it;
19
-
-[GCC](https://gcc.gnu.org/) or [Clang](https://clang.llvm.org/) (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.
20
-
21
-
<!-- TODO: document specific dependencies for the rest of the targets. Like mingw32-w64 and wine on Linux for gas-x86_64-Windows, etc. -->
Also check out more examples at [./examples/](./examples/).
31
24
Find the project documentation at [./docs/](./docs/).
32
25
26
+
## Dependencies
27
+
28
+
Generally, to write programs for the three major contemporary platforms (Linux, Windows, Darwin) you need only these things:
29
+
30
+
-[Rust](https://www.rust-lang.org/) - the compiler is written in it;
31
+
-[GCC](https://gcc.gnu.org/) or [Clang](https://clang.llvm.org/) or [mingw-w64](https://www.mingw-w64.org/) (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.
32
+
33
+
If you feel like playing with our "spicy" targets, you will need to setup few additional things.
34
+
35
+
### uxn
36
+
37
+
[Uxn](https://100r.co/site/uxn.html) is a pretty cool small virtual machine designed to be simple and portable.
38
+
39
+
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](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.
40
+
41
+
### 6502-posix
42
+
43
+
[MOS Technology 6502](https://en.wikipedia.org/wiki/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.
44
+
45
+
Since "targeting 6502" doesn't really mean anything, given the diverse array of hardware, we created a special target called [posix6502](https://github.com/bext-lang/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.
46
+
47
+
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:
Copy the `build/posix6502` executable somewhere were the `$PATH` points at.
56
+
57
+
### ilasm-mono
58
+
59
+
This target tries to produce [.NET](https://dotnet.microsoft.com/en-us/)/[Mono](https://www.mono-project.com/) compatible binaries. It's currently a work-in-progress and does not have anything useful implemented in it.
60
+
61
+
The compiler toolchain expects `ilasm` and `mono` executables available in the `$PATH` environment variables. Lots of Linux distros make them available via the mono packages in their official repos:
62
+
63
+
```consols
64
+
$ sudo xbps-install mono # Void Linux
65
+
$ sudo apt install mono-devel # Ubuntu
66
+
...
67
+
```
68
+
33
69
## Contribution
34
70
35
71
Accepting Pull Requests is currently paused. We are in the middle of [Decentralizing](https://github.com/tsoding/b/issues/62) this repo. The plan is
@@ -38,7 +74,7 @@ Accepting Pull Requests is currently paused. We are in the middle of [Decentrali
38
74
2. Keep `*x86_64*` and `*aarch64*` codegens in the main repo.
39
75
3. Move codegens [6502](./src/codegen/mos6502.rs) (owner [@Miezekatze64](https://github.com/miezekatze64)), [uxn](./src/codegen/uxn.rs) (owner [@deniska](https://github.com/deniska)), [gas-sh4dsp-prizm](https://github.com/tsoding/b/pull/175) (owner [@seija-amanojaku](https://github.com/seija-amanojaku)) to separate repos within the organization and give the owners full admin access to them.
40
76
41
-
You can still submit PRs in the meantime. Just don't expect them to be reviewed any time soon since decouping codegens requires extensive refactoring. They will be addressed eventually.
77
+
You can still submit PRs in the meantime. Just don't expect them to be reviewed any time soon since decoupling codegens requires extensive refactoring. The PRs will be addressed eventually.
0 commit comments