Skip to content

RustLayout

Clean-room, 100% pure-Rust, GPU-accelerated GDSII / .gds.gz / SEMI P39 OASIS IC layout viewer, zero-copy .rlay spatial cache, and real-time GPU Visual XOR Diff toolkit.

All RustEDA modules · Benchmarks · Architecture · Repository

RustLayout desktop workbench displaying a real IHP SG13G2 128-Kbit SRAM + BIST macro at 532 FPS

Real silicon IHP SG13G2 128-Kbit SRAM + BIST macro (RM_IHPSG13_1P_2048x64_c2_bm_bist.gds) rendered in RustLayout on Apple Metal — live 532 FPS (1.88 ms/frame), 32×32 GPU stipple fills, expanded cell hierarchy, shape inspector, minimap, magnetic ruler, and desktop menu bar.

Key Capabilities

  • 120–400+ FPS Retina GPU rendering: Vertex-pulled 16 B/rect storage buffers, Hilbert 4-wide BvhNode4 HLOD, native GPU SREF/AREF instancing, < 1.7 ms per-layer cached visibility/color toggles, GPU pan tile-shift, and hard-capped LRU VRAM streaming (≤ 512 MiB even on 5 GiB layouts).
  • Native multi-touch trackpad & desktop CAD UX: Cursor-anchored macOS trackpad pinch-to-zoom, smooth scroll/pan damping, crisp HiDPI rendering, 0% idle CPU/GPU (ControlFlow::Wait), full desktop menu bar (File, Edit, View, Layers, Tools, Diff, Window, Help) with native OS file/export dialogs, recent files, magnetic corner/midpoint/edge-snapping rulers, and KLayout hotkeys.
  • 5–13× faster multi-format ingestion & 0.048 ms zero-copy reopen: Parallel pread GDSII (0.49×–0.61× RAM), pure-Rust .gds.gz, clean-room SEMI P39 OASIS (.oas) with parallel CBLOCK inflation, and 64-byte-aligned .rlay mmap spatial caches.
  • Real-time 66.9 FPS GPU Visual XOR Diff & cross-probing: Live dual-layout A \ B Copper / B \ A Mint diffing with 1-DBU perturbation jump-lists, KLayout .lyp XML import/export, open-PDK presets (SKY130A, IHP SG13G2, GF180MCU D), and --watch-focus <json> cross-probing from RustEDA, RustROAD, and RustSTA.
  • 100% pure Rust, zero C/C++ FFI: Workspace-wide #![deny(unsafe_code)], explicit hostile-input resource caps, verified 100% geometric parity vs. KLayout 0.30.13, and zero panics across 800+ mutated GDS/OASIS fuzz cases.

RustLayout pipeline: GDSII, gzipped GDSII, SEMI P39 OASIS and zero-copy RLAY inputs indexed into Hilbert 4-wide BVH trees and rendered by wgpu with HLOD, mask caching, and real-time GPU XOR diff

Verified Performance Highlights

Paired quiet-host runs on Apple M6 (12 cores, 32 GiB RAM, Metal) recorded in receipt.json:

Benchmark Size RustLayout KLayout 0.30.13 Delta
sky130_fd_sc_hd.gds cold parse & RSS 4.0 MiB 2.23 ms / 24.0 MiB 7.26 ms / 348.3 MiB 3.26× faster, 14.5× less RAM
curvilinear_500mb.gds cold parse 512 MiB 148.83 ms 1,888.86 ms 12.69× faster
hier_sram_1gb.gds cold parse & RSS 1.0 GiB 143.26 ms / 604.5 MiB 1,137.39 ms / 933.8 MiB 7.94× faster, 35% less RAM
flat_fill_2gb.gds cold parse & RSS 2.0 GiB 276.25 ms / 1,247.9 MiB 2,438.02 ms / 1,558.5 MiB 8.83× faster, 20% less RAM
mega_5gb.gds cold parse & RSS 5.0 GiB 1,414.19 ms / 2,497.0 MiB 6,523.98 ms / 3,580.9 MiB 4.61× faster, 30% less RAM
flat_fill_2gb warm .rlay reopen 555 MiB 0.048 ms — Zero-copy mmap reopen
flat_fill_2gb headless 4K PNG 2.0 GiB 0.814 s cold / 0.073 s warm 7.355 s 9.03× cold / 101.2× warm
hier_sram_1gb Retina 3K flythrough 1.0 GiB 2.50 ms P50 (400 FPS) — 1.64 ms layer toggle · 73 MiB VRAM
soc_100mb Retina GPU XOR Diff 100 MiB 14.95 ms P50 (66.9 FPS) — 1-DBU exact perturbation detection

Documentation

  • Architecture — Crate graph, two-phase parallel GDS/OASIS ingestion, Hilbert 4-wide BVH + HLOD, 16-bit integer-split WGSL rendering, and desktop workbench design.
  • Benchmark Report — Full paired parse, indexing, 4K headless PNG, 600–1,000 frame Retina flythrough, VRAM cap, and parity receipts.

Known Limits

  • RustLayout is currently a read-only layout viewer, renderer, cache builder, and GPU XOR diff engine; interactive polygon editing, GDSII/OASIS writing, and DRC/LVS rule-deck execution remain outside current scope.
  • Dense all-curvilinear workloads (curvilinear_500mb) warm up chunked polygon triangulation at 16.22 ms P50 (62 FPS, 892 MiB peak VRAM) versus 2.50–2.82 ms P50 on rectangular SRAM/metal layouts.
  • Published timings reflect a single Apple M6 (Metal) quiet host; Vulkan/DX12 throughput depends on platform GPU drivers.