Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for How to build desktop apps with Tauri and Mint
Szikszai Gusztáv
Szikszai Gusztáv

Posted on

     

How to build desktop apps with Tauri and Mint

I've recently launchedDevBox (Launch Post), a desktop application full of developer utilities. I am building it withTauri andMint 🚀 and in this post, I'll show you how!

Installing Prerequisites

You will need to install both Tauri and Mint.

For Mint, I useasdf:

asdf plugin add mintasdfinstallmint latest
Enter fullscreen modeExit fullscreen mode

For Tauri, it's a little more complicated, but theirGetting Started Guide contains the installation instructions.

Scaffolding the project

First, you need to create a directory and install the@tauri-apps/cli and@tauri-apps/api packages of Tauri:

mkdir mint-tauri && cd mint-tauriyarn add -D @tauri-apps/cli @tauri-apps/api
Enter fullscreen modeExit fullscreen mode
  • @tauri-apps/cli is the command line interface
  • @tauri-apps/api is the bridge between Rust process and the webview (we will use this later).

Next, we initialize the Tauri side of the project:

yarn tauri init
Enter fullscreen modeExit fullscreen mode

This will ask some questions about your setup and scaffold the application intosrc-tauri. The name and title should be different for your project, but the development server and dist directory should be the same:

What is your app name?: mint-tauri-testWhat should the window title be?: Mint Tauri TestWhere are your web assets (HTML/CSS/JS) located, relative to the "<current dir>/src-tauri" folder that will be created?: ../app/distWhat is the url of your dev server?: http://localhost:3000
Enter fullscreen modeExit fullscreen mode

And finally, we initialize the Mint side of the project:

mint init app
Enter fullscreen modeExit fullscreen mode

Running the development server

There is one thing to do before running the server is to change:

"beforeDevCommand": "",
Enter fullscreen modeExit fullscreen mode

to:

"beforeDevCommand": "cd app && mint start",
Enter fullscreen modeExit fullscreen mode

in thesrc-tauri/tauri.conf.json file. This will make it so that the Mint developer server is started before the Tauri development server.

To start the development server, just run:

yarn tauri dev
Enter fullscreen modeExit fullscreen mode

(at first, this will take a while because it compiles a bunch of Rust crates, but subsequent invocations will take less time)

At this point, you should see the default Mint application in a window.

Mint Tauri Window


That's it for this post! Let me know what you think in the comments below!

In the next post, I'll show how to integrate with the Tauri APIs to show notifications and read some files!

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Web developer, author of Mint (https://www.mint-lang.com)
  • Location
    Budapest
  • Joined

More fromSzikszai Gusztáv

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp