News for hackers. Stuff that matters.

kusti8

I was pretty active in the Raspberry Pi community around 4 years ago. Playing YouTube easily was a big problem and I tried making a lot of packages to solve this. I would also build Chromium to add widevine support for DRM content.

I also helped the Raspberry Pi Foundation around 4 years ago building and packaging their patched version of Chromium. What they essentially did was directly modify the Chromium source to add HW decoding specifically for the Pi with MMAL. Then, an extension would be auto installed to enable H264 on YouTube instead of VP9. This was released back when they launched the Pixel desktop.

This obviously had some problems, because the patch needed to be manually changed for every release of Chromium, which come pretty often. It couldn't also be easily upstreamed. Looking at it now, it seems it hasn't been updated in about a year, and I'm curious what the Foundation's roadmap for this is in the future, after having been out of the loop for so long.

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.
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.
The reason I did not add a renderer to React Native and went with my own renderer and reconciler was because mobile and desktop behave differently. The goal of the project is to make sure you can copy almost all your code from React Native, but not hinder usability. For example, you can define multiple windows in Proton Native and I intend to add more props to that soon.
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

Re:Proton Native – React Native for the desktop on Wednesday May 02, 2018 @07:35PM (#16982094)
Thanks for the feedback! I'm not a Qt dev, so I wasn't aware of the practices. I'll revise it and remove the Qt code.
Re:Proton Native – React Native for the desktop on Wednesday May 02, 2018 @03:04PM (#16980153)
Because I forgot. I updated the page. My bad.
Re:Proton Native – React Native for the desktop on Wednesday May 02, 2018 @03:02PM (#16980139)
Yeah I'll reword that. My bad.
Re:Proton Native – React Native for the desktop on Wednesday May 02, 2018 @02:04PM (#16979611)
I've tried to improve documentation and make it ready for use. Also all the forks is are platform specific while this is cross platform.
Re:Proton Native – React Native for the desktop on Wednesday May 02, 2018 @02:03PM (#16979600)
I'm one highschooler with not enough time. Ideally this would come from someone who can maintain this full-time like a corporation, but so far no one has done it.
Re:Proton Native – React Native for the desktop on Wednesday May 02, 2018 @02:02PM (#16979585)
Currently no. That's one thing that I want to test sometime, but right now I'm busy improving it.
Re:Proton Native – React Native for the desktop on Wednesday May 02, 2018 @01:59PM (#16979556)
Hey. I'm the author. It's hard to find a simple example that everyone understands but can show capabilities. If you're used to Qt then you're going to like Qt better, but I mainly developed this for people who want to use React. You are obviously free to use whatever you want.

But if you have any suggestions let me know!

Re:Proton Native – React Native for the Desktop on Thursday February 15, 2018 @06:32AM (#16383244)
I don't really understand what you mean. To get data from a server, you can just use normal nodejs to send a http request. Usually you'll have it so that it works when a callback is triggered, such as a button press.
Re:Proton Native – React Native for the Desktop on Thursday February 15, 2018 @06:31AM (#16383236)
Memory usage is a lot less. Electron has a full webbrowser running to display the page, which this uses Gtk on Linux or cocoa on Mac etc.
Re:Proton Native – React Native for the Desktop on Wednesday February 14, 2018 @07:49PM (#16381022)
It's not totally ready for production because the GUI library that I'm using is not totally polished. My part I would say is Beta, and the GUI library is versioned as alpha. For most tasks it will work fine. For more complex stuff you will obviously want something more robust.

With Windows, the .dll is compiled on npm install, and that works perfectly. Currently I don't think libui supports icons.

I chose libui because it is the only GUI library for JS that I could find. It is nice and fits well with React, but it does have some holes. The author is going to continue development soon, so some of the problems should be fixed in the future.

A MSI can be generated using an installer such as NSIS.