KLayout-coredb
June 25, 2026 · View on GitHub
KLayout workspace with CORE (CommonDB) mcore streamer: open and save .core / *.layout.core layout files directly in KLayout — no GDS round-trip for viewing.
Vendored KLayout tree under klayout-src/ plus integrations/klayout/mcore plugin sources (compiled into db_plugins/mcore.dll).
Layout
| Path | Purpose |
|---|---|
klayout-src/ | KLayout sources (build.sh / build.bat) |
integrations/klayout/mcore/ | CORE streamer plugin (reader/writer) |
integrations/klayout/generated/ | Pre-generated Cap'n Proto C++ |
../CommonDB | CORE library sources linked at build time (COMMONDB_ROOT) |
scripts/setup_klayout_mcore.* | Link mcore into KLayout tree + write local.pri |
scripts/test_core_load.rb | Headless smoke test (klayout -b -r …) |
Prerequisites
- CommonDB checkout as a sibling directory, e.g.
../CommonDB - Qt 5 (
qmake) on Linux, or Qt 6 on newer systems — KLayout auto-detects - Build tools:
g++,make,git, zlib/libpng/curl/expat devel headers
Quick start (Linux)
git clone https://github.com/adatsuk/KLayout-coredb.git
git clone https://github.com/IHP-GmbH/CommonDB.git
cd KLayout-coredb
export COMMONDB_ROOT="$(cd ../CommonDB && pwd)"
bash scripts/setup_klayout_mcore.sh
cd klayout-src
./build.sh -build build-release -bin bin-release -noruby -nopython -option "-j$(nproc)"
Open a CORE layout:
./bin-release/klayout examples/sample.core # or any *.layout.core from LibMan
Smoke test (after build, klayout on PATH or set KLAYOUT):
export COMMONDB_ROOT=../CommonDB
export KLAYOUT=$PWD/klayout-src/bin-release/klayout
$KLAYOUT -b -r scripts/test_core_load.rb
Windows
scripts\setup_klayout_mcore.cmd
cd klayout-src
build.bat -j 4
bin-release\klayout.exe path\to\cell.layout.core
Coordinate scale / naming
Layout views use dbuPerMicron in CORE. LibMan expects cell.layout.core naming — see CommonDB CORE_FILE_NAMING.
CI
GitHub Actions (.github/workflows/ci.yaml) builds on Rocky Linux 8 (RHEL 8 compatible): checks out CommonDB, links mcore, runs build.sh (no Ruby/Python bindings), verifies mcore plugin and klayout binary.
Upstream
KLayout sources track KLayout/klayout. CORE plugin sources mirror CommonDB integrations/klayout.
License
KLayout is GPL-2.0 (see klayout-src/COPYRIGHT). CORE integration follows the CommonDB / IHP stack workflow.