Closed hxse closed 1 year ago
It's feasible, but the framework doesn't provides a document for that: https://burn-rs.github.io/book/advanced/index.html
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.
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.
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.
Running locally in the browser and no longer depend large company server. Support WASM will be nice, is it possible?