Skip to the content Skip to the Navigation

Red And Green

  • Python Code
  • Rust Programming
  • Bitcoin Programming
  • Contact

Rust Programming

  1. HOME
  2. Rust Programming
type-safe dynamic dispatch
January 2, 2026 / Last updated : January 3, 2026 admin Rust Programming

Type-safe dynamic dispatch

If you’ve ever looked at Rust MCP server code and seen ToolRouter<Self>, you might have been like “wtf, how can a struct contain itself? Isn’t that circular?” Let’s break down this elegant pattern that’s actually simpler than it looks. This does involve function pointers, which leads on to “why do we even want to use […]

MCP
January 2, 2026 / Last updated : January 2, 2026 admin AI ML

Building Your First MCP Server in Rust: A Calculator Service

What You’ll Learn By the end of this tutorial, you’ll understand how to build a Model Context Protocol (MCP) server in Rust that exposes tools AI assistants can use. We’ll build a simple calculator service with four operations. Prerequisites What is MCP? The Model Context Protocol (MCP) is a standard that allows AI assistants to […]

zst
December 31, 2025 / Last updated : December 31, 2025 admin Rust Programming

Zero-Sized Types (ZSTs)

Zero-Sized Types in Rust, Explained Through the Facade Pattern One of Rust’s most surprising features is the Zero-Sized Type (ZST): a type that occupies no memory at runtime, yet still behaves like a real value. This seems paradoxical at first—how can something that takes no space still exist? The answer lies in understanding that in […]

December 30, 2025 / Last updated : December 30, 2025 admin Rust Programming

Rust Wrappers and Destructuring

This article explains why and how to use wrappers (like Parameters<T>) in Rust, and why destructuring is so powerful when working with them. Example Setup Here: Why Use Destructuring? 1️⃣ Easy Access to Inner Value Without destructuring, you’d need .0: Destructuring gives a named variable immediately: 2️⃣ Works Generically for Any T Your wrapper can […]

When deserializing JSON into Rust structs, you often want optional fields with sensible defaults.
December 24, 2025 / Last updated : December 24, 2025 admin Rust Programming

Serde Default Values: Why Functions Instead of Constants?

If you’ve worked with Serde deserialization in Rust, you’ve probably seen code like this: You might be wondering: Why use a function? Why not just a constant? Well I did anway! This tutorial explains the reasoning behind this pattern and when to use it. The Problem: Missing Fields When deserializing JSON into Rust structs, you […]

WEWAI
December 14, 2025 / Last updated : December 14, 2025 admin AI ML

WEWAI – ‘Works Even Without AI’

Regardless of whether AI is a bubble or not, it might be wise to build systems that are not dependent on AI for them to be able to function. My jobstr.work site is one such concept. Sure AI can query the relays and answer questions about the jobs listed, but equally you can use the […]

jobstr.work
December 11, 2025 / Last updated : December 13, 2025 admin AI ML

AI job search – Disrupting the Recruitment Status Quo: How jobstr.work and LLMs are Building the Future of Decentralised Job Searches

The traditional job search process “sucks” – it is characterised by closed platforms which creates a “recruitment shїtshow”. Don’t just take my words for that, try Indeed or Reed or LinkedIn! Same job listed multiple times… Remote, but different “location” jobstr.work is a real solution, working via a decentralised platform for listing jobs that combines […]

November 25, 2025 / Last updated : November 25, 2025 admin Rust Programming

Rust Polymorphism – Study Notes

In Rust, there’s no inheritance, no class hierarchies, and no hidden virtual tables — yet you can still write code that acts like classic polymorphism. How? By combining enums, structs, and traits, Rust lets different types share behavior while keeping everything explicit, safe, and lightning-fast. one interface, many implementations This approach gives you the flexibility […]

Facade
November 13, 2025 / Last updated : November 14, 2025 admin Rust Programming

The Facade pattern

“I have many subsystems, but I want one easy function that hides how messy they are.” The Facade pattern is a classic design pattern used to provide a simple, unified API on top of one or more complex subsystems. In Rust, where types, modules, and ownership models naturally encourage small and well-defined components, it’s common […]

Evaluate - LLM evals framework
November 6, 2025 / Last updated : November 6, 2025 admin AI ML

Evaluate – LLM evals framework

Note, this article is written by me, the human who wrote the code! If you use LLMs you will need to check their output, else hallucinations, wrong answers, and unhappy customers. Note, this code is all open source, aka “Free” I built “evaluate” as the server, which does the calls to the LLMs, and you […]

Posts pagination

  • «
  • Page 1
  • Page 2
  • Page 3
  • …
  • Page 17
  • »

Recent Posts

qdrant-rust

RAG with Qdrant and Rust 🦀(&FastEmbed)

January 21, 2026
ok-or

Memorising Rust Patterns

January 20, 2026
chunks - Qdrant

Qdrant + FastEmbed with Rust #2

January 18, 2026
fastembed

Qdrant + FastEmbed with Rust #1

January 16, 2026
"Mismatched Types" in Rust

“Mismatched Types” in Rust

January 12, 2026

A Didactic dyn Trait Example

January 11, 2026
closures

Returning Closures in Rust: The impl Keyword Explained

January 10, 2026

The Hybrid Trait Pattern in Rust: Fast Internals, Stable Architecture

January 8, 2026
handlers

Handler Pattern in Rust: Closures Inside Process Functions

January 7, 2026
swap logic

Swap Logic: Making One Function Do Many Things in Rust

January 6, 2026

Category

  • AI ML
  • automation
  • Bitcoin Programming
  • c
  • ebay api
  • email
  • JavaScript
  • LangChain
  • MySQL
  • Pandas
  • postgres
  • Python Code
  • Raspberry Pi
  • requests
  • Rust Programming
  • Scrapy
  • Selenium
  • Smart Contracts
  • Stellar
  • SurrealDB
  • Uncategorized
  • web scraping

Archive

  • January 2026
  • December 2025
  • November 2025
  • September 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • November 2022
  • September 2022
  • November 2021
  • September 2021
  • August 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • July 2020
  • June 2020
  • April 2020
  • March 2020

Actix-web AI Ansible API async Automation axum BDK bitcoin Bitcoin Core blockchain Closure closures Design Patterns dictionaries GitHub huggingface iced impl jobstr langchain LLM MCP ModelContextProtocol mutable Networks Podman python Qdrant Rust Programming scrapy Smart Contracts Sphinx Stellar struct SurrealDB unpacking lists Upsert VectorDatabase Vectors WASM webscraping web scraping Word DOCX xpath

  • email
  • github
  • YouTube
This site is hosted with https://webdock.io/en Fast Cloud VPS Hosting Flat fee all-inclusive VPS with a Free Control Panel

Copyright © Red And Green All Rights Reserved.

Powered by WordPress & Lightning Theme by Vektor,Inc. technology.

MENU
  • Python Code
  • Rust Programming
  • Bitcoin Programming
  • Contact
Translate »