karolis-sh / electron-snowpack

Use Snowpack and esbuild for Electron app development
MIT License
50 stars 8 forks source link

Support for koffi or node-ffi #69

Open aw1875 opened 2 years ago

aw1875 commented 2 years ago

This is more a question than anything else. But I was wondering if its possible to use packages like koffi or node-ffi. I tried to see if I could add it manually to the package but I had no luck. I know that the creator of koffi just made some changes so that it works with electron so realistically it should work but I'm assuming there are some changes I need to make to access my dlls using this. Any help would be appreciated.

karolis-sh commented 2 years ago

Hard to tell, not sure how these work. If they in theory work in electron and snowpack, some glue could be added to make them work in this package. Could be just proper electron setup necessary and could work.

aw1875 commented 2 years ago

With the React Electron boilerplate package I was pretty easily able to copy the dll's manually using CopyWebpackPlugin. However I believe the default electron config packages it by default in the app.asar.

karolis-sh commented 2 years ago

I guess then you could search for some alternative plugins in snowpack that would do file copying. Depending on the lifetime when these files are needed, you could as well just use some shell script.

aw1875 commented 2 years ago

Ya I'm note entirely sure if electron is the best option for what I'm working on since I will be requiring a lot of low level functions but I was just taking a look at what kind of DLL options exist in case it turns out to be the best approach.