4 authors = ["The Rust Project Developers"]
5 license = "MIT/Apache-2.0"
7 repository = "https://github.com/rust-lang/backtrace-rs"
8 homepage = "https://github.com/rust-lang/backtrace-rs"
9 documentation = "https://docs.rs/backtrace"
11 A library to acquire a stack trace (backtrace) at runtime in a Rust program.
18 members = ['crates/cpp_smoke_test', 'crates/as-if-std']
19 exclude = ['crates/without_debuginfo', 'crates/macos_frames_test', 'crates/line-tables-only']
23 rustc-demangle = "0.1.4"
24 backtrace-sys = { path = "crates/backtrace-sys", version = "0.1.35", optional = true, default_features = false }
25 libc = { version = "0.2.45", default-features = false }
27 # Optionally enable the ability to serialize a `Backtrace`, controlled through
28 # the `serialize-*` features below.
29 serde = { version = "1.0", optional = true, features = ['derive'] }
30 rustc-serialize = { version = "0.3", optional = true }
32 # Optionally demangle C++ frames' symbols in backtraces.
33 cpp_demangle = { default-features = false, version = "0.3.0", optional = true }
36 # Optional dependencies enabled through the `gimli-symbolize` feature, do not
37 # use these features directly.
38 addr2line = { version = "0.13.0", optional = true, default-features = false }
39 miniz_oxide = { version = "0.4.0", optional = true, default-features = false }
43 default-features = false
44 features = ['read_core', 'elf', 'macho', 'pe', 'unaligned']
46 [target.'cfg(windows)'.dependencies]
47 winapi = { version = "0.3.3", optional = true }
50 dylib-dep = { path = "crates/dylib-dep" }
54 # By default libstd support and gimli-symbolize is used to symbolize addresses.
55 default = ["std", "gimli-symbolize"]
57 # Include std support. This enables types like `Backtrace`.
60 #=======================================
61 # Methods of resolving symbols
63 # - gimli-symbolize: use the `gimli-rs/addr2line` crate to symbolicate
64 # addresses into file, line, and name using DWARF debug information.
65 # - libbacktrace: this feature activates the `backtrace-sys` dependency,
66 # building the libbacktrace library found in gcc repos.
68 # Note that MSVC unconditionally uses the dbghelp library to symbolize and won't
69 # be affected by feature selection here. Also note that it's highly unlikely you
70 # want to configure this. If you're having trouble getting backtraces it's
71 # likely best to open an issue.
72 gimli-symbolize = ["addr2line", "miniz_oxide", "object"]
73 libbacktrace = ["backtrace-sys/backtrace-sys"]
75 #=======================================
76 # Methods of serialization
78 # Various features used for enabling rustc-serialize or syntex codegen.
79 serialize-rustc = ["rustc-serialize"]
80 serialize-serde = ["serde"]
82 #=======================================
83 # Deprecated/internal features
85 # Only here for backwards compatibility purposes or for internal testing
86 # purposes. New code should use none of these features.
87 coresymbolication = []
96 'winapi/libloaderapi',
99 'winapi/processthreadsapi',
108 required-features = ["std"]
112 required-features = ["std"]
115 name = "skip_inner_frames"
116 required-features = ["std"]
119 name = "long_fn_name"
120 required-features = ["std"]
124 required-features = ["std"]
129 required-features = ["std", "gimli-symbolize"]
133 name = "concurrent-panics"
134 required-features = ["std"]