├── .gitignore ├── .vscode └── extensions.json ├── LICENSE ├── README.md ├── adv-async-commands ├── .gitignore ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── src-tauri │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ ├── capabilities │ │ └── default.json │ ├── icons │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── 32x32.png │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ ├── Square30x30Logo.png │ │ ├── Square310x310Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── StoreLogo.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ ├── src │ │ ├── lib.rs │ │ └── main.rs │ └── tauri.conf.json ├── src │ ├── bindings.ts │ ├── main.ts │ └── styles.css ├── tsconfig.json └── vite.config.ts ├── deep-link-desktop ├── .gitignore ├── .vscode │ └── extensions.json ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── public │ ├── tauri.svg │ └── vite.svg ├── src-tauri │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ ├── capabilities │ │ └── default.json │ ├── icons │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── 32x32.png │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ ├── Square30x30Logo.png │ │ ├── Square310x310Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── StoreLogo.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ ├── src │ │ ├── lib.rs │ │ └── main.rs │ └── tauri.conf.json ├── src │ ├── App.css │ ├── App.tsx │ ├── assets │ │ └── react.svg │ ├── main.tsx │ └── vite-env.d.ts ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts ├── filesystem-apis ├── .gitignore ├── .vscode │ └── extensions.json ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── public │ ├── tauri.svg │ └── vite.svg ├── src-tauri │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ ├── capabilities │ │ └── default.json │ ├── icons │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── 32x32.png │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ ├── Square30x30Logo.png │ │ ├── Square310x310Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── StoreLogo.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ ├── src │ │ ├── lib.rs │ │ └── main.rs │ └── tauri.conf.json ├── src │ ├── App.css │ ├── App.tsx │ ├── assets │ │ └── react.svg │ ├── main.tsx │ └── vite-env.d.ts ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts ├── local-first-data ├── .gitignore ├── .vscode │ └── extensions.json ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── public │ ├── tauri.svg │ └── vite.svg ├── src-tauri │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ ├── icons │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── 32x32.png │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ ├── Square30x30Logo.png │ │ ├── Square310x310Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── StoreLogo.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ ├── src │ │ └── main.rs │ └── tauri.conf.json ├── src │ ├── App.css │ ├── App.jsx │ └── main.jsx └── vite.config.js ├── mobile ├── .gitignore ├── .vscode │ └── extensions.json ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── public │ ├── tauri.svg │ └── vite.svg ├── src-tauri │ ├── .cargo │ │ └── config.toml │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── Info.ios.plist │ ├── build.rs │ ├── capabilities │ │ ├── default.json │ │ └── mobile.json │ ├── gen │ │ ├── android │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── app │ │ │ │ ├── .gitignore │ │ │ │ ├── build.gradle.kts │ │ │ │ ├── proguard-rules.pro │ │ │ │ └── src │ │ │ │ │ └── main │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── jacobbolda │ │ │ │ │ │ └── mobile │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ │ └── res │ │ │ │ │ ├── drawable-v24 │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ │ ├── drawable │ │ │ │ │ └── ic_launcher_background.xml │ │ │ │ │ ├── layout │ │ │ │ │ └── activity_main.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── values-night │ │ │ │ │ └── themes.xml │ │ │ │ │ ├── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── themes.xml │ │ │ │ │ └── xml │ │ │ │ │ └── file_paths.xml │ │ │ ├── build.gradle.kts │ │ │ ├── buildSrc │ │ │ │ ├── build.gradle.kts │ │ │ │ └── src │ │ │ │ │ └── main │ │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── jacobbolda │ │ │ │ │ └── mobile │ │ │ │ │ └── kotlin │ │ │ │ │ ├── BuildTask.kt │ │ │ │ │ └── RustPlugin.kt │ │ │ ├── gradle.properties │ │ │ ├── gradle │ │ │ │ └── wrapper │ │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ │ └── gradle-wrapper.properties │ │ │ ├── gradlew │ │ │ ├── gradlew.bat │ │ │ └── settings.gradle │ │ └── apple │ │ │ ├── .gitignore │ │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── AppIcon-20x20@1x.png │ │ │ │ ├── AppIcon-20x20@2x-1.png │ │ │ │ ├── AppIcon-20x20@2x.png │ │ │ │ ├── AppIcon-20x20@3x.png │ │ │ │ ├── AppIcon-29x29@1x.png │ │ │ │ ├── AppIcon-29x29@2x-1.png │ │ │ │ ├── AppIcon-29x29@2x.png │ │ │ │ ├── AppIcon-29x29@3x.png │ │ │ │ ├── AppIcon-40x40@1x.png │ │ │ │ ├── AppIcon-40x40@2x-1.png │ │ │ │ ├── AppIcon-40x40@2x.png │ │ │ │ ├── AppIcon-40x40@3x.png │ │ │ │ ├── AppIcon-512@2x.png │ │ │ │ ├── AppIcon-60x60@2x.png │ │ │ │ ├── AppIcon-60x60@3x.png │ │ │ │ ├── AppIcon-76x76@1x.png │ │ │ │ ├── AppIcon-76x76@2x.png │ │ │ │ ├── AppIcon-83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ │ ├── ExportOptions.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ ├── Podfile │ │ │ ├── Sources │ │ │ └── mobile │ │ │ │ ├── bindings │ │ │ │ └── bindings.h │ │ │ │ └── main.mm │ │ │ ├── mobile.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ └── WorkspaceSettings.xcsettings │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── mobile_iOS.xcscheme │ │ │ ├── mobile_iOS │ │ │ ├── Info.plist │ │ │ └── mobile_iOS.entitlements │ │ │ └── project.yml │ ├── icons │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── 32x32.png │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ ├── Square30x30Logo.png │ │ ├── Square310x310Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── StoreLogo.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ ├── src │ │ ├── lib.rs │ │ └── main.rs │ └── tauri.conf.json ├── src │ ├── App.css │ ├── App.tsx │ ├── main.tsx │ └── vite-env.d.ts ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts ├── multiwebview ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── src-tauri │ ├── .cargo │ │ └── config.toml │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ ├── gen │ │ └── schemas │ │ │ ├── capabilities.json │ │ │ ├── desktop-schema.json │ │ │ ├── plugin-manifests.json │ │ │ └── windows-schema.json │ ├── icons │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── 32x32.png │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ ├── Square30x30Logo.png │ │ ├── Square310x310Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── StoreLogo.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ ├── src │ │ ├── lib.rs │ │ └── main.rs │ └── tauri.conf.json └── src │ ├── assets │ ├── javascript.svg │ └── tauri.svg │ ├── index.html │ ├── index1.html │ ├── index2.html │ ├── index3.html │ ├── index4.html │ ├── main.js │ └── styles.css ├── package-lock.json ├── rust-att-leptos ├── .gitignore ├── .taurignore ├── .vscode │ ├── extensions.json │ └── settings.json ├── Cargo.toml ├── README.md ├── Trunk.toml ├── index.html ├── public │ ├── leptos.svg │ └── tauri.svg ├── src-tauri │ ├── .gitignore │ ├── Cargo.toml │ ├── build.rs │ ├── icons │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── 32x32.png │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ ├── Square30x30Logo.png │ │ ├── Square310x310Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── StoreLogo.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ ├── src │ │ └── main.rs │ └── tauri.conf.json ├── src │ ├── app.rs │ └── main.rs └── styles.css ├── tauri-egui ├── .gitignore ├── .vscode │ └── extensions.json ├── README.md ├── src-tauri │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ ├── icons │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── 32x32.png │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ ├── Square30x30Logo.png │ │ ├── Square310x310Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── StoreLogo.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ ├── src │ │ └── main.rs │ └── tauri.conf.json └── src │ ├── assets │ ├── javascript.svg │ └── tauri.svg │ ├── index.html │ ├── main.js │ └── style.css ├── tauri-sidecar ├── .gitignore ├── .vscode │ └── extensions.json ├── README.md ├── bin │ ├── deno-server.ts │ └── graphgen-x86_64-pc-windows-msvc.exe ├── index.html ├── package-lock.json ├── package.json ├── public │ ├── tauri.svg │ └── vite.svg ├── src-tauri │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ ├── icons │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── 32x32.png │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ ├── Square30x30Logo.png │ │ ├── Square310x310Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── StoreLogo.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ ├── src │ │ └── main.rs │ └── tauri.conf.json ├── src │ ├── app.css │ ├── app.jsx │ ├── assets │ │ └── preact.svg │ ├── main.jsx │ └── style.css └── vite.config.js ├── tray-app ├── .gitignore ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── src-tauri │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ ├── capabilities │ │ └── migrated.json │ ├── gen │ │ └── schemas │ │ │ ├── acl-manifests.json │ │ │ ├── capabilities.json │ │ │ ├── desktop-schema.json │ │ │ └── windows-schema.json │ ├── icons │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── 32x32.png │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ ├── Square30x30Logo.png │ │ ├── Square310x310Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── StoreLogo.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ ├── rustfmt.toml │ ├── src │ │ └── main.rs │ └── tauri.conf.json ├── src │ ├── App.css │ ├── App.jsx │ ├── favicon.svg │ ├── index.css │ ├── logo.svg │ └── main.jsx └── vite.config.js ├── verso-runtime ├── .gitignore ├── .vscode │ └── extensions.json ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── public │ ├── tauri.svg │ └── vite.svg ├── src-tauri │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ ├── capabilities │ │ └── default.json │ ├── icons │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── 32x32.png │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ ├── Square30x30Logo.png │ │ ├── Square310x310Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── StoreLogo.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ ├── src │ │ ├── lib.rs │ │ └── main.rs │ └── tauri.conf.json ├── src │ ├── App.css │ ├── App.tsx │ ├── assets │ │ └── react.svg │ ├── main.tsx │ └── vite-env.d.ts ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts └── windows-vibing ├── .gitignore ├── index.html ├── package-lock.json ├── package.json ├── src-tauri ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── build.rs ├── icons │ ├── 128x128.png │ ├── 128x128@2x.png │ ├── 32x32.png │ ├── Square107x107Logo.png │ ├── Square142x142Logo.png │ ├── Square150x150Logo.png │ ├── Square284x284Logo.png │ ├── Square30x30Logo.png │ ├── Square310x310Logo.png │ ├── Square44x44Logo.png │ ├── Square71x71Logo.png │ ├── Square89x89Logo.png │ ├── StoreLogo.png │ ├── icon.icns │ ├── icon.ico │ └── icon.png ├── src │ └── main.rs └── tauri.conf.json ├── src ├── app.jsx ├── favicon.svg ├── index.css ├── logo.jsx └── main.jsx └── vite.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] 3 | } 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Jacob Bolda 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tauri-playground -------------------------------------------------------------------------------- /adv-async-commands/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /adv-async-commands/README.md: -------------------------------------------------------------------------------- 1 | # Tauri + Vanilla TS 2 | 3 | This template should help get you started developing with Tauri in vanilla HTML, CSS and Typescript. 4 | 5 | ## Recommended IDE Setup 6 | 7 | - [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) 8 | -------------------------------------------------------------------------------- /adv-async-commands/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri App 8 | 9 | 10 | 11 | 12 |
13 |

