RSSAmplifier

Blog

Cetra's Thoughts

Blogs and Investigations mostly about Rust

cetra3.github.ioRSS feed ↗18 posts

Latest posts

The State of Allocators in 2026

The Allocators RFC is about to reach a decade milestone of it being accepted , but with no stabilisation. With the 2025 State of Rust Survey indicating ~12% would be unblocked by stabilisation and another ~27% would have improved code, it still seems to be something that a significant portion of rust users want. I figured it was time to take a lay of the land and work out what the current state of…

Creating MCP Servers in Rust

MCP servers are useful tools that allow AI agents the ability to interact with applications in a prescribed fashion. I wanted to understand how they put together so I could work out where/how they are useful. One of the things I found when first investigating them, is that there aren't that many MCP servers that are written in rust, most are either NodeJS or Python. So this is my journey…

A tale of two lengths

They say there are 2 hard problems in computer science, and I've hit all 3 of them.... This is a blog post about a memory problem we were hitting in production with a service written in rust, and the tools used to resolve it. The Problem Object Storage, whether S3 or something else, does not have the best performance for latency in comparison to local disk. There can be a lot of overhead to…

Creating your own custom derive macro

One of the things I tackled early on with when creating DiveDB was trying to import a lot of metrics from dive logs. At regular intervals, normally every 10 seconds, a dive computer will record metrics about the dive, such as depth, tank pressure, water temperature etc... While this isn't a huge amount of entries, nearly every SQL framework I used for it was painfully slow at importing this…

Synchronizing state with Websockets and JSON Patch

At formlogic , we are using rust for a number of components within our tech stack, including: internal and external web applications, coordinating and logging machining workflows, parsing an industrial domain specific language ( G-Code ), and more. One of the challenges we faced early on was we had state that needed to be synchronized between rust applications, browsers and the database itself. We…

Publishing Rust types to a TypeScript frontend

When building in a strongly-typed language such as rust it's a shame to have to throw this strictness away, especially when dealing with the wild west of frontend stacks. The bigger the project is, the more you want to keep things cohesive. This cohesion evaporates quickly when you need to pass language barriers. While normal JavaScript does not have types, we can utilise TypeScript to share…

Implementing a Job queue with SQLx and Postgres

SQLx is a new async SQL Toolkit for rust that is closer to standard SQL than a more opinionated ORM like Diesel . I wanted to give it a bit of a test run and see how easy it would be to convert usage from tokio-postgres . So as the next saga in the jobq series ( part 1 , part 2 ), we will be converting jobq crate to use sqlx . You can find the SQLx branch here:…

Drawing SVG Graphs with Rust

I have just released the first version of lorikeet-dash and part of that exercise was to find out a way to draw SVG graphs using rust. I thought my findings & approach may be useful for others looking to do the same thing and so I have documented the design evolution in this blog. Here's what the end result looks like in the lorikeet-dash project: Defining the Graph First we want to define…

Implementing a Job queue with Tokio-Serde

In the last blog of this series, I implemented job queue with tmq . I noted back then that tmq is great if you need to interact with other languages, but may be a little overkill if you are just using rust. I wondered what it'd take to build the job queue with a smaller library footprint, using something like tokio-serde instead of tmq . It was successful, and this blog will step through some…

Lorikeet 0.11.0 - Upgrading to async

I have just spent some time doing an initial async version of lorikeet now that the async/await syntax is stable and the ecosystem has caught up. The major blocker was reqwest, as this is used extensively in the http test. This async version is available now as version 0.11.0 . You can also install the cli by running cargo install lorikeet . What is Lorikeet Lorikeet is a command line tool…

Implementing a Job queue with Tokio, PostgreSQL & ZeroMQ

One of the challenges I have had with on premise solutions is the lack of reliable environments and constrained resources. Not only are you limited in your ability to control things, you need to ensure that things continue on in the case of failure. I was tasked with rewriting the job processing pipeline for my company's product, SchoolBench , to ensure a greater level of robustness in the…

Handling Breaking API Changes

While upgrading dependencies (basically deleting Cargo.lock ) in a big rust project I hit an issue. A new commit in serde_json caused has upstream failure in another library, jmespath , and possibly more crates. Because these structs and enums visibility has changed, this could be interpreted as a breaking change, depending on what you consider public . While jmespath was doing the wrong thing…

Lessons learnt updating a library to std::future

With the new std::future way of doing things and tokio slowly reaching maturation, it's time to look at updating the libraries out there that are using the old ways . For one of my libraries, tmq , a Tokio ZeroMQ library, there is some awesome work already done to get this updated. But, I thought it pertinent to at least get my feet in the water to see how hard it would be, from a library…

My Wishes for Rust 2020

2019 was another huge year for rust, but instead of implementing the shiny new thing, it's been a focus on refining existing ideas. Having being using rust professionally for over 3 years, I feel I will very soon be regailing new rust developers of the times before NLL & async, where we had to play lexicon-fu to get things like caches to work in a reasonable fashion, or using super dooper…

Face Detection with Actix Web

Last article I wrote about how to use tensorflow with rust . This time we're going to take what we've built on, and serve it as an HTTP API call. As Actix Web is nearing its inevitable 1.0 release , I thought it would be a great time to build something with it. This article assumes you have some knowledge about Futures and how they work. I will do my best to explain in simpler terms, but…

Face Detection with Tensorflow Rust

One of the promises of machine learning is to be able to use it for object recognition in photos. This includes being able to pick out features such as animals, buildings and even faces. This article will step you through using some existing models to accomplish face detection using rust and tensorflow . For the impatient among you, you can find the source code here:…

TMQ 0.1.0 Release: ZeroMQ bindings for Tokio

TMQ is a rust library to use ZeroMQ within the Tokio ecosystem. ZeroMQ is a distributed messaging queue written in C supporting a number of different messaging patterns. While there are other options out there (including gRPC, etc..), I settled on ZeroMQ due to its cross-language support, great documentation and battle-tested nature. Version 0.1.0 is an alpha release which implements request ,…

My Wishes for Rust 2019

2018 was a massive year for rust, and it's great to reflect back on how far we've all come. My main wish for the new year is to put on the breaks a little bit, and finish off what has been started without taking on anything majorly new. There are a couple of areas that I feel need more attention than most (purely for selfish reasons of course!): Compiler Times, IDE Support and RLS I…

Cetra's Thoughts · RSS Amplifier