nodejs / single-executable

This team aims to advance the state of the art in packaging Node.js applications as single standalone executables (SEAs) on all supported operating systems.
312 stars 6 forks source link

Initiative: Single Executable Application #75

Open jesec opened 2 years ago

jesec commented 2 years ago

Continuation of https://github.com/nodejs/node/pull/42334#issuecomment-1155270649.

Single Executable Application is one of the technical priorities:

Node.js often loses out to other runtimes/languages in cases where being able to package a single, executable application simplifies distribution and management of what needs to be delivered. While there are components/approaches for doing this, they need to be better documented and evangelized so that this is not seen as a barrier for using Node.js in these situations. This is important to support the expansion of where/when Node.js is used in building solutions.

Prior discussions:

Items (core):

Items:

Out-of-scope, per discussions:

Edge cases:


Proof of concept (https://github.com/nodejs/node/pull/42334#issuecomment-1144410524):

image

btsimonh commented 2 years ago

"More fine-grained way to load a native module from an offset in a file (the executable in our case)." In my use case, my VFS is compressed and encrypted. So load from a buffer would be better. On windows, I looked into this in detail some time back, and it's as close to impossible, that it is certainly impractical, relying on undocumented and possibly fragile APIs (look up 'MS detours').

"Should the SEA behave as the bundled application in all scenarios" - In my nexe based implementation, I disable the command line except in debug builds. e.g. I don't want my customers to be able to run the node debugger on my somewhat-hidden code (especially the decrypt code!).

I also compress and encrypt the code inserted into Node (vfs and launch code). One issue with baking a pseudo-security facility into OSS is that there is no true code protection, so we have to rely on obscurity and difficult to debug code. If it was 'standard' code, that all disappears. nexe's code patching system facilitates the patching of the node c++ to achieve this, but the patches themselves should probably remain unique to users if they want this kind of facility?

github-actions[bot] commented 1 year ago

There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.

For more information on how the project manages feature requests, please consult the feature request management document.

ovflowd commented 1 year ago

@RaisinTen can we remove the stale label from here?

github-actions[bot] commented 1 year ago

There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.

For more information on how the project manages feature requests, please consult the feature request management document.

piranna commented 1 year ago

This is not stale... or is it?

RaisinTen commented 1 year ago

I'll transfer this to the single-executable repo, where it won't keep getting marked as stale.