make self-contained static binaries for racket applications
Go to file
xenia 35236b5052 add demo of static binary ffi
this adds a demo where the embedding C wrapper creates a new primitive
module with an ffi table which can be accessed and used from the racket
side to call functions, even when the runtime is hosted in a static
binary
2020-10-14 18:17:24 -04:00
scripts initial commit 2020-10-13 04:40:00 -04:00
.gitignore add demo of static binary ffi 2020-10-14 18:17:24 -04:00
Makefile update embedding launcher to cooperate with 3m GC 2020-10-14 17:33:50 -04:00
README.md initial commit 2020-10-13 04:40:00 -04:00
main_bc.c add demo of static binary ffi 2020-10-14 18:17:24 -04:00
run.rkt add demo of static binary ffi 2020-10-14 18:17:24 -04:00

README.md

racket-static

a base set of scripts that let you build fully self-contained static binaries for racket applications. this is better than raco exe/raco dist because that tooling can generate distribution folders that still depend on dynamic libraries the target system might not have, and it's also a whole folder instead of one easily distributable file

dependencies

  • systemd-nspawn (containers!)
  • sudo (for running the above)
  • rsync (copying files into container)
  • wget (downloading stuff)

hello world demo

first time you run make it'll take a while. be patient. having more cores helps

make
./run

references

https://docs.racket-lang.org/inside/embedding.html