Expand description
Resrap is a seedable, grammar-based code snippet generator.
Instead of parsing code, it generates code from formal ABNF-style grammars.
This crate is a Rust port of the Go package
github.com/osdc/resrap and aims
to match its API and generation behaviour exactly, including deterministic
output for a given seed.
Modules§
- templates
- Ready-to-use Resrap grammars for common languages.
Structs§
- Code
Channel - A cloneable, blocking result channel. Multiple consumers may call
recv; disconnected meansshut_down_resraphas finished draining every result. - Code
GenRes - The result of one generation job.
- Node
- Describes either a directory or file entry in a codebase specification.
- Resrap
- Resrap is the main access point for single-threaded use. It is a collection of grammars which can be generated from a parsed grammar graph.
- ResrapMT
- The multithreaded version of
crate::Resrap.
Enums§
Constants§
Traits§
- Grammar
Loader - Implemented by both
ResrapandResrapMT, allowing the built-in templates to load into either one.
Functions§
- parse_
dsl - Parses the directory DSL into a tree.