yeti 0.2.0

(Placeholder) A fuzzer for untrusted Rust code
Documentation
/*
    Trait for fuzzable types
*/

pub trait Fuzzable {
    fn random_input() -> Self;
}

pub fn fuzz<F, InputType, OutputType>(f: F)
where
    F: Fn(InputType) -> OutputType,
    InputType: Fuzzable,
{
    // TODO: here we're looping
    // but we may want to:
    // - catch errors
    // - fuzz only for a bounded amount of time
    loop {
        let t = InputType::random_input();
        f(t);
    }
}

impl Fuzzable for bool {
    fn random_input() -> bool {
        // Placeholder
        false
    }
}