Skip to content

Commit 67ccecb

Browse files
committed
Update comments in Cargo.toml
1 parent 29af390 commit 67ccecb

File tree

1 file changed

+19
-28
lines changed

1 file changed

+19
-28
lines changed

Cargo.toml

+19-28
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,22 @@ cfg-if = "0.1.10"
2323
rustc-demangle = "0.1.4"
2424
backtrace-sys = { path = "crates/backtrace-sys", version = "0.1.35", optional = true, default_features = false }
2525
libc = { version = "0.2.45", default-features = false }
26-
core = { version = "1.0.0", optional = true, package = 'rustc-std-workspace-core' }
27-
compiler_builtins = { version = '0.1.2', optional = true }
2826

29-
# Optionally enable the ability to serialize a `Backtrace`
27+
# Optionally enable the ability to serialize a `Backtrace`, controlled through
28+
# the `serialize-*` features below.
3029
serde = { version = "1.0", optional = true, features = ['derive'] }
3130
rustc-serialize = { version = "0.3", optional = true }
3231

3332
# Optionally demangle C++ frames' symbols in backtraces.
3433
cpp_demangle = { default-features = false, version = "0.2.3", optional = true }
3534

36-
# Optional dependencies enabled through the `gimli-symbolize` feature
37-
addr2line = { version = "0.12.0", optional = true, default-features = false }
35+
# Internal dependencies when built as a dependency of libstd, do not use.
36+
core = { version = "1.0.0", optional = true, package = 'rustc-std-workspace-core' }
37+
compiler_builtins = { version = '0.1.2', optional = true }
3838

39+
# Optional dependencies enabled through the `gimli-symbolize` feature, do not
40+
# use these features directly.
41+
addr2line = { version = "0.12.0", optional = true, default-features = false }
3942
[dependencies.object]
4043
version = "0.19"
4144
optional = true
@@ -45,34 +48,24 @@ features = ['read_core', 'elf', 'macho', 'pe']
4548
[target.'cfg(windows)'.dependencies]
4649
winapi = { version = "0.3.3", optional = true }
4750

48-
# Each feature controls the two phases of finding a backtrace: getting a
49-
# backtrace and then resolving instruction pointers to symbols. The default
50-
# feature enables all the necessary features for each platform this library
51-
# supports, but it can be disabled to have finer grained control over the
52-
# dependencies.
53-
#
54-
# Note that not all features are available on all platforms, so even though a
55-
# feature is enabled some other feature may be used instead.
5651
[features]
52+
# By default libstd support and libbacktrace is used to symbolize addresses.
5753
default = ["std", "libbacktrace"]
5854

59-
# Include std support.
55+
# Include std support. This enables types like `Backtrace`.
6056
std = []
6157

6258
#=======================================
6359
# Methods of resolving symbols
6460
#
6561
# - libbacktrace: this feature activates the `backtrace-sys` dependency,
66-
# building the libbacktrace library found in gcc repos. This library
67-
# parses the DWARF info of ELF executables to find symbol names, and it
68-
# can also provide filename/line number information if debuginfo is
69-
# compiled in. This library currently only primarily works on unixes that
70-
# are not OSX, however.
62+
# building the libbacktrace library found in gcc repos. This is the historical
63+
# default for the `backtrace` crate.
7164
# - gimli-symbolize: use the `gimli-rs/addr2line` crate to symbolicate
72-
# addresses into file, line, and name using DWARF debug information. At
73-
# the moment, this is only possible when targetting Linux, since macOS
74-
# splits DWARF out into a separate object file. Enabling this feature
75-
# means one less C dependency.
65+
# addresses into file, line, and name using DWARF debug information.
66+
#
67+
# Note that MSVC unconditionally uses the dbghelp library to symbolize and won't
68+
# be affected by feature selection here.
7669
libbacktrace = ["backtrace-sys/backtrace-sys"]
7770
gimli-symbolize = ["addr2line", "object", "std"]
7871

@@ -84,18 +77,16 @@ serialize-rustc = ["rustc-serialize"]
8477
serialize-serde = ["serde"]
8578

8679
#=======================================
87-
# Deprecated features
80+
# Deprecated/internal features
8881
#
89-
# Only here for backwards compatibility purposes, they do nothing now.
82+
# Only here for backwards compatibility purposes or for internal testing
83+
# purposes. New code should use none of these features.
9084
coresymbolication = []
9185
dladdr = []
9286
kernel32 = []
9387
unix-backtrace = []
9488
libunwind = []
9589
dbghelp = []
96-
97-
#=======================================
98-
# Internal features for testing and such.
9990
verify-winapi = [
10091
'winapi/dbghelp',
10192
'winapi/handleapi',

0 commit comments

Comments
 (0)