aprender-profile 0.32.0

Pure Rust system call tracer with source-aware correlation for Rust binaries
[package]
name = "aprender-profile"
version.workspace = true
edition = "2021"
rust-version = "1.75"
authors = ["Pragmatic AI Labs <info@paiml.com>"]
description = "Pure Rust system call tracer with source-aware correlation for Rust binaries"
license = "MIT"
repository = "https://github.com/paiml/renacer"
readme = "README.md"
keywords = ["strace", "tracing", "syscall", "debugging", "profiling"]
exclude = [
    "book/",
    "docs/",
    "tests/",
    ".pmat/",
    ".pmat-metrics/",
    ".pmat-work/",
    ".github/",
    "scripts/",
    "*.md",
    "!README.md",
    "roadmap.yaml",
    "tempo-config.yml",
    "*.svg",
    "**/*.profraw",
    "**/*.profdata",
    "**/*.proptest-regressions",
]
categories = ["development-tools::debugging", "development-tools::profiling"]

[lib]
name = "renacer"

[dependencies]
# CLI and argument parsing
clap = { version = "4.5", default-features = false, features = ["derive", "cargo", "std", "help", "usage", "error-context", "suggestions"] }

# Ptrace and system calls (Unix-only — RC2 fix: cfg(unix) gate)
libc = "0.2"

[target.'cfg(unix)'.dependencies]
nix = { version = "0.30", default-features = false, features = ["ptrace", "process", "signal", "uio", "resource", "user"] }

# Error handling
# PMAT-284: Core tracing primitives (extracted to break circular dep)
renacer-core = { version = "0.1" }

anyhow = "1.0"
thiserror = "2.0"

# JSON serialization
serde = { version = "1.0", default-features = false, features = ["derive", "std"] }
serde_json = { version = "1.0", default-features = false, features = ["std"] }
hex = { version = "0.4", default-features = false, features = ["std"] }

# MessagePack for Sprint 27 decision trace (v2.0.0 spec)
rmp-serde = "1.3"

# FNV hash for u64 decision IDs (Sprint 27)
fnv = "1.0"

# DWARF debug info parsing
addr2line = { version = "0.25", default-features = false, features = ["std"] }
gimli = { version = "0.32", default-features = false, features = ["read", "std", "endian-reader"] }
object = { version = "0.38", default-features = false, features = ["read", "elf", "std"] }
memmap2 = "0.9"

# Stack unwinding for function profiling
backtrace = "0.3"

# High-performance SIMD/GPU compute (sister project - published on crates.io)
trueno = { version = "0.17" }

# Machine learning for anomaly detection (Sprint 23)
# GH-581: Use path dep to avoid trueno version skew with local workspace
aprender = { path = "../aprender-core", version = "0.32.0", package = "aprender-core" }

# Lock-free data structures for ring buffer (Sprint 40)
crossbeam = { version = "0.8", default-features = false, features = ["crossbeam-channel", "crossbeam-queue", "std"] }

# Concurrent hashmap for metrics registry (Sprint 56)
dashmap = "6.1"

# Parquet storage for golden thread traces (Sprint 40)
trueno-db = { version = "0.3.16" }

# Graph database for causal analysis (Sprint 41)
trueno-graph = { workspace = true }

# SHA-256 hashing for state-based semantic equivalence (Sprint 42)
sha2 = { version = "0.10", default-features = false, features = ["std"] }

# Compile-time trait assertions for Send+Sync bounds (Sprint 59)
static_assertions = "1.1"

# TOML parsing for build-time assertions (Sprint 44)
toml = { version = "0.8", default-features = false, features = ["parse", "display"] }

# Regex filtering (Sprint 16)
regex = { version = "1.10", default-features = false, features = ["std", "perf"] }

# Random number generation for Isolation Forest (Sprint 22)
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] }

# Development tracing/debugging
tracing = { version = "0.1", default-features = false, features = ["std"] }
tracing-subscriber = { version = "0.3", default-features = false, features = ["env-filter", "fmt", "std", "ansi"] }

