Hello all!

This time I would like to announce a new project that I've been working on, 
it's called [Dr. Chaos](https://github.com/status-im/nim-drchaos). It's an 
efficient structure aware fuzzing framework for Nim types. The user should 
define, as a parameter to the target function, the input type and the fuzzer is 
responsible for providing valid inputs. Looks like this:
    
    
    import drchaos
    
    type
      ContentNodeKind = enum
        P, Br, Text
      ContentNode = object
        case kind: ContentNodeKind
        of P: pChildren: seq[ContentNode]
        of Br: discard
        of Text: textStr: string
    
    func `==`(a, b: ContentNode): bool =
      if a.kind != b.kind: return false
      case a.kind
      of P: return a.pChildren == b.pChildren
      of Br: return true
      of Text: return a.textStr == b.textStr
    
    func fuzzTarget(x: ContentNode) =
      # Convert or translate `x` to any format (JSON, HMTL, binary, etc...)
      # and feed it to the API you are testing.
    
    defaultMutator(fuzzTarget)
    
    
    Run

Dr. Chaos will generate millions of inputs and run fuzzTarget under a few 
seconds. But there is more! Check the Readme to learn how to write custom 
mutators and other details.

Lastly I am very grateful to @zah who's guidance helped me finish this project.

Reply via email to