Skip to content

Latest commit

 

History

History
 
 

ruby

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Ruby Rules

Rule Description
ruby_proto_repositories Load workspace dependencies.
ruby_proto_compile Generate ruby protobuf source files.

ruby_proto_repositories

Enable ruby support by loading the dependencies in your workspace.

load("@org_pubref_rules_protobuf//ruby:rules.bzl", "ruby_proto_repositories")
ruby_proto_repositories()

ruby_proto_compile

This is a thin wrapper over the proto_compile rule having language @org_pubref_rules_protobuf//ruby.

load("@org_pubref_rules_protobuf//ruby:rules.bzl", "ruby_proto_compile")

ruby_proto_compile(
  name = "protos",
  protos = ["message.proto"],
)
$ bazel build :protos
Target //:protos up-to-date:
  bazel-genfiles/message_pb.rb

ruby_proto_library (not implemented)

Support for a library rule would be dependent on loading the ruby runtime and ruby gems dependencies (this does not exist in bazel ecosystem at the moment).