# TUI visualization (Sprint 52-55)
crossterm = "0.28"

# SIMD-accelerated visualization primitives (sister project)
trueno-viz = { version = "0.2", default-features = false, features = ["monitor"] }

# OpenTelemetry for distributed tracing (Sprint 30)
opentelemetry = { version = "0.31.0", optional = true }
opentelemetry_sdk = { version = "0.31.0", features = ["rt-tokio"], optional = true }
opentelemetry-otlp = { version = "0.31.0", features = ["grpc-tonic", "http-proto"], optional = true }
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros"], optional = true }

# GPU kernel tracing (Sprint 37)
wgpu = { version = "23.0", optional = true }
wgpu-profiler = { version = "0.18", optional = true }

# CUDA kernel tracing (Sprint 38)
cudarc = { version = "0.18", optional = true, features = ["f16", "cuda-version-from-build-system"] }

[dev-dependencies]
# Testing
assert_cmd = "2.0"
predicates = "3.1"
tempfile = "3.13"
serial_test = "3.2"

# Property-based testing
proptest = "1.5"

# Sprint 34: Integration testing with Jaeger
reqwest = { version = "0.12", features = ["blocking", "json"] }
serde_json = "1.0"

# Sprint 36: Performance benchmarking
criterion = { version = "0.5", features = ["html_reports"] }

[[bench]]
name = "syscall_overhead"
harness = false

[[bench]]
name = "otlp_export"
harness = false

[[bench]]
name = "memory_pool"
harness = false

[[bench]]
name = "ring_buffer_overhead"
harness = false

[[bench]]
name = "visualization_simd"
harness = false

[[bench]]
name = "metrics_throughput"
harness = false

[[bench]]
name = "graph_construction"
harness = false

[[example]]
name = "brick_trace_demo"
path = "examples/brick_trace_demo.rs"

[[example]]
name = "buggy_server"
path = "examples/buggy_server.rs"

[[example]]
name = "build_time_assertions"
path = "examples/build_time_assertions.rs"

[[example]]
name = "validate_golden_trace"
path = "examples/validate_golden_trace.rs"

[[example]]
name = "simd_visualization"
path = "examples/simd_visualization.rs"

[[example]]
name = "process_tracer_demo"
path = "examples/process_tracer_demo.rs"

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true

[profile.dev]
panic = "abort"
opt-level = 0
debug = true

[profile.test]
opt-level = 0
debug = true

# Chaos engineering features (Sprint 29 - Red-Team Profile)
# Following aprender/trueno patterns for feature organization
[features]
default = ["otlp"]

# Tier 1: Fast chaos (resource limits, signal injection)
chaos-basic = []

# Tier 2: Network/IO chaos (latency, packet loss simulation)
chaos-network = ["chaos-basic"]

# Tier 3: Byzantine fault injection (syscall return modification)
chaos-byzantine = ["chaos-network"]

# Full chaos engineering suite
chaos-full = ["chaos-byzantine", "dep:loom", "dep:arbitrary"]

# Fuzz testing support
fuzz = ["dep:arbitrary"]

# OpenTelemetry OTLP export (Sprint 30)
otlp = ["dep:opentelemetry", "dep:opentelemetry_sdk", "dep:opentelemetry-otlp", "dep:tokio"]

# GPU kernel-level tracing (Sprint 37)
gpu-tracing = ["dep:wgpu", "dep:wgpu-profiler", "otlp"]

# CUDA kernel-level tracing (Sprint 38)
cuda-tracing = ["dep:cudarc", "otlp"]

[dependencies.loom]
version = "0.7"
optional = true

[dependencies.arbitrary]
version = "1.3"
optional = true
features = ["derive"]

# Lint configuration for consistent code quality
[lints]
workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--generate-link-to-definition"]

[package.metadata.release]
shared-version = true

[[package.metadata.release.pre-release-replacements]]
file = "CHANGELOG.md"
search = "## \\[Unreleased\\]"
replace = "## [{{version}}] - {{date}}"