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
Viktor Vaczi 6c6b4e47ff Fix wxCollapsiblePane crash in element registry
Update wxwidgets submodule with fix that skips GetLabel() for
wxCollapsiblePane widgets during element registry updates to avoid
WASM memory access errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 15:13:53 +01:00
docker Add runtime resource loading and fix Docker incremental builds 2025-12-27 20:09:26 +01:00
kicad@279f2f1a84 Add runtime resource loading and fix Docker incremental builds 2025-12-27 20:09:26 +01:00
scripts Add runtime resource loading and fix Docker incremental builds 2025-12-27 20:09:26 +01:00
tests Extend element registry and migrate all tests to semantic selectors 2025-12-30 14:17:51 +01:00
wasm Reorganize project structure for clarity 2025-12-27 14:06:23 +01:00
wxwidgets@9ae058d674 Fix wxCollapsiblePane crash in element registry 2025-12-30 15:13:53 +01:00
.dockerignore Add Docker build environment for KiCad WASM 2025-12-08 12:07:01 +01:00
.gitignore Add runtime resource loading and fix Docker incremental builds 2025-12-27 20:09:26 +01: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 Add KiCad WASM build infrastructure and dependency scripts 2025-12-04 13:15:04 +01:00
README.md Reorganize project structure for clarity 2025-12-27 14:06:23 +01:00

KiCad WebAssembly Port

Run KiCad PCBnew in the browser using WebAssembly.

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)

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)

  • Emscripten SDK 4.0+
  • Node.js 18+ (for tests)
# macOS
brew install emscripten node

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

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.