github.com/consensys/gnark-crypto@v0.14.0/internal/generator/plookup/generate.go (about)

     1  package plookup
     2  
     3  import (
     4  	"path/filepath"
     5  
     6  	"github.com/consensys/bavard"
     7  	"github.com/consensys/gnark-crypto/internal/generator/config"
     8  )
     9  
    10  func Generate(conf config.Curve, baseDir string, bgen *bavard.BatchGenerator) error {
    11  
    12  	// kzg commitment scheme
    13  	conf.Package = "plookup"
    14  	entries := []bavard.Entry{
    15  		{File: filepath.Join(baseDir, "doc.go"), Templates: []string{"doc.go.tmpl"}},
    16  		{File: filepath.Join(baseDir, "vector.go"), Templates: []string{"vector.go.tmpl"}},
    17  		{File: filepath.Join(baseDir, "table.go"), Templates: []string{"table.go.tmpl"}},
    18  		{File: filepath.Join(baseDir, "plookup_test.go"), Templates: []string{"plookup.test.go.tmpl"}},
    19  	}
    20  	return bgen.Generate(conf, conf.Package, "./plookup/template/", entries...)
    21  
    22  }