Skip to content

Add NPM support via WASM - #18

Open
Xytronix wants to merge 4 commits into
atomflunder:masterfrom
Xytronix:wasm
Open

Add NPM support via WASM#18
Xytronix wants to merge 4 commits into
atomflunder:masterfrom
Xytronix:wasm

Conversation

@Xytronix

@Xytronix Xytronix commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

This adds npm build via wasm, I would say its useful moving forward.

I added the Yuksel WASM bindings, it won't build until yuksel is merged.

#17

@atomflunder

Copy link
Copy Markdown
Owner

Hi again!
First off thanks for taking your time to contribute. However, I don't know if this is a great use-case of this library.
The JavaScript ecosystem already has a great number of libraries for most of these rating systems.

To be honest, I don't have a great understanding of WASM but as I understand it the main point of it is to call it from the browser to offload some heavy computing to a faster language than JavaScript. I would assume calculating ratings is mostly done in the backend anyways, plus calculating single games is fairly fast, even in JS.

I made this calcluator for TrueSkill, the slowest algorithm included here in JavaScript (https://github.com/atomflunder/TrueSkill-Calculator) using the trueskill-ts package and it has been fast enough.

I am happy to hear your thoughts on something I am overlooking here

@Xytronix

Copy link
Copy Markdown
Contributor Author

Your points are valid, I see two particular use cases:

  • Accessibility (not all algorithms ported and a single library)
  • Batch processing (if added) using WASM can providing a meaningful speed improvement over JavaScript

It wouldn't hurt maintainability too much and it would be great to have upcoming algorithms available in JavaScript.

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.

2 participants