Edge Programming with C/C++ and Rust
Welcome
Section titled “Welcome”Welcome to Edge Programming in C/C++ and Rust . This textbook explores the application of modern programming paradigms to edge computing, bridging the gap between high-level software engineering and low-level hardware interactions.
This book provides a comprehensive, hands-on guide to mastering these challenges, focusing on the most critical languages in the embedded space: C/C++ and Rust. Each chapter includes interactive knowledge tests, hands-on tutorials, and virtual labs to reinforce core concepts and ensure technical mastery.
What You Will Learn
Section titled “What You Will Learn”This textbook is designed to take you from foundational embedded concepts to advanced, memory-safe edge architectures. Key areas of focus include:
- The Foundations of C/C++ at the Edge: Understanding how traditional Object-Oriented Programming (OOP), the C subset of C++, and standard libraries are applied to resource-constrained environments.
- Modern Tooling: Utilising Git, GitLab, and automated workflows to bring modern software engineering practices to embedded development.
- The Transition to Rust: A deep dive into modernising edge development. You will learn how Rust’s ownership model, strict compiler, and zero-cost abstractions provide memory safety and concurrency without sacrificing C-level performance.
- Advanced Edge Capabilities: Extending beyond basic sensors into GUI programming, network programming, and robust concurrency models for edge nodes.
- Practical Embedded Rust: Applying Rust’s safety guarantees directly to hardware, specifically targeting the ESP32 platform for real-world embedded applications, including resource management and performance optimisation.

How to Use This Book
Section titled “How to Use This Book”Use the sidebar navigation to progress through the chapters sequentially, or jump directly to specific topics of interest. The material is structured to provide both theoretical grounding and practical, reproducible coding examples.
Book Chapters
Section titled “Book Chapters”- Chapter 1: Introduction
- Chapter 2: Edge Programming
- Chapter 3: The C of C++
- Chapter 4: GitLab
- Chapter 5: C++ with Classes
- 5.1 C++ with Classes
- 5.2 Inheritance
- 5.3 Casts and Functions
- 5.4 Overloading
- 5.5 Separate Compilation
- 5.6 Dynamic Compilation & Multiple Inheritance
- 5.7 Friends, Static & Non-Virtual
- ⚙️Tutorial: C++ with Classes
- ⚙️Tutorial: C++ with Classes 2
- 🥽Virtual Lab: Objects on the Stack
- 🥽Virtual Lab: Class Objects on the Heap
- 📝 Knowledge Test
- Chapter 6: C++ Standard Libraries
- Chapter 7: Introduction to Rust
- Chapter 8: More Rust Fundamentals
- Chapter 9: GUI Programming
- Chapter 10: Concurrency
- Chapter 11: Network Programming
- Chapter 12: Rust on the ESP32
© 2026 Derek Molloy, Dublin City University. All rights reserved.