Skip to main content

generate_metadata

Function generate_metadata 

Source
pub fn generate_metadata(registry_root: &Path) -> Result<(), Error>
Expand description

Scans the entire registry to generate optimized JSON index files.

This function is the “Build Pipeline” for Zoi registries. It:

  • Chronologically assigns permanent IDs to new security advisories.
  • Parses every .pkg.lua file to extract static metadata.
  • Populates packages.json (the primary index) and advisories.json.
  • Enables clients to resolve packages and vulnerabilities without cloning the entire Git repository or parsing thousands of Lua scripts.