anki/rslib
RumovZ 3e0c9dc866
New TTS/AV tag handling (#1559)
* Add new `card_rendering` mod

Parses a text with av/tts tags and strips or extracts tags.

* Replace old `extract_av_tags` and `strip_av_tags`

... with new `card_rendering` mod

* ressource -> resource

* Add AV prettifier for use in browser table

* Accept String in av tag routines

... and avoid redundant writes if no changes need to be made.

* add benchmarking with criterion; make links test optional (dae)

cargo install cargo-criterion, then run ./bench.sh

* performance comparison: creating HashMap up front (dae)

the previous solution:

anki_tag_parse          time:   [1.8401 us 1.8437 us 1.8476 us]

this solution:

anki_tag_parse          time:   [2.2420 us 2.2447 us 2.2477 us]
                        change: [+21.477% +21.770% +22.066%] (p = 0.00 < 0.05)
                        Performance has regressed.

* Revert "performance comparison: creating HashMap up front" (dae)

This reverts commit f19126a2f15b729b825825a49283f63ab13474d0.

* add missing header

* Write error message if tts lang is missing

* `Tag` -> `Directive`
2021-12-17 19:04:42 +10:00
..
.cargo initial Bazel conversion 2020-11-01 14:26:58 +10:00
benches New TTS/AV tag handling (#1559) 2021-12-17 19:04:42 +10:00
build Remove native HelpPage enum 2021-07-22 16:32:49 +02:00
cargo update Rust deps 2021-12-03 20:35:53 +10:00
i18n check for missed dbg!() statements 2021-12-14 09:05:14 +10:00
i18n_helpers run buildifier/buildozer to tidy up BUILD files 2021-12-14 09:18:24 +10:00
src New TTS/AV tag handling (#1559) 2021-12-17 19:04:42 +10:00
tests use separate integration test for links 2021-07-24 10:12:25 +10:00
.gitignore initial Bazel conversion 2020-11-01 14:26:58 +10:00
bench.sh New TTS/AV tag handling (#1559) 2021-12-17 19:04:42 +10:00
BUILD.bazel run buildifier/buildozer to tidy up BUILD files 2021-12-14 09:18:24 +10:00
Cargo.toml New TTS/AV tag handling (#1559) 2021-12-17 19:04:42 +10:00
empty.rs add a valid, empty file so the check action works in Rust Analyzer 2021-05-05 15:53:27 +10:00
README.md add some code editing/completion docs 2020-12-16 14:16:08 +10:00
rustfmt.bzl update to the latest rules_rust + security framework update 2021-03-27 19:28:19 +10:00
rustfmt.toml tidy up Rust imports 2021-04-18 18:38:54 +10:00

Anki's Rust code.

backend.proto stores the interfaces used to communicate backend messages between Rust, Python and TypeScript.