Much has improved since last time I tested compiling Neuronify to WebAssembly. The latest version of Qt for WebAssembly, which comes with Qt 5.15.2, performs much better than it did about a year ago. In addition, more functionality has been added that improves the developer experience, such as support for saving and loading files asynchronously. With all of that in place, I decided to give Neuronify on the web another go. You can check out the result here:

dragly.org/projects/neuronify

Or have a peek at this screenshot from Firefox:

Neuronify in the web browser

Spending less time on packaging

A big reason to make a web-based version of Neuronify is distribution. Up until now, we have made versions of Neuronify for Linux, macOS, Windows, Android, and iOS. For Windows, we even made an installer, a zipped version, and a version for the Microsoft Store. Making installers for all of these platforms is a pretty big job.

On top of making these installers the first time, there is lot of work just to maintain them. Continuous changes in the OSes or app stores mean that any time we want to change something in Neuronify, we typically also need to update something for at least one of the platforms.

With less time available to develop Neuronify, I often find myself in a situation where I really want to spend time on developing new features, but always end up maintaining the build system and packaging instead.

Therefore, I am now strongly considering distributing Neuronify exclusively on the web. It will still be possible to build on all the platforms, but I just cannot bother with maintaining all of these installers. Instead, I want to prioritize some features that have been in the making a long time and are now long overdue, such as multi-compartment models, a recording feature, and physics-based environment simulations.

New file format version

One downside with a move to the web is that the current file format most likely cannot be supported. The reason is that the file format is based on Qt SQL and SQLite. It seems like it will be a lot of work to get the current code to work since Qt for WebAssembly does not support the Qt SQL module.

Instead, I am considering supporting only the JSON-based format NFY that we use within the current Neuronify files to define the simulation itself. The reason we store an NFY file inside an SQLite file in the first place was to also add screenshots to the save file. However, since existing files on disk cannot be listed when we transition to the web, there is no use for the screenshot feature anymore.

Should it turn out that we still need to store additional files, such as screenshots, I will most likely look into a ZIP-based format instead of SQLite. It seems easier to find a lightweight library that works without a file system for ZIP files, such as zip-rs.

In the meantime, I will see if it is possible to make some instructions on how to manually convert the files.

Work-in-progress preview

As mentioned at the top of this post there is a new preview available for Neuronify in the browser. If you want to check it out, you can head over to dragly.org/projects/neuronify.