Contents

Untitled

Introduction

Greetings, fearless reader! Brace yourself for an exhilarating journey into the realm of driver development, empowered by the formidable Rust programming language!

As you embark on this thrilling adventure, anticipate a forthcoming expedition where we shall craft a potent driver capable of rendering processes unseen. Skipping this article would be a missed opportunity, as it holds the answers to the questions posed here.

If Rust is uncharted territory for you, worry not, for I shall serve as your guide, even venturing into the familiar realms of C++. All that's required is a bit of free time, proficiency in C++ programming, and a basic understanding of kernel-level sorcery.

But why Rust, you may wonder? The answer is evident: Rust fuses style, innovation, and unwavering might. It delivers performance akin to C++, fortified by impervious safety measures. Tech titans like Microsoft, Google, Mozilla, and the Linux Foundation have recognized its potential. Even Linus Torvalds, the advocate of "C forever," officially endorsed Rust's integration into the Linux kernel [1]. Microsoft is rewriting the core of Windows with Rust [2], yet they have yet to provide developers the privilege of wielding Rust within the Windows kernel. No matter; we shall seize the reins ourselves, surpassing their efforts.

In 2015, the first version of the language was released, and since then it has been updated every 6 weeks. It has 3 releases channels: stable, beta, and nightly. (By the way, we will need the nightly toolchain to develop drivers). In addition, Rust has editions (something like standards in C++), namely Rust 2015, Rust 2018, and now at the time of writing - Rust 2021. That's why Rust even has the cargo fix --edition command, which helps to partially fix incompatible places for the new standard.

Dependencies

So set the stage for our quest, we must gather the necessary tools and prepare our environment for the challenges that lie ahead. Here's a checklist of what we need:

Required Tools

  1. Install Rust: First and foremost, let's embrace the power of Rust by installing it from here.
  2. Install SDK: We need the Windows SDK for our expedition. You can acquire it here.
  3. Install WDK: The Windows Driver Kit (WDK) is our trusted companion for driver development. You can obtain it here.