Skip to content

Add grpc package (v1.83.0) - #555

Merged
msample merged 5 commits into
gominimal:mainfrom
lrishi:add_grpc
Aug 2, 2026
Merged

Add grpc package (v1.83.0)#555
msample merged 5 commits into
gominimal:mainfrom
lrishi:add_grpc

Conversation

@lrishi

@lrishi lrishi commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new package for grpc (gRPC Core), a high-performance, open-source universal RPC framework. This allows downstream C++ projects (and other languages) in the Minimal ecosystem to consume gRPC and its plugins natively.

Changes

  • Added new package grpc.
  • Upstream Version: 1.83.0
  • Source URL: https://github.com/grpc/grpc/archive/refs/tags/v1.83.0.tar.gz
  • Wires in existing Minimal packages (abseil-cpp, protobuf, c-ares, openssl, re2, zlib) via CMake package providers (-DgRPC_*_PROVIDER=package).
  • Sets BUILD_SHARED_LIBS=ON and CMAKE_INSTALL_LIBDIR=/usr/lib to consistently emit .so artifacts alongside standard CMake/pkgconfig data.
  • Registers standard C++ runtime dependencies (glibc and gcc subsets for libgcc/libstdcpp) so downstream consumers can successfully link and load the shared libraries.

Checklist

  • I've read CONTRIBUTING.md.
  • I've accepted the ICLA (and CCLA if contributing on my employer's time). CLA Assistant will prompt me on this PR if I haven't already.
  • min check passes for the affected packages/harnesses.
  • min patched-build <name> succeeds for any package I added or modified.
  • For new packages: source_provenance points to the canonical upstream and the source builds from source (not a prebuilt release binary) where the required toolchain is available.
  • For version bumps: I've verified the new sha256 against the upstream archive.

Notes for reviewers

Summary by CodeRabbit

  • New Features
    • Added support for gRPC version 1.83.0.
    • Provides gRPC binaries, shared libraries, headers, CMake configuration, and pkg-config metadata.
    • Includes certificate-root files for secure connections.
    • Supports optimized shared-library builds with system dependencies and staged installation.
    • Includes verified source provenance information for improved package traceability.
    • Validates library linking, plugin availability, and Protocol Buffers compilation across supported language plugins.

@CLAassistant

CLAassistant commented Aug 2, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a gRPC 1.83.0 package definition. The package fetches a verified GitHub archive, declares dependencies and outputs, builds with CMake into $OUTPUT_DIR, and validates linking, plugins, and proto compilation.

Changes

gRPC package

Layer / File(s) Summary
Package contract and source definition
packages/grpc/build.ncl
Defines the gRPC version, verified source archive, build and runtime dependencies, package outputs, GitHub provenance metadata, and build specification.
Build and staged installation
packages/grpc/build.sh
Configures CMake with release flags, packaged dependencies, shared-library installation, disabled tests, parallel compilation, and staged installation into $OUTPUT_DIR.
Package integration tests
packages/grpc/build.ncl
Tests gRPC linking, language-specific plugin availability, and protobuf and gRPC C++ generation for multiple plugins.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant BuildSpec
  participant build.sh
  participant CMake
  participant OUTPUT_DIR
  participant PackageTests
  BuildSpec->>build.sh: pass package version
  build.sh->>CMake: configure gRPC with packaged dependencies
  CMake->>CMake: compile shared libraries
  CMake->>OUTPUT_DIR: install package outputs
  PackageTests->>OUTPUT_DIR: link against gRPC and run plugin and proto checks
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: adding the gRPC package at version 1.83.0.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
packages/grpc/build.sh (1)

1-2: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the repository shell convention.

Use #!/bin/sh and set -e. This script does not use Bash-specific syntax.

Proposed fix
-#!/bin/bash
-set -euo pipefail
+#!/bin/sh
+set -e

Based on learnings, packages/*/build.sh scripts use #!/bin/sh and set -e; individual packages must not switch to Bash strict mode.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/grpc/build.sh` around lines 1 - 2, Update the
`packages/grpc/build.sh` shell setup to use the repository convention: replace
the Bash shebang with `#!/bin/sh` and use `set -e` instead of `set -euo
pipefail`, preserving the script’s existing commands.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/grpc/build.ncl`:
- Around line 1-10: Update the import bindings in the minimal.ncl destructuring
so lowercase identifiers come first in alphabetical order, followed by
alphabetized uppercase identifiers; specifically place gcc before glibc and
order BuildSpec, Local, OutputBin, OutputData, OutputLib, Source, and Test
accordingly.
- Around line 58-64: Update the outputs declaration to explicitly capture gRPC’s
installed root certificate at usr/share/grpc/etc/roots.pem, using the
appropriate OutputData type alongside the existing bins, libs, headers, cmake,
and pkgconfig outputs.

In `@packages/grpc/build.sh`:
- Around line 10-23: Update the cmake configuration in build.sh to disable
gRPC’s implicit archive downloads while retaining the existing
gRPC_*_PROVIDER=package settings and GitHub tag archive behavior. Add the
appropriate gRPC CMake option alongside the other gRPC configuration flags.

---

Nitpick comments:
In `@packages/grpc/build.sh`:
- Around line 1-2: Update the `packages/grpc/build.sh` shell setup to use the
repository convention: replace the Bash shebang with `#!/bin/sh` and use `set
-e` instead of `set -euo pipefail`, preserving the script’s existing commands.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 32cbc01e-1a4f-4396-a113-066aaff4b61b

📥 Commits

Reviewing files that changed from the base of the PR and between 527251f and fc6dc87.

📒 Files selected for processing (2)
  • packages/grpc/build.ncl
  • packages/grpc/build.sh

Comment thread packages/grpc/build.ncl Outdated
Comment thread packages/grpc/build.ncl
Comment thread packages/grpc/build.sh
@msample

msample commented Aug 2, 2026

Copy link
Copy Markdown
Member

/build

Comment thread packages/grpc/build.ncl
@msample

msample commented Aug 2, 2026

Copy link
Copy Markdown
Member

/build

@msample

msample commented Aug 2, 2026

Copy link
Copy Markdown
Member

Lovel, do you have time to add an exec test for each executable this package produces? For example, see what we do for jq - https://github.com/gominimal/pkgs/blob/main/packages/jq/build.ncl

This makes catching issues easier when we bump up the src version in the future.

@lrishi

lrishi commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Lovel, do you have time to add an exec test for each executable this package produces? For example, see what we do for jq - https://github.com/gominimal/pkgs/blob/main/packages/jq/build.ncl

This makes catching issues easier when we bump up the src version in the future.

Yes, I'll add it.

@twitchyliquid64

Copy link
Copy Markdown
Member

/build

@twitchyliquid64

Copy link
Copy Markdown
Member

Run min check --fix - package build.ncl just needs formatting

@msample

msample commented Aug 2, 2026

Copy link
Copy Markdown
Member

/build

@msample msample left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks Lovel!

@msample
msample added this pull request to the merge queue Aug 2, 2026
Merged via the queue into gominimal:main with commit 6798bfc Aug 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants