#requirements #trace #mantra #req #framework #collect #set

mantra-rust-trace

Collects requirement traces from rust code for the mantra framework

7 releases (breaking)

0.7.0 Dec 17, 2024
0.6.1 Jul 4, 2024
0.5.0 Jun 14, 2024
0.4.0 Jun 13, 2024
0.1.0 Apr 29, 2024

#622 in Data structures

Download history 17/week @ 2024-09-13 8/week @ 2024-09-20 4/week @ 2024-09-27 1/week @ 2024-10-04 2/week @ 2024-10-11 11/week @ 2024-12-06 123/week @ 2024-12-13 19/week @ 2024-12-20 24/week @ 2024-12-27

177 downloads per month
Used in mantra

MIT license

44KB
853 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.5–2.5MB
~51K SLoC