This repository is Intelligent Electron's fork of PCBJam, KiCad compiled to WebAssembly with a web editor around it. Intelligent Electron serves the editor built from this fork to the engineers who use it. Like PCBJam, it is free software under the GNU General Public License, version 3 (see LICENSE); its components keep their own licenses.
- Upstream: PCBJam tag
v0.2.12(commitbef5202), with KiCad at4a343c3and wxWidgets at01b74eaas submodules. - Our branch:
ie/v0.2.12. Each release here (tagie-v0.2.12, thenie-v0.2.12-2and on as the patches change) carries the editor's web bundle, PCBJam's prebuilt v0.2.12 WebAssembly files (checked against the sha256 sums PCBJam publishes), and a source archive of this branch with every submodule, all listed inSHA256SUMS. - What our patches change, all in the web editor (
web/standalone), with no change to KiCad, wxWidgets or the WebAssembly build:- Files over 4 MiB are read and saved through short-lived storage URLs that the backend hands out, keeping the compare-and-swap revision the save is conditional on, since the backend's requests are capped below the size of large boards.
- The editor tells the page that embeds it when a file has unsaved changes, when it saved, and when a save conflicted, and reloads a file when that page asks (a
postMessagebridge with the parent document, same origin only). - The release workflow (
.github/workflows/ie-release.yml) builds only the web bundle on a standard runner and attaches the files above to the release. PCBJam's own workflows are removed on this branch, since they build and deploy PCBJam's services.
To build the bundle yourself: cd web && pnpm install && pnpm --filter @pcbjam/standalone build, with the variables .github/workflows/ie-release.yml sets. To rebuild the WebAssembly files, follow PCBJam's instructions below.
Run KiCad PCBnew in the browser using WebAssembly.
# 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-wx-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)# Requires: Node.js 18+ (Emscripten SDK auto-installed on first build)
./scripts/build-wx-wasm.sh
./scripts/build-wasm-test.sh
cd tests && npm install && npm testkicad-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-wx-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 (local emsdk install)
└── output/ # Build output (pcbnew.js, pcbnew.wasm)
Design docs and research notes are not kept in this repo: they moved to
pcbjam-private (docs/) on 2026-10-06. Their history up to then is here.
Code comments that cite docs/features/<name>/… refer to that tree.
./scripts/create-feature-patches.sh [branch-name] generates per-branch patches
(root.patch, kicad.patch, wxwidgets.patch) into a local features/<branch-name>/
scratch dir. That dir is gitignored — the patches are local history, not committed.
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:kicadOutput: output/pcbnew.js, output/pcbnew.wasm
For an experiment or feature you can work in a disposable git worktree so the
main checkout stays pristine. This repo has three submodules
(kicad, wxwidgets, web/pcbjam-shared); a new worktree starts
with them empty, so initialize and branch each one:
# 1. Create the worktree on a new branch (off main), at a sibling path
git worktree add -b experiment/my-thing ../kicad-wasm-my-thing main
# 2. Check out the submodules INSIDE the worktree (working trees only;
# git objects are shared with the main checkout)
cd ../kicad-wasm-my-thing
git submodule update --init kicad wxwidgets web/pcbjam-shared
# 3. Create a matching branch in each submodule (they start at detached HEAD)
git checkout -b experiment/my-thing # root already on it via -b above
for sm in kicad wxwidgets web/pcbjam-shared; do
git -C "$sm" checkout -b experiment/my-thing
doneThen build from inside the worktree. Use an isolated Docker project — do NOT
set COMPOSE_PROJECT_NAME to another branch's project (e.g. kicad-wasm-main),
which can collide with other workflows; docker/build.sh auto-derives an isolated
project name from the worktree branch. The first build provisions deps
(wxWidgets + OCC) from scratch. To keep the machine responsive, cap
parallelism:
KICAD_DOCKER_CPUS=4 ./docker/build.sh pcbnew -j 4Tear down afterward with git worktree remove ../kicad-wasm-my-thing (and
docker compose -p <project> down -v to drop the isolated volumes).
Some test artifacts are gitignored and are NOT produced by the build pipeline,
so they don't carry into a newly-created git worktree — without them the
gal-webgl tests 404 ("Loading WASM...") and the collab specs fail with
Could not resolve "@pcbjam/shared". After building (docker/build.sh +
scripts/build-wx-wasm.sh) and cd tests && npm i, run once per worktree:
./scripts/setup-worktree.sh # idempotent: sysroot headers, gal-webgl harness, web/ pnpm install, collab bundleBuild standalone wxWidgets test apps for feature testing:
# Build wxWidgets for WASM
./scripts/build-wx-wasm.sh
# Build test apps
./scripts/build-wasm-test.sh
# Run wxWidgets tests
cd tests && npm install && npm testOutput: tests/apps/standalone/
- Docker Desktop with 16GB+ RAM allocated
- 10+ GB disk space for build cache
- 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.shcd tests
npm install
# Run all tests
npm test
# Run specific tests
npm run test:kicad # KiCad tests only
npx playwright test menu # Menu tests onlySee tests/README.md for test documentation.
CI's Linux render is the source of truth for baseline screenshots. On each main
push, CI compares its render against the baselines (pinned by the R2-hosted
manifest — nothing screenshot-related is committed) and posts the diff (plus the
runtime-perf numbers) to Discord. To update baselines after an intended render
change, promote the CI run's screenshots in the morelli review app
(https://pcbjam-morelli-staging.pcbjam-staging.workers.dev) — pick the run,
review the diffs, bulk-select, Promote. CI uploads every run's renders to R2
for that purpose (30-day retention).
cd tests
npm run screenshots:fetch-manifest && npm run screenshots:fetch # materialize baselines
npm run screenshots:check # local gate: current vs baselinesSee tests/tools/screenshots/README.md.
- 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
The design docs, build notes and debugging guides moved to pcbjam-private
(docs/) on 2026-10-06. What stays next to the code:
- Docker README - Container setup
- Tests README - Test infrastructure
KiCad is GPL-3.0. This project follows the same license.
The site combines KiCad (GPLv3) with the wxWidgets fork; the wxWidgets WebAssembly
port files are LGPL v2 (without the wxWindows binary exception). See the
/licenses page for the full breakdown and
the corresponding-source offer.