gRPC Core with C++ standard library Announcement

26 views
Skip to first unread message

Esun Kim

unread,
Sep 4, 2019, 7:26:19 PM9/4/19
to grpc.io

TL;DR Starting from gRPC 1.24, gRPC Core will start to have a dependency against the C++ standard library (e.g. libstdc++.so or libc++.so). As a result, all wrapped gRPC libraries based on gRPC Core (C++, C#,  Node.js, Objective-C, PHP, Python, and Ruby) have new dependency against the C++ standard library, too. 


To have better productivity in writing gRPC Core, gRPC Core will start using C++ standard library from gRPC 1.24. Previously, gRPC Core didn't have a dependency against the C++ standard library for better portability, but since all of our supported platforms now provide the C++ standard library, this change is considered safe. So we decide to add this dependency to gRPC Core. As a result, all wrapped gRPC libraries based on this will have C++ stdlib dependency, too.


For gRPC Users:


We expect that most users will not see any problem with this change, because most platforms are bundled with the C++ standard library. To keep it gRPC portable as much as possible, gRPC Core will be restricted to use C++ standard library features available in GLIBCXX_3.4.9, which was released in 2007.


Change for individual platforms:

  • Linux: C++ library will be dynamically linked. If the system doesn’t have C++ standard library (e.g. Alpine Linux), you may need to install it.

  • Windows: C++ library will be statically linked so it should be fine.

  • MacOS, iOS, and Android: C++ library will be dynamically linked but these platforms have pre-installed C++ library so it should be fine.


Change for individual languages:

  • C++, Node.js, Objective-C, and Python: These gRPC libraries already have been linked to C++ standard library before this change, so users may not see any change.

  • C#, PHP, and Ruby: These gRPC libraries will start to be linked to C++ standard library with this change, so users may see changes.


For gRPC Contributors:


We will use only limited features of C++ standard library until gRPC 1.24 has successfully deployed: std::map and pure virtual functions. This will enable us to roll this change back if there is a serious problem on a particular language or platform. Once gRPC 1.24 is proven safe to use, we will then allow use of the full C++11 standard library. 


* Related proposal: L59 - Allow C++ standard library in gRPC Core Library (PR, file)


Reply all
Reply to author
Forward
0 new messages