module-info 0.5.0

Embeds metadata into ELF binaries as note sections for Rust projects on Linux, providing runtime access and crash dump info
Documentation
[package]
name = "module-info"
version = "0.5.0"
edition = "2021"
rust-version = "1.74"
authors = ["Microsoft Corporation <opencode@microsoft.com>"]
description = "Embeds metadata into ELF binaries as note sections for Rust projects on Linux, providing runtime access and crash dump info"
license = "MIT"
readme = "README.md"
repository = "https://github.com/microsoft/module-info"
documentation = "https://docs.rs/module-info"
homepage = "https://github.com/microsoft/module-info"
keywords = ["metadata", "elf", "linux", "coredump", "crash"]
categories = [
  "development-tools",
  "development-tools::build-utils",
  "os::linux-apis",
]

# Keep the published crate small. Exclude repo-only tooling (CI workflows,
# contributor docs) and the `examples/` directory, which contains standalone
# cargo packages that are not dependencies of the library.
exclude = [
  ".github/",
  "CODE_OF_CONDUCT.md",
  "CONTRIBUTING.md",
  "SECURITY.md",
  "SUPPORT.md",
  "examples/",
  "tests/",
  ".clippy.toml",
  ".markdownlint-cli2.yaml",
  "deny.toml",
  "rust-toolchain.toml",
]

[package.metadata.module_info]
maintainer = "opencode@microsoft.com"
copyright = "Microsoft Corporation"

# Regular dependencies - will be used for all targets
[dependencies]
cfg-if = "1.0.4"

[target.'cfg(target_os = "linux")'.dependencies]
# `toml` 0.8.x has rust-version = 1.66; pinning here keeps the resolver from
# pulling 0.9.x (rust-version 1.76), which would push our MSRV above 1.74.
toml = "0.8.20"
serde_json = "1"
serde = { version = "1", features = ["derive"] }
# Transitive of `toml`; newer `indexmap` releases bumped MSRV beyond 1.74
# (2.10 → rust 1.74; 2.13 → 1.82; 2.14 → edition 2024 / 1.85). Cap so
# downstream consumers on rust 1.74 keep resolving a compatible version.
# Bump the upper bound together with the crate's MSRV.
indexmap = ">=2,<2.10"
# Non-Linux targets will use these empty/stub implementations
[target.'cfg(not(target_os = "linux"))'.dependencies]
# Empty dependencies for non-Linux targets

[target.'cfg(target_os = "linux")'.dev-dependencies]
# Newer `tempfile` (3.20+) depends on `getrandom` 0.4, whose MSRV is 1.85.
# Cap so the dev-dep tree stays buildable on 1.74. Bump together with MSRV.
tempfile = ">=3.10,<3.20"

[features]
# Enable module info embedding in ELF binaries
embed-module-info = []

# `.clippy.toml` exempts tests/examples; production code (`src/`) must use
# pattern matching, `?`, or `.get()` instead.
[lints.clippy]
expect_used = "warn"
unwrap_used = "warn"

# Examples under `examples/` are standalone cargo packages (each has its own
# Cargo.toml) rather than crate examples. Build them from their own directories,
# e.g. `cargo build --manifest-path examples/sample_crashing_process/Cargo.toml`.

[package.metadata.docs.rs]
# Build documentation with the 'embed-module-info' feature enabled
features = ["embed-module-info"]
# Include all Linux targets
targets = [
  "x86_64-unknown-linux-gnu",
  "aarch64-unknown-linux-gnu",
  "i686-unknown-linux-gnu",
]