Skip to main content

Crate sctrace

Crate sctrace 

Source
Expand description

§Sctrace - Syscall Compatibility Tracer

sctrace is a library for analyzing strace logs against SCML (Syscall Matching Language) patterns to determine syscall compatibility. It provides APIs for parsing strace output, matching syscalls against pattern specifications, and reporting compatibility results.

§Examples

use sctrace::{CliReporterBuilder, Patterns, SctraceBuilder, StraceLogStream};

fn main() -> Result<(), String> {
    let scml_files = vec!["patterns1.scml", "patterns2.scml"];

    let sctrace = SctraceBuilder::new()
        .strace(StraceLogStream::open_file("strace.log")?)
        .patterns(Patterns::from_scml_files(&scml_files)?)
        .reporter(CliReporterBuilder::new().quiet().build())
        .build();

    let _ = sctrace.run();
    Ok(())
}

Structs§

CliReporter
Reporter for outputting syscall trace analysis results.
CliReporterBuilder
Builder for creating a CliReporter with customizable settings.
Patterns
Collection of syscall patterns parsed from SCML files.
Sctrace
The high-level API of syscall compatibility tracer.
SctraceBuilder
Builder for creating an Sctrace instance.
StraceLogStream
A stream of strace log entries.