kiutils-rs 0.1.1

Pure-Rust KiCad API for seamless, lossless S-expression document round-trips
Documentation
  • Coverage
  • 100%
    1 out of 1 items documented1 out of 1 items with examples
  • Size
  • Source code size: 13.09 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 9.45 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 29s Average build duration of successful builds.
  • all releases: 29s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Milind220/kiutils-rs
    4 2 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Milind220

kiutils-rs

Pure-Rust, lossless KiCad S-expression document API for agent workflows. Designed for parse -> typed edit -> write with minimal diff noise and explicit forward-compat surfaces.

Why this crate (for AI agents and automation)

Capability kiutils-rs Python kiutils KicadModTree KiCad IPC Rust API (kicad-api-rs-official)
File round-trip target First-class (WriteMode::Lossless) SCM-friendly goal, with known round-trip caveats in docs Generator-centric (creates footprints; not general file parser API) Runtime IPC API (different problem)
Unknown/future syntax Exposed as typed unknown carriers (UnknownNode, UnknownField) Known issues document format/ordering caveats in some cases Focused on scripted footprint construction N/A for S-expression file editing
Architecture for tooling 3 layers (kiutils-sexpr -> kiutils-kicad -> kiutils-rs) Single Python package/dataclass stack Tree-based node generator framework IPC client binding
Public tests/docs signal Integration tests assert byte-equal lossless writes across formats Project tests exist; changelog tracks format fixes over time README/docs emphasize footprint generation workflows README states docs are not yet available

Source evidence:

V1 API scope

  • .kicad_pcb
  • .kicad_mod
  • fp-lib-table
  • sym-lib-table
  • .kicad_dru
  • .kicad_pro

Compatibility target:

  • Primary: KiCad v10
  • Secondary: KiCad v9

Quickstart

use kiutils_rs::{PcbFile, WriteMode};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut doc = PcbFile::read("input.kicad_pcb")?;
    doc.set_generator("kiutils-rs-agent")
        .set_generator_version("0.1.0")
        .upsert_property("Owner", "EDA-Agent");
    doc.write_mode("output.kicad_pcb", WriteMode::Lossless)?;
    Ok(())
}

Crate package name: kiutils-rs Rust import path: kiutils_rs