Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
108 lines (102 loc) · 5.2 KB
/
Copy pathCargo.toml
File metadata and controls
108 lines (102 loc) · 5.2 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[workspace]
resolver = "3"
# Every crate in this repository lives under `crates/`, one directory per
# package, each directory named for the package it holds. There is no root
# package: `crates/tinystoragedrivers` is the facade a host depends on, and the
# ports and drivers it forwards are ordinary members beside it.
members = ["crates/*"]
# `worktrees/` holds `git worktree` checkouts of this same repository; each
# contains a full copy of this manifest and every crate under it, so without
# this entry cargo walks into them and reports duplicate packages.
exclude = ["worktrees", "proof-workspaces/document-callback"]
# Shared package metadata. A member inherits a field with `field.workspace =
# true`, so the version the release workflow bumps is written in exactly one
# place and every crate moves together.
[workspace.package]
version = "0.11.0"
edition = "2024"
rust-version = "1.88"
license = "GPL-3.0-only"
repository = "https://github.com/tinyhumansai/tinystoragedrivers"
[workspace.dependencies]
# Minimal document wire clients and confined host callbacks; never linked by core.
tinybus = { git = "https://github.com/tinyhumansai/tinybus", rev = "d5b949be8ea56eb5a17289a09aa28e8c09bd88b7", default-features = false }
tinystoragedrivers-bus = { path = "crates/tinystoragedrivers-bus" }
# Bus client implementing the storage ports, plus the reference server adapter.
tinystoragedrivers-client = { path = "crates/tinystoragedrivers-client" }
# The real TinyBus transport for the storage bus: module-side connect and host-side serve.
tinystoragedrivers-busproxy = { path = "crates/tinystoragedrivers-busproxy" }
# SHA-256 binds Mongo watch cursors and protects native secret key identities.
sha2 = "0.10"
# Shared streaming buffers for the S3 driver and zeroized cloud KMS payloads.
bytes = "1"
# HTTP transports for AWS/GCP KMS; also used by the S3 HTTP contract tests.
# TLS and JSON stay caller-selected to keep optional transports out of core.
reqwest = { version = "0.12", default-features = false }
# Scoped S3-compatible streaming blobs, optional in the facade.
tinystoragedrivers-s3 = { path = "crates/tinystoragedrivers-s3" }
# The storage ports, the in-memory driver and the conformance suite. Every
# driver crate and the facade depend on it, so a value written through one
# driver has exactly one set of types to describe it.
# No `version` requirement on purpose: the workspace version moves on every
# release, and a pinned requirement here would stop resolving the moment it did.
# Nothing in this workspace is published, so the path is the whole address.
tinystoragedrivers-core = { path = "crates/tinystoragedrivers-core" }
# The plain-file driver. The facade forwards it behind its `file` feature.
# No `version` requirement, for the same reason as the core above.
tinystoragedrivers-file = { path = "crates/tinystoragedrivers-file" }
# Throwaway directories for the file driver's tests and the facade's `file:`
# URL test. Dev-only; no library code depends on it.
tempfile = "3"
# The SQLite driver, forwarded by the facade's `sqlite` feature.
tinystoragedrivers-sqlite = { path = "crates/tinystoragedrivers-sqlite" }
# The `SecretStore` port and its drivers. The facade forwards it behind its
# `secrets` feature; kept out of the core so the core links no cryptography.
tinystoragedrivers-secrets = { path = "crates/tinystoragedrivers-secrets" }
# The MongoDB driver. The facade forwards it behind its `mongodb` feature.
tinystoragedrivers-mongodb = { path = "crates/tinystoragedrivers-mongodb" }
# The ports are object-safe async traits (`Arc<dyn DocumentStore>`), which
# native `async fn` in traits cannot express on the declared MSRV.
async-trait = "0.1"
# Derive macros for `StorageError`.
thiserror = "2"
# Documents and stream records are JSON values; `CollectionSpec` and the query
# types serialize so a host can log or persist them.
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# The blocking bridge owns a dedicated runtime thread, and tests drive the async
# ports. Only the current-thread runtime is needed by the library itself.
tokio = { version = "1", default-features = false, features = ["rt", "sync"] }
# Lints apply to every member that opts in with `[lints] workspace = true`, and
# to every target of that member. CI runs clippy with `-D warnings`, so anything
# set to "warn" here fails the build in CI.
[workspace.lints.rust]
unsafe_code = "forbid"
missing_docs = "warn"
missing_debug_implementations = "warn"
unreachable_pub = "warn"
rust_2018_idioms = { level = "warn", priority = -1 }
[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
# Library code must not panic on its own; tests and examples may.
unwrap_used = "warn"
expect_used = "warn"
panic = "warn"
todo = "warn"
unimplemented = "warn"
# Public fallible/panicking APIs must document their failure modes.
missing_errors_doc = "warn"
missing_panics_doc = "warn"
# Documentation hygiene.
doc_markdown = "warn"
# `#[must_use]` on pure public functions.
must_use_candidate = "warn"
[workspace.lints.rustdoc]
broken_intra_doc_links = "warn"
private_intra_doc_links = "warn"
[profile.release]
# Cross-crate optimization and smaller, faster binaries for release builds.
lto = "thin"
codegen-units = 1
strip = "debuginfo"