Short notes for day-to-day build, test, and quality checks.
Prerequisites
- CMake that supports generator Visual Studio 18 2026 (VS 2026 bundled CMake 4.3+ is fine; older PATH CMake may lack this generator)
- Visual Studio 2026 (C++ workload) — primary local toolchain
- vcpkg with
VCPKG_ROOTset (GLFW/GLEW via repovcpkg.jsonmanifest) - OCCT 8.0.0 prebuilts + 3rdparty-vc14-64 (strongly recommended — see docs/building-occt.md)
Typical configure (run from repo root):
# Prefer VS-bundled cmake if PATH cmake is too old for the VS 18 generator:
# "C:\Program Files\Microsoft Visual Studio\18\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe"
cmake -S . -B build -G "Visual Studio 18 2026" -A x64 `
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" `
-DOpenCASCADE_DIR=C:\bin\opencascade-8.0.0-vc14-64\cmake `
-DOCCT_3RD_PARTY_DIR=C:\bin\3rdparty-vc14-64Paths above match the V8.0.0 combined prebuilt extracted under C:\bin (see docs/building-occt.md). Adjust if your install lives elsewhere. Manifest mode installs glfw3 and glew from vcpkg.json on configure (first run may take a few minutes).
Do not use -G "Visual Studio 17 2022" on a machine that only has VS 2026 installed — configure fails with a generator/instance mismatch. CI still uses VS 2022 (windows-msvc.yml). After wiping build/, re-run this configure step (do not open a stale .sln alone).
Build:
cmake --build build --config Release
# or open build/EzyCad.sln in Visual Studio and build the EzyCad projectThe resulting EzyCad.exe (and EzyCad_tests.exe) plus required DLLs end up under build/Debug or build/Release.
Running tests:
cd build
ctest -C Release --output-on-failure
# Or run the EzyCad_tests project / executable directly from Visual StudioAfter CMake structural changes (e.g. adding new folders for IDE visibility under agents/, docs/, or github-workflows), or when switching generators (e.g. VS 17 -> VS 18):
- Clean the configure cache: delete
build/CMakeCache.txt,build/CMakeFiles/, and any_deps/*-subbuild/directories. - Re-run the configure step above.
See root README.md and docs/building-occt.md for more OCCT details and troubleshooting.
Agent note: desktop uses OCCT 8, recommended wasm uses 7.9.3 until OCCT 8 wasm works. Shared src/ must compile on both — see conventions/occt-wasm-dual-version.md.
Full OCCT + EzyCad wasm instructions live in docs/building-occt.md and the root README.
High-level flow (after emsdk_env):
-
Build the OCCT wasm package (if not already done):
# Recommended (7.9.3) .\scripts\build-occt-793-wasm.ps1 # OCCT 8.0.0.p1 (upstream regression compare) .\scripts\build-occt-v8-wasm.ps1
Default install trees:
%USERPROFILE%\occt-wasm-build\V7_9_3\installand...\V8_0_0_p1\install. -
Configure + build EzyCad (Ninja generator recommended):
emcmake cmake -S . -B build-em-7-9-3 -G Ninja -Wno-dev ` -DOpenCASCADE_DIR=$env:USERPROFILE\occt-wasm-build\V7_9_3\install\lib\cmake\opencascade ` -DCMAKE_BUILD_TYPE=Release ninja -C build-em-7-9-3
-
Serve locally:
ninja && python -m http.server 8000
Load
EzyCad.html(or the copy underweb/) in a browser.
See scripts/build-occt-793-wasm.ps1, scripts/build-occt-v8-wasm.ps1, and shared scripts/build-occt-wasm.ps1 (with .cmd wrappers) for script options.
-
After editing or creating code (agents: one command, pass the files you touched):
python scripts/agent_check.py src/gui.cpp src/gui.h
Runs ASCII on C++. With
.mdpaths, also checks table alignment. Default (no args):src/andtests/. IDE:ezycad_agent_checkCMake target. Optional local code style (not CI):python scripts/code_style_check.py. -
Format C++ (run before committing changes under
src/):.\scripts\format-src.ps1Requires
clang-format(either in PATH or at the default LLVM location). -
ASCII-only is also in
scripts/check-nonascii-src.ps1/.cmd. CI (.github/workflows/source-hygiene.yml) runspython scripts/agent_check.py. Prefer that after edits so you do not launch a second checker.
scripts/ezycad/— Importable remote client (putscripts/onPYTHONPATH, thenimport ezycad). Typedezy/view/sketchAPI for IPython completion; see docs/scripting.md.scripts/ezycad_remote.py— CLI wrapper (python scripts/ezycad_remote.py, orpython -m ezycadwithscripts/on the path). Smoke:EzyCad --listen 127.0.0.1:8765, thenpython -c "import sys; sys.path.insert(0,'scripts'); import ezycad; print(ezycad.connect().view.sketch_count())".scripts/agent_check.py— Post-edit ASCII check (Markdown tables if.mdpaths). Agents run this instead ofcheck-nonascii-src. Optional--stylerunscode_style_check.py.scripts/code_style_check.py— Optional local style from docs/ezycad_code_style.md (not CI).scripts/align_md_tables.py— Align GFM pipe tables in.mdfiles for source + preview readability (see conventions/markdown-tables.md).scripts/sync-github-pages-html.ps1— Syncweb/changes (EzyCad.html etc.) to the GitHub Pages wasm demo site.scripts/pbf-to-png.ps1/.py— Icon / asset conversion helpers.scripts/pimpl_gen.py— PIMPL stub generator.scripts/ezycad_graphical_debugging.xml— Geometry Watch type defs (Graphical Debugging extension). After editing, re-select the path under Tools -> Options -> Graphical Debugging -> General (restart alone does not reload).scripts/build-occt-793-wasm.ps1— OCCT 7.9.3 wasm (recommended).scripts/build-occt-v8-wasm.ps1— OCCT 8.0.0.p1 wasm.scripts/build-occt-wasm.ps1— Shared implementation (advanced-OcctTaguse).
Agent pointers: agents/README.md. Token budget: conventions/token-lean.md.