kwasm
Standalone web-based layout viewer using KLayout
What it is and what it does
kwasm wraps KLayout's layout rendering engine (compiled to WebAssembly via Emscripten and Rust FFI) to create a browser-based viewer for semiconductor design files. It runs entirely client-side—no server, no installation in the browser—and can be embedded in Jupyter notebooks or bundled as self-contained HTML files via a CLI. The viewer supports GDS2 and OASIS formats, with interactive tools for panning, zooming, measuring, drawing annotations, toggling layer visibility, and switching between dark and light themes. Layouts can be loaded via drag-and-drop, URL query parameters, or direct Python calls.
The Python package (version 0.2.24) depends only on typer for CLI scaffolding and targets Python 3.12 exclusively. It's actively maintained and has no known security vulnerabilities. The underlying WASM artifacts are built from a Rust FFI layer and KLayout's C++ engine, but users install only the pre-built wheel. For Jupyter workflows, kwasm integrates with gdsfactory to accept component objects directly.
Use it for:
- View and inspect GDS2 chip layouts in a Jupyter notebook without leaving the notebook environment.
- Generate self-contained HTML viewers for sharing semiconductor designs with collaborators who have no special software installed.
- Embed an interactive layout viewer in a web application using the bundled WASM artifacts and React library.
- Measure and annotate semiconductor designs interactively in the browser for design review and documentation.
- Load and visualize layer properties from .lyp files to see designs with custom color schemes and layer configurations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
kwasm bundles KLayout's WebAssembly-compiled layout rendering engine to view GDS2 and OASIS semiconductor design files directly in a browser or Jupyter notebook, with no server required.
Yes, if you work with GDS2/OASIS files and use Python 3.12. The package is actively maintained, has zero known vulnerabilities, and offers genuine value for semiconductor design workflows—especially in Jupyter notebooks and for sharing designs without requiring KLayout installation. The GPL-3.0 copyleft license is a consideration for commercial redistribution but not for internal use. The Python 3.12-only requirement is a hard constraint; it will not run on other versions.
Install
kwasm on PyPI
pip
pip install kwasmuv
uv add kwasmpoetry
poetry add kwasmInstalling kwasm
Before you install
Low friction: pure Python wheel with only typer as a runtime dependency. Active maintenance (latest release 2026-08-13, 1 day old). Requires Python 3.12 specifically (capped_below_current support).
License in practice
GPL-3.0 copyleft license: any derivative work or distribution must also be open-source under GPL-3.0. Suitable for internal tools and open-source projects; review required before commercial redistribution.
Quickstart
pip install kwasm
import kwasm
kwasm.show("my_chip.gds")
# Or from CLI:
kwasm bundle my_chip.gds --output viewer.html
Requires Python 3.12 exactly (~=3.12.0); earlier or later versions will not work.
Verify before relying
- Whether gdsfactory integration (mentioned in description) is fully functional or still in development.
- Performance characteristics when viewing large GDS2/OASIS files in the browser.
- Browser compatibility matrix and minimum browser versions required for WASM execution.
Package facts
| License | GPL-3.0 (copyleft) |
| Python support | capped below the current Python release (~=3.12.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typer |
| Maintenance | actively maintained — 1 days since the last release |
| First released | |
| Downloads | 77,438/month — #14,523 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kwasm-0.2.24-py3-none-any.whl
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
kfactoryKFactory is a Python framework for designing…
unclear · top 15,000 on PyPI
klayoutKLayout is a Python package for layout viewing,…
copyleft · top 15,000 on PyPI
elvis-lvsElvis extracts connectivity from GDS layout…
unclear · top 15,000 on PyPI
gdsfactoryGDSFactory generates CAD files (GDS, OASIS,…
unclear · top 15,000 on PyPI
gdstkGdstk is a Python module for creating and…
unclear · top 15,000 on PyPI
gdsfactoryplusGDSFactory+ extends the GDSFactory library with…
unclear · top 15,000 on PyPI
wasmerExecutes WebAssembly modules from Python with a…
permissive · top 15,000 on PyPI
cmsis-pack-managerQueries and manages device information from…
permissive · top 5,000 on PyPI
qwasmDecodes and disassembles WebAssembly binary…
permissive · top 15,000 on PyPI
dvsimDVSim is a Python-based build and run system…
permissive · top 15,000 on PyPI