I am trying to create an executable file in a racket dynamically linked. My world hello program is currently compiling into a 4MB executable. There he is:
(define (extract str)
(substring str 4 7))
(print (extract "the cat out of the bag"))
I will compile it with
raco exe first.rkt
And the resulting executable is 4+ MB. So it’s clear that this is the static link of the racket libraries.
- EDIT ---
Here is the startup code:
(require launcher/launcher)
(require racket/runtime-path)
(define-runtime-path prog-path "first.rkt")
(make-racket-launcher (list (path->string prog-path))
"first"
'())
You just need to insert a separate file and execute using
racket <launch-file>.rkt
Salil source
share