Name Date Size #Lines LOC

..--

bin/H25-Apr-2025-618406

end2end/H25-Apr-2025-2,8361,749

ext/grpc/H25-Apr-2025-7,6065,452

lib/H25-Apr-2025-3,3301,717

nativedebug/H25-Apr-2025-347238

pb/H25-Apr-2025-2,1781,529

qps/H25-Apr-2025-1,305912

spec/H25-Apr-2025-7,5455,944

stress/H25-Apr-2025-210157

tools/H25-Apr-2025-16272

.gitignoreH A D25-Apr-2025125 1615

.rubocop.ymlH A D25-Apr-2025381 2215

.rubocop_todo.ymlH A D25-Apr-202528.3 KiB907468

CHANGELOG.mdH A D25-Apr-2025348 128

README.mdH A D25-Apr-20252.3 KiB8466

README.md

1[![Gem](https://img.shields.io/gem/v/grpc.svg)](https://rubygems.org/gems/grpc/)
2gRPC Ruby
3=========
4
5A Ruby implementation of gRPC.
6
7PREREQUISITES
8-------------
9
10- Ruby 2.x. The gRPC API uses keyword args.
11
12INSTALLATION
13---------------
14
15**Linux and Mac OS X:**
16
17```sh
18gem install grpc
19```
20
21If using a Gemfile and you wish to pull from a git repository or GitHub, make sure to tell bundler to retrieve submodules:
22```
23gem 'grpc', github: 'grpc/grpc', submodules: true
24```
25
26BUILD FROM SOURCE
27---------------------
28- Clone this repository
29
30- Init submodules
31
32```sh
33git submodule update --init
34```
35
36- Install Ruby 2.x. Consider doing this with [RVM](http://rvm.io), it's a nice way of controlling
37  the exact ruby version that's used.
38```sh
39$ command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
40$ \curl -sSL https://get.rvm.io | bash -s stable --ruby=ruby-2
41$
42$ # follow the instructions to ensure that your're using the latest stable version of Ruby
43$ # and that the rvm command is installed
44```
45- Make sure your run `source $HOME/.rvm/scripts/rvm` as instructed to complete the set up of RVM
46
47- Install [bundler](http://bundler.io/)
48```
49$ gem install bundler
50```
51
52- Finally,  build and install the gRPC gem locally.
53```sh
54$ # from this directory
55$ bundle install  # creates the ruby bundle, including building the grpc extension
56$ rake  # runs the unit tests, see rake -T for other options
57```
58
59DOCUMENTATION
60-------------
61- rubydoc for the gRPC gem is available online at [rubydoc][].
62- the gRPC Ruby reference documentation is available online at [grpc.io][]
63
64CONTENTS
65--------
66Directory structure is the layout for [ruby extensions][]
67- ext: the gRPC ruby extension
68- lib: the entrypoint gRPC ruby library to be used in a 'require' statement
69- spec: Rspec unittests
70- bin: example gRPC clients and servers, e.g,
71
72  ```ruby
73  stub = Math::Math::Stub.new('my.test.math.server.com:8080', :this_channel_is_insecure)
74  req = Math::DivArgs.new(dividend: 7, divisor: 3)
75  GRPC.logger.info("div(7/3): req=#{req.inspect}")
76  resp = stub.div(req)
77  GRPC.logger.info("Answer: #{resp.inspect}")
78  ```
79
80[ruby extensions]:http://guides.rubygems.org/gems-with-extensions/
81[rubydoc]: http://www.rubydoc.info/gems/grpc
82[grpc.io]: https://grpc.io/docs/languages/ruby/quickstart
83[Debian jessie-backports]:http://backports.debian.org/Instructions/
84