Open ivanitskiy opened 1 year ago
Hi @ivanitskiy, thanks for bringing up the idea of adding Rust support to protovalidate
. I can see how this could be really beneficial for those working in the Rust ecosystem.
Just to set expectations, we don't have plans to work on this at the moment. But, knowing that there’s interest is really valuable, and I'm open to hearing more about what you have in mind.
If you or anyone in the community is interested in contributing, that would be amazing. Specifically, implementing Rust support would require building a CEL (Common Expression Language) interpreter in Rust. This would be a crucial component for validation logic. If that's something you or others might be up for tackling, we would be incredibly appreciative. Community contributions really make a difference.
Feel free to reach out if you have any questions or need more information - we will always offer support if this is something you would like to attempt.
A quick search led me to this not implemented crate protoc-gen-prost-validate. The idea of protoc-gen-prost project is to provide a collection of protoc plugin that generates code using the Prost! code generation engine.
It would be great to see some collaboration between buf & @neoeinstein's protoc-gen-prost.
The first library is new and active, the other two aren't, so at least there's a baseline for anyone interested in contributing
Alternatively, it might be easier to bind to the core C++ implementation: https://github.com/google/cel-spec
We needed to cover the functionality of protoc-gen-validate
(legacy) and ended up implementing it.
It's available here.
At one point we could investigate implementing protovalidate
in Rust, but we found that the comparison between the implementation using prost-reflect
and the one using derive based code generation showed that reflection based validation crushes the performance.
Feature description:
It would be really nice to support Rust language. There is a number of Protocol Buffer implementations for Rust, and post, rust-protobuf are one of them.
Problem it solves or use case:
Enables Rust ecosystem to have consistent validation for code written in Rust.
Proposed implementation or solution:
Contribution:
Examples or references:
Additional context:
Linking this issue https://github.com/bufbuild/protoc-gen-validate/issues/457 this is from the PGV project for reference