« Tauri » : différence entre les versions
| Ligne 65 : | Ligne 65 : | ||
* <code>irm</code> alias pour <code>Invoke-RestMethod</code> | * <code>irm</code> alias pour <code>Invoke-RestMethod</code> | ||
* <code>iex</code> alias pour <code>Invoke-Expression</code> | * <code>iex</code> alias pour <code>Invoke-Expression</code> | ||
== Premier exemple == | |||
Nom du projet : Navig2 | |||
Fichiers {{fichier|C:\Prog\Navig2\package-lock.json}} | |||
<source> | |||
{ | |||
"name": "navig2", | |||
"version": "0.1.0", | |||
"lockfileVersion": 3, | |||
"requires": true, | |||
"packages": { | |||
"": { | |||
"name": "navig2", | |||
"version": "0.1.0", | |||
"devDependencies": { | |||
"@tauri-apps/cli": "^2" | |||
} | |||
}, | |||
"node_modules/@tauri-apps/cli": { | |||
"version": "2.12.4", | |||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.12.4.tgz", | |||
"integrity": "sha512-JI9bHfudSRJikGOrjbXEm6RjzzvmKuLc+JixB1NE8hNzQkNlCCIC3pTES3uypkR9lxHrsbxzcnSwhI2IxBQphw==", | |||
"dev": true, | |||
"license": "Apache-2.0 OR MIT", | |||
"bin": { | |||
"tauri": "tauri.js" | |||
}, | |||
"engines": { | |||
"node": ">= 10" | |||
}, | |||
"funding": { | |||
"type": "opencollective", | |||
"url": "https://opencollective.com/tauri" | |||
}, | |||
"optionalDependencies": { | |||
"@tauri-apps/cli-darwin-arm64": "2.12.4", | |||
"@tauri-apps/cli-darwin-x64": "2.12.4", | |||
"@tauri-apps/cli-linux-arm-gnueabihf": "2.12.4", | |||
"@tauri-apps/cli-linux-arm64-gnu": "2.12.4", | |||
"@tauri-apps/cli-linux-arm64-musl": "2.12.4", | |||
"@tauri-apps/cli-linux-riscv64-gnu": "2.12.4", | |||
"@tauri-apps/cli-linux-x64-gnu": "2.12.4", | |||
"@tauri-apps/cli-linux-x64-musl": "2.12.4", | |||
"@tauri-apps/cli-win32-arm64-msvc": "2.12.4", | |||
"@tauri-apps/cli-win32-ia32-msvc": "2.12.4", | |||
"@tauri-apps/cli-win32-x64-msvc": "2.12.4" | |||
} | |||
}, | |||
"node_modules/@tauri-apps/cli-darwin-arm64": { | |||
"version": "2.12.4", | |||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.12.4.tgz", | |||
"integrity": "sha512-OxqKSckIkoJ6vX2AjifIJpTasFC0Hbdoo7gEiCmAjauABO3U8m2MRsLWe+QTiBwDx1mIrvgA+rvI7tvDnbnHVg==", | |||
"cpu": [ | |||
"arm64" | |||
], | |||
"dev": true, | |||
"license": "Apache-2.0 OR MIT", | |||
"optional": true, | |||
"os": [ | |||
"darwin" | |||
], | |||
"engines": { | |||
"node": ">= 10" | |||
} | |||
}, | |||
"node_modules/@tauri-apps/cli-darwin-x64": { | |||
"version": "2.12.4", | |||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.12.4.tgz", | |||
"integrity": "sha512-fz76/77wMMJOaaUN6n3CybRG0P/MTEjjqYk81mGPyhi9m6Ue5T+LWBnJP/AkPooNatBPI2vtulGqomyMJ44lCQ==", | |||
"cpu": [ | |||
"x64" | |||
], | |||
"dev": true, | |||
"license": "Apache-2.0 OR MIT", | |||
"optional": true, | |||
"os": [ | |||
"darwin" | |||
], | |||
"engines": { | |||
"node": ">= 10" | |||
} | |||
}, | |||
"node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { | |||
"version": "2.12.4", | |||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.12.4.tgz", | |||
"integrity": "sha512-K0w8Bof6Lt8QKLAYhRy0yy36ZH5iA/35VuSOvnxyjvCUZ+A3JKsUTlALviH/sVgAlisaPzzmeJSH8XOn4Q2HBA==", | |||
"cpu": [ | |||
"arm" | |||
], | |||
"dev": true, | |||
"license": "Apache-2.0 OR MIT", | |||
"optional": true, | |||
"os": [ | |||
"linux" | |||
], | |||
"engines": { | |||
"node": ">= 10" | |||
} | |||
}, | |||
"node_modules/@tauri-apps/cli-linux-arm64-gnu": { | |||
"version": "2.12.4", | |||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.12.4.tgz", | |||
"integrity": "sha512-j5rOnjmRUwWrm1oosf0zBYl4D+fqydgUROFCk0hvKZxvbTT8SOERes0QB7rBV/XWNy+kM6pCKzb3oSm2sRglzg==", | |||
"cpu": [ | |||
"arm64" | |||
], | |||
"dev": true, | |||
"license": "Apache-2.0 OR MIT", | |||
"optional": true, | |||
"os": [ | |||
"linux" | |||
], | |||
"engines": { | |||
"node": ">= 10" | |||
} | |||
}, | |||
"node_modules/@tauri-apps/cli-linux-arm64-musl": { | |||
"version": "2.12.4", | |||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.12.4.tgz", | |||
"integrity": "sha512-aOue3Fy6Jb7+oWcfAVUsVHfeTybSCt2CZoU06aO4jv4d2Ks/KnaTPwMAK3CLEduGOvBLY1lbBBrIyomqLLH5Sg==", | |||
"cpu": [ | |||
"arm64" | |||
], | |||
"dev": true, | |||
"license": "Apache-2.0 OR MIT", | |||
"optional": true, | |||
"os": [ | |||
"linux" | |||
], | |||
"engines": { | |||
"node": ">= 10" | |||
} | |||
}, | |||
"node_modules/@tauri-apps/cli-linux-riscv64-gnu": { | |||
"version": "2.12.4", | |||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.12.4.tgz", | |||
"integrity": "sha512-Fx6GShY/RvST+t6LMlTHAwd66+1tEaAAGrnU7cysVfaiRP1BKng5Vl6rVmO6rSLOA1Sp1dRzNYM4f0OWQGb7qA==", | |||
"cpu": [ | |||
"riscv64" | |||
], | |||
"dev": true, | |||
"license": "Apache-2.0 OR MIT", | |||
"optional": true, | |||
"os": [ | |||
"linux" | |||
], | |||
"engines": { | |||
"node": ">= 10" | |||
} | |||
}, | |||
"node_modules/@tauri-apps/cli-linux-x64-gnu": { | |||
"version": "2.12.4", | |||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.12.4.tgz", | |||
"integrity": "sha512-tNzZSa79Z1nRpHxEpQ38lsAFpKlFlYvoXzjTV+lRRn/zSf3wrdUC3wnLcq2XEadchPu4ttK0zivhYzr+XGD19Q==", | |||
"cpu": [ | |||
"x64" | |||
], | |||
"dev": true, | |||
"license": "Apache-2.0 OR MIT", | |||
"optional": true, | |||
"os": [ | |||
"linux" | |||
], | |||
"engines": { | |||
"node": ">= 10" | |||
} | |||
}, | |||
"node_modules/@tauri-apps/cli-linux-x64-musl": { | |||
"version": "2.12.4", | |||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.12.4.tgz", | |||
"integrity": "sha512-jmZ1pr0xEqUhuEusWtt9Yt+GF6lCnGHUmIL+KIknpbjK/XQ2qkhDBhaxK/JMHM2A8dAacVXCxXJk2EXpwhQUfA==", | |||
"cpu": [ | |||
"x64" | |||
], | |||
"dev": true, | |||
"license": "Apache-2.0 OR MIT", | |||
"optional": true, | |||
"os": [ | |||
"linux" | |||
], | |||
"engines": { | |||
"node": ">= 10" | |||
} | |||
}, | |||
"node_modules/@tauri-apps/cli-win32-arm64-msvc": { | |||
"version": "2.12.4", | |||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.12.4.tgz", | |||
"integrity": "sha512-fGo8pgEHZxdSYgZ/J98m1usJ7NHKmKbq7k6uT0x1rpOq6Bg2YVzzpaAblWk710f5LHYBJIL5QIFS5IrD+4gmTg==", | |||
"cpu": [ | |||
"arm64" | |||
], | |||
"dev": true, | |||
"license": "Apache-2.0 OR MIT", | |||
"optional": true, | |||
"os": [ | |||
"win32" | |||
], | |||
"engines": { | |||
"node": ">= 10" | |||
} | |||
}, | |||
"node_modules/@tauri-apps/cli-win32-ia32-msvc": { | |||
"version": "2.12.4", | |||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.12.4.tgz", | |||
"integrity": "sha512-ezl8sQIcjYsye3TUnTH5VcWmWzccZASlQm7hlZt0dYyj1XD0qpVW47u2xYVrIKui0F8uQv/7QGZixdWiClBsbg==", | |||
"cpu": [ | |||
"ia32" | |||
], | |||
"dev": true, | |||
"license": "Apache-2.0 OR MIT", | |||
"optional": true, | |||
"os": [ | |||
"win32" | |||
], | |||
"engines": { | |||
"node": ">= 10" | |||
} | |||
}, | |||
"node_modules/@tauri-apps/cli-win32-x64-msvc": { | |||
"version": "2.12.4", | |||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.12.4.tgz", | |||
"integrity": "sha512-DJhDeCqjLDNMWYFy7ZS8cfeAHX2RK0RbQMLiA3bMVVkXRDJ4NBYiHriGqsUhsr9iG41aTb+dJGkFPmPw1gWwVw==", | |||
"cpu": [ | |||
"x64" | |||
], | |||
"dev": true, | |||
"license": "Apache-2.0 OR MIT", | |||
"optional": true, | |||
"os": [ | |||
"win32" | |||
], | |||
"engines": { | |||
"node": ">= 10" | |||
} | |||
} | |||
} | |||
} | |||
</source> | |||
== Voir aussi == | == Voir aussi == | ||
Version du 5 novembre 2026 à 20:17
Tauri est un cadriciel (framework) pour la création d'application web.
Généralité
Site officiel :
Tauri sur Wikipédia
Vidéo
Youtube, Codynn, Tauri for Beginners: Build a Desktop App in Rust
- https://www.youtube.com/watch?v=KhAkFqUi9l0 ; Tauri 2 tutorial for beginners: build Jot, a desktop notes app, with JavaScript and Rust.
- date : 03/10/2022 • durée : 1 h 5 min 23 s
Youtube, NDC Conferences, Good Bye Electron, Hello Rust + Tauri! - Andreas Lillebø Holm - NDC TechTown 2025
- https://www.youtube.com/watch?v=2xsrudVGPGs ; Tauri 2 tutorial for beginners: build Jot, a desktop notes app, with JavaScript and Rust.
- date : 23/12/2025 • durée : 1 h 5 min 39 s
Point de repère
Une fois que tous les outils sont installés :
- création d'un projet :
- se positionner dans le dossier des projet,
- en PowerShell :
irm https://create.tauri.app/ps | iex - indiquer un nom de projet (project name) :
Fen2Bous - indiquer un nom de paquet (package name) :
Fen2Bous - choisir un identifiant (identifier) :
com.phil.fen2bous - choisir un langage pour la forme (frontend) :
JavaScript - choisir un gestionnaire de paquets (package manager) :
npm - choisir un modèle d'interface (UI template) :
Vanilla - choisir un langage d'interface (UI flavor) :
JavaScript
- se positionner dans le dossier du projet :
cd Fen2Bou - installer les éléments du projet :
npm install - lancer le développement :
npm run tauri dev; environ 348 éléments à préparer - les éléments suivants sont créés dans le dossier du projet :
.vscodenode_modulessrcsrc-tauri.gitignorepackage-lock.jsonpackage.jsonREADME.md
- les sous-dossiers suivants contiennent les principaux fichiers du projet :
src:index.htmlmain.jsstyles.css
src-tauri\src:lib.rsmain.rs
Note :
irmalias pourInvoke-RestMethodiexalias pourInvoke-Expression
Premier exemple
Nom du projet : Navig2
Fichiers C:\Prog\Navig2\package-lock.json
{
"name": "navig2",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "navig2",
"version": "0.1.0",
"devDependencies": {
"@tauri-apps/cli": "^2"
}
},
"node_modules/@tauri-apps/cli": {
"version": "2.12.4",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.12.4.tgz",
"integrity": "sha512-JI9bHfudSRJikGOrjbXEm6RjzzvmKuLc+JixB1NE8hNzQkNlCCIC3pTES3uypkR9lxHrsbxzcnSwhI2IxBQphw==",
"dev": true,
"license": "Apache-2.0 OR MIT",
"bin": {
"tauri": "tauri.js"
},
"engines": {
"node": ">= 10"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/tauri"
},
"optionalDependencies": {
"@tauri-apps/cli-darwin-arm64": "2.12.4",
"@tauri-apps/cli-darwin-x64": "2.12.4",
"@tauri-apps/cli-linux-arm-gnueabihf": "2.12.4",
"@tauri-apps/cli-linux-arm64-gnu": "2.12.4",
"@tauri-apps/cli-linux-arm64-musl": "2.12.4",
"@tauri-apps/cli-linux-riscv64-gnu": "2.12.4",
"@tauri-apps/cli-linux-x64-gnu": "2.12.4",
"@tauri-apps/cli-linux-x64-musl": "2.12.4",
"@tauri-apps/cli-win32-arm64-msvc": "2.12.4",
"@tauri-apps/cli-win32-ia32-msvc": "2.12.4",
"@tauri-apps/cli-win32-x64-msvc": "2.12.4"
}
},
"node_modules/@tauri-apps/cli-darwin-arm64": {
"version": "2.12.4",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.12.4.tgz",
"integrity": "sha512-OxqKSckIkoJ6vX2AjifIJpTasFC0Hbdoo7gEiCmAjauABO3U8m2MRsLWe+QTiBwDx1mIrvgA+rvI7tvDnbnHVg==",
"cpu": [
"arm64"
],
"dev": true,
"license": "Apache-2.0 OR MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@tauri-apps/cli-darwin-x64": {
"version": "2.12.4",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.12.4.tgz",
"integrity": "sha512-fz76/77wMMJOaaUN6n3CybRG0P/MTEjjqYk81mGPyhi9m6Ue5T+LWBnJP/AkPooNatBPI2vtulGqomyMJ44lCQ==",
"cpu": [
"x64"
],
"dev": true,
"license": "Apache-2.0 OR MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@tauri-apps/cli-linux-arm-gnueabihf": {
"version": "2.12.4",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.12.4.tgz",
"integrity": "sha512-K0w8Bof6Lt8QKLAYhRy0yy36ZH5iA/35VuSOvnxyjvCUZ+A3JKsUTlALviH/sVgAlisaPzzmeJSH8XOn4Q2HBA==",
"cpu": [
"arm"
],
"dev": true,
"license": "Apache-2.0 OR MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@tauri-apps/cli-linux-arm64-gnu": {
"version": "2.12.4",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.12.4.tgz",
"integrity": "sha512-j5rOnjmRUwWrm1oosf0zBYl4D+fqydgUROFCk0hvKZxvbTT8SOERes0QB7rBV/XWNy+kM6pCKzb3oSm2sRglzg==",
"cpu": [
"arm64"
],
"dev": true,
"license": "Apache-2.0 OR MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@tauri-apps/cli-linux-arm64-musl": {
"version": "2.12.4",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.12.4.tgz",
"integrity": "sha512-aOue3Fy6Jb7+oWcfAVUsVHfeTybSCt2CZoU06aO4jv4d2Ks/KnaTPwMAK3CLEduGOvBLY1lbBBrIyomqLLH5Sg==",
"cpu": [
"arm64"
],
"dev": true,
"license": "Apache-2.0 OR MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@tauri-apps/cli-linux-riscv64-gnu": {
"version": "2.12.4",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.12.4.tgz",
"integrity": "sha512-Fx6GShY/RvST+t6LMlTHAwd66+1tEaAAGrnU7cysVfaiRP1BKng5Vl6rVmO6rSLOA1Sp1dRzNYM4f0OWQGb7qA==",
"cpu": [
"riscv64"
],
"dev": true,
"license": "Apache-2.0 OR MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@tauri-apps/cli-linux-x64-gnu": {
"version": "2.12.4",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.12.4.tgz",
"integrity": "sha512-tNzZSa79Z1nRpHxEpQ38lsAFpKlFlYvoXzjTV+lRRn/zSf3wrdUC3wnLcq2XEadchPu4ttK0zivhYzr+XGD19Q==",
"cpu": [
"x64"
],
"dev": true,
"license": "Apache-2.0 OR MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@tauri-apps/cli-linux-x64-musl": {
"version": "2.12.4",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.12.4.tgz",
"integrity": "sha512-jmZ1pr0xEqUhuEusWtt9Yt+GF6lCnGHUmIL+KIknpbjK/XQ2qkhDBhaxK/JMHM2A8dAacVXCxXJk2EXpwhQUfA==",
"cpu": [
"x64"
],
"dev": true,
"license": "Apache-2.0 OR MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@tauri-apps/cli-win32-arm64-msvc": {
"version": "2.12.4",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.12.4.tgz",
"integrity": "sha512-fGo8pgEHZxdSYgZ/J98m1usJ7NHKmKbq7k6uT0x1rpOq6Bg2YVzzpaAblWk710f5LHYBJIL5QIFS5IrD+4gmTg==",
"cpu": [
"arm64"
],
"dev": true,
"license": "Apache-2.0 OR MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@tauri-apps/cli-win32-ia32-msvc": {
"version": "2.12.4",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.12.4.tgz",
"integrity": "sha512-ezl8sQIcjYsye3TUnTH5VcWmWzccZASlQm7hlZt0dYyj1XD0qpVW47u2xYVrIKui0F8uQv/7QGZixdWiClBsbg==",
"cpu": [
"ia32"
],
"dev": true,
"license": "Apache-2.0 OR MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@tauri-apps/cli-win32-x64-msvc": {
"version": "2.12.4",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.12.4.tgz",
"integrity": "sha512-DJhDeCqjLDNMWYFy7ZS8cfeAHX2RK0RbQMLiA3bMVVkXRDJ4NBYiHriGqsUhsr9iG41aTb+dJGkFPmPw1gWwVw==",
"cpu": [
"x64"
],
"dev": true,
"license": "Apache-2.0 OR MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
}
}
}

