<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Rust on Home</title>
    <link>https://blog.rafaelfernandez.dev/tags/rust/</link>
    <description>Recent content in Rust on Home</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <copyright>© 2026 Rafael Fernandez</copyright>
    <lastBuildDate>Tue, 24 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.rafaelfernandez.dev/tags/rust/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>How Query Engines Work 2. Why modern query engines think in columns</title>
      <link>https://blog.rafaelfernandez.dev/posts/how-query-engines-work-2-columnar-storage-arrow-rust/</link>
      <pubDate>Tue, 24 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/how-query-engines-work-2-columnar-storage-arrow-rust/</guid>
      <description>Why do modern query engines pass around columns instead of rows? Because the hardware loves it. This post explains why columnar layout is so fast, how Apache Arrow represents it in memory, and how to build and manipulate Arrow arrays in Rust without treating the whole thing like black magic.</description>
      
    </item>
    
    <item>
      <title>How Query Engines Work 1. The small compiler hiding behind every SQL query</title>
      <link>https://blog.rafaelfernandez.dev/posts/how-query-engines-work-1-from-sql-to-results/</link>
      <pubDate>Mon, 23 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/how-query-engines-work-1-from-sql-to-results/</guid>
      <description>You write a SQL query, hit enter, and a few milliseconds later results appear. In between, a small compiler has already parsed your text, built a plan, optimized it, and executed it. This post walks through that pipeline with a real query and real Rust code using DataFusion.</description>
      
    </item>
    
    <item>
      <title>The Elm Architecture: a loop that fits in your head</title>
      <link>https://blog.rafaelfernandez.dev/posts/the-elm-architecture-a-loop-that-fits-in-your-head/</link>
      <pubDate>Sun, 22 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/the-elm-architecture-a-loop-that-fits-in-your-head/</guid>
      <description>Model, Update, View. Three pieces, one loop, zero surprises. We explain The Elm Architecture from scratch with side-by-side examples in Rust and Scala, trace where the pattern came from, why it keeps showing up in TUIs and functional codebases, and when it stops being the right tool.</description>
      
    </item>
    
    <item>
      <title>The Curry-Howard Correspondence: when types become proofs</title>
      <link>https://blog.rafaelfernandez.dev/posts/curry-howard-types-as-proofs/</link>
      <pubDate>Fri, 20 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/curry-howard-types-as-proofs/</guid>
      <description>Every well-typed program is a proof. Every type is a proposition. This is not a metaphor; it is a mathematical theorem discovered in the 1930s that explains why making invalid states unrepresentable actually works.</description>
      
    </item>
    
    <item>
      <title>Making Invalid States Unrepresentable 3: Real bugs from representable nonsense</title>
      <link>https://blog.rafaelfernandez.dev/posts/making-invalid-states-unrepresentable-3-real-bugs/</link>
      <pubDate>Wed, 18 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/making-invalid-states-unrepresentable-3-real-bugs/</guid>
      <description>Null references, UI loading spinners that show errors and data simultaneously, payments that are captured and voided at the same time. These are not hypotheticals. They are the direct consequence of types that lie about the domain.</description>
      
    </item>
    
    <item>
      <title>Making Invalid States Unrepresentable 2: The algebra behind your types</title>
      <link>https://blog.rafaelfernandez.dev/posts/making-invalid-states-unrepresentable-2-algebra-behind-types/</link>
      <pubDate>Mon, 16 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/making-invalid-states-unrepresentable-2-algebra-behind-types/</guid>
      <description>Types are called algebraic because they obey arithmetic. Product types multiply, sum types add. Understanding this arithmetic explains why an enum with 5 variants is infinitely more precise than 4 boolean flags.</description>
      
    </item>
    
    <item>
      <title>Making Invalid States Unrepresentable 1: Why boolean flags are bugs in disguise</title>
      <link>https://blog.rafaelfernandez.dev/posts/making-invalid-states-unrepresentable-1-boolean-flags/</link>
      <pubDate>Sat, 14 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/making-invalid-states-unrepresentable-1-boolean-flags/</guid>
      <description>A traffic light that is red and green at the same time. A user who is logged in and logged out simultaneously. Boolean flags make these absurd states perfectly representable, and that is the problem.</description>
      
    </item>
    
    <item>
      <title>Ownership in Rust 3. Clone guilt and the Republic of types</title>
      <link>https://blog.rafaelfernandez.dev/posts/ownership-rust-3-clone-guilt-republic-of-types/</link>
      <pubDate>Thu, 12 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/ownership-rust-3-clone-guilt-republic-of-types/</guid>
      <description>The Rust community turned .clone() into a moral failing. That dogma is as dangerous as the Jedi Council&amp;rsquo;s inability to adapt. We put the guilt under a microscope: the real performance numbers, the clippy lint that reinforces it, and the type theory that explains why Rust makes duplication visible in the first place.</description>
      
    </item>
    
    <item>
      <title>Ownership in Rust 2. Six ways to share state and how to pick the right one</title>
      <link>https://blog.rafaelfernandez.dev/posts/ownership-rust-2-six-ways-to-share-state/</link>
      <pubDate>Mon, 09 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/ownership-rust-2-six-ways-to-share-state/</guid>
      <description>Move, borrow, clone, Rc, Arc, Cow. Rust gives you six lightsaber forms for ownership. Each one counters a specific threat. Using the wrong form against the wrong opponent is not just inelegant, it is fatal. We map each strategy to the situations where it excels and where it fails catastrophically.</description>
      
    </item>
    
    <item>
      <title>Ownership in Rust 1. Stop fearing .clone()</title>
      <link>https://blog.rafaelfernandez.dev/posts/ownership-rust-1-stop-fearing-clone/</link>
      <pubDate>Fri, 06 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/ownership-rust-1-stop-fearing-clone/</guid>
      <description>The Rust community treats .clone() like a code smell. Sometimes it is. But most of the time, the instinct to avoid it costs more in complexity than the clone costs in nanoseconds. We dissect what clone actually does for every common type, the real cost spectrum across six orders of magnitude, and why Clone and Copy are not the same conversation.</description>
      
    </item>
    
    <item>
      <title>Tagless Final is denotational semantics in disguise</title>
      <link>https://blog.rafaelfernandez.dev/posts/tagless-final-is-denotational-semantics/</link>
      <pubDate>Tue, 03 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/tagless-final-is-denotational-semantics/</guid>
      <description>Every trait in your hexagonal architecture is a tagless-final algebra. Every impl is an interpreter. You have been writing denotational semantics without knowing it. We trace the connection from Kiselyov&amp;rsquo;s paper through Scala&amp;rsquo;s Cats-Effect to Rust&amp;rsquo;s port traits, and show why the pattern that academics call &amp;lsquo;finally tagless&amp;rsquo; is the same pattern that practitioners call &amp;lsquo;dependency injection.&amp;rsquo;</description>
      
    </item>
    
    <item>
      <title>Todo TUI in Rust 5. Event polling, the edit vertical slice, and closing</title>
      <link>https://blog.rafaelfernandez.dev/posts/todo-tui-rust-5-event-polling-edit-vertical-slice/</link>
      <pubDate>Sat, 28 Feb 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/todo-tui-rust-5-event-polling-edit-vertical-slice/</guid>
      <description>The rat serves the last course. We fix input lag with non-blocking event polling, add the edit feature as a full vertical slice from application layer to TUI, watch the state machine grow from 3 to 4 variants with compiler-guided safety, and close with the key takeaways from the entire migration.</description>
      
    </item>
    
    <item>
      <title>Todo TUI in Rust 4. UX polish and the input popup</title>
      <link>https://blog.rafaelfernandez.dev/posts/todo-tui-rust-4-ux-polish-input-popup/</link>
      <pubDate>Wed, 25 Feb 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/todo-tui-rust-4-ux-polish-input-popup/</guid>
      <description>The rat learns to plate. Five UX improvements transform a monochrome prototype into a scannable, responsive tool: color coding, positive feedback, empty state guidance, transient messages, and a visual cursor. Then we replace the cramped command bar input with a centered modal popup.</description>
      
    </item>
    
    <item>
      <title>Todo TUI in Rust 3. Events, terminal safety, and the migration moment of truth</title>
      <link>https://blog.rafaelfernandez.dev/posts/todo-tui-rust-3-events-terminal-safety-migration/</link>
      <pubDate>Sat, 21 Feb 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/todo-tui-rust-3-events-terminal-safety-migration/</guid>
      <description>The rat wires up the ears. We implement mode-specific event handlers with crossterm, redesign the key mapping to use a toggle instead of separate keys, solve the terminal restore problem with a capture-cleanup-return pattern, and run cargo test to discover that zero lines changed outside the adapter.</description>
      
    </item>
    
    <item>
      <title>Todo TUI in Rust 2. Rendering the View layer with ratatui</title>
      <link>https://blog.rafaelfernandez.dev/posts/todo-tui-rust-2-rendering-view-layer-ratatui/</link>
      <pubDate>Wed, 18 Feb 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/todo-tui-rust-2-rendering-view-layer-ratatui/</guid>
      <description>The rat starts painting. We implement the rendering layer: immediate-mode drawing, a three-zone layout with Layout::vertical, a task table with StatefulWidget and row highlighting, a context-sensitive command bar that changes with InputMode, and the subtle Block gotcha that cost a few minutes of debugging.</description>
      
    </item>
    
    <item>
      <title>Todo TUI in Rust 1. Scaffolding the TUI adapter and designing the state machine</title>
      <link>https://blog.rafaelfernandez.dev/posts/todo-tui-rust-1-scaffolding-tui-adapter-state-machine/</link>
      <pubDate>Sat, 14 Feb 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/todo-tui-rust-1-scaffolding-tui-adapter-state-machine/</guid>
      <description>We start a new series by migrating the CLI adapter to a ratatui TUI. We set up the new dependencies, design the module structure under adapters/tui/, model the interaction modes as an enum to make invalid states unrepresentable, and solve the ownership puzzle of cloning a repository in a persistent session.</description>
      
    </item>
    
    <item>
      <title>Syntax and Semantics 3. The Expression Problem</title>
      <link>https://blog.rafaelfernandez.dev/posts/syntax-and-semantics-3-the-expression-problem/</link>
      <pubDate>Sat, 07 Feb 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/syntax-and-semantics-3-the-expression-problem/</guid>
      <description>Adding a new type is easy in OOP, hard in FP. Adding a new operation is easy in FP, hard in OOP. Philip Wadler named this the Expression Problem in 1998. We show how it manifests in Rust and Scala, and tease the resolution.</description>
      
    </item>
    
    <item>
      <title>Syntax and Semantics 2: Three ways to define what your code means</title>
      <link>https://blog.rafaelfernandez.dev/posts/syntax-and-semantics-2-three-ways-to-define-meaning/</link>
      <pubDate>Tue, 03 Feb 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/syntax-and-semantics-2-three-ways-to-define-meaning/</guid>
      <description>Your match expression is operational semantics. Your pure function is denotational semantics. Rust&amp;rsquo;s borrow checker is axiomatic semantics. Three formal frameworks, three ways to assign meaning to code, and you have been using all of them without knowing it.</description>
      
    </item>
    
    <item>
      <title>Syntax and Semantics 1: Your code has a grammar problem</title>
      <link>https://blog.rafaelfernandez.dev/posts/syntax-and-semantics-1-your-code-has-a-grammar-problem/</link>
      <pubDate>Fri, 30 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/syntax-and-semantics-1-your-code-has-a-grammar-problem/</guid>
      <description>Every enum you write is a formal grammar. Every sealed trait is a set of production rules. You have been doing formal methods all along; you just did not know the name. We trace the connection from Chomsky&amp;rsquo;s hierarchy to your domain types in Rust and Scala.</description>
      
    </item>
    
    <item>
      <title>Traits are grammars too: a small design lesson that kept nagging at me</title>
      <link>https://blog.rafaelfernandez.dev/posts/traits-are-grammars-too-from-contract-design-to-formal-syntax/</link>
      <pubDate>Wed, 28 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/traits-are-grammars-too-from-contract-design-to-formal-syntax/</guid>
      <description>While revisiting the TaskRepository trait from the Todo CLI series, I realized I was doing more than drawing an architectural boundary. I was also defining what could be said across that boundary, which is much closer to grammar than I first admitted.</description>
      
    </item>
    
    <item>
      <title>Todo CLI in Rust 5. Next step moving from CLI to a TUI with ratatui</title>
      <link>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-5-cli-to-tui-with-ratatui/</link>
      <pubDate>Mon, 26 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-5-cli-to-tui-with-ratatui/</guid>
      <description>We close the series by exploring what it means to migrate from CLI to TUI with ratatui: how the interaction model changes, what frictions Rust introduces with ownership and &amp;amp;mut in a persistent event loop, and why hexagonal architecture absorbs the change without surgery.</description>
      
    </item>
    
    <item>
      <title>Todo CLI in Rust 4. Building the CLI with clap: typed parsing, subcommands and dual output</title>
      <link>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-4-building-cli-with-clap/</link>
      <pubDate>Thu, 22 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-4-building-cli-with-clap/</guid>
      <description>We design the CLI layer with clap derive, typed argument parsing with ValueEnum and FromStr for UUIDs, subcommands as enums, global &amp;ndash;output flag for dual table/json output, and errors propagated through layers down to stderr.</description>
      
    </item>
    
    <item>
      <title>Todo CLI in Rust 3.1. Testing strategy and explicit technical debt</title>
      <link>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-3-1-testing-strategy-technical-debt/</link>
      <pubDate>Sun, 18 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-3-1-testing-strategy-technical-debt/</guid>
      <description>We analyze the repository&amp;rsquo;s testing strategy: behavior-driven tests for each adapter, isolation with tempdir, why there are no shared tests, and the technical debt we decided to document instead of hide.</description>
      
    </item>
    
    <item>
      <title>Todo CLI in Rust 3. JSON persistence, contract vs implementation</title>
      <link>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-3-json-persistence-contract-vs-implementation/</link>
      <pubDate>Thu, 15 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-3-json-persistence-contract-vs-implementation/</guid>
      <description>Third part of the series: we define the persistence contract with a generic trait, implement two adapters (in-memory and JSON to disk), and delve into the difference between interface and implementation as the axis of hexagonal architecture.</description>
      
    </item>
    
    <item>
      <title>Todo CLI in Rust 2. Immutable domain and typed errors by layer</title>
      <link>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-2-immutable-domain-typed-errors/</link>
      <pubDate>Mon, 12 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-2-immutable-domain-typed-errors/</guid>
      <description>In this part we model the heart of the project: the Task entity, its immutable transitions, and a taxonomy of errors by layers. Less magic, more explicit rules, and fewer surprise bugs.</description>
      
    </item>
    
    <item>
      <title>Todo CLI in Rust 1. Hexagonal architecture in a small project</title>
      <link>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-1-hexagonal-architecture/</link>
      <pubDate>Thu, 08 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-1-hexagonal-architecture/</guid>
      <description>We kick off the series by building a To-Do CLI in Rust from CodeCrafters&amp;rsquo; Project #1, but without turning it into a giant script. We cover architecture decisions, layer boundaries, and why a small project can also teach you serious design.</description>
      
    </item>
    
    <item>
      <title>Todo CLI in Rust 0. Series roadmap and repository map</title>
      <link>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-0-roadmap-repository-map/</link>
      <pubDate>Mon, 05 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-0-roadmap-repository-map/</guid>
      <description>Reading guide for the Todo CLI in Rust series, featuring the repository&amp;rsquo;s technical map, recommended reading order, and direct links to files and commits to follow each decision step by step.</description>
      
    </item>
    
    <item>
      <title>Setting Sail. A clean setup using Docker, Jupyter &amp; RustRover</title>
      <link>https://blog.rafaelfernandez.dev/posts/setting-sail-clean-setup-docker-jupyter-rustrover/</link>
      <pubDate>Sun, 20 Jul 2025 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/setting-sail-clean-setup-docker-jupyter-rustrover/</guid>
      <description>A practical guide to setting up a clean and reproducible environment with Docker, Jupyter, and RustRover to work with Sail, whether as a user or contributor. From launching services with docker-compose to debugging locally without installing any dependencies on your machine.</description>
      
    </item>
    
    <item>
      <title>Sail. Sailing Through Giants and Sparks</title>
      <link>https://blog.rafaelfernandez.dev/posts/sail-sailing-through-giants-and-sparks/</link>
      <pubDate>Wed, 16 Jul 2025 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/sail-sailing-through-giants-and-sparks/</guid>
      <description>In this article, I share my critical view on the current state of data engineering, dominated by heavyweight platforms like Spark and Databricks, and introduce Sail, an open-source engine built on top of Apache Arrow and DataFusion, written in Rust, that offers a new path: lightweight, efficient, and powerful.</description>
      
    </item>
    
    <item>
      <title>First Steps in Rust 🦀</title>
      <link>https://blog.rafaelfernandez.dev/posts/first-steps-in-rust/</link>
      <pubDate>Thu, 13 Feb 2025 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/first-steps-in-rust/</guid>
      <description>My first impressions of Rust from a functional programming background (Scala and Haskell). A mix of excitement, frustration, and a paradigm shift in thinking.</description>
      
    </item>
    
  </channel>
</rss>
