Central repository for all learnings with Tauri & Rust Backend and Vue JS (my preferred UI framework)
npm create tauri-app@latest
npm install --save-dev @tauri-apps/cli # npm create tauri-app@latest -- --beta
npm run tauri dev
- A simple boilerplate example with vanilla JS and html to call a function in Tauri using
withGlobalTauri
- A simple boilerplate example with vite to call a function in Tauri using
@tauri-apps/api
, and printing from the rust backend - Using control the inspector window visibility by using the
Window::open_devtools
andWindow::close_devtools
functions - Example of how to use the Isolation pattern to ensure app security, but isolating the app in a sandbox. (
window.__TAURI_ISOLATION_HOOK__
) - Example using
vscode-lldb
vs code extension to enable debugging in any rust file, must add.vscode/launch.json
and.vscode/tasks.json
- An example using
tauri-apps/tauri-action@v0
github action to automate building for MacOS, Windows and Linux operating systems. Check.github/workflows/build.yaml
- Example of tauri application getting micrphone access, with recorder which stops recording after 3 seconds of silence. Check
entitlements.plist
,tauri.conf.json
andAudioRecorder.vue
- Example using crabnebula devtools (https://devtools.crabnebula.dev/dash/127.0.0.1/3000/console)
- Using sidecar to execute some python executable built with
PyInstaller
, which is run by the JS frontend. (also included dev-tools to inspect the time waterfall of the operations) - Using the
tauri-cli
andcargo tauri icon
command to change the desktop app icon. - Creating a custom window menu with
main.rs
- Saving a file from an action in frontend frontend to the machine filesystem.
- Using webpack to load in a Javascript plugin dynamically using the UI. (Need to fix, doesn't work in browser only window)
- < broken version of example13 >
Tauri has a new version coming out with additional capabilities, so separated the examples related to the latest release here:
- Setting up a tauri 2 project for the first time with
npm create tauri-app@latest -- --beta
. UsingWebviewUrl
to load in 3 different webviews within the one app. Also have a button on the frontend which can open up another.app
file. - My attempt of extending example15 with an "embedded" app window - tried overlaying the window of the binary when run on top desktop application host window and track the side of the host window so i can be programtically resized. Didn't work as planned.
- Embedding a WASM as a webview within a host tauri vue application - also included rust WASM backend function to be called from JS frontend. NOTE: html is rended using
web_sys
. - Using the tauri store plugin to save and retrieve a
.bin
file key from the JS frontend. Files are saved to$APPDATA/
- Can be represented asBaseDirectory.AppData
. - Example of creating an email/password account within supabase Auth
- Example of logging in with an email/password account OR with Google account within supabase Auth
- Example of using
@stripe/connect-js
to create a marketplace payment structure (NOTE: need to come back to this in the future, NOTE 2: All keys in here are test keys) - Example of spinning up a github action workflow using Javascript from the frontend using
@octokit/core
. and Github Apps -server.js
in a different repo. - nothing interesting here, just wanted to test out the filepath of an application for the store/binaries
- Getting access to private repositories via github app, and displaying the authorized repos within the form.
- A tauri application that incorporates an update, allowing automated updates to the app installed on users machines. This example also incorporates code signing. (So 2 different types of signing, Updater and binary code signing) - See
.github/workflows/build-binary-with-updater.yaml
- usesrelaunch
on js side fromtauri-apps/plugin-process
to restart the application (only works in build mode, not dev just FYI)