ceremonyclient/types/compiler/compiler.go
Cassandra Heart dbd95bd9e9
v2.1.0 (#439)
* v2.1.0 [omit consensus and adjacent] - this commit will be amended with the full release after the file copy is complete

* 2.1.0 main node rollup
2025-09-30 02:48:15 -05:00

28 lines
834 B
Go

package compiler
import (
"io"
)
// CompiledCircuit represents a compiled circuit without exposing bedlam types
type CompiledCircuit interface {
// Marshal serializes the circuit to a writer
Marshal(w io.Writer) error
// GetMetadata returns any metadata about the compiled circuit
// This could include annotations or other compiler output
GetMetadata() interface{}
}
// CircuitCompiler defines the interface for compiling and validating QCL
// circuits
type CircuitCompiler interface {
// Compile compiles QCL source code into a circuit
// Returns the compiled circuit and any metadata/annotations
Compile(source string, inputSizes [][]int) (CompiledCircuit, error)
// ValidateCircuit validates a compiled circuit from a reader
// Returns an error if the circuit is invalid
ValidateCircuit(reader io.Reader) error
}