anki/rslib/Cargo.toml
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

105 lines
2.7 KiB
TOML

[package]
name = "anki"
version = "0.0.0"
edition = "2021"
authors = ["Ankitects Pty Ltd and contributors"]
license = "AGPL-3.0-or-later"
description = "Anki's Rust library code"
build = "build/main.rs"
[lib]
name = "anki"
path = "src/lib.rs"
[features]
bench = ["criterion"]
links = ["linkcheck"]
[[test]]
name = "links"
required-features = ["links"]
[[bench]]
name = "benchmark"
harness = false
required-features = ["bench"]
# After updating anything below, run ../cargo/update.py
[build-dependencies]
prost-build = "0.9.0"
[dev-dependencies]
env_logger = "0.9.0"
tokio = { version = "1.12.0", features = ["macros"] }
[dependencies]
# pinned as any changes could invalidate sqlite indexes
unicase = "=2.6.0"
anki_i18n = { path="i18n" }
criterion = { version = "0.3.5", optional = true }
linkcheck = { git = "https://github.com/ankitects/linkcheck.git", rev = "2f20798ce521cc594d510d4e417e76d5eac04d4b", optional = true }
nom = "7.0.0"
proc-macro-nested = "0.1.7"
slog-term = "2.8.0"
blake3 = "1.0.0"
bytes = "1.1.0"
chrono = "0.4.19"
coarsetime = "0.1.19"
flate2 = "1.0.22"
fluent = "0.16.0"
fluent-bundle = "0.15.1"
futures = "0.3.17"
hex = "0.4.3"
htmlescape = "0.3.1"
intl-memoizer = "0.5.1"
itertools = "0.10.1"
lazy_static = "1.4.0"
num_enum = "0.5.4"
num-integer = "0.1.44"
once_cell = "1.8.0"
pin-project = "1.0.8"
prost = "0.9.0"
rand = "0.8.4"
regex = "1.5.4"
reqwest = { git="https://github.com/ankitects/reqwest.git", rev="7591444614de02b658ddab125efba7b2bb4e2335", default-features=false, features=[
"json",
"socks",
"stream",
"multipart",
# the Bazel build scripts separate these out by platform
"native-tls",
"rustls-tls",
"rustls-tls-webpki-roots",
"rustls-tls-native-roots",
] }
rusqlite = { version = "0.26.1", features = ["trace", "functions", "collation", "bundled"] }
scopeguard = "1.1.0"
serde = "1.0.130"
serde_derive = "1.0.130"
serde_json = "1.0.68"
serde_repr = "0.1.7"
serde_tuple = "0.5.0"
serde-aux = "3.0.1"
sha1 = "0.6.0"
slog = { version = "2.7.0", features = ["max_level_trace", "release_max_level_debug"] }
slog-async = "2.7.0"
slog-envlogger = "2.2.0"
tempfile = "3.2.0"
tokio = { version = "1.12.0", features = ["fs", "rt-multi-thread"] }
unic-langid = { version = "0.9.0", features = ["macros"] }
unicode-normalization = "0.1.19"
utime = "0.3.1"
zip = { version = "0.5.13", default-features = false, features = ["deflate", "time"] }
async-trait = "0.1.51"
ammonia = "3.1.2"
pulldown-cmark = "0.8.0"
fnv = "1.0.7"
strum = { version = "0.23.0", features = ["derive"] }
tokio-util = { version = "0.6.8", features = ["io"] }
pct-str = { git="https://github.com/timothee-haudebourg/pct-str.git", rev="4adccd8d4a222ab2672350a102f06ae832a0572d" }
unic-ucd-category = "0.9.0"