diff --git a/README.md b/README.md index a8f61bf..33a2ad8 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ # 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 +applications + +depending on your needs, this can be preferred to the usual `raco exe`/`raco dist` because that +tooling can generate distribution folders that still depend on dynamic libraries the target system +might not have (actually, i was prompted to make this partially by someone running into this exact +problem on mastodon). additionally, one single binary can be more convenient to distribute than a +whole `dist` folder structure ## dependencies @@ -12,6 +16,22 @@ whole folder instead of one easily distributable file - rsync (copying files into container) - wget (downloading stuff) +## limitations + +because the runtime is hosted in a static binary, dynamic ffi is unavailable (eg, `ffi-lib`) will +not work. the workaround for this currently provided is static ffi, where loading `table` from +`static-ffi` (a primitive module instatiated by the runtime wrapper) will produce a table of +available static ffi functions - the integer pointer will need to be `cast` to the correct function +type but after that it works as expected +further work will automate the generation and loading of static ffi tables, ideally out of C headers +using `c-utils` + +currently if the racket code runs into an error it segfaults. i think i have to register a handler +for this but idk how the internals work + +runtime include paths probably don't work as expected. i have not tested but ideally don't use +those yet + ## hello world demo first time you run make it'll take a while. be patient. having more cores helps