#rust

Tag's specific feed:
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...
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...
Back to all tags