spindle-lib 0.3.0

Simple and efficient expression and byte sequence generator for fuzz testing.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mod common;
use common::rand_u;
use spindle_lib::Grammar;

fn main() {
    let grammar: Grammar = r#"
        regex_string : "\"" r"[a-zA-Z_0-9]+" "\"" ;
    "#
    .parse()
    .unwrap();

    let mut buf = [0; 4096];
    let mut u = rand_u(&mut buf);
    let sentence: String = grammar.expression(&mut u, Some(10)).unwrap();
    println!("{}", sentence);
}