[HN Gopher] Show HN: Autarkie - Instant grammar fuzzing using Ru...
       ___________________________________________________________________
        
       Show HN: Autarkie - Instant grammar fuzzing using Rust macros
        
       Author : r9295
       Score  : 30 points
       Date   : 2025-04-28 15:30 UTC (7 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | mmastrac wrote:
       | This is awesome. I've been working on a project to make the
       | PostgreSQL/EdgeDB/Gel protocols declarative in Rust (see
       | https://github.com/geldata/gel-rust/blob/master/gel-pg-proto...
       | for an example) and my approach to fuzzing has been somewhat
       | arbitrary (you can see at the bottom).
       | 
       | I've used AFL but never managed to create a consistent fuzzing
       | process using it.
       | 
       | This _should_ allow me to add some more extensive fuzz tests than
       | I've currently been using, even though the grammar is binary
       | since we're really just "parsing" and "rendering" text that
       | happens to be [u8] rather than str.
       | 
       | I don't think there's been any real discussion of the Postgres
       | message format philosophy, but it's a very regular syntax:
       | messages are composed of primitives and lists. Lists are either
       | length-prefixed or zero-suffixed. Everything else is just a
       | combination of these building blocks.
        
         | r9295 wrote:
         | Glad to hear this! Please create an issue if you run into any
         | issues during the integration.
        
       | vrm wrote:
       | would it be possible to fuzz an arbitrary JSON schema with this?
       | I've been looking for such a lib for a while now
        
         | r9295 wrote:
         | If you can translate the schema into native rust types, then
         | yes!
         | 
         | https://github.com/oxidecomputer/typify may help for starters.
         | Please create an issue if you need further help with
         | integration!
        
       ___________________________________________________________________
       (page generated 2025-04-28 23:01 UTC)