|
|
| (3 versions intermédiaires par le même utilisateur non affichées) |
| Ligne 6 : |
Ligne 6 : |
|
| |
|
| {{wikipédia|Tauri (environnement de développement)|Tauri}} | | {{wikipédia|Tauri (environnement de développement)|Tauri}} |
| | |
| | Programmer en Rust en ligne : |
| | * https://play.rust-lang.org/ |
|
| |
|
| == Vidéo == | | == Vidéo == |
| Ligne 30 : |
Ligne 33 : |
|
| |
|
| == Point de repère == | | == Point de repère == |
| | |
| | === L'écosystème === |
| Une fois que tous les outils sont installés : | | Une fois que tous les outils sont installés : |
| * création d'un projet : | | * création d'un projet : |
| Ligne 66 : |
Ligne 71 : |
| * <code>iex</code> alias pour <code>Invoke-Expression</code> | | * <code>iex</code> alias pour <code>Invoke-Expression</code> |
|
| |
|
| == Premier exemple == | | === À noter === |
| Nom du projet : Navig2
| | La fenêtre du programme s'actualise en direct : |
| | * pour les modifications de <code>index.html</code> |
| | * pour les modifications de <code>styles.css</code> |
|
| |
|
| Fichiers {{fichier|C:\Prog\Navig2\package-lock.json}}
| | Une nouvelle compilation est nécessaire : |
| <source> | | * pour les modifications de <code>main.rs</code> |
| {
| | * pour les modifications de <code>lib.rs</code> |
| "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> | |
|
| |
|
| | == Premier exemple == |
| | Voir la sous-page : |
| | * [[Tauri/Premier exemple]] |
|
| |
|
| == Voir aussi == | | == Voir aussi == |
Tauri est un cadriciel (framework) pour la création d'application web.
Généralité
Site officiel :
Tauri sur Wikipédia
Programmer en Rust en ligne :
Vidéo
Youtube,
Codynn, Tauri for Beginners: Build a Desktop App in Rust
Youtube,
NDC Conferences, Good Bye Electron, Hello Rust + Tauri! - Andreas Lillebø Holm - NDC TechTown 2025
Point de repère
L'écosystème
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 :
.vscode
node_modules
src
src-tauri
.gitignore
package-lock.json
package.json
README.md
- les sous-dossiers suivants contiennent les principaux fichiers du projet :
src :
index.html
main.js
styles.css
src-tauri\src :
Note :
irm alias pour Invoke-RestMethod
iex alias pour Invoke-Expression
À noter
La fenêtre du programme s'actualise en direct :
- pour les modifications de
index.html
- pour les modifications de
styles.css
Une nouvelle compilation est nécessaire :
- pour les modifications de
main.rs
- pour les modifications de
lib.rs
Premier exemple
Voir la sous-page :
Voir aussi