Project

gritz-core

0.0
The project is in a healthy, maintained state
Transport-independent controllers, routing, middleware, configuration and testing for Gritz.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 1.1, < 3
>= 4.33, < 5
>= 2.7, < 3
>= 1.6, < 2
>= 2.7, < 3
 Project Readme

Gritz Core

Transport-independent controllers, routing, middleware, configuration, forked-worker supervision and network-free testing for Ruby gRPC applications. Requires CRuby 3.3 or later. This gem has no grpc dependency. Requiring the core does not load a transport; starting a server loads the selected adapter.

require "gritz/core"

Use gritz for the default framework and executable, or combine this gem with gritz-native for the official grpc gem adapter. The experimental gritz-async adapter runs RPCs in fibers and supports inherited TCP listeners without installing the official grpc gem.

Controller tests can load gritz/testing/rspec or gritz/testing/minitest and run without a network or the grpc gem. See the controller examples and configuration guide.

Gritz::Testing::Server selects the configured adapter for real-socket tests; require that adapter's entrypoint first. Adapter suites explicitly require gritz/testing/transport_contract to run shared wire checks with RSpec, the official grpc client and googleapis-common-protos-types as test dependencies. Production eager loading skips this shared test suite.

Supervised servers support phased replacement, fresh-interpreter hot reexec, request/memory/lifetime recycling, Admin HTTP probes and process-wide Prometheus totals. The CLI keeps one lifecycle owner across master generations; application controllers and gRPC resources stay in serving processes.

Gritz::Client.define creates lazy, fork-safe client constants with deadline propagation, selected request headers and middleware around complete streams. See the client guide. Optional gritz-otel adds server/client spans and worker OTLP metrics after fork.

The optional Gritz::Compat::Gruf module adapts Gruf controllers, returned response streams and server interceptors. gritz-migrate-gruf converts supported static configuration without executing the source file. See the Gruf migration guide. Add gritz-rails for Rails execution, generators and development reloading.

Development

git clone https://github.com/gritzrpc/gritz-core.git
cd gritz-core
bundle install
COVERAGE=1 bundle exec rake
bundle exec rubocop
bundle exec rake build

Tests, lint and packaging run independently in this repository. See CONTRIBUTING.md, SECURITY.md and the release guide.

Documentation

Read the published guides and API reference, public API policy, support policy and stabilization gate.

License

MIT.