I decided to create a cross-platform desktop application that will run on Windows, MacOS, and Linux. I heard about a recent project Neutralino and tried using this framework. It has been a tough road…
The start was very quick and pleasant. The installation itself was as simple as possible with
npm i -g @neutralinojs/neu
Next, I bootstrapped a new application:
E-book: How to set up free WordPress platform for IT blogs
Do you want to set up a typical blog but you don’t know how to start, which plugins to use or how to customize the site? I spent a few weeks in total doing that from scratch – from learning the ecosystem to adjusting the platform to my very specific needs. Now I want to share with my experience and make the start easier for you.
neu create code-library --template ts
I decided to use Typescript templates. More advanced ones, like Vue, Angular, React, should be added in the future. That’s a pity.
Furtunately, it was easy to build and worked immediately:
neu build ; .\neutralino-win.exe
Then I tried to understand the folder structure:
- code in
- HTML in
- styles in
- and there is a mysterious file
- nearly all source files start with the MIT License comment
.gitignoredoes not include all ignores (like log or built executables)
- executables are built in the root folder, always named
- wrong application name in
- and there is a GitHub configuration that displays sponsorship for the original author in your repo
I wouldn’t be surprised of most of that if I cloned the Neutralino project, but I used a command-line tool to create a new, empty project.
The documentation is very short and presents the main concepts. I haven’t found many answers there. For example, I changed the application name in the the
settings.json file and the application stopped working. Because I used a space in the project name. No error during compilation, no information in the documentation.
As for the file structure, I discovered that:
- source HTML templates are in
- source code files are in
/src/*.ts(except for “built-in”
index.d.ts). These files are compiled to
- source CSS files are in
/src/*.cssand included in the
.tsfiles. They are compiled to
So some sources are in
/app/ and some in
/src/. And the former contains built assets too. That’s quite confusing.
- read the settings JSON file
- read and save application’s data (the documentation says that you retrieve the data by providing a key, but save it by providing only an object without a key – I’m not sure how it works)
- create, remove, delete directory and file
- run an “OS command”. Maybe that’s a shell command?
- get an environment variable
- show the file open/save dialogs (that’s a nice thing)
- exit the application, print debug message and check RAM usage
I bet there is a Node module that allows you to do pretty anything missing here, but there is no knowledge in this project.
I really appreciate Neutralino, but it’s far from being useful for anything serious yet. First, it lacks consistency and legibility. Second, it lacks documentation. Third, it lacks lots of OS API. I wish it all good, though now I will have to switch to Electron.
Neutralino cannot be compared to the maturity and popularity of Electron. It’s enough to check its API or take a look at the applications created with Electron. As it’s much older, there is lots of knowledge on the internet, in articles, questions, and in sample open-source applications.