Skip to content
On this page

2023 July

The month is kind of a blur in that I mostly spent it building out LA.

Thought I could release a local version of the app by August but as I chose Electron, when it was time to actually release the app, it just broke.

So now I am learning Rust. And using Tauri instead.

I wanted to use Electron instead of Tauri for LA as I thought keeping everything to one language, TS, would be amazing. But Electron is just an incredible mess. You can't use ESM only packages in Electron. If you want to do something on the OS side, you have to declare it in main. Then via IPC send message to preload. And then from preload, expose the code to the front end. I used this template for it.

I got so desperate to try get the Electron app working that I even paid the author of the template to help me. What I got back though were some messages and no actual help. Which is upsetting considering it was the last money I had left.

Lessons learned. Never pay in full before getting actual help/service.

Rust and Tauri migration

Doing this quickly to learn enough rust:

  1. Comprehensive Rust
  2. Rust book
  3. Rust by Example

Then I need to move the code I already wrote in node.js with Electron. Specifically the electron app on node.js side used TinyBase persisted to SQLite.

Everything was stored locally in SQLite. I had TinyBase define the schemas of my tables and used TinyBase to do queries and mutations on the store.

This is great talk on TinyBase.

As I now am using Rust/Tauri, I have to write TinyBase logic in Rust instead.

I plan to use Rusqlite for it. Then connect it to Tauri with help of this article.

Then as I am building an Obsidian like app that connects to file system. You connect a folder of markdown files to LA and it will sync up. It will convert from a .md files to a topic. Using a markdown parser.

I had a markdown parser written in TS using mdast-util-from-markdown and mdast-util-to-markdown.

Now I need to rewrite it using markdown-rs.

Then use Watchexec to listen to changes to files in a folder for full sync up. If change in LA app happens, file content gets updated. If file content gets updated (say user uses Obsidian but wants to use LA for publishing only), it will also sync up well and work.

So yeah. Writing Rust, day and night until I can do the above.


Started watching The Bear and it's amazing.



Release LA for real. Local app and website with all the topics + search.