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
> 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.
5
5
6
6
<palign=center>
7
7
<imgsrc="./logo/logo_strawberry.png"width=400>
@@ -11,14 +11,14 @@
11
11
<sub>Logo by Strawberry 🍓</sub>
12
12
</p>
13
13
14
-
Compiler for the B Programming Language implemented in [Crust](https://github.com/tsoding/crust)
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
16
## Dependencies
17
17
18
18
-[Rust](https://www.rust-lang.org/) - the compiler is written in it;
19
-
-[fasm](https://flatassembler.net/)- used as the compiler backend;
19
+
-[GCC](https://gcc.gnu.org/)or [Clang](https://clang.llvm.org/) (whatever surves 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
20
21
-
<!-- TODO: document specific dependencies for the rest of the targets. Like mingw32-w64 and wine on Linux for Fasm_x86_64_Windows, etc. -->
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
-
32
-
## Testing
33
-
34
-
The project comes with [btest](./src/btest.rs) utility which tests the B compiler. It is built automatically along with the B compiler when you do `make`.
35
-
36
-
When you run it, it just builds and runs all the tests from the [./tests/](./tests/) folder on all the supported targets and generates a matrix report. Give it a try to see it for yourself:
37
-
38
-
```
39
-
$ make
40
-
$ ./build/btest
41
-
```
42
-
43
-
It doesn't crash when it encounters errors, it just collects the statuses of the tests on all the platforms to give an overview of the current state of the compiler.
44
-
45
-
### Slicing the Test Matrix
46
-
47
-
If you want to test only on a specific platform you can supply the flag `-t`.
48
-
49
-
```console
50
-
$ ./build/btest -t fasm-x86_64-linux
51
-
```
52
-
53
-
You can supply several platforms.
54
-
55
-
```console
56
-
$ ./build/btest -t fasm-x86_64-linux -t uxn
57
-
```
58
-
59
-
If you want to run a specific test case you can supply flag `-c`.
60
-
61
-
```console
62
-
$ ./build/btest -c upper
63
-
```
64
-
65
-
You can do several tests.
66
-
67
-
```console
68
-
$ ./build/btest -c upper -c vector
69
-
```
70
-
71
-
And of course you can combine both `-c` and `-t` flags to slice the Test Matrix however you want.
This folder contains various documents regarding the project
4
+
5
+
-[btest.md](./btest.md) - documents the testing tool.
6
+
-[bext.md](./bext.md) - documents the B extensions and deviations from the original [kbman](https://www.nokia.com/bell-labs/about/dennis-m-ritchie/kbman.html) document.
The project comes with [btest](../src/btest.rs) utility which tests the B compiler. It is built automatically along with the B compiler when you do `make`.
4
+
5
+
When you run it, it just builds and runs all the tests from the [../tests/](./tests/) folder on all the supported targets and generates a matrix report. Give it a try to see it for yourself:
6
+
7
+
```
8
+
$ make
9
+
$ ./build/btest
10
+
```
11
+
12
+
It doesn't crash when it encounters errors, it just collects the statuses of the tests on all the platforms to give an overview of the current state of the compiler.
13
+
14
+
## Slicing the Test Matrix
15
+
16
+
If you want to test only on a specific platform you can supply the flag `-t`.
17
+
18
+
```console
19
+
$ ./build/btest -t gas-x86_64-linux
20
+
```
21
+
22
+
You can supply several platforms.
23
+
24
+
```console
25
+
$ ./build/btest -t gas-x86_64-linux -t uxn
26
+
```
27
+
28
+
If you want to run a specific test case you can supply flag `-c`.
29
+
30
+
```console
31
+
$ ./build/btest -c upper
32
+
```
33
+
34
+
You can do several tests.
35
+
36
+
```console
37
+
$ ./build/btest -c upper -c vector
38
+
```
39
+
40
+
And of course you can combine both `-c` and `-t` flags to slice the Test Matrix however you want.
0 commit comments