https://github.com/prideout/layout-viewer
WebGL renderer for chip layouts
https://github.com/prideout/layout-viewer
Last synced: 5 months ago
JSON representation
WebGL renderer for chip layouts
- Host: GitHub
- URL: https://github.com/prideout/layout-viewer
- Owner: prideout
- License: bsd-3-clause
- Created: 2025-03-15T05:49:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-12T21:03:19.000Z (about 1 year ago)
- Last Synced: 2025-04-12T21:32:18.235Z (about 1 year ago)
- Language: Rust
- Homepage: https://prideout.net/layout-viewer/
- Size: 12.9 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Layout Viewer
Rust library and CLI tool for rendering GDSII layouts with OpenGL / WebGL or
converting them to SVG format.
Includes a [web app](https://prideout.net/layout-viewer/) that allows users
to drop a GDSII file for local viewing. All work is performed in the browser
and no data is sent to the server. In fact there is no server, it's just
a static site hosted with GitHub Pages.
## Modules
- `core` contains the data model and core logic.
- Defines a set of ECS components.
- `graphics` is a simple WebGL rendering library.
- Provides abstractions similar to libraries like THREE and Filament.
- Knows nothing about circuits or app behavior.
- All objects except **Renderer** can be constructed without a WebGL
context.
- `webui` defines a set of Yew components.
- The UI for the web application lives here.
- Components with the **Page** suffix are navigation targets.
- `cli` provides a command-line interface and simple native window target.
- `rsutils` are utilities that you could imagine being a part of **std**.
- Nothing here should know about circuits or the app.
## Usage examples
```bash
# Open a GL window with the Intel 4004 chip:
cargo run --quiet --bin layout-viewer -- --gl assets/gds/intel-4004.gds
# Open a much larger GDS file using a release build:
cargo run --release --quiet --bin layout-viewer -- --gl assets/gds/caravel.gds
# Generate a SVG file:
cargo run --quiet --bin layout-viewer -- --gl assets/gds/mos-6502.gds mos-6502.svg
# Deploy a local web server:
trunk serve --open
```
## Limitations
- Arefs are ignored (but we might fix this)
- Magnification of elements is ignored.
- The "absolute" flag is ignored for magnitudes and angles.
- Text, Nodes, and Boxes are ignored.
## Dependencies
- bevy_ecs: Entity-component-system
- gds21: GDSII parser
- svg: SVG generation
- wasm-bindgen: WebAssembly bindings
- anyhow: Error handling