MCPcopy Create free account
hub / github.com/PolyhedraZK/ExpanderCompilerCollection / Compile

Function Compile

ecgo/rust/rust.go:11–20  ·  view source on GitHub ↗
(rc *irsource.RootCircuit)

Source from the content-addressed store, hash-verified

9)
10
11func Compile(rc *irsource.RootCircuit) (*irwg.RootCircuit, *layered.RootCircuit, error) {
12 s := irsource.SerializeRootCircuit(rc)
13 irWgSer, lcSer, err := wrapper.CompileWithRustLib(s, field.GetFieldId(rc.Field))
14 if err != nil {
15 return nil, nil, err
16 }
17 irWg := irwg.DeserializeRootCircuit(irWgSer)
18 lc := layered.DeserializeRootCircuit(lcSer)
19 return irWg, lc, nil
20}
21
22func ProveFile(circuitFilename string, witnessBytes []byte) []byte {
23 return wrapper.ProveCircuitFile(circuitFilename, witnessBytes, layered.DetectFieldIdFromFile(circuitFilename))

Callers 1

CompileFunction · 0.92

Calls 5

SerializeRootCircuitFunction · 0.92
CompileWithRustLibFunction · 0.92
GetFieldIdFunction · 0.92
DeserializeRootCircuitFunction · 0.92
DeserializeRootCircuitFunction · 0.92

Tested by

no test coverage detected