7
vane
3y

My another attempt to write something in rust and I wanted to try tauri as it’s promising competition to electron.

Why use tauri not electron?
Cause in tauri you can write rust plugins that you can interact with directly from javascript without stupid http servers, mangling code and stuff.

From javascript point you only call one method and pass object with arguments into it.

So it took me entire weekend to create draft plugin to interact with sqlite database.

Documentation of tauri is inconsistent. I understand that cause it’s young project and plugins architecture changed frequently.

Moreover my knowledge of rust is near to zero. But overall it was worth it. I like what I achieved.

I can pass sql query and execute it inside mutex guarded singleton. Like I said before I like it cause I can call my plugin directly from javascript.

I know I wasn’t fancy with my implementation. I just created file database connection from json configuration and managed to receive string sql statements. I just print results with rust to console for now.

I will add sending back results later this week.

For me tauri is already better then electron cause code is clear and there is no workaround ( except singleton with connection - cause of limitations of my rust knowledge ).

Live long tauri and fuck you electron.

https://tauri.studio/en/
if you’re interested.

Comments
  • 1
    This is amazing! Rust and JS have a child for desktop apps. Is there Rust+TS Tauri for an absolute winner? 😁
    They even brought a roadmap. There's no time to lose, fellas!
  • 1
    @vintprox I am using angular without any problems so typescript should work.
Add Comment