Advanced Async Commands

14 | 15 | 21 | 22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /adv-async-commands/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "adv-async-commands", 3 | "private": true, 4 | "version": "0.1.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview", 10 | "tauri": "tauri" 11 | }, 12 | "dependencies": { 13 | "@tauri-apps/api": "^2", 14 | "@tauri-apps/plugin-shell": "^2" 15 | }, 16 | "devDependencies": { 17 | "@tauri-apps/cli": "^2", 18 | "vite": "^5.3.1", 19 | "typescript": "^5.2.2" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # Generated by Tauri 6 | # will have schema files for capabilities auto-completion 7 | /gen/schemas 8 | -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "adv-async-commands" 3 | version = "0.1.0" 4 | description = "A Tauri App" 5 | authors = ["you"] 6 | edition = "2021" 7 | 8 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 9 | 10 | [lib] 11 | # The `_lib` suffix may seem redundant but it is necessary 12 | # to make the lib name unique and wouldn't conflict with the bin name. 13 | # This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 14 | name = "adv_async_commands_lib" 15 | crate-type = ["staticlib", "cdylib", "rlib"] 16 | 17 | [build-dependencies] 18 | tauri-build = { version = "2", features = [] } 19 | 20 | [dependencies] 21 | tauri = { version = "2", features = [] } 22 | serde = { version = "1", features = ["derive"] } 23 | serde_json = "1" 24 | specta-typescript = "0.0.7" 25 | tauri-specta = { version = "=2.0.0-rc.20", features = ["derive", "typescript"] } 26 | specta = "=2.0.0-rc.20" 27 | -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/capabilities/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../gen/schemas/desktop-schema.json", 3 | "identifier": "default", 4 | "description": "Capability for the main window", 5 | "windows": ["main"], 6 | "permissions": ["core:default"] 7 | } 8 | -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/adv-async-commands/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | fn main() { 5 | adv_async_commands_lib::run() 6 | } 7 | -------------------------------------------------------------------------------- /adv-async-commands/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.tauri.app/config/2", 3 | "productName": "adv-async-commands", 4 | "version": "0.1.0", 5 | "identifier": "com.adv-async-commands.app", 6 | "build": { 7 | "beforeDevCommand": "npm run dev", 8 | "devUrl": "http://localhost:1420", 9 | "beforeBuildCommand": "npm run build", 10 | "frontendDist": "../dist" 11 | }, 12 | "app": { 13 | "withGlobalTauri": true, 14 | "windows": [ 15 | { 16 | "title": "adv-async-commands", 17 | "width": 800, 18 | "height": 600 19 | } 20 | ], 21 | "security": { 22 | "csp": null 23 | } 24 | }, 25 | "bundle": { 26 | "active": true, 27 | "targets": "all", 28 | "icon": [ 29 | "icons/32x32.png", 30 | "icons/128x128.png", 31 | "icons/128x128@2x.png", 32 | "icons/icon.icns", 33 | "icons/icon.ico" 34 | ] 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /adv-async-commands/src/styles.css: -------------------------------------------------------------------------------- 1 | :root { 2 | font-family: Inter, Avenir, Helvetica, Arial, sans-serif; 3 | font-size: 16px; 4 | line-height: 24px; 5 | font-weight: 400; 6 | 7 | color: #0f0f0f; 8 | background-color: #f6f6f6; 9 | 10 | font-synthesis: none; 11 | text-rendering: optimizeLegibility; 12 | -webkit-font-smoothing: antialiased; 13 | -moz-osx-font-smoothing: grayscale; 14 | -webkit-text-size-adjust: 100%; 15 | } 16 | 17 | .container { 18 | margin: 0; 19 | padding-top: 10vh; 20 | display: flex; 21 | flex-direction: column; 22 | justify-content: center; 23 | text-align: center; 24 | } 25 | 26 | a { 27 | font-weight: 500; 28 | color: #646cff; 29 | text-decoration: inherit; 30 | } 31 | 32 | a:hover { 33 | color: #535bf2; 34 | } 35 | 36 | h1 { 37 | text-align: center; 38 | } 39 | 40 | select, 41 | input, 42 | button { 43 | border-radius: 8px; 44 | border: 1px solid transparent; 45 | padding: 0.6em 1.2em; 46 | margin: 0.6rem; 47 | font-size: 1em; 48 | font-weight: 500; 49 | font-family: inherit; 50 | color: #0f0f0f; 51 | background-color: #ffffff; 52 | transition: border-color 0.25s; 53 | box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2); 54 | } 55 | 56 | button { 57 | cursor: pointer; 58 | } 59 | 60 | button:hover { 61 | border-color: #396cd8; 62 | } 63 | button:active { 64 | border-color: #396cd8; 65 | background-color: #e8e8e8; 66 | } 67 | 68 | input, 69 | button { 70 | outline: none; 71 | } 72 | 73 | @media (prefers-color-scheme: dark) { 74 | :root { 75 | color: #f6f6f6; 76 | background-color: #2f2f2f; 77 | } 78 | 79 | a:hover { 80 | color: #24c8db; 81 | } 82 | 83 | input, 84 | button { 85 | color: #ffffff; 86 | background-color: #0f0f0f98; 87 | } 88 | button:active { 89 | background-color: #0f0f0f69; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /adv-async-commands/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | 16 | /* Linting */ 17 | "strict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "include": ["src"] 23 | } 24 | -------------------------------------------------------------------------------- /adv-async-commands/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | 3 | // @ts-expect-error process is a nodejs global 4 | const host = process.env.TAURI_DEV_HOST; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig(async () => ({ 8 | 9 | // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` 10 | // 11 | // 1. prevent vite from obscuring rust errors 12 | clearScreen: false, 13 | // 2. tauri expects a fixed port, fail if that port is not available 14 | server: { 15 | port: 1420, 16 | strictPort: true, 17 | host: host || false, 18 | hmr: host 19 | ? { 20 | protocol: "ws", 21 | host, 22 | port: 1421, 23 | } 24 | : undefined, 25 | watch: { 26 | // 3. tell vite to ignore watching `src-tauri` 27 | ignored: ["**/src-tauri/**"], 28 | }, 29 | }, 30 | })); 31 | -------------------------------------------------------------------------------- /deep-link-desktop/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /deep-link-desktop/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] 3 | } 4 | -------------------------------------------------------------------------------- /deep-link-desktop/README.md: -------------------------------------------------------------------------------- 1 | # Deep Links On Desktop 2 | 3 | We went through this live on YouTube. [Watch the VOD](https://www.youtube.com/watch?v=LXaY-P8bfn8). 4 | -------------------------------------------------------------------------------- /deep-link-desktop/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri + React + Typescript 8 | 9 | 10 | 11 |
12 | 13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /deep-link-desktop/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "deep-link-desktop", 3 | "private": true, 4 | "version": "0.1.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview", 10 | "tauri": "tauri" 11 | }, 12 | "dependencies": { 13 | "@tauri-apps/api": ">=2.0.0-rc.0", 14 | "@tauri-apps/plugin-deep-link": "^2.0.0-rc.2", 15 | "@tauri-apps/plugin-shell": ">=2.0.0-rc.0", 16 | "react": "^18.2.0", 17 | "react-dom": "^18.2.0" 18 | }, 19 | "devDependencies": { 20 | "@tauri-apps/cli": ">=2.0.0-rc.0", 21 | "@types/react": "^18.2.15", 22 | "@types/react-dom": "^18.2.7", 23 | "@vitejs/plugin-react": "^4.2.1", 24 | "typescript": "^5.2.2", 25 | "vite": "^5.3.1" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /deep-link-desktop/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # Generated by Tauri 6 | # will have schema files for capabilities auto-completion 7 | /gen/schemas 8 | -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "deep-link-desktop" 3 | version = "0.1.0" 4 | description = "A Tauri App" 5 | authors = ["you"] 6 | edition = "2021" 7 | 8 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 9 | 10 | [lib] 11 | name = "deep_link_desktop_lib" 12 | crate-type = ["lib", "cdylib", "staticlib"] 13 | 14 | [build-dependencies] 15 | tauri-build = { version = "2.0.0-rc", features = [] } 16 | 17 | [dependencies] 18 | tauri = { version = "2.0.0-rc", features = [] } 19 | tauri-plugin-shell = "2.0.0-rc" 20 | serde = { version = "1", features = ["derive"] } 21 | serde_json = "1" 22 | tauri-plugin-deep-link = "2.0.0-rc" 23 | 24 | [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] 25 | tauri-plugin-single-instance = "2.0.0-rc" 26 | 27 | -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/capabilities/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../gen/schemas/desktop-schema.json", 3 | "identifier": "default", 4 | "description": "Capability for the main window", 5 | "windows": ["main"], 6 | "permissions": ["core:default", "shell:allow-open", "deep-link:default"] 7 | } 8 | -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/deep-link-desktop/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/src/lib.rs: -------------------------------------------------------------------------------- 1 | use tauri::{AppHandle, Emitter, Manager}; 2 | 3 | // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command 4 | #[tauri::command] 5 | fn greet(name: &str) -> String { 6 | format!("Hello, {}! You've been greeted from Rust!", name) 7 | } 8 | 9 | #[cfg_attr(mobile, tauri::mobile_entry_point)] 10 | pub fn run() { 11 | tauri::Builder::default() 12 | .plugin(tauri_plugin_single_instance::init(|app, argv, _cwd| { 13 | println!("a new app instance was opened with {argv:?} and the deep link event was already triggered"); 14 | let _ = show_window(app); 15 | let _ = app.emit("single-instance", ()); 16 | // when defining deep link schemes at runtime, you must also check `argv` here 17 | })) 18 | .plugin(tauri_plugin_deep_link::init()) 19 | .plugin(tauri_plugin_shell::init()) 20 | .invoke_handler(tauri::generate_handler![greet]) 21 | // .setup(|app| { 22 | // #[cfg(any(windows, target_os = "linux"))] 23 | // { 24 | // use tauri_plugin_deep_link::DeepLinkExt; 25 | // app.deep_link().register_all()?; 26 | // } 27 | // Ok(()) 28 | // }) 29 | .run(tauri::generate_context!()) 30 | .expect("error while running tauri application"); 31 | } 32 | 33 | // from example in docs: https://v2.tauri.app/plugin/single-instance/#focusing-on-new-instance 34 | fn show_window(app: &AppHandle) { 35 | let windows = app.webview_windows(); 36 | 37 | windows 38 | .values() 39 | .next() 40 | .expect("Sorry, no window found") 41 | .set_focus() 42 | .expect("Can't Bring Window to Focus"); 43 | } 44 | -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | fn main() { 5 | deep_link_desktop_lib::run() 6 | } 7 | -------------------------------------------------------------------------------- /deep-link-desktop/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.tauri.app/config/2.0.0-rc", 3 | "productName": "deep-link-desktop", 4 | "version": "0.1.0", 5 | "identifier": "com.deep-link-desktop.app", 6 | "build": { 7 | "beforeDevCommand": "npm run dev", 8 | "devUrl": "http://localhost:1420", 9 | "beforeBuildCommand": "npm run build", 10 | "frontendDist": "../dist" 11 | }, 12 | "app": { 13 | "withGlobalTauri": true, 14 | "windows": [ 15 | { 16 | "title": "deep-link-desktop", 17 | "width": 800, 18 | "height": 600 19 | } 20 | ], 21 | "security": { 22 | "csp": null 23 | } 24 | }, 25 | "bundle": { 26 | "active": true, 27 | "targets": "all", 28 | "icon": [ 29 | "icons/32x32.png", 30 | "icons/128x128.png", 31 | "icons/128x128@2x.png", 32 | "icons/icon.icns", 33 | "icons/icon.ico" 34 | ] 35 | }, 36 | "plugins": { 37 | "deep-link": { 38 | "desktop": { 39 | "schemes": ["deep-link-desktop-test"] 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /deep-link-desktop/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import App from "./App"; 4 | 5 | ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( 6 | 7 | 8 | , 9 | ); 10 | -------------------------------------------------------------------------------- /deep-link-desktop/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /deep-link-desktop/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /deep-link-desktop/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /deep-link-desktop/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | // @ts-expect-error process is a nodejs global 5 | const host = process.env.TAURI_DEV_HOST; 6 | 7 | // https://vitejs.dev/config/ 8 | export default defineConfig(async () => ({ 9 | plugins: [react()], 10 | 11 | // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` 12 | // 13 | // 1. prevent vite from obscuring rust errors 14 | clearScreen: false, 15 | // 2. tauri expects a fixed port, fail if that port is not available 16 | server: { 17 | port: 1420, 18 | strictPort: true, 19 | host: host || false, 20 | hmr: host 21 | ? { 22 | protocol: "ws", 23 | host, 24 | port: 1421, 25 | } 26 | : undefined, 27 | watch: { 28 | // 3. tell vite to ignore watching `src-tauri` 29 | ignored: ["**/src-tauri/**"], 30 | }, 31 | }, 32 | })); 33 | -------------------------------------------------------------------------------- /filesystem-apis/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /filesystem-apis/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] 3 | } 4 | -------------------------------------------------------------------------------- /filesystem-apis/README.md: -------------------------------------------------------------------------------- 1 | # Tauri + React + Typescript 2 | 3 | This template should help get you started developing with Tauri, React and Typescript in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | - [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) 8 | -------------------------------------------------------------------------------- /filesystem-apis/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri + React + Typescript 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /filesystem-apis/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "filesystem-apis", 3 | "private": true, 4 | "version": "0.1.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview", 10 | "tauri": "tauri" 11 | }, 12 | "dependencies": { 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0", 15 | "@tauri-apps/api": "^2", 16 | "@tauri-apps/plugin-shell": "^2" 17 | }, 18 | "devDependencies": { 19 | "@types/react": "^18.2.15", 20 | "@types/react-dom": "^18.2.7", 21 | "@vitejs/plugin-react": "^4.2.1", 22 | "typescript": "^5.2.2", 23 | "vite": "^5.3.1", 24 | "@tauri-apps/cli": "^2" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /filesystem-apis/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # Generated by Tauri 6 | # will have schema files for capabilities auto-completion 7 | /gen/schemas 8 | -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "filesystem-apis" 3 | version = "0.1.0" 4 | description = "A Tauri App" 5 | authors = ["you"] 6 | edition = "2021" 7 | 8 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 9 | 10 | [lib] 11 | # The `_lib` suffix may seem redundant but it is necessary 12 | # to make the lib name unique and wouldn't conflict with the bin name. 13 | # This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 14 | name = "filesystem_apis_lib" 15 | crate-type = ["staticlib", "cdylib", "rlib"] 16 | 17 | [build-dependencies] 18 | tauri-build = { version = "2", features = [] } 19 | 20 | [dependencies] 21 | tauri = { version = "2", features = [] } 22 | tauri-plugin-shell = "2" 23 | serde = { version = "1", features = ["derive"] } 24 | serde_json = "1" 25 | 26 | -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/capabilities/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../gen/schemas/desktop-schema.json", 3 | "identifier": "default", 4 | "description": "Capability for the main window", 5 | "windows": ["main"], 6 | "permissions": [ 7 | "core:default", 8 | "shell:allow-open" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/filesystem-apis/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Learn more about Tauri commands at https://tauri.app/develop/calling-rust/ 2 | #[tauri::command] 3 | fn greet(name: &str) -> String { 4 | format!("Hello, {}! You've been greeted from Rust!", name) 5 | } 6 | 7 | #[cfg_attr(mobile, tauri::mobile_entry_point)] 8 | pub fn run() { 9 | tauri::Builder::default() 10 | .plugin(tauri_plugin_shell::init()) 11 | .invoke_handler(tauri::generate_handler![greet]) 12 | .run(tauri::generate_context!()) 13 | .expect("error while running tauri application"); 14 | } 15 | -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | fn main() { 5 | filesystem_apis_lib::run() 6 | } 7 | -------------------------------------------------------------------------------- /filesystem-apis/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.tauri.app/config/2", 3 | "productName": "filesystem-apis", 4 | "version": "0.1.0", 5 | "identifier": "com.filesystem-apis.app", 6 | "build": { 7 | "beforeDevCommand": "npm run dev", 8 | "devUrl": "http://localhost:1420", 9 | "beforeBuildCommand": "npm run build", 10 | "frontendDist": "../dist" 11 | }, 12 | "app": { 13 | "windows": [ 14 | { 15 | "title": "filesystem-apis", 16 | "width": 800, 17 | "height": 600 18 | } 19 | ], 20 | "security": { 21 | "csp": null 22 | } 23 | }, 24 | "bundle": { 25 | "active": true, 26 | "targets": "all", 27 | "icon": [ 28 | "icons/32x32.png", 29 | "icons/128x128.png", 30 | "icons/128x128@2x.png", 31 | "icons/icon.icns", 32 | "icons/icon.ico" 33 | ] 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /filesystem-apis/src/App.tsx: -------------------------------------------------------------------------------- 1 | import "./App.css"; 2 | 3 | function App() { 4 | async function filesystemAction() { 5 | console.log("howdy friends"); 6 | 7 | const opfsRoot = await navigator.storage.getDirectory(); 8 | const fileHandle = await opfsRoot.getFileHandle("my first file", { 9 | create: true, 10 | }); 11 | console.log({ fileHandle }); 12 | const directoryHandle = await opfsRoot.getDirectoryHandle( 13 | "my first folder", 14 | { 15 | create: true, 16 | } 17 | ); 18 | console.log({ directoryHandle }); 19 | 20 | // @ts-expect-error 21 | for await (let [name, handle] of directoryHandle) { 22 | alert(JSON.stringify({ name, handle })); 23 | } 24 | // @ts-expect-error 25 | for await (let [name, handle] of directoryHandle.entries()) { 26 | alert(JSON.stringify({ name, handle })); 27 | } 28 | // @ts-expect-error 29 | for await (let handle of directoryHandle.values()) { 30 | alert(JSON.stringify({ handle })); 31 | } 32 | // @ts-expect-error 33 | for await (let name of directoryHandle.keys()) { 34 | alert(JSON.stringify({ name })); 35 | } 36 | 37 | const nestedFileHandle = await directoryHandle.getFileHandle( 38 | "my first nested file", 39 | { create: true } 40 | ); 41 | console.log({ nestedFileHandle }); 42 | const nestedDirectoryHandle = await directoryHandle.getDirectoryHandle( 43 | "my first nested folder", 44 | { create: true } 45 | ); 46 | console.log({ nestedDirectoryHandle }); 47 | } 48 | 49 | return ( 50 |
51 |

Welcome to The Filesystem

52 | 53 | 54 |
55 | ); 56 | } 57 | 58 | export default App; 59 | -------------------------------------------------------------------------------- /filesystem-apis/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import App from "./App"; 4 | 5 | ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( 6 | 7 | 8 | , 9 | ); 10 | -------------------------------------------------------------------------------- /filesystem-apis/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /filesystem-apis/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /filesystem-apis/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /filesystem-apis/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | // @ts-expect-error process is a nodejs global 5 | const host = process.env.TAURI_DEV_HOST; 6 | 7 | // https://vitejs.dev/config/ 8 | export default defineConfig(async () => ({ 9 | plugins: [react()], 10 | 11 | // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` 12 | // 13 | // 1. prevent vite from obscuring rust errors 14 | clearScreen: false, 15 | // 2. tauri expects a fixed port, fail if that port is not available 16 | server: { 17 | port: 1420, 18 | strictPort: true, 19 | host: host || false, 20 | hmr: host 21 | ? { 22 | protocol: "ws", 23 | host, 24 | port: 1421, 25 | } 26 | : undefined, 27 | watch: { 28 | // 3. tell vite to ignore watching `src-tauri` 29 | ignored: ["**/src-tauri/**"], 30 | }, 31 | }, 32 | })); 33 | -------------------------------------------------------------------------------- /local-first-data/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /local-first-data/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] 3 | } 4 | -------------------------------------------------------------------------------- /local-first-data/README.md: -------------------------------------------------------------------------------- 1 | # Tauri + React 2 | 3 | This template should help get you started developing with Tauri and React in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | - [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) 8 | -------------------------------------------------------------------------------- /local-first-data/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri + React 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /local-first-data/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "local-first-data", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "tauri": "tauri" 11 | }, 12 | "dependencies": { 13 | "@tauri-apps/api": "^1.5.0", 14 | "react": "^18.2.0", 15 | "react-dom": "^18.2.0", 16 | "tinybase": "^4.3.11" 17 | }, 18 | "devDependencies": { 19 | "@tauri-apps/cli": "^1.5.0", 20 | "@vitejs/plugin-react": "^4.0.3", 21 | "vite": "^4.4.4" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /local-first-data/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /local-first-data/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | -------------------------------------------------------------------------------- /local-first-data/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "local-first-data" 3 | version = "0.0.0" 4 | description = "A Tauri App" 5 | authors = ["you"] 6 | license = "" 7 | repository = "" 8 | edition = "2021" 9 | 10 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 11 | 12 | [build-dependencies] 13 | tauri-build = { version = "1.5", features = [] } 14 | 15 | [dependencies] 16 | tauri = { version = "1.5", features = ["shell-open"] } 17 | serde = { version = "1.0", features = ["derive"] } 18 | serde_json = "1.0" 19 | 20 | [features] 21 | # this feature is used for production builds or when `devPath` points to the filesystem 22 | # DO NOT REMOVE!! 23 | custom-protocol = ["tauri/custom-protocol"] 24 | -------------------------------------------------------------------------------- /local-first-data/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /local-first-data/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/local-first-data/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /local-first-data/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command 5 | #[tauri::command] 6 | fn greet(name: &str) -> String { 7 | format!("Hello, {}! You've been greeted from Rust!", name) 8 | } 9 | 10 | fn main() { 11 | tauri::Builder::default() 12 | .invoke_handler(tauri::generate_handler![greet]) 13 | .run(tauri::generate_context!()) 14 | .expect("error while running tauri application"); 15 | } 16 | -------------------------------------------------------------------------------- /local-first-data/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": { 3 | "beforeDevCommand": "npm run dev", 4 | "beforeBuildCommand": "npm run build", 5 | "devPath": "http://localhost:1420", 6 | "distDir": "../dist", 7 | "withGlobalTauri": false 8 | }, 9 | "package": { 10 | "productName": "local-first-data", 11 | "version": "0.0.0" 12 | }, 13 | "tauri": { 14 | "allowlist": { 15 | "all": false, 16 | "shell": { 17 | "all": false, 18 | "open": true 19 | } 20 | }, 21 | "bundle": { 22 | "active": true, 23 | "targets": "all", 24 | "identifier": "com.tauri.dev", 25 | "icon": [ 26 | "icons/32x32.png", 27 | "icons/128x128.png", 28 | "icons/128x128@2x.png", 29 | "icons/icon.icns", 30 | "icons/icon.ico" 31 | ] 32 | }, 33 | "security": { 34 | "csp": null 35 | }, 36 | "windows": [ 37 | { 38 | "fullscreen": false, 39 | "resizable": true, 40 | "title": "local-first-data", 41 | "width": 800, 42 | "height": 600 43 | } 44 | ] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /local-first-data/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import App from "./App"; 4 | 5 | // ReactDOM.createRoot(document.body).render() 6 | addEventListener("load", () => 7 | ReactDOM.createRoot(document.body).render( 8 | // 9 | 10 | // 11 | ) 12 | ); 13 | -------------------------------------------------------------------------------- /local-first-data/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig(async () => ({ 6 | plugins: [react()], 7 | 8 | // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` 9 | // 10 | // 1. prevent vite from obscuring rust errors 11 | clearScreen: false, 12 | // 2. tauri expects a fixed port, fail if that port is not available 13 | server: { 14 | port: 1420, 15 | strictPort: true, 16 | }, 17 | // 3. to make use of `TAURI_DEBUG` and other env variables 18 | // https://tauri.studio/v1/api/config#buildconfig.beforedevcommand 19 | envPrefix: ["VITE_", "TAURI_"], 20 | })); 21 | -------------------------------------------------------------------------------- /mobile/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /mobile/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] 3 | } 4 | -------------------------------------------------------------------------------- /mobile/README.md: -------------------------------------------------------------------------------- 1 | # Tauri + React + Typescript 2 | 3 | This template should help get you started developing with Tauri, React and Typescript in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | - [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) 8 | -------------------------------------------------------------------------------- /mobile/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri + React + Typescript 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /mobile/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mobile", 3 | "private": true, 4 | "version": "0.1.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview", 10 | "tauri": "tauri" 11 | }, 12 | "dependencies": { 13 | "@tauri-apps/api": "^2", 14 | "@tauri-apps/plugin-barcode-scanner": "^2.0.0", 15 | "@tauri-apps/plugin-haptics": "^2.0.0", 16 | "@tauri-apps/plugin-notification": "^2.0.0", 17 | "@tauri-apps/plugin-shell": "^2", 18 | "react": "^18.2.0", 19 | "react-dom": "^18.2.0" 20 | }, 21 | "devDependencies": { 22 | "@tauri-apps/cli": "^2", 23 | "@types/react": "^18.2.15", 24 | "@types/react-dom": "^18.2.7", 25 | "@vitejs/plugin-react": "^4.2.1", 26 | "typescript": "^5.2.2", 27 | "vite": "^5.3.1" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /mobile/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mobile/src-tauri/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "x86_64-pc-windows-msvc" 3 | 4 | [target] 5 | -------------------------------------------------------------------------------- /mobile/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # Generated by Tauri 6 | # will have schema files for capabilities auto-completion 7 | /gen/schemas 8 | -------------------------------------------------------------------------------- /mobile/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mobile" 3 | version = "0.1.0" 4 | description = "A Tauri App" 5 | authors = ["you"] 6 | edition = "2021" 7 | 8 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 9 | 10 | [lib] 11 | # The `_lib` suffix may seem redundant but it is necessary 12 | # to make the lib name unique and wouldn't conflict with the bin name. 13 | # This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 14 | name = "mobile_lib" 15 | crate-type = ["staticlib", "cdylib", "rlib"] 16 | 17 | [build-dependencies] 18 | tauri-build = { version = "2", features = [] } 19 | 20 | [dependencies] 21 | tauri = { version = "2", features = [] } 22 | tauri-plugin-shell = "2" 23 | serde = { version = "1", features = ["derive"] } 24 | serde_json = "1" 25 | tauri-plugin-notification = "2" 26 | 27 | [target.'cfg(any(target_os = "android", target_os = "ios"))'.dependencies] 28 | tauri-plugin-barcode-scanner = "2" 29 | tauri-plugin-haptics = "2.0.0" 30 | -------------------------------------------------------------------------------- /mobile/src-tauri/Info.ios.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSCameraUsageDescription 6 | Read QR codes 7 | 8 | -------------------------------------------------------------------------------- /mobile/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /mobile/src-tauri/capabilities/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../gen/schemas/desktop-schema.json", 3 | "identifier": "default", 4 | "description": "Capability for the main window", 5 | "windows": [ 6 | "main" 7 | ], 8 | "permissions": [ 9 | "core:default", 10 | "shell:allow-open", 11 | "notification:default" 12 | ] 13 | } -------------------------------------------------------------------------------- /mobile/src-tauri/capabilities/mobile.json: -------------------------------------------------------------------------------- 1 | { 2 | "identifier": "mobile-capability", 3 | "platforms": [ 4 | "android", 5 | "iOS" 6 | ], 7 | "windows": [ 8 | "main" 9 | ], 10 | "permissions": [ 11 | "barcode-scanner:default" 12 | ] 13 | } -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = false 12 | insert_final_newline = false -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | key.properties 17 | 18 | /.tauri 19 | /tauri.settings.gradle -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /src/main/java/com/jacobbolda/mobile/generated 2 | /src/main/jniLibs/**/*.so 3 | /src/main/assets/tauri.conf.json 4 | /tauri.build.gradle.kts 5 | /proguard-tauri.pro 6 | /tauri.properties -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 32 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/java/com/jacobbolda/mobile/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.jacobbolda.mobile 2 | 3 | class MainActivity : TauriActivity() -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | mobile 3 | mobile 4 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/build.gradle.kts: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | dependencies { 7 | classpath("com.android.tools.build:gradle:8.5.1") 8 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25") 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | mavenCentral() 16 | } 17 | } 18 | 19 | tasks.register("clean").configure { 20 | delete("build") 21 | } 22 | 23 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `kotlin-dsl` 3 | } 4 | 5 | gradlePlugin { 6 | plugins { 7 | create("pluginsForCoolKids") { 8 | id = "rust" 9 | implementationClass = "RustPlugin" 10 | } 11 | } 12 | } 13 | 14 | repositories { 15 | google() 16 | mavenCentral() 17 | } 18 | 19 | dependencies { 20 | compileOnly(gradleApi()) 21 | implementation("com.android.tools.build:gradle:8.5.1") 22 | } 23 | 24 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Kotlin code style for this project: "official" or "obsolete": 19 | kotlin.code.style=official 20 | # Enables namespacing of each library's R class so that its R class includes only the 21 | # resources declared in the library itself and none from the library's dependencies, 22 | # thereby reducing the size of the R class for that library 23 | android.nonTransitiveRClass=true 24 | android.nonFinalResIds=false -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue May 10 19:22:52 CST 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | apply from: 'tauri.settings.gradle' 4 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/.gitignore: -------------------------------------------------------------------------------- 1 | xcuserdata/ 2 | build/ 3 | Externals/ 4 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/ExportOptions.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | method 6 | debugging 7 | 8 | 9 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | 3 | target 'mobile_iOS' do 4 | platform :ios, '13.0' 5 | # Pods for mobile_iOS 6 | end 7 | 8 | target 'mobile_macOS' do 9 | platform :osx, '11.0' 10 | # Pods for mobile_macOS 11 | end 12 | 13 | # Delete the deployment target for iOS and macOS, causing it to be inherited from the Podfile 14 | post_install do |installer| 15 | installer.pods_project.targets.each do |target| 16 | target.build_configurations.each do |config| 17 | config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' 18 | config.build_settings.delete 'MACOSX_DEPLOYMENT_TARGET' 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Sources/mobile/bindings/bindings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ffi { 4 | extern "C" { 5 | void start_app(); 6 | } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/Sources/mobile/main.mm: -------------------------------------------------------------------------------- 1 | #include "bindings/bindings.h" 2 | 3 | int main(int argc, char * argv[]) { 4 | ffi::start_app(); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/mobile.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/mobile.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | DisableBuildSystemDeprecationDiagnostic 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/mobile_iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 0.1.0 19 | CFBundleVersion 20 | 0.1.0 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIRequiredDeviceCapabilities 26 | 27 | arm64 28 | metal 29 | 30 | UISupportedInterfaceOrientations 31 | 32 | UIInterfaceOrientationPortrait 33 | UIInterfaceOrientationLandscapeLeft 34 | UIInterfaceOrientationLandscapeRight 35 | 36 | UISupportedInterfaceOrientations~ipad 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationPortraitUpsideDown 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | NSCameraUsageDescription 44 | Read QR codes 45 | 46 | -------------------------------------------------------------------------------- /mobile/src-tauri/gen/apple/mobile_iOS/mobile_iOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /mobile/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /mobile/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /mobile/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /mobile/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /mobile/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /mobile/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /mobile/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /mobile/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /mobile/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /mobile/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /mobile/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /mobile/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /mobile/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /mobile/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /mobile/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /mobile/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/mobile/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /mobile/src-tauri/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Learn more about Tauri commands at https://tauri.app/develop/calling-rust/ 2 | #[tauri::command] 3 | fn greet(name: &str) -> String { 4 | format!( 5 | "Hello, {}! You've been greeted from Rust after a reload!", 6 | name 7 | ) 8 | } 9 | 10 | #[cfg_attr(mobile, tauri::mobile_entry_point)] 11 | pub fn run() { 12 | tauri::Builder::default() 13 | .plugin(tauri_plugin_notification::init()) 14 | .plugin(tauri_plugin_shell::init()) 15 | .invoke_handler(tauri::generate_handler![greet]) 16 | .setup(|app| { 17 | #[cfg(mobile)] 18 | app.handle().plugin(tauri_plugin_haptics::init()); 19 | #[cfg(mobile)] 20 | app.handle().plugin(tauri_plugin_barcode_scanner::init()); 21 | Ok(()) 22 | }) 23 | .run(tauri::generate_context!()) 24 | .expect("error while running tauri application"); 25 | } 26 | -------------------------------------------------------------------------------- /mobile/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | fn main() { 5 | mobile_lib::run() 6 | } 7 | -------------------------------------------------------------------------------- /mobile/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.tauri.app/config/2", 3 | "productName": "mobile", 4 | "version": "0.1.0", 5 | "identifier": "com.jacobbolda.mobile", 6 | "build": { 7 | "beforeDevCommand": "npm run dev", 8 | "devUrl": "http://localhost:1420", 9 | "beforeBuildCommand": "npm run build", 10 | "frontendDist": "../dist" 11 | }, 12 | "app": { 13 | "windows": [ 14 | { 15 | "title": "mobile", 16 | "width": 800, 17 | "height": 600 18 | } 19 | ], 20 | "security": { 21 | "csp": null 22 | } 23 | }, 24 | "bundle": { 25 | "active": true, 26 | "targets": "all", 27 | "icon": [ 28 | "icons/32x32.png", 29 | "icons/128x128.png", 30 | "icons/128x128@2x.png", 31 | "icons/icon.icns", 32 | "icons/icon.ico" 33 | ] 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /mobile/src/main.tsx: -------------------------------------------------------------------------------- 1 | import ReactDOM from "react-dom/client"; 2 | import App from "./App"; 3 | 4 | import { 5 | isPermissionGranted, 6 | requestPermission, 7 | } from "@tauri-apps/plugin-notification"; 8 | 9 | import { requestPermissions as requestPermissionForBarcodeScanner } from "@tauri-apps/plugin-barcode-scanner"; 10 | 11 | // Do you have permission to send a notification? 12 | let permissionGranted = await isPermissionGranted(); 13 | await requestPermissionForBarcodeScanner(); 14 | 15 | // If not we need to request it 16 | if (!permissionGranted) { 17 | const permission = await requestPermission(); 18 | permissionGranted = permission === "granted"; 19 | } 20 | 21 | ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( 22 | // 23 | 24 | // , 25 | ); 26 | -------------------------------------------------------------------------------- /mobile/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /mobile/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /mobile/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /mobile/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | // @ts-expect-error process is a nodejs global 5 | const host = process.env.TAURI_DEV_HOST; 6 | 7 | // https://vitejs.dev/config/ 8 | export default defineConfig(async () => ({ 9 | plugins: [react()], 10 | 11 | // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` 12 | // 13 | // 1. prevent vite from obscuring rust errors 14 | clearScreen: false, 15 | // 2. tauri expects a fixed port, fail if that port is not available 16 | server: { 17 | port: 1420, 18 | strictPort: true, 19 | host: host || false, 20 | hmr: host 21 | ? { 22 | protocol: "ws", 23 | host, 24 | port: 1421, 25 | } 26 | : undefined, 27 | watch: { 28 | // 3. tell vite to ignore watching `src-tauri` 29 | ignored: ["**/src-tauri/**"], 30 | }, 31 | }, 32 | })); 33 | -------------------------------------------------------------------------------- /multiwebview/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /multiwebview/README.md: -------------------------------------------------------------------------------- 1 | # Tauri + Vanilla 2 | 3 | This template should help get you started developing with Tauri in vanilla HTML, CSS and Javascript. 4 | 5 | ## Recommended IDE Setup 6 | 7 | - [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) 8 | -------------------------------------------------------------------------------- /multiwebview/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multiwebview", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "tauri": "tauri" 8 | }, 9 | "devDependencies": { 10 | "@tauri-apps/cli": "^2.0.0-beta.0" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /multiwebview/src-tauri/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "x86_64-pc-windows-msvc" 3 | 4 | [target] 5 | -------------------------------------------------------------------------------- /multiwebview/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | -------------------------------------------------------------------------------- /multiwebview/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "multiwebview" 3 | version = "0.0.0" 4 | description = "A Tauri App" 5 | authors = ["you"] 6 | edition = "2021" 7 | 8 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 9 | 10 | [lib] 11 | name = "multiwebview_lib" 12 | crate-type = ["lib", "cdylib"] 13 | 14 | [build-dependencies] 15 | tauri-build = { version = "2.0.0-beta", features = [] } 16 | [dependencies] 17 | tauri = { version = "2.0.0-beta", features = ["unstable"] } 18 | serde_json = "1.0" 19 | 20 | [features] 21 | # this feature is used for production builds or when `devPath` points to the filesystem 22 | # DO NOT REMOVE!! 23 | custom-protocol = ["tauri/custom-protocol"] 24 | -------------------------------------------------------------------------------- /multiwebview/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /multiwebview/src-tauri/gen/schemas/capabilities.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /multiwebview/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/multiwebview/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /multiwebview/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | fn main() { 5 | multiwebview_lib::run() 6 | } 7 | -------------------------------------------------------------------------------- /multiwebview/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "productName": "multiwebview", 3 | "version": "0.0.0", 4 | "identifier": "com.tauri.dev", 5 | "build": { 6 | "frontendDist": "../src" 7 | }, 8 | "app": { 9 | "withGlobalTauri": true, 10 | "windows": [ 11 | { 12 | "title": "multiwebview", 13 | "width": 800, 14 | "height": 600, 15 | "label": "main0" 16 | } 17 | ], 18 | "security": { 19 | "csp": null 20 | } 21 | }, 22 | "bundle": { 23 | "active": true, 24 | "targets": "all", 25 | "icon": [ 26 | "icons/32x32.png", 27 | "icons/128x128.png", 28 | "icons/128x128@2x.png", 29 | "icons/icon.icns", 30 | "icons/icon.ico" 31 | ] 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /multiwebview/src/assets/javascript.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /multiwebview/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri App 8 | 9 | 14 | 15 | 16 | 17 |
18 |

