Lurker News
Hey!

I made Heynote entirely for my own use case. For many years, I always had an Emacs instance running with the scratch buffer open, even long after I had abandoned Emacs as my programming editor in favor of more recent IDE:s.
The simplicity of having just one big scratch buffer appeals to me, but I still want to separate the different things I jot down somehow (without using tabs or similar). Previously, my solution was to insert a bunch of blank lines between the notes, but hitting C-A would still select the entire buffer. That's why I came up with the concept of "blocks", which turned out really well for my use cases.
I decided to release Heynote, thinking it might be useful to others.

Comments (303) 149 threads

Show all comments

Showing thread 3 of 149

dceddia3 replies#
This looks awesome! I love the blocks idea. I’m gonna download and give it a try.

I see lots of comments about Electron (per usual here haha) and I just thought I’d shout out Tauri if you hadn’t run across it. It’s basically Electron-but-in-Rust and uses the system webview instead of Chromium, so bundle size and memory usage is reduced a bunch.
I took a look at the code and it looks like you haven’t got a ton of Electron-side code so if you felt like playing with Rust it might not be too hard to swap. I have a video editing app that I started building with Electron and then switched to Tauri midway and it’s been pretty nice.
I hope it’s clear this isn’t a request and please feel free to disregard this comment entirely :)

jonatanheyman1 reply#
Yeah, I looked at Tauri in the beginning of the project. What made me go with Electron was the maturity and large user base. And it has actually been a bliss to work with Electron (my expectations after having worked with other cross-platform tools for mobile were extremely low), so I haven't regretted my choice. I've dealt with very few bugs. I love that there is a large ecosystem, and that it was easy to automate building (as well as auto-updating) for multiple platforms.
dceddia#
That makes a lot of sense. I miss a bit of that from Electron. Its auto-updater is nicer, and while I haven't had a ton of cross-browser issues there've been a couple that I had to fix with transpiling or avoiding some newer CSS stuff. Shipping everything with one browser engine lends a lot toward peace of mind.

I wish there was a way to build a stripped-down Electron, like a configurator where you could uncheck things you don't need. Printing support? WebGPU? WebRTC? Video playback? PDF reader? Straight to jail. It would be lovely. I'd love to see what would happen to the bundle size.

esafak1 reply#
I read that the Rust part was unergonomic. Do you find Tauri productive?
dceddia#
Yeah, it works pretty well for me. Rust definitely took some getting used to (I was new to it when I started).

There's a lot of functionality you can access from JS without needing to get into Rust, but on the Rust side Tauri has this notion of "commands" for calling Rust from the UI.
You can write a Rust function and annotate it with #[tauri::command], and register it, and then you can call it from the JS side with invoke('your_command_name', args). Those commands can be async too, so you can do blocking work on the Rust side and the UI won't freeze.
You can inject State variables into those commands, which get injected at call time and are effectively global to the Rust side. I would say the State stuff is a bit unergonomic in that you run up against needing to share them between threads, so everything inside them needs to be Arc> and writing those wrappers was boilerplatey.
I wish the JS <-> Rust calling overhead were lower. It serializes everything to JSON and back, so I try to avoid too many calls, and try to avoid sending lots of data between them.

OccamsMirror#
My issue with Tauri is that it used WebKitGtk2 on Linux. Which is pretty poor from a performance perspective and missing feature support compared to WebKit on MacOS or Webview2 on Windows.