Self-hosted emergence-engineering/pcbjam (browser KiCad WASM) — CMMS embed fork. Upstream tracked as remote "upstream".
  • TypeScript 49.1%
  • C++ 36%
  • Shell 4.2%
  • C 2.9%
  • JavaScript 2.6%
  • Other 5.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Balint Ipkovich 03fbd73e99 feat(web): wire gerbview tool (file-less launch, wizard-skip, UI)
Register the newly WASM-ported Gerber Viewer in the web app the same way as
the other tools — registry entries only, no UI edits (ProjectDetailPage renders
launch links generically from FILELESS_TOOLS).

GERBVIEW_FRAME opens gerber/drill files through its own File→Open UI and projects
carry no gerber files to auto-open, so it's treated as file-less (boot standalone),
mirroring symbol_editor. It boots through single_top.cpp's STARTWIZARD, so it seeds
config to skip the first-run wizard (TOOL_NEEDS_CONFIG_SEED) and gets a
/usr/bin/gerbview argv0.

- contract: add "gerbview" to TOOLS, TOOL_LABELS ("Gerber Viewer"), FILELESS_TOOLS
- frontend: add gerbview to TOOL_ARGV0 and TOOL_NEEDS_CONFIG_SEED
- e2e: add file-less gerbview case to tools-open.spec.ts (title "Gerber Viewer",
  canvas painted, wizard-free, no WASM abort)

Verified in-browser via npm run test:web: gerbview boots wizard-free with the
viewer chrome (toolbars + layers manager), 0 console errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 16:47:23 +02:00
.claude fix(skills): make git-workflow script paths portable 2026-06-01 14:59:09 +02:00
docker feat: gerbview WASM port 2026-06-03 14:23:57 +02:00
features feat: gerbview WASM port 2026-06-03 14:23:57 +02:00
kicad@933c2fda02 feat: gerbview WASM port 2026-06-03 14:23:57 +02:00
logs Added logs .gitignore. 2026-01-03 13:52:34 +01:00
research wip: nested-asyncify fix, wxAuiToolBar registration, tests, research docs 2026-04-21 13:58:16 +02:00
scripts feat: gerbview WASM port 2026-06-03 14:23:57 +02:00
tests feat(web): wire gerbview tool (file-less launch, wizard-skip, UI) 2026-06-03 16:47:23 +02:00
wasm feat: gerbview WASM port 2026-06-03 14:23:57 +02:00
web feat(web): wire gerbview tool (file-less launch, wizard-skip, UI) 2026-06-03 16:47:23 +02:00
wxwidgets@ea186374a5 fix(web): eeschema schematic open path — Asyncify/dynCall fixes + bump submodules 2026-06-02 20:32:24 +02:00
.dockerignore Add Docker build environment for KiCad WASM 2025-12-08 12:07:01 +01:00
.gitignore fix(web): eeschema schematic open path — Asyncify/dynCall fixes + bump submodules 2026-06-02 20:32:24 +02:00
.gitmodules Remove unused legacy build scripts and directories 2025-12-27 11:07:54 +01:00
build.md Update documentation to reflect current project structure 2025-12-27 11:13:17 +01:00
CLAUDE.md fix(wasm): Fix Asyncify modal errors with global lock mechanism 2026-01-19 14:35:08 +01:00
DEBUG.md docs(DEBUG.md): make -O2 asyncify pass the documented default 2026-06-01 08:32:32 +02:00
learning.md fix(wasm): Fix Asyncify modal errors with global lock mechanism 2026-01-19 14:35:08 +01:00
README.md fix(wasm): Fix asyncify rewind with asyncify-aware dynCall shims 2026-03-13 12:26:48 +01:00

KiCad WebAssembly Port

Run KiCad PCBnew in the browser using WebAssembly.

Quick Start

Full Build (KiCad + All Tests)

# 1. Initialize submodules
git submodule update --init --recursive

