I love Rust/Tauri & Svelte
Nasser El Idrissi

Nasser El Idrissi @abdenasser

About: a husband, a father, and a software engineer

Location:
Morocco
Joined:
Aug 25, 2021

I love Rust/Tauri & Svelte

Publish Date: Nov 1 '24
195 27

Hey DEV community! 👋 I recently built a native task manager for macOS that brings the htop experience to the desktop. After sharing it on Reddit and getting amazing feedback, I wanted to share what I learned here as well.

The Project: NeoHtop

NeoHtop is a modern, native process monitoring tool that combines the power of terminal-based system monitors with a clean, desktop-native UI. Check it out:

Key Features

🚀 Real-time process monitoring
💻 CPU and Memory usage tracking
🎨 Beautiful, modern UI with dark/light themes
🔍 Process search and filtering
📌 Pin important processes
🛠 Process management (kill processes)
🎯 Sort by any column
🔄 Auto-refresh system stats

  • and more...

Tech Stack & Architecture

For this project, I went with a Rust and Tauri backend paired with a Svelte frontend. The backend uses the fantastic sysinfo crate to collect system metrics efficiently. What I love about this combination is how Rust handles all the heavy lifting - from process monitoring to CPU/Memory calculations - while Tauri seamlessly bridges the gap between native capabilities and web technologies.

On the frontend side, Svelte has been a joy to work with. Its reactive nature made it perfect for building the UI components that need constant updates. I particularly enjoyed implementing the themes switcher and integrating SimpleIcons to give each process a distinctive visual identity.

Technical Challenges & Solutions

Building NeoHtop came with its fair share of interesting challenges. Performance was the biggest one - keeping everything smooth while updating multiple processes in real-time isn't trivial. The solution came from leveraging Rust's efficiency for heavy computations and establishing a fast IPC bridge to the frontend.

The most... interesting part? Dealing with Apple's certification process 😅. Between code signing, notarization, and configuring entitlements, it felt like navigating a maze. But hey, it was a great learning experience!

Lessons Learned

This project really opened my eyes to the power of Rust and Tauri for desktop applications. The developer experience was fantastic, and the performance speaks for itself. Svelte's simplicity made frontend development a breeze, though I learned to be extra careful when dealing with native APIs, especially on macOS.

What's Next?

I'm excited about the future of NeoHtop! I'm planning to add Linux support, implement more process management features, and include detailed system metrics. Network usage monitoring is high on the priority list too. I'm also planning to write a detailed technical article diving deep into the implementation details, especially around performance optimization and the IPC bridge.

Join the Journey!

I'd love for you to try out NeoHtop and share your thoughts. Have you built desktop apps with Tauri? How was your experience with Rust in desktop development? Let's chat in the comments!

Stay tuned for my upcoming technical deep-dive article where I'll break down the architecture and share some code snippets! 🚀

Try It Out!

Comments 27 total

  • Marcin Kozlowski
    Marcin KozlowskiNov 2, 2024

    Very cool

  • Trym Nilsen
    Trym NilsenNov 2, 2024

    Love it!

  • Archer - Lampron Group
    Archer - Lampron GroupNov 3, 2024

    Nicely done!

  • Chinmay
    ChinmayNov 3, 2024

    Absolutely amazing work 💯👏 I am bullish on Rust and I am learning it with Rustlings, Svelte is also near and dear to me , I am build a code editor in it for fun and learning esbuild bundling, this was informative and fun....

  • Husnul Aman
    Husnul AmanNov 3, 2024

    Amazing!

  • Hafiz Bilal
    Hafiz BilalNov 3, 2024

    Amazing work!

  • Maksim Muruev
    Maksim MuruevNov 3, 2024

    I thought tools like htop mush consume as little as possible.. which is thy btop is preferable..but this one..we need whole browser for check CPU. As DIY project is interesting.

  • Erick Rodriguez
    Erick RodriguezNov 3, 2024

    Thank you ChatGPT. This article didn't add any context on why or how you used tauri and what points makes you take the decision to use it. What outweighs against electron and no example of an implementation that makes even worth to star your "project"

    All I read was rust/electron/Svelte, star my repo.

    What an article. Give me back my 5 minutes.

    • Nasser El Idrissi
      Nasser El Idrissi Nov 3, 2024

      looking at comments you left on other posts on dev.to, it sounds like you are giving away 5 minutes everywhere you can. go get a life bro.

      • Erick Rodriguez
        Erick RodriguezNov 5, 2024

        Well, if the article had more context, OF COURSE I would ask something more meaningful.

        Let's say, what outweighs your decision to take on tauri? What benefits you gain by using Rust than NodeJS to access the list of processes? I could go on by asking even more questions.

        The quality of the article might not reflect the product. Just write something compelling so people gives you more feedback. Mine is article quality.

        And I have plenty of time to read technical articles, good or bad, and those who need work, I left my 5 cents of sarcasm and criticism since content could be better.

  • Md Kawsar Islam Yeasin
    Md Kawsar Islam YeasinNov 3, 2024

    Add Linux support Bro, How to download on linux ?

  • stephane rebai
    stephane rebaiNov 3, 2024

    Some advice for a better article :

    • you assume the reader knows what is Rust, Tauri and Svelte : a small explanation would be useful , plus if there's a link for each.
    • you chose some technologies : why ? what design process did you take ? what were your goals ?
    • Using a web frontend for a application that is system oriented aises some questions : have you considered other solutions ? why did you finally chose this stack ? Just random, root questions that can transform a "hey guys i've done this" to a more deep-in-tech discussion :)
    • Nasser El Idrissi
      Nasser El Idrissi Nov 3, 2024

      I appreciate the advice, but this is not an article titled a "deep dive to xyz", this is titled "I love Rust/Tauri & Svelte" although I mentioned "Stay tuned for my upcoming technical deep-dive article where I'll break down the architecture and share some code snippets! 🚀"

  • Marcos Sete
    Marcos SeteNov 3, 2024

    It was very good, congratulations

  • hz
    hzNov 4, 2024

    Performance concern on a Mac and no Linux is odd but ok. Sharp tech stack though, cross-platform should be nearly automatic.

  • Sukoon Admin
    Sukoon AdminNov 4, 2024

    The main thing you forgot is memory pressure.

  • Jones Beach
    Jones BeachNov 4, 2024

    I’m most impressed you made a website for this. jkjk I’ve been in marketing brain 😂 this is honestly very cool and impressive!

    • Nasser El Idrissi
      Nasser El Idrissi Nov 5, 2024

      hhh it's a (Github Pages) landing page for people to download the app

      • Jones Beach
        Jones BeachNov 5, 2024

        haha yes I know, I'm impressed all around!

  • Cheng Zhang
    Cheng ZhangNov 6, 2024

    Looks amazing! What is the average RAM usage for this app?

  • Jude Ndubuisi 🥷🧑‍💻
    Jude Ndubuisi 🥷🧑‍💻Nov 18, 2024

    Seriously this is very interesting and I am so happy going through the source code and downloading the software. I am learning Rust now and its always beautiful seeing real-world applications built in it and how it's done. Kudos to you

Add comment