All blog posts

Atom/RSS

You can browse by tags which have their own Atom/RSS feeds.

Quadlet: Running Podman containers under systemd

Tags: #container,#linux,#selfhosting

Reading time: ~12min


Quadlet lets you run your Podman containers as systemd services. This is especially useful for running containers in the background and automatically starting them after a server reboot.

Running Podman containers under systemd isn't new. Indeed, this was supported by Podman for a long time with the command podman generate systemd. But this command now shows a deprecation warning to migrate to Quadlet.

For some months, I was too lazy to do that migration on my home server. Why even touch a working system? But now that I finally found time for it, I really appreciate Quadlet! I think that Podman finally has a Docker Compose alternative which is even more flexible and powerful!

In this blog post, I will explain how to use Quadlet with rootless Podman and migrate from the old method with podman generate systemd.

Read more...
Killing in the name of Privacy

Tags: #web,#linux,#foss,#selfhosting

Reading time: ~11min


An AD blocker killed a project that I was working on for 4 months. It was one commit adding 2 lines that killed 419 commits with more than 2000 total lines of code.

The script that powers my project was placed on the filter list "EasyPrivacy". But is the project that I designed with privacy as the first feature trying to invade your privacy?

This brings up the topic about telemetry in FOSS projects. Is telemetry inherently bad? Is there a way to collect telemetry without comprimising privacy?

Read more...
Faster Rust Serialization

Tags: #rust

Reading time: ~13min


The tech industry happily wastes a lot of resources on serializing and deserializing JSON with its inefficient plain text format. But sadly, JSON is currently (still) the standard for sending data over the internet.

Nevertheless, we can at least try to make serialization and deserialization as efficient as possible!

In this blog post, we will see how you can improve the serialization performance of serde in Rust. We will take a look at a simple example and improve its performance by up to 2.25x 🚀

Read more...
Teaching Rust in 5 days

Tags: #rust

Reading time: ~14min


I gave a 5-day Rust course at my university and want to share my experience teaching Rust.

In this blog post, I want to answer the following questions:

  • Can you learn Rust in 5 days?
  • What learning resources are currently available for teaching Rust?
  • What should you focus on when teaching Rust?
Read more...
Rust vs Julia in scientific computing

Tags: #rust,#julia

Reading time: ~32min


Although the scientific domain often requires the highest performance out of programming languages, people in this domain have often preferred less efficient dynamic languages like Python for flexibility and ease of use. At some point, a project grows out of that efficiency compromise and the software has to be rewritten in a statically-typed language like C/C++. This means that people in the scientific domain had to switch between two languages and often rewrite the logic that they already encoded in the first one. This is a problem which is referred to as the two-language problem. As an attempt to solve this problem, Julia was developed as a dynamic language that feels like Python but has performance comparable to C/C++.

Rust is a statically-typed language that indirectly addresses the problem by improving the experience with statically typed languages instead of accelerating the runtime of dynamic ones. Its strong type system and friendly compiler empower developers to write reliable and efficient software without the memory safety problems known from C/C++.

After using and even teaching both languages, I will compare them and discuss whether Julia solves the two-language problem and when you should use Rust instead.

Read more...
SQLx integration in Axum

Tags: #rust,#axum,#web,#database

Reading time: ~9min


SQLx is an awesome crate for interacting with databases in Rust with compile time checks. In this blog post, we will learn how to use it in an Axum backend to store and retrieve data from a database.

The example will be storing submitted contact forms from the previous post about Axum.

During the SQLx integration, we will learn about states and returning JSON in Axum.

Read more...
SQLx - Interacting with databases in Rust

Tags: #rust,#database

Reading time: ~16min


SQLx is an async Rust crate that let's us interact with a database with compile-time checked queries 🧰

This post will be a short introduction to SQLx with PostgreSQL, but SQLx also supports MySQL, SQLite, and MSSQL.

The example will be a todo list in a database. A classical programming example, I know 😅

We will also see if SQLx protects us against SQL injections 💉

Read more...
Containerized PostgreSQL with rootless Podman

Tags: #container,#linux,#database

Reading time: ~9min


This post is about running rootless Podman containers with PostgreSQL as a central example 📦️

The post serves as an optional preparation for the next post about interacting with databases with SQLx in Rust 🦀

Read more...
Getting started with Rust backends

Tags: #rust,#axum,#web

Reading time: ~9min


How hard can it be to write a web backend in Rust? We will try to answer this question through an example.

Read more...

Check out my list of similar blogs 🚀