[package]
name = "nnd"
license = "Apache-2.0"
description = "A fast handmade TUI-based debugger for Linux"
documentation = "https://github.com/al13n321/nnd"
repository = "https://github.com/al13n321/nnd"
keywords = ["debugger", "tui"]
categories = ["development-tools::debugging"]
version = "0.64.0" # [[this version number is written by release.sh]]
edition = "2021" # I tried updating to 2024, but it just makes build 10% slower without making the resulting executable any faster
rust-version = "1.89" # build often breaks when updating the compiler because of newly added warnings

[profile.dev]
panic = 'abort'
opt-level = 1

[profile.release]
panic = 'abort'

[profile.dbgo]
inherits = "release"
debug = true
debug-assertions = true
overflow-checks = true

[profile.release-with-debug-info]
inherits = "release"
debug = true

[dependencies]
libc = "0.2.146" # syscall wrappers
iced-x86 = {version = "1.19", default-features = false, features = ["std", "decoder", "instr_info", "nasm"]} # disassember
bitflags = "^1.3" # TODO: update to 2.*
gimli = {version = "^0.31.1", default-features = false, features = ["std", "read"]} # TODO: remove the remaining usage (e.g. evaluating line number programs and dwarf expressions) and delet dis
#gimli = {path = "/home/al13n/Dropbox/coding/gimli"}
crc32fast = "^1.3.2" # a few things in ELF and DWARF use crc32
flate2 = "^1.0.26" # for decompressing ELF sections
md5 = "^0.7" # for checking source file hashes against debug symbols; but it seems that hashes are never present in the debug symbols in practice, so maybe we should remove this
cpp_demangle = "^0.5.1" # for demangling function names (unavoidable in .symtab, convenient in .debug_info); TODO: update after https://github.com/gimli-rs/cpp_demangle/pull/306 is released
#cpp_demangle = {path = "/home/al13n/cpp_demangle"}
rand = "^0.8.5"
unicode-segmentation = "^1.10"
unicode-width = "^0.1"
rustc-demangle = "^0.1"
# HTTP+TLS client for downloading from debuginfod. This accounts for more than half of the dependency tree (see `cargo tree`)
# and adds the only non-cargo dependency: musl-tools (use e.g. `apt install musl-tools`). But I couldn't find anything smaller :(
ureq = "^3.0"
voracious_radix_sort = "^1.2"

# musl's default allocator is very slow with many threads because of mutex contention.
[target.'cfg(target_env = "musl")'.dependencies]
#rlsf = "^0.2"  # symbols loading 4% slower than jemalloc
tikv-jemallocator = "^0.6"

[dev-dependencies]
gimli = {version = "^0.31.1", default-features = false, features = ["std", "read", "write"]}