Welcome to Tauri!

19 | 20 | 35 | 36 |

Click on the Tauri logo to learn more about the framework

37 | 38 |
39 | 40 | 41 |
42 | 43 |

44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /multiwebview/src/index1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri App 8 | 9 | 14 | 15 | 16 | 17 |
18 |

Welcome to Tauri in the first webview!

19 | 20 | 35 | 36 |

Click on the Tauri logo to learn more about the framework

37 | 38 |
39 | 40 | 41 |
42 | 43 |

44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /multiwebview/src/index2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri App 8 | 9 | 14 | 15 | 16 | 17 |
18 |

Welcome to Tauri in the second webview!

19 | 20 | 35 | 36 |

Click on the Tauri logo to learn more about the framework

37 | 38 |
39 | 40 | 41 |
42 | 43 |

44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /multiwebview/src/index3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri App 8 | 9 | 14 | 15 | 16 | 17 |
18 |

Welcome to Tauri in the third webview!

19 | 20 | 35 | 36 |

Click on the Tauri logo to learn more about the framework

37 | 38 |
39 | 40 | 41 |
42 | 43 |

44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /multiwebview/src/index4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri App 8 | 9 | 14 | 15 | 16 | 17 |
18 |

Welcome to Tauri in the fourth webview!

