Get the current master
branch of Crystal. Compile a new crystal compiler:
$ make .build/crystal
In the crystal installation:
- create an empty
src/none.cr
file; - replace
src/gc/none.cr
; - place the
ygc.cr
file at the root;
Compile the library (this will generate a .o
or .obj
file):
$ bin/crystal build --cross-compile --single-module --prelude=./none ygc.cr
Build an executable program:
$ crystal build -Dgc_none app.cr
The program should compile, link and run identically to the original gc/none
.