| Crates.io | trace-doc |
| lib.rs | trace-doc |
| version | 0.1.0 |
| created_at | 2026-01-05 14:06:25.176178+00 |
| updated_at | 2026-01-05 14:06:25.176178+00 |
| description | A Rust-based framework for compile-time, zero-cost traceability and specification modeling |
| homepage | https://github.com/arnoox/trace-doc |
| repository | https://github.com/arnoox/trace-doc |
| max_upload_size | |
| id | 2023932 |
| size | 13,748 |
A Rust-based framework for compile-time, zero-cost traceability and specification modeling.
trace-doc enables you to model requirements, realizations, and tests directly in Rust's type system. It provides zero-runtime-cost traceability for safety-critical and high-assurance software.
/// The system shall be able to calculate the mathematical constant π.
pub struct ReqCalculatePI;
impl Artifact for ReqCalculatePI {
const STATUS: Status = Status::Accepted;
}
impl Requirement for ReqCalculatePI {
const TITLE: &str = "Calculate mathematical constant π";
}
/// This realization implements the calculation of π.
pub struct PICalculation; // implements pub fn calculate_pi() -> f64
impl Artifact for PICalculation {}
impl Realization for PICalculation {}
impl Realizes<ReqCalculatePI> for PICalculation {}
impl PICalculation {
/// Calculates PI
pub fn calculate_pi() -> f64 {
// let's cheat a bit and return the PI constant directly for simplicity
std::f64::consts::PI
}
}
Realizes, Tests).mantra: An alternative approach to requirement tracing that uses string-based requirement IDs with automatic source code scanning and database-backed reporting.