A Quick Post on Electron to Tauri Conversion

I will start to say, I am by no means an expert on anything in this post.

Over the life-pause of 2020/2021 I started working on some text journaling tools to fill some gaps in my life caused by programs being abandoned and turned into subscription models.

One of the tools was made with Electron and Svelte, and I am quite proud of it and use it nearly daily for journaling and rapid notes.

I recently got a Framework laptop and run Fedora Linux (KDE) on it. Love it, it’s great. I was able to, after some reading, build the Electron app for Linux and use it there.

Recently I started re-investigating Tauri. Tauri is a stack similar to Electron in the sense that it uses web tech (HTML, CSS, Javascript) for the UI with a Node.js / web view foundation.

I had looked at Tauri when I started this app, but at the time Tauri was in Alpha and lacked several features I needed.

I thought, what would it take to port this Electron app to Tauri?

I started on Monday evening, starting with setting up the Tauri app template. It has a Svelte option and was easier to set up the two than Electron had been.

From there, however, the youth of Tauri started to show itself. Often the biggest speed-bump to getting things changed was the lack of documentation or examples.

Admittedly part of this is going to fall on me and my skillset.

It took two evenings to get things mostly set up. The Svelte UI worked just fine, and I didn’t have to change anything, save for a single CSS mod. It was really just the hooks back to the operating system that needed changed, and the quirks that came with it.

For example, the functions to write txt files in Electron call back to the backend, but can be called from the Svelte files.

In Tauri they live in the frontend with the right plugin loaded, which makes them easier to set up; however, they can’t live in the Svelte files, and so I had to make a util.js file to hold those type of functions. This wasn’t obvious from the documentation, and it took trial and error to figure out why this wasn’t working.

One of the advantages touted of Tauri is the smaller file size. The Electron app is about 65 megs. The .deb (Debian Linux file type) version of the app was 4.6 megs!

But. Because there has to be a but. Tauri does not export to RPM (Fedora Linux file type). Instead it does an appimage, which is an all in one file that runs on most Linux distributions. It was 80 megs in size.

Tauri did use less ram, 165 megs v 230 megs.

My port was only about 80%. It works, but lacks some things like a menu, spell check, remembering window size, things that I have no doubt could be set up with some more work, but were not as straight forward to set up as they had been on Electron. Again, this is probably a combination of my experience and the documentation.

I plan to write up the apps themselves independent of the framework, so more to follow.

How To Get me to try? Make it easy to leave

This is going to sound counter initiative to some business minded people, but the best way to get me to try something is to make it easy for me to leave that thing.

Easy to export my data. Easy to cancel the account; delete the account. Easy to cancel the subscription. Easy to leave.

Newspaper subscriptions are the top of the list for this. Would I subscribe to a newspaper and read it regularly? I have no idea because as a rule it seems you have to go through a very complicated process to cancel. Sign up is easy! Cancelling? Oh, you have to call a representative during ‘business hours’ who is going to take 30 minutes of your time (after the hold time) to try to talk you into staying before transferring you to the person who can cancel you.

sigh.

I was thinking about this when I was reading about iPhone tools to move from Android to iPhone. While the tool to make it easier to come over to your side is useful, it made me realize the other way would also be just as important.

What if I don’t like this thing? How can I get my stuff out? And if I can’t transfer, move, shutdown, delete, am I going to actually use the product, the software, the phone, to its fullest? No. I’m not going to risk it entering into my life.

If I am going to try your… thing, your service, your app, your online whatsit, there is a chance I am not going to like it. And that’s fine, not everything is for everyone.

But, if I can’t leave, I’m not going to come in. I can’t risk it.

By giving me the clear path to the exit door, rather than encouraging me to leave, it gives me a sense of security. If I don’t want to be here, I can go, so I am going to stick around for a bit and see how things are. I’m going to try this, honestly try it, because I know I can leave.

So show us the exits. Show us the door. Show us the way out. And you’ll be more likely to get us to come in.

Every Fediverse Instance an Island

I’ve been playing with some of the fediverse software to see about their features and what may be something I want to use. 

For example, I am excited to try Pixelfed, which is for image sharing (think Instagram) for Apokrupha. I’ve set up and have been using Bookwyrm for my reading habits. And playing with GoToSocial, Calckey and Mastodon for microblogging. 

The thing is though, the features of these applications are only a part of the equation. 

When you set up a single user instance, it is bare. There is no one else there to interact with. You aren’t federated with anyone yet, so searches don’t really work. 

It is just an empty canvas. 

That server, that island you are on is intended to be a social network. That is the main feature of each of these apps: interaction between accounts. 

The federation of these islands is a feature, yes. But that federation is based on user interactions, and is not automatic. A fresh server is empty, unconnected. 

Does Bookwyrm have a use if no one but me ever sees what I post there? I mean… yes, it does. It’s a nice record of books I’ve read and thoughts on them as I go. 

But I know I’m missing out on the real power, which is connecting and exchanging with other readers. 

I am not familiar enough with the backend of these protocols to even start to suggest what may be a good plan. Something as innocent as a ‘broadcast’ type post that would let introductions from one server be sent to others would no doubt have unintended consequences. 

There are things one can do to start to connect. Feditips (which continues to be a great resource) had a post a few days ago which had some good ideas. Among which are, joining groups, which are basically accounts that auto reblog anything sent to them, letting you connect to topics independent of servers; and looking through registries of accounts for ones you’d like to follow. 

The hope is, of course, that once you get enough posts rolling through, you’ll be able to keep connecting to more accounts that you want to interact with. 

And yet, still, your instance is an island. It will always be an island. The “social” part of the networking will always be reliant on you, the user, leaving your island and going to find new things to connect with. It is a pro-active stance that you frankly don’t have on large networks.

So why don’t I just invite people to my island? (Insert ‘People, what a bunch of bastards’ joke here) Joking aside, that turns it from something I use to something I have to admin, to something I have to moderate. Moderation can be a lot of work in of itself. 

I used to moderate a forum (a few forums) back in the dark ages of the internet, and while I toyed with the idea of starting a horror themed fediverse server, it quickly realized how much work that would be managing people. 

So why don’t I just join a larger instance for these apps? 

I suspect this is the question I am dealing with. In the end, I think smaller / one person instances is really the future / killer feature of the fediverse. Each of us having our own slice of the world we control, and yet are connected is powerful. 

But. 

But maybe those larger instances have a place as well, especially for those starting out, those without connections to bring. 

Because, as an unfortunate side note, older posts don’t get shown to new users on different servers. So that amazing picture I posted on Pixelfed of those strawberries? No one who follows me will see them through their account. 

They have to go to my server to see that image, and then (at least as far as I know) there isn’t really an easy way to interact with it. So that post is effectively lost in time. It exists, but not socially.

Which is its raison d’etre, no?