volution / z-run

z-run -- scripting library lightweight Go-based tool
35 stars 1 forks source link

Add support for `memfd` (on Linux) for storing scripts #5

Open cipriancraciun opened 4 years ago

cipriancraciun commented 4 years ago

At the moment scripts are passed to the interpreter as a /dev/fd/{N} path, with the descriptor being a pipe if the script is less than 1MiB, or a temporary file if it is larger.

On Linux there is a third alternative (perhaps better than both) by using a memfd, as per: