Clean-room, 100% pure-Rust, GPU-accelerated GDSII / OASIS IC layout viewer & visual XOR diff toolkit.
120–400+ FPS Retina GPU rendering · Native multi-touch trackpad pinch-zoom · 0.048 ms zero-copy .rlay cache · Zero C/C++ FFI
Documentation ·
RustEDA Suite ·
Benchmarks ·
Architecture ·
Apache-2.0
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 patterns, expanded cell hierarchy, shape inspector, minimap, and magnetic ruler.
Legacy IC layout viewers stall for seconds on multi-gigabyte tapeout files, drop frames on Retina displays, treat laptop trackpads like scroll-wheel mice, and carry heavy C++/Qt/Python stacks. RustLayout is built from scratch in 100% pure Rust (#![deny(unsafe_code)], zero C/C++ FFI) around modern wgpu GPU rendering and human-first desktop ergonomics:
- Ultra-High-Performance GPU Rendering (120–400+ FPS on GB-Scale Chips): Vertex-pulled
16 B/rectstorage slabs, 32-bit Hilbert spatial sorting, 128-byte 4-wideBvhNode4with non-inflating density HLOD, native GPUSREF/AREFinstancing, and per-layerRG8Unormmask caching deliver 2.50–2.82 ms P50 (354–400 FPS) at Retina3024×1964on 1–2 GiB layouts,< 1.7 msinstant layer toggles, GPU pan tile-shift, and hard-capped LRU VRAM streaming (≤ 512 MiBeven on 5 GiB reticles). - Native Multi-Touch Trackpad & Modern CAD Ergonomics: Built directly on
winit+wgpu+egui_dockwith cursor-anchored macOS trackpad pinch-to-zoom, buttery smooth two-finger pan/scroll with exponential camera damping, crisp HiDPI/Retina scaling, 0% idle CPU/GPU (ControlFlow::Wait), a 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 familiar KLayout hotkeys (F,G,R,S,Z,0..9,*,[/],Cmd/Ctrl+K). - 5–13× Faster Multi-Format Parsing &
0.048 msZero-Copy Reopen: Two-phase parallelpreadGDSII ingestion (keeping peak RAM at 0.49×–0.61× file size), pure-Rust.gds.gzdecompression, and a clean-room SEMI P39 OASIS (.oas) parser with parallelCBLOCKinflation and unexpandedAREFmapping. Save once to a 64-byte-aligned.rlaycache to reopen a 2 GiB chip in0.048 msand a 5 GiB chip in0.184 ms. - Sub-Nanometer Precision & Real-Time
66.9 FPSGPU Visual XOR Diff: Camera-relative 16-bit integer-split WGSL vertex math achieves1.00000raw IoU at100 nmzoom across±500 mmwafers (±10⁹DBU) with zerof32jitter. Compare two tapeout revisions live on GPU (A \ BCopper,B \ AMint) at 66.9 FPS on Retina 3K with exact 1-DBU perturbation jump-lists and--watch-focus <json>cross-probing fromRustEDA,RustROAD, andRustSTA. - Full KLayout
.lypFidelity & Safety by Construction: Parses and exports KLayout.lypXML with 32×32 screen-space stipple bitmasks plus built-in open-PDK presets (SKY130A,IHP SG13G2,GF180MCU D). Verified 100% geometric parity vs. KLayout 0.30.13 across canonical fixtures and all three foundry PDKs, with zero panics across 800+ mutated GDS/OASIS fuzz cases.
All measurements come from paired quiet-host runs on Apple M6 (12 cores, 32 GiB RAM, Metal) committed in docs/benchmarks/receipt.json — see Benchmark Report for full methodology and tables.
| Benchmark (paired quiet-host receipts) | Size | RustLayout | KLayout 0.30.13 | RustLayout 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 |
soc_100mb.gds cold parse |
100 MiB | 17.49 ms | 104.30 ms | 5.96× faster |
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 (0.59×) |
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 (0.61×) |
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 (0.49×) |
6,523.98 ms / 3,580.9 MiB | 4.61× faster, 30% less RAM |
flat_fill_2gb warm .rlay mmap reopen |
555 MiB | 0.048 ms | — | Instant zero-copy reopen |
flat_fill_2gb headless 4K (3840×2160) PNG |
2.0 GiB | 0.814 s cold / 0.073 s warm | 7.355 s | 9.03× cold / 101.2× warm |
flat_fill_2gb 600-frame Retina (3024×1964) |
2.0 GiB | 2.82 ms P50 (354 FPS) / 8.37 ms P95 | — | 1.53 ms layer toggle · 137 MiB VRAM |
hier_sram_1gb 600-frame Retina (3024×1964) |
1.0 GiB | 2.50 ms P50 (400 FPS) / 8.56 ms P95 | — | 1.64 ms layer toggle · 73 MiB VRAM |
mega_5gb 1,000-frame Retina (512 MiB cap) |
5.0 GiB | 1.25 ms P50 (800 FPS) / 1.93 ms P95 | — | Strictly ≤ 512 MiB VRAM |
soc_100mb Retina GPU Visual XOR Diff |
100 MiB | 14.95 ms P50 (66.9 FPS) | — | 1-DBU exact perturbation detection |
| Crate | Responsibility |
|---|---|
rustlayout-core |
Exact i32/i64 DBU geometry, D4/affine transforms, IBM excess-64 real8, camera decomposition, ResourceLimits, LayoutError. |
rustlayout-gds |
Parallel pread/mmap GDSII parser, .gds.gz decompression, clean-room SEMI P39 OASIS parser (CBLOCK parallel inflate, unexpanded AREFs), cyclic DAG guard. |
rustlayout-db |
SoA geometry arenas, 32-bit Hilbert spatial sorting, 128-byte 4-wide BvhNode4 HLOD, O(1) AREF frustum clamping, hierarchical picker, .rlay mmap cache. |
rustlayout-style |
KLayout .lyp XML reader/writer, 32×32 GPU stipple catalog, Signal Forge v2 & open-PDK presets (SKY130A, IHP SG13G2, GF180MCU D). |
rustlayout-render |
GUI-agnostic wgpu engine (headless PNG & embeddable via GpuContext::from_external), 16-bit integer-split WGSL shaders, compute culler, LRU VRAM pool, per-layer mask cache, pan tile-shift, XOR diff. |
rustlayout-app |
winit + wgpu + egui + egui_dock Signal Forge v2 desktop workbench: menu bar, native file dialogs, trackpad pinch-zoom, 100k+ virtualized cell tree, magnetic rulers, bookmarks, --watch-focus cross-probing. |
rustlayout-cli |
Unified rustlayout CLI (view, info, query, cache, render, diff, bench, png-iou) with rusteda.v1 JSON output. |
rustlayout-benchgen |
Deterministic canonical, hostile-fuzz, and multi-GB synthetic GDSII stress suite generator. |
See Architecture for the full design breakdown.
# Build optimized release binary (Rust 1.100+, Metal / Vulkan / DX12)
cargo build --release -p rustlayout-cli
# Launch the interactive Signal Forge v2 desktop workbench
./target/release/rustlayout view chip.gds --preset sky130a
./target/release/rustlayout view chip.oas --lyp sky130A.lyp --diff ref.oas --watch-focus focus.json
# Or open empty and use File > Open Layout (Cmd/Ctrl+O) or drag-and-drop
./target/release/rustlayout view# Inspect GDSII / .gds.gz / OASIS / .rlay metadata as rusteda.v1 JSON
./target/release/rustlayout info chip.gds --json
# Build a zero-copy .rlay spatial cache for < 1 ms subsequent opens
./target/release/rustlayout cache build chip.gds --out chip.rlay --json
# Headless 4K PNG export (exact geometry or HLOD-accelerated)
./target/release/rustlayout render chip.gds --out chip_4k.png --width 3840 --height 2160 --preset sky130a
# Headless GPU Visual XOR Diff (A \ B Copper, B \ A Mint)
./target/release/rustlayout diff rev_a.gds rev_b.gds --out xor.png --width 2048 --height 2048 --json
# Scripted Retina 3024x1964 GPU flythrough & layer-toggle benchmark
./target/release/rustlayout bench chip.rlay --frames 600 --width 3024 --height 1964 --max-vram-mib 512 --json- Read-only inspection, rendering & diff toolkit: RustLayout currently focuses on ultra-fast viewing, hierarchical picking, magnetic measurement, headless rendering,
.lypediting/export,.rlaycaching, and real-time GPU XOR diff. Interactive polygon editing, GDSII/OASIS streamout modification, and DRC/LVS rule-deck execution remain outside current scope. - Dense curvilinear polygon streaming: On the 512 MiB
curvilinear_500mbstress test (all 32-vertex curves), chunked lazy triangulation holds peak VRAM within the 1,024 MiB cap (892 MiB) at16.22 msP50 (62 FPS), slower than rectangular metal/SRAM workloads (2.50–2.82 msP50) while triangulation warms up. - Benchmark host scope: Headline GPU and parse timings in docs/benchmarks/receipt.json were measured on a single Apple M6 (Metal) quiet host; Linux Vulkan/DX12 throughput scales with adapter bandwidth and driver support.
Apache-2.0 — see LICENSE. External reference tools (KLayout) and open PDK layouts retain their own licenses and are used strictly as black-box verification inputs.