19 | 20 | 35 | 36 |

Click on the Tauri logo to learn more about the framework

37 | 38 |
39 | 40 | 41 |
42 | 43 |

44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /multiwebview/src/main.js: -------------------------------------------------------------------------------- 1 | const { invoke } = window.__TAURI__.core; 2 | 3 | let greetInputEl; 4 | let greetMsgEl; 5 | 6 | async function greet() { 7 | // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command 8 | greetMsgEl.textContent = await invoke("greet", { name: greetInputEl.value }); 9 | } 10 | 11 | window.addEventListener("DOMContentLoaded", () => { 12 | greetInputEl = document.querySelector("#greet-input"); 13 | greetMsgEl = document.querySelector("#greet-msg"); 14 | document.querySelector("#greet-form").addEventListener("submit", (e) => { 15 | e.preventDefault(); 16 | greet(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tauri-playground", 3 | "lockfileVersion": 3, 4 | "requires": true, 5 | "packages": {} 6 | } 7 | -------------------------------------------------------------------------------- /rust-att-leptos/.gitignore: -------------------------------------------------------------------------------- 1 | /dist/ 2 | /target/ 3 | /Cargo.lock 4 | -------------------------------------------------------------------------------- /rust-att-leptos/.taurignore: -------------------------------------------------------------------------------- 1 | /src 2 | /public 3 | /Cargo.toml -------------------------------------------------------------------------------- /rust-att-leptos/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] 3 | } 4 | -------------------------------------------------------------------------------- /rust-att-leptos/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "emmet.includeLanguages": { 3 | "rust": "html" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /rust-att-leptos/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust-att-leptos-ui" 3 | version = "0.0.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | [dependencies] 8 | leptos = { version = "0.4", features = ["csr"] } 9 | serde = { version = "1.0", features = ["derive"] } 10 | serde-wasm-bindgen = "0.5" 11 | wasm-bindgen = { version = "0.2", features = ["serde-serialize"] } 12 | wasm-bindgen-futures = "0.4" 13 | js-sys = "0.3" 14 | 15 | [workspace] 16 | members = ["src-tauri"] 17 | -------------------------------------------------------------------------------- /rust-att-leptos/README.md: -------------------------------------------------------------------------------- 1 | # Tauri + Leptos 2 | 3 | This template should help get you started developing with Tauri and Leptos. 4 | 5 | ## Recommended IDE Setup 6 | 7 | [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer). 8 | -------------------------------------------------------------------------------- /rust-att-leptos/Trunk.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "./index.html" 3 | 4 | [watch] 5 | ignore = ["./src-tauri"] 6 | 7 | [serve] 8 | address = "127.0.0.1" 9 | port = 1420 10 | open = false 11 | -------------------------------------------------------------------------------- /rust-att-leptos/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Tauri + Leptos App 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust-att-leptos" 3 | version = "0.0.0" 4 | description = "A Tauri App" 5 | authors = ["you"] 6 | license = "" 7 | repository = "" 8 | edition = "2021" 9 | 10 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 11 | 12 | [build-dependencies] 13 | tauri-build = { version = "1.4", features = [] } 14 | 15 | [dependencies] 16 | tauri = { version = "1.4", features = ["shell-open"] } 17 | serde = { version = "1.0", features = ["derive"] } 18 | serde_json = "1.0" 19 | reqwest = "0.11.18" 20 | 21 | [features] 22 | # this feature is used for production builds or when `devPath` points to the filesystem 23 | # DO NOT REMOVE!! 24 | custom-protocol = ["tauri/custom-protocol"] 25 | -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/rust-att-leptos/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | use reqwest; 5 | 6 | // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command 7 | #[tauri::command] 8 | async fn greet(name: String) -> String { 9 | let res = reqwest::get("http://httpbin.org/get").await.unwrap(); 10 | let body = res.text().await.unwrap(); 11 | 12 | format!("Hello, {}! You've been greeted from Rust!\n{}", name, body) 13 | } 14 | 15 | fn main() { 16 | tauri::Builder::default() 17 | .invoke_handler(tauri::generate_handler![greet]) 18 | .run(tauri::generate_context!()) 19 | .expect("error while running tauri application"); 20 | } 21 | -------------------------------------------------------------------------------- /rust-att-leptos/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": { 3 | "beforeDevCommand": "trunk serve", 4 | "beforeBuildCommand": "trunk build", 5 | "devPath": "http://localhost:1420", 6 | "distDir": "../dist", 7 | "withGlobalTauri": true 8 | }, 9 | "package": { 10 | "productName": "rust-att-leptos", 11 | "version": "0.0.0" 12 | }, 13 | "tauri": { 14 | "allowlist": { 15 | "all": false, 16 | "shell": { 17 | "all": false, 18 | "open": true 19 | } 20 | }, 21 | "bundle": { 22 | "active": true, 23 | "targets": "all", 24 | "identifier": "com.tauri.dev", 25 | "icon": [ 26 | "icons/32x32.png", 27 | "icons/128x128.png", 28 | "icons/128x128@2x.png", 29 | "icons/icon.icns", 30 | "icons/icon.ico" 31 | ] 32 | }, 33 | "security": { 34 | "csp": null 35 | }, 36 | "windows": [ 37 | { 38 | "fullscreen": false, 39 | "resizable": true, 40 | "title": "rust-att-leptos", 41 | "width": 800, 42 | "height": 600 43 | } 44 | ] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /rust-att-leptos/src/main.rs: -------------------------------------------------------------------------------- 1 | mod app; 2 | 3 | use app::*; 4 | use leptos::*; 5 | 6 | fn main() { 7 | mount_to_body(|cx| { 8 | view! { cx, 9 | 10 | } 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /tauri-egui/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /tauri-egui/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] 3 | } 4 | -------------------------------------------------------------------------------- /tauri-egui/README.md: -------------------------------------------------------------------------------- 1 | # Tauri + Vanilla 2 | 3 | This template should help get you started developing with Tauri in vanilla HTML, CSS and Javascript. 4 | 5 | ## Recommended IDE Setup 6 | 7 | - [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) 8 | -------------------------------------------------------------------------------- /tauri-egui/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | -------------------------------------------------------------------------------- /tauri-egui/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | authors = ["you"] 3 | description = "A Tauri App" 4 | edition = "2021" 5 | license = "" 6 | name = "tauri-egui" 7 | repository = "" 8 | rust-version = "1.57" 9 | version = "0.0.0" 10 | 11 | [build-dependencies] 12 | tauri-build = {version = "1.1", features = [] } 13 | 14 | [dependencies] 15 | tauri = { version = "1.1", features = ["api-all"] } 16 | tauri-egui = "0.1" 17 | 18 | [dev-dependencies] 19 | tauri-cli = "1.1" 20 | -------------------------------------------------------------------------------- /tauri-egui/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /tauri-egui/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-egui/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /tauri-egui/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": { 3 | "beforeDevCommand": "", 4 | "beforeBuildCommand": "", 5 | "devPath": "../src", 6 | "distDir": "../src", 7 | "withGlobalTauri": true 8 | }, 9 | "package": { 10 | "productName": "tauri-egui", 11 | "version": "0.0.0" 12 | }, 13 | "tauri": { 14 | "allowlist": { 15 | "all": true 16 | }, 17 | "bundle": { 18 | "active": true, 19 | "category": "DeveloperTool", 20 | "copyright": "", 21 | "deb": { 22 | "depends": [] 23 | }, 24 | "externalBin": [], 25 | "icon": [ 26 | "icons/32x32.png", 27 | "icons/128x128.png", 28 | "icons/128x128@2x.png", 29 | "icons/icon.icns", 30 | "icons/icon.ico" 31 | ], 32 | "identifier": "com.tauri.dev", 33 | "longDescription": "", 34 | "macOS": { 35 | "entitlements": null, 36 | "exceptionDomain": "", 37 | "frameworks": [], 38 | "signingIdentity": null 39 | }, 40 | "resources": [], 41 | "shortDescription": "", 42 | "targets": "all", 43 | "windows": { 44 | "certificateThumbprint": null, 45 | "digestAlgorithm": "sha256", 46 | "timestampUrl": "" 47 | } 48 | }, 49 | "security": { 50 | "csp": null 51 | }, 52 | "updater": { 53 | "active": false 54 | }, 55 | "windows": [ 56 | { 57 | "fullscreen": false, 58 | "height": 600, 59 | "resizable": true, 60 | "title": "tauri-egui", 61 | "width": 800, 62 | "center": true 63 | } 64 | ] 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /tauri-egui/src/assets/javascript.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tauri-egui/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri App 8 | 9 | 14 | 15 | 16 | 17 |
18 |

Welcome to Tauri!

19 | 20 | 35 | 36 |

Click on the Tauri logo to learn more about the framework

37 | 38 |
39 |
40 | 41 | 42 |
43 |
44 | 45 |

46 |
47 | 48 | 49 | -------------------------------------------------------------------------------- /tauri-egui/src/main.js: -------------------------------------------------------------------------------- 1 | const { invoke } = window.__TAURI__.tauri; 2 | 3 | let greetInputEl; 4 | let greetMsgEl; 5 | 6 | window.addEventListener("DOMContentLoaded", () => { 7 | greetInputEl = document.querySelector("#greet-input"); 8 | greetMsgEl = document.querySelector("#greet-msg"); 9 | }); 10 | 11 | async function greet() { 12 | // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command 13 | greetMsgEl.textContent = await invoke("greet", { name: greetInputEl.value }); 14 | } 15 | 16 | window.greet = greet; 17 | -------------------------------------------------------------------------------- /tauri-sidecar/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /tauri-sidecar/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] 3 | } 4 | -------------------------------------------------------------------------------- /tauri-sidecar/README.md: -------------------------------------------------------------------------------- 1 | # Tauri + Preact 2 | 3 | This template should help get you started developing with Tauri and Preact in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | - [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) 8 | -------------------------------------------------------------------------------- /tauri-sidecar/bin/deno-server.ts: -------------------------------------------------------------------------------- 1 | import * as http from "https://deno.land/x/http@v0.2.0/mod.ts"; 2 | 3 | const server = new http.Server(); 4 | let hitCounter = 0; 5 | 6 | server.use( 7 | "/", 8 | "GET" 9 | )(({ respond }: { respond: any }) => { 10 | hitCounter++; 11 | console.log(`someone hit the root url for the ${hitCounter} time(s)`); 12 | 13 | respond({ body: "Hello World!" }); 14 | }); 15 | 16 | console.log("Listening on http://localhost:8000"); 17 | server.listen(8000); 18 | -------------------------------------------------------------------------------- /tauri-sidecar/bin/graphgen-x86_64-pc-windows-msvc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/bin/graphgen-x86_64-pc-windows-msvc.exe -------------------------------------------------------------------------------- /tauri-sidecar/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri + Preact App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tauri-sidecar/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tauri-sidecar", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "tauri": "tauri" 11 | }, 12 | "dependencies": { 13 | "@tauri-apps/api": "^1.1.0", 14 | "preact": "^10.10.1" 15 | }, 16 | "devDependencies": { 17 | "@babel/core": "^7.12.10", 18 | "@preact/preset-vite": "^2.3.0", 19 | "@tauri-apps/cli": "^1.1.0", 20 | "vite": "^3.0.7" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tauri-sidecar/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | authors = ["you"] 3 | description = "A Tauri App" 4 | edition = "2021" 5 | license = "" 6 | name = "tauri-sidecar" 7 | repository = "" 8 | rust-version = "1.57" 9 | version = "0.0.0" 10 | 11 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 12 | 13 | [build-dependencies] 14 | tauri-build = {version = "1.1", features = [] } 15 | 16 | [dependencies] 17 | serde = {version = "1.0", features = ["derive"] } 18 | serde_json = "1.0" 19 | tauri = {version = "1.1", features = ["process-command-api", "shell-sidecar"] } 20 | 21 | [features] 22 | # by default Tauri runs in production mode 23 | # when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL 24 | default = ["custom-protocol"] 25 | # this feature is used used for production builds where `devPath` points to the filesystem 26 | # DO NOT remove this 27 | custom-protocol = ["tauri/custom-protocol"] 28 | -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /tauri-sidecar/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tauri-sidecar/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /tauri-sidecar/src/app.css: -------------------------------------------------------------------------------- 1 | .logo.vite:hover { 2 | filter: drop-shadow(0 0 2em #747bff); 3 | } 4 | 5 | .logo.preact:hover { 6 | filter: drop-shadow(0 0 2em #673ab8aa); 7 | } 8 | -------------------------------------------------------------------------------- /tauri-sidecar/src/assets/preact.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tauri-sidecar/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { render } from "preact"; 2 | import { App } from "./app"; 3 | import "./style.css"; 4 | 5 | render(, document.getElementById("app")); 6 | -------------------------------------------------------------------------------- /tauri-sidecar/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import preact from "@preact/preset-vite"; 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [preact()], 7 | 8 | // Vite optons tailored for Tauri development and only applied in `tauri dev` or `tauri build` 9 | // prevent vite from obscuring rust errors 10 | clearScreen: false, 11 | // tauri expects a fixed port, fail if that port is not available 12 | server: { 13 | port: 1420, 14 | strictPort: true, 15 | }, 16 | // to make use of `TAURI_DEBUG` and other env variables 17 | // https://tauri.studio/v1/api/config#buildconfig.beforedevcommand 18 | envPrefix: ["VITE_", "TAURI_"], 19 | build: { 20 | // Tauri supports es2021 21 | target: ["es2021", "chrome100", "safari13"], 22 | // don't minify for debug builds 23 | minify: !process.env.TAURI_DEBUG ? "esbuild" : false, 24 | // produce sourcemaps for debug builds 25 | sourcemap: !!process.env.TAURI_DEBUG, 26 | }, 27 | }); 28 | -------------------------------------------------------------------------------- /tray-app/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | dist 4 | dist-ssr 5 | *.local -------------------------------------------------------------------------------- /tray-app/README.md: -------------------------------------------------------------------------------- 1 | # Tauri tray app 2 | 3 | Most of this was done on stream: 4 | 5 | - [Tauri v2 Menus with Amr Bashir [Alpha Edition]](https://www.youtube.com/watch?v=MhHeJW7xBrY) 6 | - [Tauri tray experiment - Webview to Rust function](https://www.youtube.com/watch?v=0z9PBGRILDY) 7 | - [Tauri tray app using the webview](https://www.youtube.com/watch?v=utAw9sAY41s) 8 | -------------------------------------------------------------------------------- /tray-app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tray-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tray-app", 3 | "version": "0.0.0", 4 | "type": "module", 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "vite build", 8 | "serve": "vite preview", 9 | "tauri": "tauri" 10 | }, 11 | "dependencies": { 12 | "@tauri-apps/api": "^2.0.0-beta.6", 13 | "@tauri-apps/plugin-context-menu": "*", 14 | "react": "^17.0.0", 15 | "react-dom": "^17.0.0" 16 | }, 17 | "devDependencies": { 18 | "@tauri-apps/cli": "^2.0.0-beta.11", 19 | "@vitejs/plugin-react": "^4.2.1", 20 | "vite": "^5.2.7" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tray-app/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | WixTools 5 | -------------------------------------------------------------------------------- /tray-app/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | authors = ["you"] 3 | description = "A Tauri App" 4 | edition = "2021" 5 | license = "" 6 | name = "app" 7 | repository = "" 8 | version = "0.1.0" 9 | 10 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 11 | 12 | [build-dependencies] 13 | tauri-build = { version = "2.0.0-beta", features = [] } 14 | 15 | [dependencies] 16 | serde = { version = "1.0", features = ["derive"] } 17 | serde_json = "1.0" 18 | sysinfo = "0.30.8" 19 | tauri = { version = "2.0.0-beta", features = ["tray-icon"] } 20 | 21 | [features] 22 | custom-protocol = ["tauri/custom-protocol"] 23 | default = ["custom-protocol"] 24 | -------------------------------------------------------------------------------- /tray-app/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /tray-app/src-tauri/capabilities/migrated.json: -------------------------------------------------------------------------------- 1 | { 2 | "identifier": "migrated", 3 | "description": "permissions that were migrated from v1", 4 | "context": "local", 5 | "windows": [ 6 | "main" 7 | ], 8 | "permissions": [ 9 | "path:default", 10 | "event:default", 11 | "window:default", 12 | "app:default", 13 | "resources:default", 14 | "menu:default", 15 | "tray:default" 16 | ], 17 | "platforms": [ 18 | "linux", 19 | "macOS", 20 | "windows", 21 | "android", 22 | "iOS" 23 | ] 24 | } -------------------------------------------------------------------------------- /tray-app/src-tauri/gen/schemas/capabilities.json: -------------------------------------------------------------------------------- 1 | {"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["path:default","event:default","window:default","app:default","resources:default","menu:default","tray:default"],"platforms":["linux","macOS","windows","android","iOS"]}} -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /tray-app/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/tray-app/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /tray-app/src-tauri/rustfmt.toml: -------------------------------------------------------------------------------- 1 | max_width = 100 2 | hard_tabs = false 3 | tab_spaces = 2 4 | newline_style = "Auto" 5 | use_small_heuristics = "Default" 6 | reorder_imports = true 7 | reorder_modules = true 8 | remove_nested_parens = true 9 | edition = "2018" 10 | merge_derives = true 11 | use_try_shorthand = false 12 | use_field_init_shorthand = false 13 | force_explicit_abi = true 14 | imports_granularity = "Crate" 15 | -------------------------------------------------------------------------------- /tray-app/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "security": { 4 | "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'; connect-src ipc: http://ipc.localhost ipc: http://ipc.localhost ipc: http://ipc.localhost" 5 | }, 6 | "windows": [ 7 | { 8 | "fullscreen": false, 9 | "resizable": true, 10 | "title": "Tauri Tray", 11 | "decorations": false, 12 | "alwaysOnTop": true, 13 | "visible": false 14 | } 15 | ] 16 | }, 17 | "build": { 18 | "beforeBuildCommand": "npm run build", 19 | "beforeDevCommand": "npm run dev", 20 | "devUrl": "http://localhost:5173", 21 | "frontendDist": "../dist" 22 | }, 23 | "bundle": { 24 | "active": true, 25 | "category": "DeveloperTool", 26 | "copyright": "", 27 | "externalBin": [], 28 | "icon": [ 29 | "icons/32x32.png", 30 | "icons/128x128.png", 31 | "icons/128x128@2x.png", 32 | "icons/icon.icns", 33 | "icons/icon.ico" 34 | ], 35 | "linux": { 36 | "deb": { 37 | "depends": [] 38 | } 39 | }, 40 | "longDescription": "", 41 | "macOS": { 42 | "entitlements": null, 43 | "exceptionDomain": "", 44 | "frameworks": [], 45 | "minimumSystemVersion": "", 46 | "signingIdentity": null 47 | }, 48 | "resources": [], 49 | "shortDescription": "", 50 | "targets": "all", 51 | "windows": { 52 | "certificateThumbprint": null, 53 | "digestAlgorithm": "sha256", 54 | "timestampUrl": "" 55 | } 56 | }, 57 | "identifier": "com.tauri.dev", 58 | "plugins": { 59 | "updater": { 60 | "endpoints": [] 61 | } 62 | }, 63 | "productName": "tray-app", 64 | "version": "0.1.0" 65 | } 66 | -------------------------------------------------------------------------------- /tray-app/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | 40 | button { 41 | font-size: calc(10px + 2vmin); 42 | } 43 | -------------------------------------------------------------------------------- /tray-app/src/App.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import logo from "./logo.svg"; 3 | import "./App.css"; 4 | import { invoke } from "@tauri-apps/api/core"; 5 | 6 | function App() { 7 | const [sysData, setSysData] = useState(null); 8 | 9 | return ( 10 |
11 |
12 |

Hello Vite + React!

13 |

14 | 22 |

{sysData}
23 |

24 |
25 |
26 | ); 27 | } 28 | 29 | export default App; 30 | -------------------------------------------------------------------------------- /tray-app/src/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tray-app/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /tray-app/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import "./index.css"; 4 | import App from "./App"; 5 | import { Menu, MenuItem } from "@tauri-apps/api/menu"; 6 | 7 | // it is _very_ alpha and only worked on stream 8 | // based on code in a PR 9 | async function createMenu() { 10 | let i = 0; 11 | let menu; 12 | const boop = await MenuItem.new({ 13 | text: `Boop${i}`, 14 | action: async () => { 15 | console.log(`clicked boop ${i}`); 16 | i++; 17 | const newMenuItem = await MenuItem.new({ 18 | text: `Boop${i}`, 19 | action: () => console.log(`clicked boop ${i}`), 20 | }); 21 | menu.append(newMenuItem); 22 | }, 23 | }); 24 | menu = await Menu.new({ items: [boop] }); 25 | 26 | await menu.setAsAppMenu(); 27 | } 28 | createMenu(); 29 | 30 | ReactDOM.render( 31 | 32 | 33 | , 34 | document.getElementById("root") 35 | ); 36 | -------------------------------------------------------------------------------- /tray-app/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()] 7 | }) 8 | -------------------------------------------------------------------------------- /verso-runtime/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /verso-runtime/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] 3 | } 4 | -------------------------------------------------------------------------------- /verso-runtime/README.md: -------------------------------------------------------------------------------- 1 | # Tauri + React + Typescript 2 | 3 | This template should help get you started developing with Tauri, React and Typescript in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | - [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) 8 | -------------------------------------------------------------------------------- /verso-runtime/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri + React + Typescript 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /verso-runtime/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "verso-runtime", 3 | "private": true, 4 | "version": "0.1.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview", 10 | "tauri": "tauri" 11 | }, 12 | "dependencies": { 13 | "react": "^18.3.1", 14 | "react-dom": "^18.3.1", 15 | "@tauri-apps/api": "^2", 16 | "@tauri-apps/plugin-opener": "^2" 17 | }, 18 | "devDependencies": { 19 | "@types/react": "^18.3.1", 20 | "@types/react-dom": "^18.3.1", 21 | "@vitejs/plugin-react": "^4.3.4", 22 | "typescript": "~5.6.2", 23 | "vite": "^6.0.3", 24 | "@tauri-apps/cli": "^2" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /verso-runtime/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /verso-runtime/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # Generated by Tauri 6 | # will have schema files for capabilities auto-completion 7 | /gen/schemas 8 | -------------------------------------------------------------------------------- /verso-runtime/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "verso-runtime" 3 | version = "0.1.0" 4 | description = "A Tauri App" 5 | authors = ["you"] 6 | edition = "2024" 7 | 8 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 9 | 10 | [lib] 11 | # The `_lib` suffix may seem redundant but it is necessary 12 | # to make the lib name unique and wouldn't conflict with the bin name. 13 | # This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 14 | name = "verso_runtime_lib" 15 | crate-type = ["staticlib", "cdylib", "rlib"] 16 | 17 | [build-dependencies] 18 | tauri-build = { version = "2", features = [] } 19 | 20 | [dependencies] 21 | tauri = { version = "2", features = [] } 22 | tauri-plugin-opener = "2" 23 | serde = { version = "1", features = ["derive"] } 24 | serde_json = "1" 25 | tauri-runtime-verso = { git = "https://github.com/versotile-org/tauri-runtime-verso", branch = "main" } 26 | -------------------------------------------------------------------------------- /verso-runtime/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /verso-runtime/src-tauri/capabilities/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../gen/schemas/desktop-schema.json", 3 | "identifier": "default", 4 | "description": "Capability for the main window", 5 | "windows": ["main"], 6 | "permissions": [ 7 | "core:default", 8 | "opener:default", 9 | "core:window:allow-start-dragging" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /verso-runtime/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/verso-runtime/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /verso-runtime/src-tauri/src/lib.rs: -------------------------------------------------------------------------------- 1 | use tauri_runtime_verso::{ 2 | INVOKE_SYSTEM_SCRIPTS, VersoRuntime, set_verso_path, set_verso_resource_directory, 3 | }; 4 | 5 | // Learn more about Tauri commands at https://tauri.app/develop/calling-rust/ 6 | #[tauri::command] 7 | fn greet(name: &str) -> String { 8 | format!("Hello, {}! You've been greeted from Rust!", name) 9 | } 10 | 11 | #[cfg_attr(mobile, tauri::mobile_entry_point)] 12 | pub fn run() { 13 | // You need to set this to the path of the versoview executable 14 | // before creating any of the webview windows 15 | set_verso_path(r"C:\Users\Jacob\AppData\Local\verso\versoview.exe"); 16 | // Set this to verso/servo's resources directory before creating any of the webview windows 17 | // this is optional but recommended, this directory will include very important things 18 | // like user agent stylesheet 19 | set_verso_resource_directory(r"C:\Users\Jacob\AppData\Local\verso\resources"); 20 | tauri::Builder::::new() 21 | .plugin(tauri_plugin_opener::init()) 22 | .invoke_handler(tauri::generate_handler![greet]) 23 | .run(tauri::generate_context!()) 24 | .expect("error while running tauri application"); 25 | } 26 | -------------------------------------------------------------------------------- /verso-runtime/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | fn main() { 5 | verso_runtime_lib::run() 6 | } 7 | -------------------------------------------------------------------------------- /verso-runtime/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.tauri.app/config/2", 3 | "productName": "verso-runtime", 4 | "version": "0.1.0", 5 | "identifier": "com.verso-runtime.app", 6 | "build": { 7 | "beforeDevCommand": "npm run dev", 8 | "devUrl": "http://localhost:1420", 9 | "beforeBuildCommand": "npm run build", 10 | "frontendDist": "../dist" 11 | }, 12 | "app": { 13 | "windows": [ 14 | { 15 | "title": "verso-runtime", 16 | "width": 800, 17 | "height": 600 18 | } 19 | ], 20 | "security": { 21 | "csp": null 22 | } 23 | }, 24 | "bundle": { 25 | "active": true, 26 | "targets": "all", 27 | "icon": [ 28 | "icons/32x32.png", 29 | "icons/128x128.png", 30 | "icons/128x128@2x.png", 31 | "icons/icon.icns", 32 | "icons/icon.ico" 33 | ] 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /verso-runtime/src/App.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import reactLogo from "./assets/react.svg"; 3 | import { invoke } from "@tauri-apps/api/core"; 4 | import "./App.css"; 5 | 6 | function App() { 7 | const [greetMsg, setGreetMsg] = useState(""); 8 | const [name, setName] = useState(""); 9 | 10 | async function greet() { 11 | // Learn more about Tauri commands at https://tauri.app/develop/calling-rust/ 12 | setGreetMsg(await invoke("greet", { name })); 13 | } 14 | 15 | return ( 16 |
17 |