# 2. Build KiCad WASM (Docker, ~10 min incremental, ~1-2 hours full)
./docker/build.sh

# 3. Build wxWidgets for local testing
./scripts/build-wxuniversal-wasm.sh

# 4. Build wxWidgets test apps
./scripts/build-wasm-test.sh

# 5. Run all tests
cd tests && npm install
npm test              # wxWidgets tests (256 tests)
npm run test:kicad    # KiCad tests (2 tests)

wxWidgets Only (No Docker)

# Requires: Node.js 18+ (Emscripten SDK auto-installed on first build)
./scripts/build-wxuniversal-wasm.sh
./scripts/build-wasm-test.sh
cd tests && npm install && npm test

Project Structure

kicad-wasm/
├── kicad/                  # KiCad source (git submodule)
├── wxwidgets/              # wxWidgets source (git submodule)
├── wasm/                   # WASM compatibility layer
│   ├── bindings/           # Embind bindings for JavaScript
│   ├── cmake/              # CMake find modules
│   ├── kiplatform/         # Platform abstraction (app, UI, printing)
│   ├── libcontext/         # Coroutine/fiber implementation
│   ├── shims/              # Runtime JavaScript shims
│   └── stubs/              # Stub implementations (libgit2, curl)
├── scripts/                # Build scripts
│   ├── build-wxuniversal-wasm.sh   # Build wxWidgets for WASM
│   ├── build-wasm-test.sh          # Build wxWidgets test apps
│   ├── deps/               # Dependency build scripts
│   ├── kicad/              # KiCad build scripts
│   ├── common/             # Shared utilities
│   └── config/             # Build config wrappers
├── docker/                 # Docker build environment
├── tests/                  # Playwright E2E tests
│   ├── e2e/                # Test specs
│   └── apps/               # WASM test applications
├── tools/                  # External tools (binaryen)
└── output/                 # Build output (pcbnew.js, pcbnew.wasm)

Feature Branches

Each feature branch has a folder in features/<branch-name>/ containing:

  • Documentation and research notes
  • root.patch - changes to main repo
  • kicad.patch - changes to KiCad fork
  • wxwidgets.patch - changes to wxWidgets fork

Generate patches: ./scripts/create-feature-patches.sh [branch-name]

Two Build Workflows

1. KiCad Build (Docker)

Full KiCad PCBnew build using Docker:

# Build KiCad WASM
./docker/build.sh

# Copy output to test directory
./tests/scripts/setup-kicad-wasm.sh

# Run KiCad tests
cd tests && npm install && npm run test:kicad

Output: output/pcbnew.js, output/pcbnew.wasm

See build.md for detailed build documentation.

2. wxWidgets Test Apps (Local)

Build standalone wxWidgets test apps for feature testing:

# Build wxWidgets for WASM
./scripts/build-wxuniversal-wasm.sh

# Build test apps
./scripts/build-wasm-test.sh

# Run wxWidgets tests
cd tests && npm install && npm test

Output: tests/apps/standalone/

Prerequisites

For KiCad Build (Docker)

  • Docker Desktop with 16GB+ RAM allocated
  • 10+ GB disk space for build cache

For wxWidgets Build (Local)

  • Node.js 18+ (for tests)
  • Emscripten SDK (auto-installed on first build)
# Initialize submodules
git submodule update --init --recursive

# Install Emscripten SDK (auto-runs on first build, or run manually)
./scripts/setup-emsdk.sh

Testing

cd tests
npm install

# Run all tests
npm test

# Run specific tests
npm run test:kicad          # KiCad tests only
npx playwright test menu    # Menu tests only

See tests/README.md for test documentation.

Current Status

  • wxWidgets WASM: Core widgets working (menus, dialogs, grids, trees, OpenGL)
  • KiCad PCBnew: Builds and loads in browser, canvas rendering working
  • In Progress: Testing wxWidgets features used by KiCad

Documentation

License

KiCad is GPL-3.0. This project follows the same license.