-
Notifications
You must be signed in to change notification settings - Fork 11
/
README.s9core
60 lines (37 loc) · 1.54 KB
/
README.s9core
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
S9CORE
A Toolkit for Implementing Dynamic Languages
By Nils M Holm, 2015-2018
In the public domain
S9core is an easy-to-use toolbox for designers of programming
languages. It frees the implementor from re-inventing the wheel.
It is a single-file collection (plus some headers) of functions
providing
- a garbage collected heap
- bignum (arbitrary precision) integer arithmetics
- platform-independent real number arithmetics
- garbage collected I/O ports
- persistent heap images
- etc
S9core is available on all platforms providing a C89 compiler
as well as on Plan9 (native).
See the documentation in s9core.txt for further details.
COMPILING S9 CORE
Building S9core is part of building S9. Running "make test"
will test the S9 interpreter and thereby also perform a
thorough test of the S9core functions.
To use S9core in your project, there are two options:
- copy the files "s9core.c", "s9core.h", and "s9import.h" to
your new project directory and just compile and link S9core
against the other files
- #include <s9core.h> and (optionally) <s9import.h> in your
project and link against libs9core.a
If you want to include the S9core files in your project, note
that you can compile s9core with
cc -DTEST -o s9core s9core.c
to obtain an executable that will perform a quick self-test
when called. It will not print anything when the test succeeds
and print some diagnostic message and exit with a failure code
otherwise.
Feel free to include S9core in any project you like. It's in
the public domain.
ENJOY!