-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCargo.toml
More file actions
96 lines (90 loc) · 4.46 KB
/
Copy pathCargo.toml
File metadata and controls
96 lines (90 loc) · 4.46 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
[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: the crate a host links is `crates/tinyhivemind-core`, the same as any
# other member. Keeping the root virtual is what makes that uniform.
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"]
# Shared package metadata. A member inherits a field with `field.workspace =
# true`, so the version is written in exactly one place and every crate moves
# together. There is no release workflow and nothing here is published: a
# consumer pins a git commit, and that commit is the version.
[workspace.package]
version = "0.2.1"
edition = "2024"
rust-version = "1.88"
license = "GPL-3.0-only"
repository = "https://github.com/tinyhumansai/tinyhivemind"
[workspace.dependencies]
# The pure half: the desk/roster/mention/session algebra. `crates/tinyhivemind`
# (the session runtime, added in P4) depends on it and re-exports it, so a host
# that only needs the algebra takes this crate alone.
# No `version` requirement on purpose: the workspace version can move on any
# commit, 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.
tinyhivemind-core = { path = "crates/tinyhivemind-core" }
# The session runtime: the host ports, attributed projection, and continuous
# sharing. `crates/tinyhivemind-hive` folds over its session types and depends on
# it directly; a host that wants group deliberation takes the hive crate and
# gets both of the others transitively.
tinyhivemind = { path = "crates/tinyhivemind" }
# Bounded group deliberation over a shared desk: traces, salience, quorum with
# cross-inhibition, and the attention market. Pure, and opt-in — a host that
# only wants one-responder routing never links it.
tinyhivemind-hive = { path = "crates/tinyhivemind-hive" }
# Derive macros for the crate-wide error type in `crates/tinyhivemind-core/src/error/`.
# Every dependency entry should carry a comment like this one saying why it is
# here.
thiserror = "2"
# Desk overlays, mentions and session messages cross a wire: they are stored
# inside the host's own records and its append-only journal. Their serde
# attributes are part of that wire format and travel with the type definitions.
serde = { version = "1", features = ["derive"] }
# Pins the exact JSON object shape and required fields of host-facing DTOs in
# unit tests without adding JSON handling to the runtime dependency graph.
serde_json = "1"
# Optional, and off by default. Powers the `regex` feature of the `select`
# module: a search that cannot be spelled as a substring is spelled as an
# expression instead. Default features are off because a picker needs matching
# and case folding, not the whole crate's optional syntax surface.
regex = { version = "1", default-features = false, features = ["std", "perf", "unicode-case", "unicode-perl"] }
# Drives only the runtime crate's async unit tests. The library itself remains
# executor-neutral and exposes boxed futures at its host port.
tokio = { version = "1", features = ["macros", "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"