skillfed

kwasm

Standalone web-based layout viewer using KLayout

kwasm v0.2.24 77.4K downloads/30d#14,523 on PyPI
Copyleft license GPL-3.0 Active released

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 kwasm

uv

uv add kwasm

poetry

poetry add kwasm

Installing 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

gds2 viewer browseroasis layout viewersemiconductor design viewerklayout wasmgds file viewerlayout visualizationchip design viewer
semiconductor-designwasmjupyter

More Graphics packages