object 0.28.4

A unified interface for reading and writing object file formats.
Documentation
[package]
name = "object"
# Note: disable resolver in workspace setting before releases.
version = "0.28.4"
edition = "2018"
exclude = ["/.github", "/testfiles"]
keywords = ["object", "elf", "mach-o", "pe", "coff"]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/gimli-rs/object"
description = "A unified interface for reading and writing object file formats."

[package.metadata.docs.rs]
features = ['doc']

[dependencies]
crc32fast = { version = "1.2", default-features = false, optional = true }
flate2 = { version = "1", optional = true }
indexmap = { version = "1.6", optional = true }
wasmparser = { version = "0.57", optional = true }
memchr = { version = "2.4.1", default-features = false }
hashbrown = { version = "0.11", features = ["ahash"], default-features = false, optional = true }

# 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' }

[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", "hashbrown"]
# Core write support with libstd features. You will need to enable some file formats too.
write_std = ["write_core", "std", "indexmap/std", "crc32fast/std"]
# Write support for all file formats, including libstd features.
write = ["write_std", "coff", "elf", "macho", "pe"]

#=======================================
# 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", "wasm"]

# Use of --all-features is not supported.
# This is a dummy feature to detect when --all-features is used.
cargo-all = []

#=======================================
# Documentation should be generated with everything in "all" except for "unaligned".
doc = [
  "read_core", "write_std",
  "std", "compression",
  "archive", "coff", "elf", "macho", "pe", "wasm",
]

#=======================================
# 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', 'memchr/rustc-dep-of-std']

[workspace]
members = ["crates/examples"]
default-members = [".", "crates/examples"]
#resolver = "2"