forked from gimli-rs/object
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cargo.toml
executable file
·112 lines (93 loc) · 3.35 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
[package]
name = "object"
version = "0.25.0"
authors = [
"Nick Fitzgerald <fitzgen@gmail.com>",
"Philip Craig <philipjcraig@gmail.com>",
]
edition = "2018"
exclude = ["/.coveralls.yml", "/.travis.yml"]
keywords = ["object", "elf", "mach-o", "pe", "coff"]
license = "Apache-2.0/MIT"
repository = "https://github.com/gimli-rs/object"
description = "A unified interface for reading and writing object file formats."
[package.metadata.docs.rs]
features = ['all']
[dependencies]
crc32fast = { version = "1.2", optional = true }
flate2 = { version = "1", optional = true }
indexmap = { version = "1.1", optional = true }
wasmparser = { version = "0.57", optional = true }
memchr = { version = "2.4", default-features = false }
# Internal feature, only used when building as part of libstd, not part of the
# stable interface of this crate.
core = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-core' }
compiler_builtins = { version = '0.1.2', optional = true }
alloc = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-alloc' }
[dev-dependencies]
memmap2 = "0.2.2"
[features]
#=======================================
# Read/write features.
# Core read support. You will need to enable some file formats too.
read_core = []
# Read support for all file formats (including unaligned files).
read = ["read_core", "archive", "coff", "elf", "macho", "pe", "unaligned"]
# Core write support. You will need to enable some file formats too.
write_core = ["crc32fast", "indexmap", "std"]
# Write support for all file formats.
write = ["write_core", "coff", "elf", "macho"]
#=======================================
# Misc features.
# Enable things that require libstd.
# Currently, this provides an `Error` implementation.
std = ["memchr/std"]
# Enable decompression of compressed sections.
# This feature is not required if you want to do your own decompression.
compression = ["flate2", "std"]
# Treat all types as unaligned.
# Normally types use the alignment required by the specifications, but
# sometimes files do not strictly follow the specifications.
# This may be useful to enable when processing files for architectures
# that have no alignment constraints.
unaligned = []
#=======================================
# File format features.
archive = []
coff = []
elf = []
macho = []
pe = ["coff"]
wasm = ["wasmparser"]
#=======================================
# By default, support all read features.
default = ["read", "compression"]
#=======================================
# Umbrella feature for enabling all user-facing features of this crate. Does not
# enable internal features like `rustc-dep-of-std`.
all = ["read", "write", "std", "compression", "default"]
# Use of --all-features is not supported.
# This is a dummy feature to detect when --all-features is used.
cargo-all = []
#=======================================
# Internal feature, only used when building as part of libstd, not part of the
# stable interface of this crate.
rustc-dep-of-std = ['core', 'compiler_builtins', 'alloc']
[[example]]
name = "ar"
required-features = ["read_core", "archive"]
[[example]]
name = "objcopy"
required-features = ["read", "write"]
[[example]]
name = "objdump"
required-features = ["read"]
[[example]]
name = "objectmap"
required-features = ["read_core"]
[[example]]
name = "nm"
required-features = ["read"]
[[example]]
name = "readobj"
required-features = ["read"]