Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
72 lines (67 loc) · 2.84 KB
/
Copy pathCargo.toml
File metadata and controls
72 lines (67 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
[package]
name = "tinymemory-sources"
version = "0.1.0"
edition = "2021"
rust-version = "1.96"
license = "MIT"
repository = "https://github.com/tinyhumansai/tinymemory"
description = "Engine-neutral memory-source contracts: what a source is, and what a reader hands back"
publish = false
[dependencies]
# The source types are serde shapes: they are persisted in the host's source
# registry and cross the RPC surface.
serde = { version = "1", features = ["derive"] }
# `MemorySourceEntry` and friends appear in generated schemas, same as the
# contract crate's own types.
schemars = "1.2"
# `MemorySourceEntry::metadata` is an open `Value` — connector-specific config
# the host round-trips without interpreting.
serde_json = "1"
# `MemorySourcePatch::validate_for_kind` reports which field is inapplicable to
# a kind; the engine typed that with anyhow and the message is the payload.
anyhow = "1"
# The contract, for `MemoryError` — `ensure_within_base` reports `PathEscape`,
# which the contract already models, so readers speak the same error language
# as the drivers they feed.
tinymemory-api = { path = "../api" }
# The readers are the I/O half of this crate: they walk folders, fetch feeds,
# scrape pages and call the GitHub API. These are theirs, and the reason the
# readers live here rather than in the contract crate — `tinymemory-api`
# forbids exactly this list (#18 §D4).
async-trait = "0.1"
futures = { version = "0.3", optional = true }
regex = "1.10"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "stream"], optional = true }
walkdir = "2"
# Diagnostics on the network readers' fetch paths.
tracing = { version = "0.1", optional = true }
# Feed and issue timestamps.
chrono = { version = "0.4", features = ["serde"], optional = true }
# The GitHub reader shells out to `git` for clones.
tokio = { version = "1", features = ["process", "io-util"], optional = true }
# The registry is the host's `sources.toml`: it reads, mutates and rewrites it.
toml = "1.1"
# New sources get a generated id.
uuid = { version = "1", features = ["v4"] }
[dev-dependencies]
tempfile = "3"
# The reader tests are async.
tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread"] }
[features]
# Nothing by default: a host that only reads local folders and conversations
# links no HTTP stack.
default = []
# The readers that fetch over the network — GitHub, RSS, web pages. The engine
# spelled this gate `sync`; renamed here because `tinymemory-sync` is a
# different crate in this workspace and one name for two things is how the
# `SourceKind` confusion started.
network = ["dep:reqwest", "dep:futures", "dep:tracing", "dep:chrono", "dep:tokio"]
[lints.rust]
unsafe_code = "forbid"
missing_docs = "warn"
unreachable_pub = "warn"
[lints.clippy]
all = { level = "warn", priority = -1 }
unwrap_used = "warn"
expect_used = "warn"
panic = "warn"