-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathCargo.toml
172 lines (152 loc) · 5 KB
/
Cargo.toml
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
[workspace]
members = [
".",
"capi",
"cli",
"dev",
"examples/sym-debuginfod",
"examples/gsym-in-apk",
]
# We don't want every Cargo command to operate on all members, unless
# --workspace is specified.
default-members = ["."]
[workspace.package]
edition = "2021"
rust-version = "1.69"
license = "BSD-3-Clause"
repository = "https://github.com/libbpf/blazesym"
homepage = "https://github.com/libbpf/blazesym"
[package]
name = "blazesym"
description = "blazesym is a library for address symbolization and related tasks."
version = "0.2.0-rc.2"
edition.workspace = true
rust-version.workspace = true
authors = ["Daniel Müller <[email protected]>", "Kui-Feng <[email protected]>"]
license.workspace = true
repository.workspace = true
homepage.workspace = true
readme = "README.md"
categories = [
"algorithms",
"api-bindings",
"development-tools::debugging",
"os::unix-apis",
"value-formatting",
]
keywords = [
"dwarf",
"elf",
"gsym",
"stacktrace",
"tracing",
]
exclude = ["data/kallsyms.xz"]
autobenches = false
autoexamples = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
default = [
"backtrace",
"demangle",
"dwarf",
"zlib",
]
# Enable this feature to enable APK support (mostly relevant for
# Android).
apk = []
# Enable this feature to compile in support for capturing backtraces in errors.
# Note that by default backtraces will not be collected unless opted in with
# environment variables.
backtrace = []
# Enable BPF support. Currently that entails kernel symbolization being
# able to symbolize addresses in BPF programs.
bpf = []
# Enable this feature to enable Breakpad support.
breakpad = ["dep:nom"]
# Enable this feature to get transparent symbol demangling.
demangle = ["dep:cpp_demangle", "dep:rustc-demangle"]
# Enable this feature to enable DWARF support.
dwarf = ["dep:gimli"]
# Enable this feature to enable Gsym support.
gsym = []
# Emit `tracing` traces and configure spans. User code is responsible for
# subscribing.
tracing = ["dep:tracing"]
# Enable this feature to enable support for zlib decompression. This is
# currently only used for handling compressed debug information.
zlib = ["dep:miniz_oxide"]
# Enable this feature to enable support for zstd decompression. This is
# currently only used for handling compressed debug information.
zstd = ["dep:zstd"]
# Below here are dev-mostly features that should not be needed by
# regular users.
# Expose test-only helpers for convenient use in end-to-end tests from
# crate.
test = []
# Enable code paths requiring a nightly toolchain. This feature is only meant to
# be used for testing and benchmarking purposes, not for the core library, which
# is expected to work on stable.
nightly = []
[[test]]
name = "integration"
required-features = ["test"]
[[example]]
name = "addr2ln"
[[example]]
name = "addr2ln_pid"
[[example]]
name = "backtrace"
[[example]]
name = "normalize-virt-offset"
[[example]]
name = "inspect-mangled"
required-features = ["demangle", "blazesym-dev/generate-unit-test-files"]
[[bench]]
name = "main"
harness = false
required-features = ["test"]
[profile.release]
debug = true
opt-level = 3
lto = true
codegen-units = 1
# `bench` inherits from `release`, but we overwrite some options that
# result in excessive build times for faster iteration.
[profile.bench]
lto = false
codegen-units = 256
[dependencies]
cpp_demangle = {version = "0.4", optional = true}
gimli = {version = "0.31", optional = true}
libc = "0.2.137"
memmap2 = {version = "0.9", default-features = false}
miniz_oxide = {version = "0.8", default-features = false, features = ["simd", "with-alloc"], optional = true}
nom = {version = "7", optional = true}
rustc-demangle = {version = "0.1.4", optional = true}
tracing = {version = "0.1.38", default-features = false, features = ["attributes"], optional = true}
zstd = {version = "0.13.1", default-features = false, optional = true}
[dev-dependencies]
# For performance comparison; pinned, because we use #[doc(hidden)]
# APIs.
addr2line = "=0.24.2"
anyhow = "1.0.71"
blazesym-dev = {path = "dev", features = ["generate-unit-test-files"]}
# TODO: Use 0.5.2 once released.
criterion = {git = "https://github.com/bheisler/criterion.rs.git", rev = "b913e232edd98780961ecfbae836ec77ede49259", default-features = false, features = ["rayon", "cargo_bench_support"]}
scopeguard = "1.2"
stats_alloc = {version = "0.1.1", features = ["nightly"]}
tempfile = "3.4"
test-log = {version = "0.2.14", default-features = false, features = ["trace"]}
test-tag = "0.1.3"
[target.'cfg(target_os = "linux")'.dev-dependencies]
# `bpf` shouldn't be enabled by default for non-Linux targets, because
# it simply can't work.
blazesym = {path = ".", features = ["bpf"]}
# https://docs.rs/about/metadata
[package.metadata.docs.rs]
features = ["apk", "backtrace", "breakpad", "demangle", "dwarf", "gsym"]
# defines the configuration attribute `docsrs`
rustdoc-args = ["--cfg", "docsrs"]
[lints.rust]
unexpected_cfgs = {level = "warn", check-cfg = ['cfg(has_procmap_query_ioctl)', 'cfg(has_large_test_files)']}