-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
103 lines (88 loc) · 2.94 KB
/
Cargo.toml
File metadata and controls
103 lines (88 loc) · 2.94 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
[package]
name = "bytes-radar"
version = "1.1.0"
edition = "2021"
authors = ["ProgramZmh <zmh@lightxi.com>"]
description = "A tool for analyzing code statistics from remote repositories with hyper-fast performance"
license = "Apache-2.0"
repository = "https://github.com/zmh-program/bytes-radar"
keywords = ["cloc", "code-analysis", "remote", "cli"]
exclude = [
"target/",
"app/",
"Cargo.lock",
"tests/",
"examples/",
".github/",
".gitignore",
".git/",
"*.md",
"benches/",
"docs/"
]
[features]
default = ["cli"]
cli = ["colored", "env_logger", "clap", "indicatif", "serde_yaml", "toml"]
worker = ["wasm-bindgen", "web-sys", "js-sys", "wasm-bindgen-futures", "serde-wasm-bindgen"]
[lib]
crate-type = ["rlib", "cdylib"]
[dependencies]
once_cell = "1.21"
anyhow = "1.0"
thiserror = "2.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde-xml-rs = "0.6"
log = "0.4"
tar = "0.4"
flate2 = "1.1"
futures-util = "0.3"
bytes = "1.5"
async-trait = "0.1"
# CLI dependencies
colored = { version = "2.2", optional = true }
env_logger = { version = "0.11", optional = true }
clap = { version = "4.5", features = ["derive"], optional = true }
indicatif = { version = "0.17", optional = true }
serde_yaml = { version = "0.9", optional = true }
toml = { version = "0.8", optional = true }
# WASM dependencies
wasm-bindgen = { version = "0.2", optional = true }
web-sys = { version = "0.3", features = ["Headers", "Request", "RequestInit", "RequestMode", "Response", "Window", "console"], optional = true }
js-sys = { version = "0.3", optional = true }
wasm-bindgen-futures = { version = "0.4", optional = true }
serde-wasm-bindgen = { version = "0.6", optional = true }
instant = { version = "0.1.13", features = ["wasm-bindgen"] }
# Configure dependencies differently for different targets
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.46", default-features = false, features = ["macros", "rt", "net", "io-util", "fs", "process", "signal", "time", "rt-multi-thread", "sync"] }
reqwest = { version = "0.12", features = ["stream", "rustls-tls", "json"], default-features = false }
[target.'cfg(target_arch = "wasm32")'.dependencies]
tokio = { version = "1.46", default-features = false, features = ["macros", "rt", "sync"] }
reqwest = { version = "0.12", features = ["stream", "json", "default-tls"], default-features = false }
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
[profile.dev]
opt-level = 0
debug = true
[[example]]
name = "basic_analysis"
path = "examples/basic_analysis.rs"
[[example]]
name = "github_token_analysis"
path = "examples/github_token_analysis.rs"
[[example]]
name = "compare_repositories"
path = "examples/compare_repositories.rs"
[[example]]
name = "custom_analysis"
path = "examples/custom_analysis.rs"
[dev-dependencies]
tokio = { version = "1.46", features = ["macros", "rt"] }
[[bin]]
name = "bradar"
path = "src/main.rs"
required-features = ["cli"]