Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
152 lines (138 loc) Β· 5.77 KB
/
Copy pathCargo.toml
File metadata and controls
152 lines (138 loc) Β· 5.77 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
[package]
name = "microscope"
version = "0.1.0"
edition = "2024"
license = "MIT OR Apache-2.0"
description = "A Linux x86-64 native debugger"
repository = "https://github.com/microscope-dev/microscope"
readme = "README.md"
keywords = ["debugger", "dwarf", "linux", "ptrace"]
categories = ["command-line-utilities", "development-tools::debugging"]
[features]
# Fuzz harnesses synthesize object files from structured input.
fuzzing = ["object/write"]
# The deterministic simulator's sweep and replay binary. Its tests run with
# the library's own.
sim = []
# Allocates with the C library's allocator instead of mimalloc, for heap
# profilers such as Valgrind's that cannot see mimalloc.
system-alloc = []
# Developer tools: `microscope-tools` dumps every answer a program's debug
# information gives, loads programs for benchmarks, and summarizes timings.
tools = []
[[bin]]
name = "microscope-tools"
path = "src/bin/microscope-tools.rs"
required-features = ["tools"]
[[bin]]
name = "microscope-sim"
path = "src/bin/microscope-sim.rs"
required-features = ["sim"]
[lints.rust]
future_incompatible = { level = "deny", priority = -1 }
rust_2018_idioms = { level = "deny", priority = -1 }
unsafe_code = "deny"
unsafe_op_in_unsafe_fn = "deny"
unused = { level = "deny", priority = -1 }
# loom/ builds the protocols it checks under cfg(loom).
unexpected_cfgs = { level = "deny", check-cfg = ["cfg(loom)"] }
[lints.clippy]
all = { level = "deny", priority = -1 }
cargo = { level = "deny", priority = -1 }
nursery = { level = "deny", priority = -1 }
pedantic = { level = "deny", priority = -1 }
# Hash iteration order varies between runs, which would make the same input
# behave differently; clippy.toml bans the iterator methods `for` misses.
iter_over_hash_type = "deny"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
missing_safety_doc = "deny"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"
undocumented_unsafe_blocks = "deny"
[dependencies]
anyhow = "1.0"
anstyle = "1.0"
anstyle-query = "1.1"
clap = { version = "4.6", features = ["derive", "wrap_help"] }
memchr = "2.8"
regex = "1.13"
rustyline = "18.0"
rustc_apfloat = "=0.2.3"
serde = { version = "1.0", features = ["derive", "rc"] }
serde_json = "1.0"
serde_path_to_error = "0.1"
thiserror = "2.0"
wasmi = { version = "2.0", default-features = false, features = ["std", "validate"] }
tokio = { version = "1.52", features = ["fs", "io-std", "io-util", "macros", "net", "rt-multi-thread", "signal", "sync", "time"] }
axum = { version = "0.8", default-features = false, features = ["http1", "tokio", "ws"] }
toml = "1.1"
mimalloc = { version = "0.1", default-features = false }
foldhash = "0.2"
# pprof's profiles are gzipped; object already brings it in.
flate2 = "1.1"
# `alloc` for zeroed vectors the allocator can take from fresh, already
# zero pages instead of filling.
zerocopy = { version = "0.8", features = ["alloc", "derive"] }
rayon = "1.11"
twox-hash = { version = "2.1", default-features = false, features = ["std", "xxhash3_64", "xxhash3_128"] }
# The instrumentation ABI, which the collector reads: the SDK without its
# `enabled` feature is that and nothing else.
microscope-probes = { path = "sdk/rust-probes" }
[target.'cfg(target_os = "linux")'.dependencies]
aya = "0.14"
aya-obj = "0.3"
cpp_demangle = "0.5"
crc32fast = "1.5"
gimli = "0.34"
iced-x86 = { version = "1.21", default-features = false, features = ["decoder", "gas", "instr_info", "intel", "std"] }
lzma-rs = "0.3"
nix = { version = "0.31", features = ["feature", "fs", "personality", "poll", "ptrace", "process", "resource", "sched", "signal", "term", "time", "uio"] }
object = { version = "0.39", features = ["read"] }
perf-event = "0.4"
# Safe wrappers of the system calls nix does not make; clap brings it in.
rustix = { version = "1.1", features = ["event", "param", "process", "thread"] }
ureq = { version = "3", default-features = false, features = ["rustls"] }
rustc-demangle = "0.1"
[dev-dependencies]
expectrl = "0.9"
futures-util = { version = "0.3.34", default-features = false, features = ["sink"] }
jsonschema = { version = "0.58", default-features = false }
proptest = { version = "1.11", default-features = false, features = ["std"] }
tokio-tungstenite = "0.29"
ts-rs = { version = "12.0.1", features = ["serde-json-impl"] }
[target.'cfg(target_os = "linux")'.dev-dependencies]
object = { version = "0.39", features = ["read", "write"] }
# Debug-info normalization is deliberately CPU-heavy. A small amount of
# optimization keeps the full behavioral matrix fast without the compile cost
# or disabled safety checks of the release profile: at no optimization the
# suite takes three times as long. Optimized builds otherwise link-time
# optimize across a crate's codegen units, which repeats for the whole crate
# after every edit and takes as long as compiling the edit.
[profile.test]
opt-level = 1
debug = 1
lto = "off"
# An integer overflow is a bug; a release build panics on one rather than
# wrapping to a plausible wrong value. See dev/assertions.md.
[profile.release]
overflow-checks = true
# Profilers read release builds with line tables, which name the functions
# and lines their costs belong to.
[profile.profiling]
inherits = "release"
debug = "line-tables-only"
# Simulation sweeps: optimized, with the debug assertions that keep the
# flight recorder and internal checks on.
[profile.sim]
inherits = "release"
debug-assertions = true
overflow-checks = true
# Generating debuginfo for this crate more than doubles the incremental rebuild
# after an edit. Dependencies keep theirs since they are rarely rebuilt. Pass
# `--config 'profile.test.package.microscope.debug=2'` when stepping through a test.
[profile.test.package.microscope]
debug = 0
# The crate has more modules than an incremental build's 256 default codegen
# units, so a clean build merged them and ran fewer at once.
codegen-units = 4096