
Parity test
FixturFab/kicad-utilities-wasm
WASM implementation of kicad native tools and IO (ERC,DRC,STEP,DSN,SES)

WASM implementation of kicad native tools and IO (ERC,DRC,STEP,DSN,SES)
Sample is an open-source printed circuit board by FixturFab, from the FixturFab/kicad-utilities-wasm repository on GitHub. It is a 2-layer board of 40 × 20 mm with 2 parts on 3 nets, routed with 1 track and 0 vias.
KiCad PCB and schematic tools running in the browser or Node.js via WebAssembly.
This project compiles KiCad's validation and export tools to WebAssembly, enabling PCB/schematic design checks and 3D export without a native KiCad installation.
schemas.kicad.org/drc.v1.json schemaschemas.kicad.org/erc.v1.json schemaengrave_depth_mm boolean-subtracts the silkscreen
from the board body as real recesses (for laser-engraved panel previews); the
removed volumes are kept as marker-colored ENGRAVING productsimport { readFileSync } from 'fs';
import createKicadDRC from './build-wasm/kicad_drc.mjs';
// Initialize the WASM module
const Module = await createKicadDRC();
// Read a .kicad_pcb file
const pcb = readFileSync('board.kicad_pcb', 'utf-8');
// Allocate string in WASM memory
const len = Module.lengthBytesUTF8(pcb) + 1;
const ptr = Module._malloc(len);
Module.stringToUTF8(pcb, ptr, len);
// Load PCB (returns 0 on success)
const rc = Module._kicad_load_pcb(ptr, 0);
Module._free(ptr);
// Run DRC
const violationCount = Module._kicad_run_drc();
// Get JSON results
const jsonPtr = Module._kicad_get_drc_results();
const results = JSON.parse(Module.UTF8ToString(jsonPtr));Run with threading support:
node --experimental-wasm-threads test/test-wasm.mjs board.kicad_pcbThe module exports four C functions, callable via Module._<name>():
kicad_load_pcb(pcb_content, length)Load a KiCad PCB from in-memory content (s-expression format).
const char*) — null-terminated .kicad_pcb file contentsize_t) — byte length, or 0 to use strlen0 on success, non-zero error code on failurekicad_run_drc()Run all DRC checks on the loaded PCB. Must call kicad_load_pcb() first.
-1 on errorkicad_get_drc_results()Get DRC results as a JSON string. The returned pointer is valid until the next call to kicad_run_drc() or kicad_cleanup().
schemas.kicad.org/drc.v1.json schema, or NULL on errorkicad_cleanup()Free all resources (board, DRC engine, results).
Results follow the KiCad DRC JSON schema:
{
"source": "board.kicad_pcb",
"coordinate_units": "mm",
"violations": [
{
"type": "silk_overlap",
"severity": "warning",
"description": "Silkscreen overlap ...",
"items": [
{
"description": "Text \"REF**\" on F.Silkscreen",
"pos": { "x": 100.0, "y": 50.0 }
}
]
}
],
"unconnected_items": [],
"schematic_parity": []
}# 1. Clone KiCad source — NOTE: master pinned near 2026-03-06, NOT the 9.0
# stable branch (the port tracks master-only files like layer_utils.cpp)
git clone --shallow-since=2026-02-15 https://gitlab.com/kicad/code/kicad.git kicad-src
git -C kicad-src checkout $(git -C kicad-src rev-list -1 --before="2026-03-07" origin/master)
# 2. Build KiCad natively first (needed for generated headers).
# KICAD_USE_CMAKE_FINDPROTOBUF works around Ubuntu's protobuf packages
# lacking CMake config files.
cmake -S kicad-src -B kicad-src/build/release -DCMAKE_BUILD_TYPE=Release \
-DKICAD_USE_CMAKE_FINDPROTOBUF=ON -DKICAD_BUILD_QA_TESTS=OFF \
-DKICAD_SCRIPTING_WXPYTHON=OFF
cmake --build kicad-src/build/release -j$(nproc)
# 3. Install and activate Emscripten
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk && ./emsdk install 5.0.0 && ./emsdk activate 5.0.0
source emsdk_env.sh && cd ..
# 4. Download OCCT 7.6.3 source (compiled into the WASM build for STEP export)
git clone --depth 1 --branch V7_6_3 https://github.com/Open-Cascade-SAS/OCCT.git \
kicad-drc-wasm/thirdparty/occt-7.6.3
# 5. Configure WASM build (build-wasm-erc is the directory the node tests use)
emcmake cmake -S kicad-drc-wasm -B kicad-drc-wasm/build-wasm-ercOutput files:
kicad-drc-wasm/build-wasm/kicad_drc.wasm (7.3 MB)kicad-drc-wasm/build-wasm/kicad_drc.mjs (103 KB loader)kicad-drc-wasm/build-wasm/kicad_drc.worker.mjs (pthread worker)kicad-cli. The 2 missing are library parity warnings that require footprint library access and schematic data, which are not available in standalone mode.testFootprints=false) is not loaded, so footprint-vs-schematic checks are skipped.drc_test_provider_library_parity is excluded (crashes in WASM static initialization due to a global UNITS_PROVIDER).Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp headers.This project builds upon KiCad source code, which is licensed under the GNU General Public License v3.0. See the KiCad project for details.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 1 | 10k | Resistor_SMD:R_0805_2012Metric | R1 |
| 1 | 4.7k | Resistor_SMD:R_0805_2012Metric | R2 |

FixturFab/kicad-utilities-wasm
WASM implementation of kicad native tools and IO (ERC,DRC,STEP,DSN,SES)

FixturFab/kicad-utilities-wasm
WASM implementation of kicad native tools and IO (ERC,DRC,STEP,DSN,SES)

FixturFab/kicad-utilities-wasm
WASM implementation of kicad native tools and IO (ERC,DRC,STEP,DSN,SES)

FixturFab/kicad-utilities-wasm
WASM implementation of kicad native tools and IO (ERC,DRC,STEP,DSN,SES)

FixturFab/kicad-utilities-wasm
WASM implementation of kicad native tools and IO (ERC,DRC,STEP,DSN,SES)

hzeller/rpi-rgb-led-matrix
Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO


adamws/kicad-kbplacer
KiCad plugin for automatic keyboard's key placement and routing

Luos-io/luos_engine
Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

NVNTLabs/switch2-SDEX2M2
Micro SD Express to M.2 NVME Adapter for Nintendo Switch 2

BlueSCSI/BlueSCSI-v2
BlueSCSI v2/Ultra - an open source, open hardware, SCSI emulator using the Pi Pico PR2040 and Pico 2 RP2350

ohmtech-rdi/eurorack-blocks
Software to Hardware Prototyping for Eurorack using C++, Max/Gen~ or Faust

It measures 40 × 20 mm and has 2 copper layers, 1.6 mm thick.
2 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the FixturFab/kicad-utilities-wasm repository on GitHub, at the commit this page was made from: the board is public/sample.kicad_pcb and its schematic public/sample.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask FixturFab before reusing the design.