Crates.io | rs-fsrs |
lib.rs | rs-fsrs |
version | 1.2.1 |
source | src |
created_at | 2024-10-28 09:14:36.55694 |
updated_at | 2024-10-28 09:14:36.55694 |
description | Rust-based Scheduler for FSRS |
homepage | |
repository | |
max_upload_size | |
id | 1425399 |
size | 62,818 |
A rust implementation of FSRS scheduler.
Install:
[dependencies]
fsrs = { git = "https://github.com/open-spaced-repetition/rs-fsrs" }
chrono = { version = "0.4.23", features = ["serde"] }
Quickstart:
use chrono::Utc;
use fsrs::{FSRS, Card, Rating};
fn main() {
let fsrs = FSRS::default();
let card = Card::new();
let record_log = fsrs.repeat(card, Utc::now());
for rating in Rating::iter() {
let item = record_log[rating].to_owned();
println!("{:?}", item.card);
println!("{:?}", item.review_log);
}
}
run
cargo fmt
cargo clippy -- -D clippy::nursery
cargo test --release
fsrs-rs contains a Rust API for training FSRS parameters, and for using them to schedule cards.
MIT