src: add initial support for single executable applications
requested to merge github/fork/RaisinTen/add-initial-support-for-single-executable-applications into main
Compile a JavaScript file into a single executable application:
$ echo 'console.log(`Hello, ${process.argv[2]}!`);' > hello.js
$ cp $(command -v node) hello
# On systems other than macOS:
$ npx postject hello NODE_JS_CODE hello.js \
--sentinel-fuse NODE_JS_FUSE_fce680ab2cc467b6e072b8b5df1996b2
# On macOS:
$ npx postject hello NODE_JS_CODE hello.js \
--sentinel-fuse NODE_JS_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \
--macho-segment-name NODE_JS
$ ./hello world
Hello, world!
Signed-off-by: Darshan Sen raisinten@gmail.com
It was decided in the Node.js Collaborator Summit that we want to come up with an MVP that is capable of compiling a single JavaScript file into a single executable application. More features will be added incrementally.
Meeting notes for reference: https://github.com/nodejs/single-executable/blob/c7008ecd67a395c7c902d602f2f116e2c5744bc9/meetings/2022-10-01.md
cc @nodejs/single-executable