forked from libbpf/blazesym
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
155 lines (139 loc) · 5.16 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
[workspace]
members = [
".",
"capi",
"cli",
"examples/sym-debuginfod",
"examples/gsym-in-apk",
]
[package]
name = "blazesym"
description = "blazesym is a library for address symbolization and related tasks."
version = "0.2.0-alpha.12"
edition = "2021"
rust-version = "1.65"
authors = ["Daniel Müller <deso@posteo.net>", "Kui-Feng <thinker.li@gmail.com>"]
license = "BSD-3-Clause"
repository = "https://github.com/libbpf/blazesym"
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 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 = []
# 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.
# Enable this feature to opt in to the generation of unit test files.
# Having these test files created is necessary for running tests.
generate-unit-test-files = ["dump_syms", "xz2", "zip"]
# Enable this feature to opt in to the generation of large benchmark
# files (also used for regression testing).
generate-large-test-files = ["dump_syms", "reqwest", "xz2"]
# Disable generation of test files. This feature takes preference over
# `generate-unit-test-files`.
dont-generate-unit-test-files = []
# 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 = []
[[example]]
name = "addr2ln"
[[example]]
name = "addr2ln_pid"
[[example]]
name = "backtrace"
[[bench]]
name = "main"
harness = false
[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
[build-dependencies]
dump_syms = {version = "2.3", optional = true, default-features = false}
libc = "0.2.137"
reqwest = {version = "0.12.0", optional = true, features = ["blocking"]}
xz2 = {version = "0.1.7", optional = true}
zip = {version = "2.0.0", optional = true, default-features = false}
[dependencies]
cpp_demangle = {version = "0.4", optional = true}
gimli = {version = "0.29", optional = true}
libc = "0.2.137"
miniz_oxide = {version = "0.7", 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.27", 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.22.0"
anyhow = "1.0.71"
# TODO: Enable `zstd` feature once toolchain support for it is more
# widespread (enabled by default in `ld`). Remove conditionals in
# test code alongside.
blazesym = {path = ".", features = ["generate-unit-test-files", "apk", "breakpad", "gsym", "tracing"]}
# 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"]}
# A set of unused dependencies that we require to force correct minimum versions
# of transitive dependencies, for cases where our dependencies have incorrect
# dependency specifications themselves.
# > 22 | let mut hash = simd_adler32::Adler32::from_checksum(adler);
# > | ^^^^^^^^^^^^^ function or associated item not found in `Adler32`
_simd-adler32_unused = { package = "simd-adler32", version = "0.3.3" }
# 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"]