Blog
Rust is rolling off the Volvo assembly line
Rust interop in practice: speaking Python and Javascript
Mix in Rust with C++
Mix in Rust with Python: PyO3
Current zlib-rs performance
zlib-rs
project implements a drop-in replacement for libz.so
, a dynamic library that is widely used to perform gzip (de)compression.Mix in C with Rust: A taste of C in your Rust
Statime vs Linux PTP: Comparison of precision
As part of the development of our Precision Time Protocol implementation, Statime, we want to know how it performs compared to other implementations of PTP.
To figure this out, last April we visited VSL, the Dutch National Metrology Institute. There, we performed comparitive precision tests between Statime and Linux PTP.
Will Rust be alive in 10 years?
Want more Rust? Break the cycle!
Tock binary size
Mix in Rust with C
Mix in Rust
A safe Internet requires secure time
Hacking time: how you can control anyone's clock
Save the planet, code in Rust
Sudo-rs dependencies: when less is better
Teach-rs: Rust 101 evolved
Rust in Production at Tweede golf (podcast)
Sequential-storage: efficiently store data in flash
While using a full-blown filesystem for storing your data in non-volatile memory is common practice, those filesystems are often too big, not to mention annoying to use, for the things I want to do. My solution?
I've been hard at work creating the sequential-storage crate. In this blog post I'd like to go over what it is, why I created it and what it does.
Building an Async Runtime with mio
Rust for hardware vendors
At Tweede golf we're big fans of creating applications on embedded devices with Rust and we've written a lot about it.
But if you're a hardware vendor (be it chips or full devices/systems), should you give your users Rust support in addition to your C support?
In this blog I argue that the answer to the question is yes.
Introducing ntpd-rs metrics
An unusual tool for unused code
ntpd-rs: Folkert explains the project (video)
Statime continues: Boundary Clocks and Master Ports
sudo-rs' first security audit
Why we sponsor memory safety event Tectonics
Dealing with Dependencies in Rust
At Tweede golf we are convinced that if software is written in Rust, it will be more robust (compared to legacy languages such as C, C++ or Java), and more efficient (compared to code written in PHP or Python and again, Java).
In order to get more robust software out there, we have to get Rust code running on computers of people who are not themselves Rust developers.
First stable release of ntpd-rs
Our pixel-rendered planner with a Rust backend
Are we embedded yet?
Rust 101's first run at STU Bratislava
Sovereign Tech Fund invests in Pendulum
Our talk at CYSAT 2023
ntpd-rs: NTP for the modern era (video)
This article is an adaptation of the original, published by Prossimo.
We're happy to announce that the Internet Security Research Group has officially made us the maintainers of the open-source memory-safe implementation of NTP, ntpd-rs
. As such, we are now also looking for early adopters.
The implementation includes a server and client, as well as full support for Network Time Security (NTS), which brings encryption and greater integrity to time synchronization. Timing is precise and stable, as reflected by excellent performance in the NTP pool.
Rust at Royal Netherlands Aerospace Centre
While working on the Roc compiler, we regularly dive deep on computer science topics. A recurring theme is speed, both the runtime performance of the code that we generate, as well as the performance of our compiler itself.
One extremely useful technique that we have been playing with is data-oriented design: the idea that the actual data you have should guide how code is structured.
Introducing MailCrab!
TrustZone, trials and tribulations
TrustZone-m is a technology by ARM that allows you to create a Trusted Execution Environment (TEE) in your software. You can use it for example to keep your encryption keys secret or to separate a big vulnerable networking stack from your own code.
Over the last three months I've been working on a set of crates (Rust libraries) with the aim of making the usage of TrustZone-m a lot easier.
Crash! And now what?
Imagine you've just deployed an embedded device in the world and of course, you have tested it thoroughly and it works. To monitor the device, you've set up some logging.
Low power & low frustration (video)
Rust 101: an open-source university course
Our year in Rust
Our year in Rust
A company-changing year in a short story,
begins with a thank you, for this new-found glory.
We want to be clear in this prelude,
It is to Rust we owe our gratitude.
Meetup: Rust in open-source critical infrastructure
Sorting with SIMD
Google recently published a blog article and paper introducing their SIMD-accelerated sorting algorithm.
SIMD stands for single instruction, multiple data. A single instruction is used to apply the same operation to multiple pieces of data. The prototypical example is addition, where one instruction can do e.g. 4 32-bit additions. A single SIMD addition should be roughly 4 times faster than performing 4 individual additions.
This kind of instruction-level parallelism has many applications in areas with a lot of number crunching, e.g. machine learning, physics simulations, and game engines. But how can this be used for sorting? Sorting does not involve arithmetic, and the whole idea of sorting is that each element moves to its unique correct place in the output. In other words, we don't want to perform the same work for each element, so at first sight it's hard to see where SIMD can help.
To understand the basic concepts, I played around with the ideas from the paper Fast Quicksort Implementation Using AVX Instructions by Shay Gueron and Vlad Krasnov. They provide an implementation in (surprisingly readable) assembly on their github. Let's see how we can make SIMD sort.
Pioneering Rust in High Tech
Pioneering Rust in the high-tech industry!
Together with High Tech Software Cluster, we organized an event to showcase Rust’s strengths and safety features to tech companies in the Brainport region in the Netherlands.
Implementing the Network Time Protocol (NTP) in Rust
For the last couple of months we at Tweede golf have been working on implementing a Network Time Protocol (NTP) client and server in Rust.
The project is a Prossimo initiative and is supported by their sponsors, Cisco and AWS. Our first short-term goal is to deploy our implementation at Let's Encrypt. The long-term goal is to develop an alternative fully-featured NTP implementation that can be widely used.
Using C libraries in your Rust project
Announcing: Statime, a Rust PTP implementation
Introducing Rust in security research
We asked 5 people why they like Embedded Rust
LoRaWAN Applications in Rust
Last September, at the start of my internship at Tweede Golf, my tutors gave me a LoRa-E5 Dev Board. My task was to do something that would make it easier to write applications for this device in Rust. Here's what I did.
Async Rust vs RTOS showdown!
It's time for another technical blog post about async Rust on embedded. This time we're going to pitch Embassy/Rust against FreeRTOS/C on an STM32F446 microcontroller.
My first weeks at Tweede golf
Async on Embedded: Present & Future
In our last post, we've seen that async
can help reduce power consumption in embedded programs. The async machinery is much more fine-grained at switching to a different task than we reasonably could be. Embassy schedules the work intelligently, which means the work is completed faster and we race to sleep. Our application actually gets more readable because we programmers mostly don't need to worry about breaking up our functions into tasks and switching between them. Any await
is a possible switching point.
Now, we want to actually start using async in our programs. Sadly there are currently some limitations. In this post, we'll look at the current workarounds, the tradeoffs, and how the limitations might be partially resolved in the near future.
Measuring power consumption: sync vs. async
RP1: an experimental Diesel-based CRUD for Rocket
Cryptify: your identity ís the key
David's first weeks at Tweede golf
Long range networking with LoRa: an overview
Build your own async primitive
Concurrency isn't easy and implementing its primitives is even harder. I found myself in need of some no-std, no-alloc Rust async concurrency primitives and decided to write some. I kept the scope small so even you and I can understand it. Even so, it still involved futures, wakers, atomics, drop and unsafe. I'll introduce each of those to you while building a simple primitive. At the end, you will be able to implement your own primitives!
Potential improvements for Rust embedded abstractions
Recently, we worked on an embedded (STM32) project in Rust
and we got some hands-on experience with
the abstractions commonly used for that.
There's embedded-hal
, which offers abstractions related to
timing, GPIO pins and
common communication peripherals like SPI and USART.
There's also multiple stm32xxx-hal
crates
which offer abstractions over
most of the peripherals of different STM32 CPU families.
Although many of them were nice to use,
we found some parts to be lacking
and we'd like to propose some potential improvements
to embedded-hal
and its implementing crates.
Rust will be the Constant in your Life (5/5)
If one person at Tweede golf is a Rustacean, it’s definitely Wouter. Whether it’s about web, embedded, or even games: he tried it. And probably not just tried it, but prototyped, created, documented, presented, and nailed it. Just take a look at Wouter’s GitHub page[1]. He’s also engaged in the Rust community as an organizer of RustFest, member of the Dutch Rust foundation, and as maintainer of several open-source crates. He believes that Rust is well on its way to perfection.
Functional Rust? (4/5)
A racing bike with training wheels (3/5)
Rust wide web (2/5)
Instant data retrieval from large point clouds
The Dutch government offers the AHN [1] as a way to get information about the height of any specific place in the country. They offer this data by using a point cloud. That is, a large set of points with some additional meta information. With the current version of the AHN the resolution of the dataset is about eight points per square meter. This results in about 2.5TB of compressed data for the relatively small area of the Netherlands. While this is something that is not impossible to store locally, it does offer some challenges.
Rust, my first embedded language (1/5)
Why is Rust loved? 5 developers, 5 stories
The promise of Rust async-await for embedded
Why Rust is a great fit for embedded software
Making embedded robust with Rust
Embedded software has an issue that most software doesn't: It can be very hard to get it patched. Sometimes a device hangs 5 meters high on a street light in the middle of a highway in another country. Sometimes a device is attached to a customer's heart. Sometimes strict validation requirements make changes to the software very expensive. In each case it is important to build software that doesn't fail, even in unpredictable conditions.
Implementing Lempel-Ziv Jaccard Distance (LZJD) in Rust
One of our clients helps companies in becoming GDPR-compliant. A goal is to recognize sensitive pieces of user data in a big pile of registrations, receipts, emails, and transcripts, and mark them to be checked out later. As more and more data is collected by companies, finding and eliminating sensitive data becomes harder and harder, to the point where it is no longer possible for mere human employees to keep up without assistance.
Meetup report: Rust for the (Inter)Net
How productive is Rust?
We often get the question how productive working with Rust is. "We know that it is awesome, but isn't it hard to learn? Don’t you struggle with the borrow checker?". Well, we put it to the test in Google's Hash Code 2019 programming competition.