Let the compiler check your URLs 0 ▲ Guilherme Souza 61 days ago · Tech · hide · Fediverse post It's nice when some classes of bugs cannot be fabricated. For example, some languages like Kotlin and Rust bake the concept of "empty" especially in the language and standard library to remind and force you (the developer) to deal with the case when something is missing. This post is about a library I wrote that brings a similar compile-verified assurance to URL construction when writing web servers in Rust. 🦀 The problem it solves is: in a web server, you usually declare some "handlers" (like web pages, assets or api endpoints) and hook them to a global path router. It works well, but what about when you want to link from one page to another? How to do that correctly and let the compiler help you keep all links correct as your app evolves? To illustrate, consider this basic example using the library axum in Rust to create a website with a home page and a dynamic "posts" page, with the home linking to a post: use axum::extract::Path; use axum::response::Html; use axum::routing::get;… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town