Skip to content

Remove unnecessary, WASM-specific code and configurations#173

Open
tzimnoch wants to merge 2 commits into
dds-bridge:developfrom
tzimnoch:optimize_wasm_pipeline
Open

Remove unnecessary, WASM-specific code and configurations#173
tzimnoch wants to merge 2 commits into
dds-bridge:developfrom
tzimnoch:optimize_wasm_pipeline

Conversation

@tzimnoch

@tzimnoch tzimnoch commented Jun 7, 2026

Copy link
Copy Markdown

See #168 for further details.

The (SetMaxThreads) call is no longer necessary in 3.0.0 and can be removed from all examples, tests, etc.

I only removed it for __linux__ and  __WASM__ flags as I'm not able to test on __APPLE__, but I suspect this call can be removed for all platforms.

Comment thread examples/analyse_play_bin.cpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_wasm and 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 using ErrorMessage().

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 thread examples/solve_board.cpp Outdated
Comment thread examples/solve_board_pbn.cpp Outdated
Comment thread examples/calc_dd_table_pbn.cpp Outdated
Comment thread examples/analyse_play_bin.cpp Outdated
Comment thread examples/wasm/calc_dd_table_pbn_test.cpp Outdated
Comment thread docs/wasm_build.md
…_WASM__ flag that is currently not necessary or used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants