Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
79 lines (73 loc) · 3.02 KB
/
Copy pathCargo.toml
File metadata and controls
79 lines (73 loc) · 3.02 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
[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/tinytools`, the same as any other
# member.
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 the release workflow bumps is written in exactly one
# place and every crate moves together.
[workspace.package]
version = "0.5.0"
edition = "2024"
rust-version = "1.88"
license = "GPL-3.0-only"
repository = "https://github.com/tinyhumansai/tinytools"
[workspace.dependencies]
# The tool trait is `async`, so it needs the object-safety shim until native
# async-in-trait supports `dyn`. This is the single heaviest thing this crate
# asks of a host, and it is already in every consumer's graph.
async-trait = "0.1"
# Tool results, specs and the permission vocabulary are serialized: into agent
# transcripts, into RPC replies, and into the JSONL session records hosts keep
# on disk.
serde = { version = "1", features = ["derive"] }
# Tool arguments and JSON Schema parameter shapes are untyped by nature.
serde_json = "1"
# Text-mode tool-call grammars recognize tolerant XML/tag variants.
regex = "1"
# Agent protocol diagnostics are optional so the vocabulary crate stays lean.
tracing = { version = "0.1", default-features = false }
# `Tool::execute` returns `anyhow::Result` because a tool body calls arbitrary
# host code and has no useful closed error set of its own.
anyhow = "1"
# Unit tests for async traits drive a real executor.
tokio = { version = "1", features = ["macros", "rt-multi-thread", "time"] }
# 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"