<?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>en</language><fh:complete/><atom:link rel="self" href="https://navi-rs-docs.vercel.app/blog/rss.xml"/><item><title>How we built a file-based router that runs on five Rust UI frameworks</title><link>https://navi-rs-docs.vercel.app/blog/welcome-to-navi/</link><guid isPermaLink="true">https://navi-rs-docs.vercel.app/blog/welcome-to-navi/</guid><pubDate>Sun, 15 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;In Rust desktop and WASM applications, routing is often an afterthought: a global &lt;code dir=&quot;auto&quot;&gt;Route&lt;/code&gt; enum, a giant &lt;code dir=&quot;auto&quot;&gt;match&lt;/code&gt; block, and manual async fetching inside component mount hooks. When you switch UI toolkits, you throw the whole navigation layer away.&lt;/p&gt;
&lt;p&gt;Navi brings TanStack Router semantics—file-based route trees, loaders, guards, and devtools—to Rust without coupling the router to a single UI crate.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;the-goal&quot;&gt;The Goal&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;We wanted build-time route generation from &lt;code dir=&quot;auto&quot;&gt;src/routes&lt;/code&gt;, typed path and query parameters, &lt;code dir=&quot;auto&quot;&gt;before_load&lt;/code&gt; redirects, and scroll restoration, all running unmodified across GPUI, Dioxus, Leptos, Xilem, and Floem.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;the-architecture&quot;&gt;The Architecture&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;navi-router-core&lt;/code&gt; contains zero UI dependencies and no hardcoded async runtime. It matches URLs against a ranked radix trie using interned &lt;code dir=&quot;auto&quot;&gt;Arc&amp;#x3C;str&gt;&lt;/code&gt; segments and stack-collected parameter bindings, delegating reactive state and rendering to &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;Build-Time Route Tree&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; scans &lt;code dir=&quot;auto&quot;&gt;src/routes&lt;/code&gt; in &lt;code dir=&quot;auto&quot;&gt;build.rs&lt;/code&gt; and emits a validated route tree alongside typed &lt;code dir=&quot;auto&quot;&gt;use_params!&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;use_search!&lt;/code&gt; macros.&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;Loaders &amp;#x26; Blockers&lt;/span&gt;&lt;/p&gt;&lt;div data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;p&gt;Routes support stale-while-revalidate data loaders (backed by &lt;code dir=&quot;auto&quot;&gt;rs-query&lt;/code&gt;), &lt;code dir=&quot;auto&quot;&gt;before_load&lt;/code&gt; guards, and async blockers for unsaved forms.&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;Allocation-Free Matching&lt;/span&gt;&lt;/p&gt;&lt;div data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;p&gt;Active link checks compare bytes directly, and per-frame hooks read cached navigation state without allocating on the heap.&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;Cross-Framework Devtools&lt;/span&gt;&lt;/p&gt;&lt;div data-astro-cid-mhvouzvf=&quot;&quot;&gt;&lt;p&gt;Pressing &lt;code dir=&quot;auto&quot;&gt;Cmd+Shift+D&lt;/code&gt; opens an inspectable panel showing the route tree, cache entries, event timeline, and active blockers.&lt;/p&gt;&lt;/div&gt;&lt;/article&gt;&lt;/div&gt;
&lt;div&gt;&lt;h2 id=&quot;what-it-cost&quot;&gt;What it cost&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Keeping the core framework-free meant enforcing strict workspace rules: &lt;code dir=&quot;auto&quot;&gt;#![forbid(unsafe_code)]&lt;/code&gt;, pedantic Clippy lints with zero &lt;code dir=&quot;auto&quot;&gt;#[allow]&lt;/code&gt; suppressions, and maintaining five separate host demos (&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;) over one shared &lt;code dir=&quot;auto&quot;&gt;demo-core&lt;/code&gt; crate.&lt;/p&gt;
&lt;aside aria-label=&quot;The Trade-off&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;The Trade-off&lt;/p&gt;&lt;div&gt;&lt;p&gt;Portable routes render as &lt;code dir=&quot;auto&quot;&gt;quoin_ui::Node&lt;/code&gt; trees or &lt;code dir=&quot;auto&quot;&gt;component!&lt;/code&gt; blocks so they compile across all five backends. If you need direct access to raw GPUI-specific elements, you have to step out of the portable abstraction using &lt;code dir=&quot;auto&quot;&gt;quoin&lt;/code&gt;’s &lt;code dir=&quot;auto&quot;&gt;rsx!&lt;/code&gt; escape hatch.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;div&gt;&lt;h2 id=&quot;getting-started&quot;&gt;Getting started&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;Read the &lt;a href=&quot;https://navi-rs-docs.vercel.app/tutorials/getting-started/&quot;&gt;getting started tutorial&lt;/a&gt; to configure &lt;code dir=&quot;auto&quot;&gt;navi.config.json&lt;/code&gt; and define your first route.&lt;/p&gt;</content:encoded></item></channel></rss>