lychee/lychee-lib/Cargo.toml
Matthias ac490f9c53
Add caching functionality (v2) (#443)
A while ago, caching was removed due to some issues (see #349).
This is a new implementation with the following improvements:

 * Architecture: The new implementation is decoupled from the collector, which was a major issue in the last version.    Now the collector has a single responsibility: collecting links. This also avoids race-conditions when running multiple collect_links instances, which probably was an issue before.
* Performance: Uses DashMap under the hood, which was noticeably faster than Mutex<HashMap> in my tests.
* Simplicity: The cache format is a CSV file with two columns: URI and status. I decided to create a new struct called CacheStatus for serialization, because trying to serialize the error kinds in Status turned out to be a bit of a nightmare and at this point I don't think it's worth the pain (and probably isn't idiomatic either).

This is an optional feature. Caching only gets used if the `--cache` flag is set.
2022-01-14 15:25:51 +01:00

65 lines
1.7 KiB
TOML

[package]
name = "lychee-lib"
authors = ["Matthias Endler <matthias@endler.dev>"]
description = "A glorious link checker"
documentation = "https://github.com/lycheeverse/lychee/blob/master/README.md"
edition = "2021"
homepage = "https://github.com/lycheeverse/lychee"
keywords = [
"link",
"checker",
"cli",
"link-checker",
"validator",
]
license = "Apache-2.0/MIT"
repository = "https://github.com/lycheeverse/lychee"
version = "0.8.2"
[dependencies]
check-if-email-exists = "0.8.25"
fast_chemail = "0.9.6"
glob = "0.3.0"
html5ever = "0.25.1"
http = "0.2.6"
hubcaps = "0.6.2"
linkify = "0.8.0"
openssl-sys = "0.9.72"
pulldown-cmark = "0.9.0"
regex = "1.5.4"
# Use trust-dns to avoid lookup failures on high concurrency
# https://github.com/seanmonstar/reqwest/issues/296
reqwest = { version = "0.11.9", features = ["gzip", "trust-dns"] }
# Make build work on Apple Silicon.
# See https://github.com/briansmith/ring/issues/1163
# This is necessary for the homebrew build
# https://github.com/Homebrew/homebrew-core/pull/70216
ring = "0.16.20"
serde = { version = "1.0.133", features = ["derive"] }
shellexpand = "2.1.0"
tokio = { version = "1.15.0", features = ["full"] }
typed-builder = "0.9.1"
url = { version = "2.2.2", features = ["serde"] }
log = "0.4.14"
path-clean = "0.1.0"
percent-encoding = "2.1.0"
async-stream = "0.3.2"
jwalk = "0.6.0"
cached = "0.29.0"
once_cell = "1.9.0"
thiserror = "1.0.30"
futures = "0.3.19"
lazy_static = "1.4.0"
[dependencies.par-stream]
version = "0.10.0"
features = ["runtime-tokio"]
[dev-dependencies]
doc-comment = "0.3.3"
pretty_assertions = "1.0.0"
tempfile = "3.3.0"
wiremock = "0.5.10"
[features]
vendored-openssl = ["openssl-sys/vendored"]