<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fh="http://purl.org/syndication/history/1.0"><channel><title>Navi | Blog</title><description>A powerful file-based router for Rust UI frameworks — one route table, every frontend, powered by quoin.</description><link>https://navi-rs-docs.vercel.app/</link><language>fr</language><fh:complete/><atom:link rel="self" href="https://navi-rs-docs.vercel.app/fr/blog/rss.xml"/><item><title>Comment nous avons conçu un routeur basé sur les fichiers pour cinq frameworks UI Rust</title><link>https://navi-rs-docs.vercel.app/fr/blog/welcome-to-navi/</link><guid isPermaLink="true">https://navi-rs-docs.vercel.app/fr/blog/welcome-to-navi/</guid><pubDate>Sun, 15 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Dans les applications Rust desktop et WASM, le routage est souvent relégué au second plan : une énumération globale &lt;code dir=&quot;auto&quot;&gt;Route&lt;/code&gt;, un bloc &lt;code dir=&quot;auto&quot;&gt;match&lt;/code&gt; géant et des chargements asynchrones manuels dans les hooks de montage des composants. Dès que vous changez de boîte à outils UI, vous devez jeter toute la couche de navigation.&lt;/p&gt;
&lt;p&gt;Navi apporte la sémantique de TanStack Router — arbres de routes basés sur les fichiers, chargeurs, gardes et outils de développement — à Rust, sans coupler le routeur à une unique crate UI.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;lobjectif&quot;&gt;L’objectif&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Nous voulions une génération d’arbre de routes à la compilation depuis &lt;code dir=&quot;auto&quot;&gt;src/routes&lt;/code&gt;, des paramètres de chemin et de requête typés, des redirections &lt;code dir=&quot;auto&quot;&gt;before_load&lt;/code&gt; et la restauration du défilement, le tout fonctionnant sans modification sur GPUI, Dioxus, Leptos, Xilem et Floem.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;larchitecture&quot;&gt;L’architecture&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;navi-router-core&lt;/code&gt; ne contient aucune dépendance UI ni aucun runtime asynchrone figé. Il fait correspondre les URL à un arbre radix pondéré utilisant des segments &lt;code dir=&quot;auto&quot;&gt;Arc&amp;#x3C;str&gt;&lt;/code&gt; internés et des liaisons de paramètres collectées sur la pile, tout en déléguant l’état réactif et le rendu à &lt;code dir=&quot;auto&quot;&gt;quoin&lt;/code&gt;.&lt;/p&gt;
&lt;div data-astro-cid-udrfwtvx=&quot;&quot;&gt;&lt;article data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;p data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;svg data-astro-cid-mhvouzvf=&quot;true&quot; aria-hidden=&quot;true&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;currentColor&quot; data-astro-cid-ib7v6bda=&quot;&quot;&gt;&lt;path d=&quot;m21.32 9.55-1.89-.63.89-1.78A1 1 0 0 0 20.13 6L18 3.87a1 1 0 0 0-1.15-.19l-1.78.89-.63-1.89A1 1 0 0 0 13.5 2h-3a1 1 0 0 0-.95.68l-.63 1.89-1.78-.89A1 1 0 0 0 6 3.87L3.87 6a1 1 0 0 0-.19 1.15l.89 1.78-1.89.63a1 1 0 0 0-.68.94v3a1 1 0 0 0 .68.95l1.89.63-.89 1.78A1 1 0 0 0 3.87 18L6 20.13a1 1 0 0 0 1.15.19l1.78-.89.63 1.89a1 1 0 0 0 .95.68h3a1 1 0 0 0 .95-.68l.63-1.89 1.78.89a1 1 0 0 0 1.13-.19L20.13 18a1 1 0 0 0 .19-1.15l-.89-1.78 1.89-.63a1 1 0 0 0 .68-.94v-3a1 1 0 0 0-.68-.95ZM20 12.78l-1.2.4A2 2 0 0 0 17.64 16l.57 1.14-1.1 1.1-1.11-.6a2 2 0 0 0-2.79 1.16l-.4 1.2h-1.59l-.4-1.2A2 2 0 0 0 8 17.64l-1.14.57-1.1-1.1.6-1.11a2 2 0 0 0-1.16-2.82l-1.2-.4v-1.56l1.2-.4A2 2 0 0 0 6.36 8l-.57-1.11 1.1-1.1L8 6.36a2 2 0 0 0 2.82-1.16l.4-1.2h1.56l.4 1.2A2 2 0 0 0 16 6.36l1.14-.57 1.1 1.1-.6 1.11a2 2 0 0 0 1.16 2.79l1.2.4v1.59ZM12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm0 6a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;span data-astro-cid-mhvouzvf=&quot;&quot;&gt;Arbre de routes généré à la compilation&lt;/span&gt;&lt;/p&gt;&lt;div data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;navi-codegen&lt;/code&gt; analyse &lt;code dir=&quot;auto&quot;&gt;src/routes&lt;/code&gt; dans &lt;code dir=&quot;auto&quot;&gt;build.rs&lt;/code&gt; et génère un arbre de routes validé accompagné des macros typées &lt;code dir=&quot;auto&quot;&gt;use_params!&lt;/code&gt; et &lt;code dir=&quot;auto&quot;&gt;use_search!&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;&lt;/article&gt;&lt;article data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;p data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;svg data-astro-cid-mhvouzvf=&quot;true&quot; aria-hidden=&quot;true&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;currentColor&quot; data-astro-cid-ib7v6bda=&quot;&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M1.44 8.855v-.001l3.527-3.516c.34-.344.802-.541 1.285-.548h6.649l.947-.947c3.07-3.07 6.207-3.072 7.62-2.868a1.821 1.821 0 0 1 1.557 1.557c.204 1.413.203 4.55-2.868 7.62l-.946.946v6.649a1.845 1.845 0 0 1-.549 1.286l-3.516 3.528a1.844 1.844 0 0 1-3.11-.944l-.858-4.275-4.52-4.52-2.31-.463-1.964-.394A1.847 1.847 0 0 1 .98 10.693a1.843 1.843 0 0 1 .46-1.838Zm5.379 2.017-3.873-.776L6.32 6.733h4.638l-4.14 4.14Zm8.403-5.655c2.459-2.46 4.856-2.463 5.89-2.33.134 1.035.13 3.432-2.329 5.891l-6.71 6.71-3.561-3.56 6.71-6.711Zm-1.318 15.837-.776-3.873 4.14-4.14v4.639l-3.364 3.374Z&quot; clip-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M9.318 18.345a.972.972 0 0 0-1.86-.561c-.482 1.435-1.687 2.204-2.934 2.619a8.22 8.22 0 0 1-1.23.302c.062-.365.157-.79.303-1.229.415-1.247 1.184-2.452 2.62-2.935a.971.971 0 1 0-.62-1.842c-.12.04-.236.084-.35.13-2.02.828-3.012 2.588-3.493 4.033a10.383 10.383 0 0 0-.51 2.845l-.001.016v.063c0 .536.434.972.97.972H2.24a7.21 7.21 0 0 0 .878-.065c.527-.063 1.248-.19 2.02-.447 1.445-.48 3.205-1.472 4.033-3.494a5.828 5.828 0 0 0 .147-.407Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;span data-astro-cid-mhvouzvf=&quot;&quot;&gt;Chargeurs et bloqueurs&lt;/span&gt;&lt;/p&gt;&lt;div data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;p&gt;Les routes prennent en charge les chargeurs de données stale-while-revalidate (propulsés par &lt;code dir=&quot;auto&quot;&gt;rs-query&lt;/code&gt;), les gardes &lt;code dir=&quot;auto&quot;&gt;before_load&lt;/code&gt; et les bloqueurs asynchrones pour les formulaires non enregistrés.&lt;/p&gt;&lt;/div&gt;&lt;/article&gt;&lt;article data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;p data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;svg data-astro-cid-mhvouzvf=&quot;true&quot; aria-hidden=&quot;true&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;currentColor&quot; data-astro-cid-ib7v6bda=&quot;&quot;&gt;&lt;path d=&quot;M18.71 7.21a1 1 0 0 0-1.42 0l-7.45 7.46-3.13-3.14A1.02 1.02 0 1 0 5.29 13l3.84 3.84a1.001 1.001 0 0 0 1.42 0l8.16-8.16a1 1 0 0 0 0-1.47Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;span data-astro-cid-mhvouzvf=&quot;&quot;&gt;Correspondance sans allocation&lt;/span&gt;&lt;/p&gt;&lt;div data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;p&gt;La vérification des liens actifs compare directement les octets, et les hooks exécutés à chaque image lisent l’état de navigation mis en cache sans allocation sur le tas.&lt;/p&gt;&lt;/div&gt;&lt;/article&gt;&lt;article data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;p data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;svg data-astro-cid-mhvouzvf=&quot;true&quot; aria-hidden=&quot;true&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;currentColor&quot; data-astro-cid-ib7v6bda=&quot;&quot;&gt;&lt;path d=&quot;M17 22H5a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3h1a4 4 0 0 1 7.3-2.18c.448.64.692 1.4.7 2.18h3a1 1 0 0 1 1 1v3a4 4 0 0 1 2.18 7.3A3.86 3.86 0 0 1 18 18v3a1 1 0 0 1-1 1ZM5 8a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h11v-3.18a1 1 0 0 1 1.33-.95 1.77 1.77 0 0 0 1.74-.23 2 2 0 0 0 .93-1.37 2 2 0 0 0-.48-1.59 1.89 1.89 0 0 0-2.17-.55 1 1 0 0 1-1.33-.95V8h-3.2a1 1 0 0 1-1-1.33 1.77 1.77 0 0 0-.23-1.74 1.939 1.939 0 0 0-3-.43A2 2 0 0 0 8 6c.002.23.046.456.13.67A1 1 0 0 1 7.18 8H5Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;span data-astro-cid-mhvouzvf=&quot;&quot;&gt;Outils de développement multi-frameworks&lt;/span&gt;&lt;/p&gt;&lt;div data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;p&gt;Le raccourci &lt;code dir=&quot;auto&quot;&gt;Cmd+Shift+D&lt;/code&gt; ouvre un panneau d’inspection affichant l’arbre des routes, les entrées du cache, la chronologie des événements et les bloqueurs actifs.&lt;/p&gt;&lt;/div&gt;&lt;/article&gt;&lt;/div&gt;
&lt;div&gt;&lt;h2 id=&quot;ce-que-cela-a-coûté&quot;&gt;Ce que cela a coûté&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Garder le cœur indépendant de tout framework a imposé des règles strictes sur le workspace : &lt;code dir=&quot;auto&quot;&gt;#![forbid(unsafe_code)]&lt;/code&gt;, des lints Clippy pédants sans aucune suppression &lt;code dir=&quot;auto&quot;&gt;#[allow]&lt;/code&gt;, et la maintenance de cinq démonstrations hôtes distinctes (&lt;code dir=&quot;auto&quot;&gt;demo-gpui&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;demo-dioxus&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;demo-floem&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;demo-xilem&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;demo-leptos&lt;/code&gt;) au-dessus d’une même crate partagée &lt;code dir=&quot;auto&quot;&gt;demo-core&lt;/code&gt;.&lt;/p&gt;
&lt;aside aria-label=&quot;Le compromis&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Le compromis&lt;/p&gt;&lt;div&gt;&lt;p&gt;Les routes portables sont rendues sous forme d’arbres &lt;code dir=&quot;auto&quot;&gt;quoin_ui::Node&lt;/code&gt; ou de blocs &lt;code dir=&quot;auto&quot;&gt;component!&lt;/code&gt; afin de compiler sur les cinq backends. Si vous avez besoin d’un accès direct aux éléments natifs spécifiques à GPUI, vous devez sortir de l’abstraction portable via la trappe d’échappement &lt;code dir=&quot;auto&quot;&gt;rsx!&lt;/code&gt; de &lt;code dir=&quot;auto&quot;&gt;quoin&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;div&gt;&lt;h2 id=&quot;démarrer&quot;&gt;Démarrer&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;cargo&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;run&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-p&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;navi-demo-gpui&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Lisez le &lt;a href=&quot;https://navi-rs-docs.vercel.app/fr/tutorials/getting-started/&quot;&gt;tutoriel de démarrage&lt;/a&gt; pour configurer &lt;code dir=&quot;auto&quot;&gt;navi.config.json&lt;/code&gt; et définir votre première route.&lt;/p&gt;</content:encoded></item></channel></rss>