An example for how you can run Nim code in an Electron application. This was based on the Electron Quick Start Guide.
To clone and run this repository you'll need Git, Nim and Node.js (which comes with npm) installed on your computer. From your command line:
# Clone this repository
git clone https://github.com/PMunch/nim-electron
# Go into the repository
cd nim-electron
# Install Electron dependencies
npm install
# Compile the Nim code
nim js -d:node -o:main.js main.nim
nim c app.nim
# Run the native app
./app
# Run the Electron app
npm start
The native app should start listening on port 1234 and the Electron app will connect to this port and send a "Hello, world" message.