unison/unison-src/transcripts-manual/gen-racket-libs.md
2024-06-27 12:28:39 -04:00

1.1 KiB

When we start out, ./scheme-libs/racket contains a bunch of library files that we'll need. They define the Unison builtins for Racket.

Next, we'll download the jit project and generate a few Racket files from it.

jit-setup/main> lib.install @unison/internal/releases/0.0.18
go = generateSchemeBoot "scheme-libs/racket"
jit-setup/main> run go

After executing this, scheme-libs/racket will contain the full complement of unison libraries for a given combination of ucm version and @unison/internal version.

To set up racket to use these files, we need to create a package with them. This is accomplished by running.

raco pkg install -t dir unison

in the directory where the unison directory is located. Then the runtime executable can be built with

raco exe scheme-libs/racket/unison-runtime.rkt

and a distributable directory can be produced with:

raco distribute <output-dir> scheme-libs/racket/unison-runtime

At that point, should contain the executable and all dependencies necessary to run it.