Hacker News new | ask | show | jobs
by kusti8 2340 days ago
Proton Native is a way to make cross-platform desktop apps with React, without using Electron or any sort of web browser. Your React code gets translated into Qt or wxWidgets API calls and runs directly on the machine.

After a long time, Proton Native V1 was starting to show it's age. So I ended up making a complete rewrite that includes a lot of the most requested features including flexbox, styling, hot reloading, and components with the same API as React Native.

For those of you who value native components, I've also been working on an experimental wxWidgets backend. There are only a few components, but I hope to implement all the components of the Qt backend soon.

Let me know of any questions you have and thanks!

Previous discussion: https://news.ycombinator.com/item?id=16978901

5 comments

Hello, as a long time proton-native follower, I was thrilled to see ~40 issues closed today for v2 when I woke up in the morning :-)

Congratulations for the v2 release!! I still couldn’t try out right away as I’m on macOS + node v13... but I’ll gonna install nvm as fast as I can :-) Thanks for your great work, it’s super useful for everybody.

I’m still kinda sad about the fate of libui— it was a great project to implement UIs, but Qt was a reasonable point, I think. I’m very looking forwards to the wxWidgets backend...for the true native widgets and the benefit it provides.

Thanks again for your great work on proton-native!!

This is incredible! Last semester I had my undergraduate software engineering class make Electron apps as group projects but I've been looking for alternatives. I'll try this out and let you know how it goes!
> ...requested features including flexbox, styling, hot reloading, and components with the same API as React Native.

That sounds like the way to go for a near 1:1 port of a cross-platform desktop app for React-based apps. Also the move from libui to Qt for the UI backend sounds interesting for this project to be used as a lightweight alternative to Electron.

To be a true alternative to Electron one must provide a simple migration path for existing Electron apps to Proton Native which would change everything in cross-platform desktop app development.

> To be a true alternative to Electron one must provide a simple migration path for existing Electron apps to Proton Native which would change everything in cross-platform desktop app development.

That only makes it an increasingly attractive alternative for those who already have an app built on Electron, and has little to do with whether Proton is a “true alternative”. If it can viably permit developing an app without Electron, it’s a true alternative. How easy it is to migrate an app from Electron is a separate matter.

Any chance of supporting a library agnostic approach, such that developers could use vanilla JS or a framework of their choice?
The library is already built to be largely library agnostic. To add a new library, just add a file that translates my calls to the library calls. This is how I achieved both Qt and wxWidgets backends.
First off, well done, this looks like a good initiative and you've clearly worked hard on it!

My main question is about app size. Once one has fully built an app and is ready to distribute it to users... how does the file size compare to an Electron app?

The only thing that meaningfully contributes to the size of the app is the size of the GUI library libraries. It currently bundles both Mac and Windows, so you can build packages for each and remove the libraries you don't need. It should be around 50 MB maximum.