Skip to content

How to store the AST? #897

Closed Answered by jnthntatum
mortenson asked this question in Q&A
Feb 19, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

It's normally stored or transferred between programs in the protobuf format. See cel.AstToCheckedExpr for converting from the go object to proto. The conformance server harness has some examples (though the proto serialization is handled by grpc). See https://github.com/google/cel-go/blob/master/server/server.go and https://github.com/google/cel-spec/blob/master/tools/celrpc/celrpc.go

The protobuf dev guide has examples for reading/writing the serialized messages.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mortenson
Comment options

Answer selected by mortenson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants