I think all thats necessary is in your project.janet file, you just need to add :lflags ["-static"]
however, in that case if your linux distro uses glibc it won't be fully static
because they do some dumb shit
so to get a fully static one you can use a docker container with alpine linux to do the build.
that uses musl libc which can be fully statically linked
most linux distros use glibc
for windows and macos, not sure what else is needed
the windows flags will differ
macos may just work with -static For example:
(declare-executable :name "hermes" :entry "src/hermes-main.janet" :lflags [;*lib-archive-lflags* ;(if *static-build* ["-static"] )] :deps hermes-src)
you can check if its fully static like this
if it says 'not a dynamic binary' its fully self contained, if it prints a bunch of .so files something is not statically linked
so the caveat being, only C extensions you preload using the new preload thing will be importable from your user scripts afaik.
code-src/bagatto [thread-refactor !] ⊕ jpml --compiler=musl-gcc build