-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
124 lines (117 loc) · 5.13 KB
/
Copy pathCargo.toml
File metadata and controls
124 lines (117 loc) · 5.13 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
[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 that ships as the `tinyanalyzer` binary is
# `crates/tinyanalyzer`, 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 = "1.0.1"
edition = "2024"
rust-version = "1.88"
license = "GPL-3.0-only"
repository = "https://github.com/tinyhumansai/tinyanalyzer"
[workspace.dependencies]
# The analysis engine. `crates/tinyanalyzer` depends on it and re-exports it,
# so a tool embedding the analyzer takes this crate alone and never links the
# HTTP server.
# 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.
tinyanalyzer-core = { path = "crates/tinyanalyzer-core" }
# Derive macros for the crate-wide error types in each crate's `src/error/`.
thiserror = "2"
# Report types are serialized to JSON for the dashboard API and the `--json`
# output mode; the configuration file is deserialized from TOML.
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# `tinyanalyzer.toml` is the tool's configuration format.
toml = { version = "0.9", default-features = false, features = ["parse", "serde"] }
# Gitignore-aware, parallel directory traversal. Reusing ripgrep's walker is
# what makes "analyze this repository" mean the same set of files a developer
# sees, without reimplementing ignore-file semantics.
ignore = "0.4"
# User-supplied include/exclude patterns in `tinyanalyzer.toml` are globs.
globset = "0.4"
# The Rust source parser behind every per-file item, function-length, and
# complexity metric. `full` is required to see function bodies; `visit` gives
# the AST walker the analyzers are written against.
syn = { version = "2", default-features = false, features = [
"full",
"parsing",
"visit",
"clone-impls",
"derive",
"printing",
"proc-macro",
] }
# `span-locations` is what turns a `syn` node into a line number. Without it
# every reported location would be line 0.
proc-macro2 = { version = "1", features = ["span-locations"] }
# The dependency graph is cargo's own resolution, not a re-parse of manifests:
# features, transitive edges, and duplicate versions are only correct if they
# come from the resolver that produced `Cargo.lock`.
cargo_metadata = "0.23"
# Per-file parsing is embarrassingly parallel and dominates wall-clock time on
# a large repository.
rayon = "1"
# Dashboard filters are compiled regular expressions; invalid expressions fall
# back to literal matching while the operator is still typing them.
regex = "1"
# The dashboard itself: a terminal UI rendered by ratatui over a crossterm
# backend. The analyzer ships as one binary with no runtime, no browser, and no
# bundled web assets — the dashboard is the program, not something the program
# serves.
# `crossterm` is taken through ratatui's own re-export rather than declared
# separately: the backend has to be built against exactly the version ratatui
# links, and two entries in one manifest is the standard way to end up with two
# incompatible `KeyEvent` types that differ only in a version number.
ratatui = { version = "0.30", default-features = false, features = [
"crossterm",
"layout-cache",
"underline-color",
] }
# The command-line surface of the shipped binary.
clap = { version = "4", features = ["derive", "env"] }
# Integration tests build fixture trees that must not outlive the test.
tempfile = "3"
# 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"