
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
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
@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
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
And finally, we initialize the Mint side of the project:
mint init app
Running the development server
There is one thing to do before running the server is to change:
"beforeDevCommand": "",
to:
"beforeDevCommand": "cd app && mint start",
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
(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.
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)
For further actions, you may consider blocking this person and/orreporting abuse