Closed tjcouch-sil closed 2 weeks ago
sqlite3 - npm [node.js] How to use native modules in NW.js | Using Sqlite3 | Ryusei.IO node.js - How to use sqlite3 module with electron? - Stack Overflow node.js - Electron crashes when requiring sqlite3 native module in forked process - Stack Overflow electron/rebuild: Package to rebuild native Node.js modules against the currently installed Electron version electron/forge: :electron: A complete tool for building and publishing Electron applications Native Node Modules | Electron
Investigate for 1-3 days and figure out how much it will take to do this. Make a plan for making this work.
A few high-level thoughts:
manifest.json
that points to TS code to launch another process during activate. If we provide another elevated privilege that allows us to spawn/fork the process for the extension, then we can automatically kill the other process when our process is shutting down.Potentially investigate how VS Code handles native deps or LSP processes or whatever regarding cross-platform builds
Some examples of VSCode extensions I looked into:
The PR that is posted allows extensions to start other processes using the createProcess
elevated privilege in manifest.json
. If someone builds executables and packages them in the extension ZIP file, then they can start processes using those binaries. The elevated privilege details include what operating system you're running on so you can start the appropriate binary.
User Story As an extension developer, I want to be able to run native modules from Node so that I can develop complex software with superpowers.
Description Biblica wants to bring an alignment tool into P.B. They are using SQLite. We need to support native modules like SQLite in some way to get this working. We need to do some digging.