Replies: 4 comments 25 replies
-
Should this be included in a formal list of design requirements, for the VFS or for the SPA bootstrapper?
Are you describing something like #27? Or different? |
Beta Was this translation helpful? Give feedback.
-
All very good point @zcbenz ! Thanks a lot for chiming in. We would love to have you in our calls if you can find the time (see #19)
Indeed! We have been extensibly discussing this on today's SEA call. Apart from AV concerns, this seems to be a good solution for making native add-ons that interact with I/O also play nicely with the VFS. See #29 for some related discussions.
Yeah, this is a top concern. To solve this problem, we have created https://github.com/postmanlabs/postject, a tool to inject arbitrary data to pre-compiled executables as proper Mach-O/ELF/PE sections.
This is a very interesting idea. We are talking about providing clear interfaces for extending |
Beta Was this translation helpful? Give feedback.
-
Yep, I think it's in line with my suggestion at #27 (edit: Ah, I see someone mentioned it already 😆) |
Beta Was this translation helpful? Give feedback.
-
_EDIT This was meant to be a reply to a thread above, but Github's email integration doesn't do that. I've copied it manually: #30 (reply in thread)
What about APIs that accept a string that is a path that are not the FS
API? For example, worker_thread, spawn, fork, etc? Since we're talking
about things like dlls, where the whole point is that those paths cannot be
VFS paths because of native code / OS requirements.
…On Fri, Sep 9, 2022, 11:41 AM Juan Cruz Viotti ***@***.***> wrote:
It is done implicit as part of their fs monkey-patching logic. @RaisinTen
<https://github.com/RaisinTen> might have links to the relevant parts of
the source code
—
Reply to this email directly, view it on GitHub
<#30 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC35OFDXSS7GWL477MEQPTV5NLDJANCNFSM6AAAAAAQC3LR34>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
On Windows, extracting DLLs and executing them is a red alarm to anti-virus softwares, so when supporting native addons with VFS there should be a way to leave the DLLs on the real filesystem, like the "unpack" feature of ASAR.
Another usage of the "unpack" feature is to feed assets to APIs outside JS world. Most system APIs and third party C libraries only read files on the real filesystem, for example when creating a tray icon you have to pass the path of the icon on the real filesystem. You can of course extract the file before passing its path, but that would require modifications to existing code to support VFS.
On macOS executables are usually signed and the single executable implementation should be compatible with signing. Many single executable implementations are concatenating the packages to the tail of the executables, which would be broken after signing, but it can be fixed by including payload in str table.
While this repo is about single executable, it would be nice supporting reading from multiple bundled packages in one process, so it would be possible to distribute Node.js apps as single files. For example users can execute downloaded apps with something like
node downloaded_app.nodeapp
or by double clicking the package file, and app developers can dofork('/path/to/another/app.nodeapp')
.There should be a way to manipulate the bundled package file itself, which is important for creating toolings. Electron does it with
original-fs
module.When supporting VFS in Node's builtin modules, instead of implementing it in JS, I think it is better implementing in C and make the code reusable for other libuv users. So it would be easier for other runtimes like deno and bun to adopt the support.
Beta Was this translation helpful? Give feedback.
All reactions