1[package]
2name = "backtrace"
3version = "0.3.69"
4authors = ["The Rust Project Developers"]
5build = "build.rs"
6license = "MIT OR Apache-2.0"
7readme = "README.md"
8repository = "https://github.com/rust-lang/backtrace-rs"
9homepage = "https://github.com/rust-lang/backtrace-rs"
10documentation = "https://docs.rs/backtrace"
11description = """
12A library to acquire a stack trace (backtrace) at runtime in a Rust program.
13"""
14autoexamples = true
15autotests = true
16edition = "2021"
17exclude = ["/ci/"]
18rust-version = "1.65.0"
19
20[workspace]
21members = ['crates/cpp_smoke_test', 'crates/as-if-std']
22exclude = [
23 'crates/without_debuginfo',
24 'crates/macos_frames_test',
25 'crates/line-tables-only',
26 'crates/debuglink',
27]
28
29[dependencies]
30cfg-if = "1.0"
31rustc-demangle = "0.1.4"
32
33# Optionally enable the ability to serialize a `Backtrace`, controlled through
34# the `serialize-*` features below.
35serde = { version = "1.0", optional = true, features = ['derive'] }
36rustc-serialize = { version = "0.3", optional = true }
37
38# Optionally demangle C++ frames' symbols in backtraces.
39cpp_demangle = { default-features = false, version = "0.4.0", optional = true, features = ["alloc"] }
40
41[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies]
42miniz_oxide = { version = "0.7.0", default-features = false }
43addr2line = { version = "0.21.0", default-features = false }
44libc = { version = "0.2.146", default-features = false }
45
46[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies.object]
47version = "0.32.0"
48default-features = false
49features = ['read_core', 'elf', 'macho', 'pe', 'xcoff', 'unaligned', 'archive']
50
51[target.'cfg(windows)'.dependencies]
52winapi = { version = "0.3.9", optional = true }
53
54[build-dependencies]
55# Only needed for Android, but cannot be target dependent
56# https://github.com/rust-lang/cargo/issues/4932
57cc = "1.0.67"
58
59[dev-dependencies]
60dylib-dep = { path = "crates/dylib-dep" }
61libloading = "0.7"
62
63[features]
64# By default libstd support is enabled.
65default = ["std"]
66
67# Include std support. This enables types like `Backtrace`.
68std = []
69
70#=======================================
71# Methods of serialization
72#
73# Various features used for enabling rustc-serialize or syntex codegen.
74serialize-rustc = ["rustc-serialize"]
75serialize-serde = ["serde"]
76
77#=======================================
78# Deprecated/internal features
79#
80# Only here for backwards compatibility purposes or for internal testing
81# purposes. New code should use none of these features.
82coresymbolication = []
83dbghelp = []
84dladdr = []
85gimli-symbolize = []
86kernel32 = []
87libbacktrace = []
88libunwind = []
89unix-backtrace = []
90verify-winapi = [
91 'winapi/dbghelp',
92 'winapi/handleapi',
93 'winapi/libloaderapi',
94 'winapi/memoryapi',
95 'winapi/minwindef',
96 'winapi/processthreadsapi',
97 'winapi/synchapi',
98 'winapi/tlhelp32',
99 'winapi/winbase',
100 'winapi/winnt',
101]
102
103[[example]]
104name = "backtrace"
105required-features = ["std"]
106
107[[example]]
108name = "raw"
109required-features = ["std"]
110
111[[test]]
112name = "skip_inner_frames"
113required-features = ["std"]
114
115[[test]]
116name = "long_fn_name"
117required-features = ["std"]
118
119[[test]]
120name = "smoke"
121required-features = ["std"]
122edition = '2021'
123
124[[test]]
125name = "accuracy"
126required-features = ["std"]
127edition = '2021'
128
129[[test]]
130name = "concurrent-panics"
131required-features = ["std"]
132harness = false
133
134[[test]]
135name = "current-exe-mismatch"
136required-features = ["std"]
137harness = false
138