-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for node native addons / napi / FFI in deno compile
#23266
Comments
I don't expect this to work. FFI/native Node extensions can't be included in the the compiled binary. |
deno compile
As a data point I ran into similar with electron-builder and now with deno. For elextron-builder I used |
deno compile
deno compile
Why not? These work with non-compiled source runtime. Anyway, in case these cannot be easily included, maybe the compiler could add these native modules as separate files to load them when running resulting binary? That would be much better than nothing. |
I wonder if we can support loading native addons using |
@kt3k I was wondering the same thing, but I think that would fail to properly support the |
@kt3k it doesn't work it can't dlopen embedded files, the workaround is to copy the file to the host system before dl opening it |
Bun for example does handle this pretty well, even complex napi projects like slint just works, bun compile produce a single executable that have the library bundled and it does dlopen it at runtime correctly |
Discussed in #23255
Originally posted by babakfp April 6, 2024
Hi 👋
parcel-bundler/lightningcss#712
Based on this comment parcel-bundler/lightningcss#712 (comment) and this:
(I used this library https://deno.land/x/abc@v1.3.3 and when I compiled, it started to download this ^ file).
It seems like Deno doesn't do the same for lightningcss.
Search keywords:
TypeError: LoadLibraryExW failed
The text was updated successfully, but these errors were encountered: