@@ -11,6 +11,9 @@ documentation = "https://docs.rs/backtrace"
11
11
description = """
12
12
A library to acquire a stack trace (backtrace) at runtime in a Rust program.
13
13
"""
14
+ autoexamples = true
15
+ autotests = true
16
+
14
17
[dependencies ]
15
18
cfg-if = " 0.1"
16
19
rustc-demangle = " 0.1.4"
@@ -47,7 +50,10 @@ backtrace-sys = { path = "backtrace-sys", version = "0.1.17", optional = true }
47
50
# Note that not all features are available on all platforms, so even though a
48
51
# feature is enabled some other feature may be used instead.
49
52
[features ]
50
- default = [" libunwind" , " libbacktrace" , " coresymbolication" , " dladdr" , " dbghelp" ]
53
+ default = [" std" , " libunwind" , " libbacktrace" , " coresymbolication" , " dladdr" , " dbghelp" ]
54
+
55
+ # Include std support.
56
+ std = []
51
57
52
58
# =======================================
53
59
# Methods of acquiring a backtrace
@@ -86,7 +92,7 @@ kernel32 = []
86
92
# the moment, this is only possible when targetting Linux, since macOS
87
93
# splits DWARF out into a separate object file. Enabling this feature
88
94
# means one less C dependency.
89
- libbacktrace = [" backtrace-sys" ]
95
+ libbacktrace = [" backtrace-sys" , " std " ]
90
96
dladdr = []
91
97
coresymbolication = []
92
98
gimli-symbolize = [" addr2line" , " findshlibs" , " gimli" , " memmap" , " object" ]
@@ -97,3 +103,23 @@ gimli-symbolize = ["addr2line", "findshlibs", "gimli", "memmap", "object" ]
97
103
# Various features used for enabling rustc-serialize or syntex codegen.
98
104
serialize-rustc = [" rustc-serialize" ]
99
105
serialize-serde = [" serde" , " serde_derive" ]
106
+
107
+ [[example ]]
108
+ name = " backtrace"
109
+ required-features = [" std" ]
110
+
111
+ [[example ]]
112
+ name = " raw"
113
+ required-features = [" std" ]
114
+
115
+ [[test ]]
116
+ name = " skip_inner_frames"
117
+ required-features = [" std" ]
118
+
119
+ [[test ]]
120
+ name = " long_fn_name"
121
+ required-features = [" std" ]
122
+
123
+ [[test ]]
124
+ name = " smoke"
125
+ required-features = [" std" ]
0 commit comments