#trace #requirements #collect #mantra #framework #req #doc-comment

mantra-rust-trace

Collects requirement traces from rust code for the mantra framework

4 releases (breaking)

0.5.0 Jun 14, 2024
0.4.0 Jun 13, 2024
0.3.0 May 28, 2024
0.1.0 Apr 29, 2024

#3 in #req

Download history 146/week @ 2024-04-29 7/week @ 2024-05-20 144/week @ 2024-05-27 6/week @ 2024-06-03 235/week @ 2024-06-10 26/week @ 2024-06-17

411 downloads per month
Used in mantra

MIT license

20KB
339 lines

mantra-rust-trace

Crate providing a collection function to collect requirement traces from rust code, using the AstCollector from mantra-lang-tracing. It collects traces set using req or reqcov from mantra-rust-macros, and traces set in doc-comments using the form [req(<requirement id(s)>)].

Examples:

use mantra_rust_macros::{req, reqcov};

#[req(fn_trace)]
fn some_fn() {
    reqcov!(function_like_trace);
}

#[req(struct_trace)]
struct SomeStruct {
    /// Attribute macros cannot be set for fields.
    /// But setting a trace in doc-comments works: [req(doc_comment_trace)]
    some_field: bool,
}

Dependencies

~1.3–2.2MB
~46K SLoC