github.com/consensys/gnark-crypto@v0.14.0/internal/generator/iop/generate.go (about) 1 package iop 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 // fri commitment scheme 13 conf.Package = "iop" 14 entries := []bavard.Entry{ 15 {File: filepath.Join(baseDir, "doc.go"), Templates: []string{"doc.go.tmpl"}}, 16 {File: filepath.Join(baseDir, "polynomial.go"), Templates: []string{"polynomial.go.tmpl"}}, 17 {File: filepath.Join(baseDir, "polynomial_test.go"), Templates: []string{"polynomial.test.go.tmpl"}}, 18 19 {File: filepath.Join(baseDir, "ratios.go"), Templates: []string{"ratios.go.tmpl"}}, 20 {File: filepath.Join(baseDir, "ratios_test.go"), Templates: []string{"ratios.test.go.tmpl"}}, 21 22 {File: filepath.Join(baseDir, "quotient.go"), Templates: []string{"quotient.go.tmpl"}}, 23 {File: filepath.Join(baseDir, "quotient_test.go"), Templates: []string{"quotient.test.go.tmpl"}}, 24 25 {File: filepath.Join(baseDir, "expressions.go"), Templates: []string{"expressions.go.tmpl"}}, 26 {File: filepath.Join(baseDir, "expressions_test.go"), Templates: []string{"expressions.test.go.tmpl"}}, 27 28 {File: filepath.Join(baseDir, "utils.go"), Templates: []string{"utils.go.tmpl"}}, 29 } 30 31 return bgen.Generate(conf, conf.Package, "./iop/template/", entries...) 32 33 }