DesignGuard
KiCad schematic and PCB validation library for Rust.
Catches common design mistakes before manufacturing:
- Missing decoupling capacitors
- Incorrect pull-up/pull-down resistors
- Trace width violations (IPC-2221)
- Component datasheet compliance
- Power integrity issues
- EMI/EMC concerns
Installation
Add to your Cargo.toml:
[]
= "0.1"
Quick Start
use *;
use Path;
Features
Schematic validation
- Decoupling capacitors: 100nF bypass caps near IC power pins
- I2C pull-ups: 2.2k–10k on SDA/SCL nets
- Crystal load caps: 10–33pF paired capacitors
- Power integrity: GND symbols and IC power connections
- ESD protection: TVS diodes on USB/Ethernet
- Datasheet checks: Built-in component library (STM32, ESP32, RP2040, etc.)
PCB validation
- Trace width: IPC-2221 current capacity
- EMI checks: Plane gaps, via placement, crosstalk
- Custom rules: JSON rule engine
Examples
See the examples/ directory:
simple_validation.rs– basic usagecustom_rules.rs– usingRulesEnginewith default rules
CLI and GUI
- CLI:
designguard-cli(same repo, workspace member) - GUI: DesignGuard desktop app
Documentation
- API docs (when published): docs.rs/designguard. If the crate was just published, docs.rs may take a few minutes to build; you can request a rebuild if needed.
- Build docs locally: From the repo root run
cargo doc --no-deps -p designguard --opento build and open the API docs (same as docs.rs).
License
MIT – see LICENSE in the repository root.