A Newbie's First Contribution to (Rust for) Linux

I recently got into Linux kernel development by rewriting a driver from C to Rust. To support this driver, I needed to add Rust abstractions for kernel APIs written in C. Some of this work is making its way upstream and now seems like a good time to write about that experience.

Because I was a noob when I started (and mostly still am), this post should be pretty approachable for people who don't have any kernel development experience.

Spoiler alert: Writing the code was the easy part!

Read more  ↩︎

Beautiful Terminal Output in Markdown

Have you ever wanted to show off your beautiful terminal output in a markdown file? Simply copying the text into a raw block will result in bland, colorless text. Including a screenshot on the other hand is bloated and hard to maintain, in case the content changes. I recently found a nice solution, so let me tell you about it!

Here's a sneak-peak of the end result:

.rw-r--r--@ 3 remo 28 Feb 00:29 .gitignore
drwxr-xr-x@ - remo  8 Mar 22:51 repo
drwxr-xr-x@ - remo  8 Mar 23:12 working_copy

I'll use the above output of eza for demonstration purposes as we progress. Below you can see the output of jj in my current repo.

@  kqlsx remo (no description set)uxkrx remo improve recipe for new blog posts
○  qwmqx remo main* add color theme for aha-generated blocks
│   qwmqx hidden remo main@origin add color theme for aha-generated blocks
├─╯
  lumlx remo add just recipe for new blog posts
│
~

You'll notice that this is just HTML, you can even copy the text. The colors are easily stylable with CSS, which we'll get into later.

Read more  ↩︎