Skip to content

Remove unnecessary, WASM-specific code and configurations#173

Open
tzimnoch wants to merge 1 commit into
dds-bridge:developfrom
tzimnoch:optimize_wasm_pipeline
Open

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

Conversation

@tzimnoch
Copy link
Copy Markdown

@tzimnoch tzimnoch commented Jun 7, 2026

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 on lines -65 to -70
#ifdef __WASM__
// For WASM, we can't use ErrorMessage, so we'll just print the error code
snprintf(line, sizeof(line), "error code %d", res);
#else
ErrorMessage(res, line);
#endif
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I don't know what verification proved this was initially necessary, but I haven't found it to be true. To verify I added

    ErrorMessage(RETURN_TOO_MANY_CARDS, line);
    printf("DDS error: %s\n", line);

outside this if block so that it would always execute and then ran node bazel-bin/examples/wasm/AnalysePlayBin.js

DDS error: Too many cards
AnalysePlayBin, hand 1: OK

WASM appears to have no problem calling this function to copy the text for error message res to line.

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.

1 participant