Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support WASM #99

Closed
hxse opened this issue Oct 5, 2023 · 4 comments
Closed

support WASM #99

hxse opened this issue Oct 5, 2023 · 4 comments

Comments

@hxse
Copy link

hxse commented Oct 5, 2023

Running locally in the browser and no longer depend large company server.
Support WASM will be nice, is it possible?

@L-M-Sherlock
Copy link
Member

It's feasible, but the framework doesn't provides a document for that: https://burn-rs.github.io/book/advanced/index.html

@cjdduarte
Copy link

I would support a migration of Anki Web (frontend) to WASM. However, I understand that it should be entirely rewritten in RUST (another framework).

But I think if it were to move forward, it would be a project for the end of 2024/ beginning of 2025.

@AlexErrant
Copy link
Member

Technically speaking, as of this PR, fsrs-rs compiles to WASM, satisfying this issue. However, more work needs to be done to make it usable from Javascript, which is probably what you want. I started work on a wrapper for fsrs-rs here https://github.com/AlexErrant/fsrs-wasm but it's very much a WIP. I got next_interval exposed to JS, but I'm missing the ability to create an "FSRS" object with weights, so you can't even call it (next_interval). I stopped working on it to chase other shiny objects, but I'll return to it eventually. (Currently trying - and failing - to learn Rust 😬.)

If you're just looking to run the scheduling algorithm, a pure JS solution exists https://github.com/open-spaced-repetition/fsrs.js You only need this repo if you want to run training of the ML model. There's also https://github.com/open-spaced-repetition/rs-fsrs if you're just looking for a scheduler.

@AlexErrant
Copy link
Member

As an FYI, I renamed fsrs-wasm to https://github.com/AlexErrant/fsrs-browser because it very much only runs in the browser. Also, I got that project demoing compute_weights, which is nice. I think all the hard work/proof of concept is done, will iterate as needed.

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

No branches or pull requests

4 participants