Welcome to Tauri + React

18 | 19 | 30 |

Click on the Tauri, Vite, and React logos to learn more.

31 | 32 |
{ 35 | e.preventDefault(); 36 | greet(); 37 | }} 38 | > 39 | setName(e.currentTarget.value)} 42 | placeholder="Enter a name..." 43 | /> 44 | 45 |
46 |

{greetMsg}

47 |
48 | ); 49 | } 50 | 51 | export default App; 52 | -------------------------------------------------------------------------------- /verso-runtime/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import App from "./App"; 4 | 5 | ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( 6 | 7 | 8 | , 9 | ); 10 | -------------------------------------------------------------------------------- /verso-runtime/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /verso-runtime/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /verso-runtime/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /verso-runtime/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | // @ts-expect-error process is a nodejs global 5 | const host = process.env.TAURI_DEV_HOST; 6 | 7 | // https://vitejs.dev/config/ 8 | export default defineConfig(async () => ({ 9 | plugins: [react()], 10 | 11 | // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` 12 | // 13 | // 1. prevent vite from obscuring rust errors 14 | clearScreen: false, 15 | // 2. tauri expects a fixed port, fail if that port is not available 16 | server: { 17 | port: 1420, 18 | strictPort: true, 19 | host: host || false, 20 | hmr: host 21 | ? { 22 | protocol: "ws", 23 | host, 24 | port: 1421, 25 | } 26 | : undefined, 27 | watch: { 28 | // 3. tell vite to ignore watching `src-tauri` 29 | ignored: ["**/src-tauri/**"], 30 | }, 31 | }, 32 | })); 33 | -------------------------------------------------------------------------------- /windows-vibing/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /windows-vibing/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /windows-vibing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "windows-vibing", 3 | "private": true, 4 | "version": "0.0.0", 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview", 9 | "tauri": "tauri" 10 | }, 11 | "dependencies": { 12 | "@tauri-apps/api": "^1.0.1", 13 | "preact": "^10.5.15" 14 | }, 15 | "devDependencies": { 16 | "@preact/preset-vite": "^2.1.5", 17 | "@tauri-apps/cli": "^1.0.0", 18 | "vite": "^2.9.9" 19 | } 20 | } -------------------------------------------------------------------------------- /windows-vibing/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | -------------------------------------------------------------------------------- /windows-vibing/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | authors = ["you"] 3 | default-run = "app" 4 | description = "A Tauri App" 5 | edition = "2021" 6 | license = "" 7 | name = "app" 8 | repository = "" 9 | rust-version = "1.57" 10 | version = "0.1.0" 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [build-dependencies] 15 | tauri-build = {version = "1.0.0", features = [] } 16 | 17 | [dependencies] 18 | serde = {version = "1.0", features = ["derive"] } 19 | serde_json = "1.0" 20 | tauri = {version = "1.0.0", features = ["api-all"] } 21 | window-vibrancy = "0.1.3" 22 | 23 | [features] 24 | # by default Tauri runs in production mode 25 | # when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL 26 | default = ["custom-protocol"] 27 | # this feature is used used for production builds where `devPath` points to the filesystem 28 | # DO NOT remove this 29 | custom-protocol = ["tauri/custom-protocol"] 30 | -------------------------------------------------------------------------------- /windows-vibing/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /windows-vibing/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbolda/tauri-playground/e32334412be07d2ba39513c501a9792c890078be/windows-vibing/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /windows-vibing/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr( 2 | all(not(debug_assertions), target_os = "windows"), 3 | windows_subsystem = "windows" 4 | )] 5 | use tauri::Manager; 6 | use window_vibrancy::apply_acrylic; 7 | 8 | fn main() { 9 | // #[cfg(target_os = "macos")] 10 | // apply_vibrancy(&window, NSVisualEffectMaterial::HudWindow).expect("Unsupported platform! 'apply_vibrancy' is only supported on macOS"); 11 | 12 | let context = tauri::generate_context!(); 13 | tauri::Builder::default() 14 | .setup(|app| { 15 | let window = app.get_window("main").unwrap(); 16 | 17 | #[cfg(target_os = "windows")] 18 | apply_acrylic(&window, Some((18, 18, 18, 125))) 19 | .expect("Unsupported platform! 'apply_blur' is only supported on Windows"); 20 | 21 | Ok(()) 22 | }) 23 | .menu(tauri::Menu::os_default(&context.package_info().name)) 24 | .run(context) 25 | .expect("error while running tauri application"); 26 | } 27 | -------------------------------------------------------------------------------- /windows-vibing/src/app.jsx: -------------------------------------------------------------------------------- 1 | import { Logo } from './logo' 2 | 3 | export function App() { 4 | return ( 5 | <> 6 | 7 |

