cue icon indicating copy to clipboard operation
cue copied to clipboard

cue: proto support

Open cueckoo opened this issue 4 years ago • 4 comments

Originally opened by @mpvl in https://github.com/cuelang/cue/issues/5

Tracking issue for adding protobuf support to CUE:

  • import command reads text and binary proto instance
  • import command reads proto definitions
  • export command supports the converse
  • core libs

cueckoo avatar Jul 03 '21 10:07 cueckoo

Original reply by @JohnAZoidberg in https://github.com/cuelang/cue/issues/5#issuecomment-661277997

What's the status of encoding Cue values as Protobuf? I'd like to describe my data in cue and dump is as binary using Protobuf. Should I go through JSON and convert that to Proto3?

cueckoo avatar Jul 03 '21 10:07 cueckoo

Original reply by @mpvl in https://github.com/cuelang/cue/issues/5#issuecomment-674021114

It is not implemented so far. Should be straightforward, but stabilizing the new evaluator has priority.

But open to contributions.

cueckoo avatar Jul 03 '21 10:07 cueckoo

Original reply by @mvdan in https://github.com/cuelang/cue/issues/5#issuecomment-810060646

In case you're not aware, the new protobuf module has low-level primitive packages for encoding and decoding, for example for arbitrary data in protowire: https://pkg.go.dev/google.golang.org/[email protected]/encoding/protowire

https://pkg.go.dev/google.golang.org/[email protected]/encoding/prototext is message-based instead of token-based, though, so it's unclear if you could use it at all without a schema.

cueckoo avatar Jul 03 '21 11:07 cueckoo

Original reply by @mpvl in cuelang/cue#5 (comment)

It is not implemented so far. Should be straightforward, but stabilizing the new evaluator has priority.

Hello, is there any update/estimate on the timelines for this request?

andreidum avatar Dec 06 '23 17:12 andreidum