Skip to content

ZIR-000: Complete documentation for Arrays/Loops, Backs, and Externs#326

Open
zeroecco wants to merge 1 commit intomainfrom
docs/backfill-stub-files
Open

ZIR-000: Complete documentation for Arrays/Loops, Backs, and Externs#326
zeroecco wants to merge 1 commit intomainfrom
docs/backfill-stub-files

Conversation

@zeroecco
Copy link
Copy Markdown

@zeroecco zeroecco commented Apr 2, 2026

Summary

Complete comprehensive documentation for three previously stub documentation files:

  • 99_Arrays_and_Loops.md - Arrays and loop constructs
  • 99_Backs.md - Back-references for sequential logic
  • 99_Externs.md - External function declarations

Changes

  • Arrays and Loops: Added documentation covering array syntax, indexing, literals, loop constructs (indexed for, element iteration, reduce expressions), common patterns (shifts, rotations, packing), and practical examples from the Keccak circuit
  • Backs: Documented back-reference syntax (@N), how they enable sequential logic, internal implementation details, use cases (state transitions, counters, pipelining), constraints, and common patterns
  • Externs: Explained external functions for nondeterministic operations, declaration syntax, usage patterns, integration with ExternHandler, examples from RISC-V and Keccak circuits, and best practices

Documentation Quality

  • Follows existing documentation style and structure
  • Includes practical code examples from the codebase
  • Provides clear explanations suitable for developers learning Zirgen
  • Cross-references related documentation sections
  • Includes "Key Takeaways" sections for quick reference

Test Plan

  • Reviewed all three documentation files for completeness
  • Verified code examples match patterns found in the codebase
  • Ensured consistent formatting and style with existing docs
  • Added proper navigation links between documentation sections

🤖 Generated with Nightshift automation

Added comprehensive documentation for three key Zirgen features:
- Arrays and Loops: syntax, patterns, reduce expressions, examples
- Backs: back-references for sequential logic, syntax, use cases
- Externs: external functions for witness generation and I/O

All documentation follows existing style and includes practical examples
from the Zirgen codebase.

Nightshift-Task: docs-backfill
Nightshift-Ref: https://github.com/marcus/nightshift

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant