irql 0.1.0

Compile-time IRQL safety for Windows kernel drivers
Documentation

Compile-time IRQL (Interrupt Request Level) safety for Windows kernel drivers.

This crate provides compile-time verification of IRQL constraints using Rust's type system. IRQL violations are caught by the compiler before code execution.

Example

use irql::{requires_irql, root_irql, Dispatch, Passive};

#[requires_irql(Dispatch)]
fn process_interrupt() {
    // Requires Dispatch IRQL or higher
}

#[requires_irql(Passive)]
fn driver_routine() {
    call_irql!(process_interrupt());
}

#[root_irql(Passive)]
fn main() {
    call_irql!(driver_routine());
}

Core Rule

IRQL can only stay the same or be raised, never lowered. This is enforced at compile time through the type system.

See the README for detailed documentation.