The Tauri configuration object. It is read from a file where you can define your frontend assets, configure the bundler, enable the app updater, define a system tray, enable APIs via the allowlist and more.
#tauri.conf pls help :)
107 messages · Page 1 of 1 (latest)
"build": {
"beforeBuildCommand": "",
"beforeDevCommand": "",
"devPath": "../dist",
"distDir": "../dist"
},
"package": {
"productName": "tauri-app",
"version": "0.1.0"
},
"tauri": {
"allowlist": {
"all": true
},
"bundle": {},
"security": {
"csp": null
},
"updater": {
"active": false
},
"windows": [
{
"fullscreen": false,
"height": 600,
"resizable": true,
"title": "Tauri App",
"width": 800
}
]
}
}```
@subtle trench
my bad
thats tauri v1
v2
build: {
devUrl: 'http://localhost:3000',
// start the dev server
beforeDevCommand: 'npm run dev',
},
bundle: {
active: true,
icon: ['icons/app.png'],
},
app: {
windows: [
{
title: 'MyApp',
},
],
},
plugins: {
updater: {
pubkey: 'updater pub key',
endpoints: ['https://my.app.updater/{{target}}/{{current_version}}'],
},
},
}```
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "main-capability",
"description": "Capability for the main window",
"windows": ["main"],
"permissions": [
{
"identifier": "shell:allow-execute",
"allow": [
{
"name": "exec-sh",
"cmd": "sh",
"args": [
"-c",
{
"validator": "\\S+"
}
],
"sidecar": false
}
]
}
]
}```
src-tauri/capabilities/default.json
mhhh idk
this is mine only thing it highlights is sidecar:
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "enables the default permissions",
"windows": [
"main"
],
"permissions": [
{
"identifier": "shell:allow-execute",
"allow": [
{
"name": "exec-sh",
"cmd": "sh",
"args": [
"-c",
{
"validator": "\\S+"
}
],
"sidecar": false
}
]
}
]
}
still same
try running npm run tauri dev
npm run tauri add shell
found this:
try
ahh yess now i think
ok cool
no worries

@subtle trench do you know how i can open links in default browser it doesnt work for me sryyy for asking xDD
tauri
first npm install @tauri-apps/api
are you trying in rust or js
shell.open(url).catch((err) => console.error("Failed to open link:", err));
``` js example
this looks like js
mhh
did you npm install @tauri-apps/api
yess
show code snippet where you added window.__TAURI_IPC
i dont added it?
show handle login click then the function
which is line 62
this shell.open(url).catch((err) => console.error("Failed to open link:", err));
is this you tauri version:
[dependencies]
tauri = "2.0"
let me look
and do cargo update -p tauri
@tauri-apps/api/shell module removed. Use @tauri-apps/plugin-shell instead. Migration
"@tauri-apps/plugin-shell": "^2.2.0",
does that work?
yes already have
my bad for going around in a circle, i got confused with v1 and v2 tauri
nono np
run npm install
this is from docs:
import { open } from '@tauri-apps/plugin-shell';
// opens the given URL on the default browser:
await open('https://github.com/tauri-apps/tauri');
// opens the given URL using firefox:
await open('https://github.com/tauri-apps/tauri', 'firefox');
// opens a file using the default program:
await open('/path/to/file');
it should work
ok but tauri.conf that i have:
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"build": {
"frontendDist": "../dist",
"devUrl": "http://localhost:1420",
"beforeDevCommand": "npm run vue-dev",
"beforeBuildCommand": "npm run build"
},
"app": {
"windows": [
{
"title": "",
"width": 800,
"height": 600,
"resizable": true,
"fullscreen": false
}
],
"security": {
"csp": null
}
},
"bundle": {
"active": true,
"targets": "all",
"externalBin": [
"../backend/apppy/apppy"
],
"icon": [
"icons/**/*"
],
"resources": [
"../backend/apppy/**/*",
"../backend/requirements.txt"
]
}
}```
yes i have same
then you should be good
yes normaly i think my pc is a ghost or something
i reproduced on my side and the only way that is possible is if its outside tauri env
mh how can i do that?
yes but 2.2.0
try // Ensure Tauri environment
await open('https://github.com/tauri-apps/tauri');
} else {
console.error('Not running in a Tauri environment');
}```
__
sryyyy my pc is retarted or i am xD