Hello Vite + Preact!

8 |

9 | 15 | Learn Preact 16 | 17 |

18 | 19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /windows-vibing/src/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /windows-vibing/src/index.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | height: 100%; 4 | width: 100%; 5 | padding: 0; 6 | margin: 0; 7 | /* background: #fafafa; */ 8 | font-family: 'Helvetica Neue', arial, sans-serif; 9 | font-weight: 400; 10 | /* color: #444; */ 11 | -webkit-font-smoothing: antialiased; 12 | -moz-osx-font-smoothing: grayscale; 13 | } 14 | 15 | * { 16 | box-sizing: border-box; 17 | } 18 | 19 | #app { 20 | height: 100%; 21 | text-align: center; 22 | /* background-color: #673ab8; */ 23 | color: #fff; 24 | font-size: 1.5em; 25 | padding-top: 100px; 26 | } 27 | 28 | .link { 29 | color: #fff; 30 | } 31 | -------------------------------------------------------------------------------- /windows-vibing/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { render } from 'preact' 2 | import { App } from './app' 3 | import './index.css' 4 | 5 | render(, document.getElementById('app')) 6 | -------------------------------------------------------------------------------- /windows-vibing/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import preact from '@preact/preset-vite' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [preact()] 7 | }) 8 | --------------------------------------------------------------------------------