The two most important days in your life are the day you are born... and the day you find out why.
— Mark Twain
Introduction to Wyzer
Wyzer is a statically typed systems programming language designed to unify the solutions to memory safety, interrupt safety, and distributed systems architecture under a single, cohesive ownership model.
It aims to provide the raw performance and low-level control of C, alongside the strict, provable safety guarantees of Rust. It achieves this without the steep learning curve of a traditional borrow checker or the unpredictable latency of a garbage collector.
Core Concepts
Wyzer is built around three foundational pillars:
Memory management is handled via highly optimized, compile-time reference counting.
By statically proving uniqueness and applying in-place mutations, Wyzer allows developers to write ergonomic, functional-style code that compiles down to highly efficient, allocation-free operations in tight loops.
Distributed system protocols are elevated to the type system.
Using Role Types, developers define network communications globally. The compiler then mathematically guarantees that there are no deadlocks, race conditions, or protocol mismatches across the network.
For embedded systems, Wyzer leverages its ownership semantics to guarantee safety.
Hardware interrupt handlers never preempt or corrupt state that is actively being modified by the main execution thread.
Who is Wyzer For?
Wyzer is designed for a broad spectrum of developers and organizations.
It is built for those writing operating systems, embedded firmware, or high-performance game engines who cannot tolerate garbage collection pauses but want memory safety guarantees.
It is also highly useful for organizations building complex, distributed microservices. Wyzer’s native choreography ensures that breaking changes in network protocols are caught at compile-time rather than during production outages.
Finally, the language is designed to be approachable. The elimination of explicit lifetime annotations and complex borrow-checking rules makes it an excellent first systems language for individuals transitioning from higher-level languages like Python or JavaScript.
Table of Contents
This book will guide you through learning Wyzer from the ground up:
- Basics: Variables, primitive types, control flow, and function definitions.
- Data Structures: Defining and utilizing Structs and Enums.
- Memory: A deep dive into Perceus reference counting, linear resources, and explicit ownership transfers.
- Project Structure: Organizing code with modules and visibility rules.
- Advanced: Leveraging Role Types for choreography, FFI for interfacing with C, and compile-time execution.