aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 113b3a6b09d13a22c5c50ab598aefd7ff31b0fa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# ZigFunge98 : a Funge-98 interpreter written in zig

This repository contains code for a zig program that can interpret a valid [Funge-98](https://github.com/catseye/Funge-98/blob/master/doc/funge98.markdown) program. It passes the [mycology test suite](https://github.com/Deewiant/Mycology).

Current limitations are :
- currently does not implement any fingerprints
- does not implement concurrent execution with the `t` command
- does not implement file I/O with the `i` and `o` commands
- does not implement system execution with the `=` command

## Contents

- [Dependencies](#dependencies)
- [Quick install](#quick-install)
- [Usage](#usage)
- [Building](#building)

## Dependencies

zig is required. Only zig version 0.11 on linux amd64 (Gentoo) is being regularly tested.

## Quick Install

To get, compile then install zigfunge98, do something like:
```sh
git clone https://git.adyxax.org/adyxax/zigfunge98
cd zigfunge98
zig build -Drelease-safe
install ./zig-out/bin/zigfunge98 ~/.local/bin/
```

## Usage

Launching zigfunge98 is as simple as :
```sh
zigfunge98 something.b98
```

The interpreter will load and execute the specified Funge-98 program until the program normally terminates or is interrupted or killed.

## Building

To run tests, use :
```sh
zig build test
```

To test the coverage, use:
```sh
zig build test -Dtest-coverage
firefox kcov-output/index.html
```

To build a debug build, simply use:
```sh
zig build
```

For a non debug build, use either one of:
```sh
zig build -Doptimize=ReleaseSafe
zig build -Doptimize=ReleaseSmall
zig build -Doptimize=ReleaseFast
```