Remove unnecessary, WASM-specific code and configurations#173
Open
tzimnoch wants to merge 1 commit into
Open
Conversation
tzimnoch
commented
Jun 7, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes WASM-specific configuration and conditional code paths, primarily by eliminating the custom __WASM__ define from the Bazel build and trimming platform-guarded initialization/workarounds in examples and docs.
Changes:
- Dropped the Bazel
__WASM__define for//:build_wasmand removed related WASM-specific notes from the WASM build documentation. - Narrowed
SetMaxThreads(0)calls in several examples/tests to only run on__APPLE__. - Removed a WASM-only error handling branch in
examples/analyse_play_bin.cpp, always usingErrorMessage().
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/wasm/calc_dd_table_pbn_test.cpp | Restricts SetMaxThreads(0) call to __APPLE__ in the WASM example test. |
| examples/solve_board.cpp | Restricts SetMaxThreads(0) call to __APPLE__ in the SolveBoard example. |
| examples/solve_board_pbn.cpp | Restricts SetMaxThreads(0) call to __APPLE__ in the SolveBoardPBN example. |
| examples/calc_dd_table_pbn.cpp | Restricts SetMaxThreads(0) call to __APPLE__ in the CalcDDtablePBN example. |
| examples/analyse_play_bin.cpp | Restricts SetMaxThreads(0) call to __APPLE__ and removes WASM-only error formatting fallback. |
| docs/wasm_build.md | Removes development notes describing the repo-defined __WASM__ macro and WASM-specific stubs. |
| CPPVARIABLES.bzl | Removes __WASM__ from DDS_LOCAL_DEFINES for the WASM build select() branch. |
Comment on lines
137
to
141
| ## Development notes | ||
|
|
||
| - The `__WASM__` preprocessor constant is defined for WASM builds (`CPPVARIABLES.bzl`). It was added to work around platform-specific code paths; revisit whether it can be narrowed or removed as WASM support matures. | ||
| - Some threading and platform-specific features are disabled or stubbed when `__WASM__` is set. | ||
| - A reusable `cc_library` WASM artifact (not only example binaries) is not yet provided; today only `wasm_cc_binary` example targets are wired up. | ||
| - The browser MVP lives under `web/`; see **Web browser (DDS MVP)** above and `//web:web_system_tests`. | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #168 for further details.