Skip to content

Rust Rewrite with Deck Federation and Yaml Deck Source#60

Open
jeprecated wants to merge 8 commits into
masterfrom
rust-brainbrew
Open

Rust Rewrite with Deck Federation and Yaml Deck Source#60
jeprecated wants to merge 8 commits into
masterfrom
rust-brainbrew

Conversation

@jeprecated
Copy link
Copy Markdown
Owner

@jeprecated jeprecated commented May 25, 2026

Issue/Discussion #4 is now achieved with this full rewrite. Only 6 years later! 😁

Ultimate Geography (in its entirety) is now a test fixture. The CrowdAnki output from before the rewrite and now is identical and fully tested for all regressions.

If its the same then why bother? This rewrite adds the following cababilities:

  • Deck Federation 😍 decks can be composed between one another. Add new fields, new cards, new templates, new note types, remove cards, translate any string in the deck. It all just works
    • Translations specifically are handled on a string by string basis, with the ability to override for a particular note/field, and errors if not all strings are translated
  • Yaml deck type 💪 a "CanonicalDeck" is now a deck.json. Csvs are dead, and should stay dead!
  • Extendable and understandable code. The code is split into three libraries: core, cli, formats. This setup is very flexible and will allow for easy changes in the future. I have plans for a web view (using the rust Iced framework) where one can import a deck, apply overlays, and see the changes live. Or an Anki extension where one can pick and choose which decks to combine / overlays to apply on import. These two would be rather than a repo having to output each and every possible combination of deck/overlay combinations.

I took a lot of inspiration from declarative systems like NixOS while doing this.

This is a work in progress, and thus marked as an alpha for now. Though parity in the output is achieved, which is the main concern. More to come.

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