Skip to main content

generate_ruby_protobuf

Function generate_ruby_protobuf 

Source
pub fn generate_ruby_protobuf(
    schema: &ProtobufSchema,
    target: &ProtobufTarget,
) -> Result<String>
Expand description

Generate Ruby Protobuf code from a schema

Parses the Protobuf schema and generates idiomatic Ruby code with message classes, service clients, and server implementations based on the target specification.

§Arguments

  • schema - Parsed Protobuf schema
  • target - Generation target: ProtobufTarget::All (complete), ProtobufTarget::Messages (messages only), or ProtobufTarget::Services (services only)

§Returns

Generated Ruby code as a string, or an error if generation fails