5 Creating Our Own Fibers In this chapter, we take a deep dive into a very popular way of handling concurrency. There is no better way of getting a fundamental understanding of the subject than doing it yourself. Fortunately, even though the topic is a little complex, we only need around 200 lines of code to get a fully working example in the end. What makes the topic complex is that it requires quite a bit of fundamental understanding of how CPUs, operating systems, and assembly work. This complexity is also what makes this topic so interesting. If you explore and work through this example in detail, you will be rewarded with an eye-opening understanding of topics you might only have heard about or only have a rudimentary understanding of. Y ou will also get the chance to get to know a few aspects of the Rust language that you haven't seen before, expanding your knowledge of both Rust and programming in general. We start off by introducing a little background knowledge that we need before we start writing code. Once we have that in place, we'll start with some small examples that will allow us to show and discuss the most technical and difficult parts of our example in detail so we can introduce the topics gradually. Lastly, we'll build on the knowledge we've gained and create our main example, which is a working example of fibers implemented in Rust. As a bonus, you'll get two expanded versions of the example in the repository to inspire you to go on and change, adapt, and build upon what we've created to make it your own. I'll list the main topics here so you can refer to them later on: How to use the repository alongside the book Background information An example we can build upon The stack Implementing our own fibers Final thoughts