grpc.grpc
importgRPC 1.83.0 — vendored upstream source build with import grpc; (abseil/protobuf/re2/c-ares/OpenSSL come from this index)
import grpc;
Module name read from the upstream `export module` declaration in src/grpc.cppm.
mcpp add grpc.grpc@1.83.0
Usage
From this repository's own test project — built and run by CI, not written for the website.
// Behavioral test for the mcpplibs.grpc package, driven entirely through
// `import grpc;` — there is no <grpcpp/...> include in this file. Every call
// reaches a real symbol in the linked gRPC, so a package that resolved and
// "built" but linked nothing could not pass.
//
// Note the ORDER: textual #includes first, `import grpc;` last. The module
// carries the standard library in its BMI, so a std header included after the
// import arrives twice and GCC fails on std::string's operator==.
// HAVE_GRPC comes from this project's own cfg-gated cxxflags — the package is
// linux/macOS-only (see mcpp.toml), so elsewhere this file is an empty main().
#ifdef HAVE_GRPC
#include <cstdio>
#include <string>
import grpc;
int main() {
// A version string read out of the library, not a header constant.
const std::string version = grpc::Version();
std::printf("grpc::Version() = %s\n", version.c_str());
if (version.rfind("1.83", 0) != 0) return 1;
// …
tests/examples/grpc-module/tests/module.cpp · project tests/examples/grpc-module
Build · upstream manifest
- modules
grpc- targets
grpc (lib)- language
c++23- manifest version
1.83.0- dependencies
compat- source
https://raw.githubusercontent.com/mcpplibs/grpc-m/v1.83.0-4/mcpp.toml