The SSL requirement of gRPC isn't necessarily making it easy to integrate. The HTTP/2 protocol requires ALPN support, which is a fairly new handshake protocol only supported by recent implementations.
As a result, we've tried hard to provide a smooth experience to our users when compiling and distributing gRPC, but this may come at performance costs due to this. More specifically, we will sometime build the SSL library by disabling assembly code
(by setting the `OPENSSL_NO_ASM` option), which can impact performance by an order of magnitude when processing encrypted streams.
## gRPC C++: Building from Source
Build system | Condition | Platform | Uses assembly optimizations
---|---|---|--
Makefile | with OpenSSL 1.0.2 development files | all | :heavy_check_mark:
Makefile | all other cases | all | :x:
Bazel | | Linux | :heavy_check_mark:
Bazel | | MacOS | :heavy_check_mark:
Bazel | | Windows | :x:
CMake | boringssl from submodule (default) | all | :x:
CMake | pre-installed OpenSSL 1.0.2+ (`gRPC_SSL_PROVIDER=package`) | all | :heavy_check_mark:
## Other Languages: Binary/Source Packages
In addition, we are shipping packages for language implementations. These packages are source packages, but also have pre-built binaries being distributed. Building packages from source may give a different result in some cases.
Language | From source | Platform | Uses assembly optimizations
---|---|---|---
C# | n/a | all | :x:
Node.JS | n/a | Linux | :heavy_check_mark:
Node.JS | n/a | MacOS | :heavy_check_mark:
Node.JS | n/a | Windows | :x:
Electron | n/a | all | :heavy_check_mark:
ObjC | Yes | iOS | :x:
PHP | Yes | all | Same as the `Makefile` case from above
@ -8,27 +8,29 @@ The example depends on experimental Grpc.Core nuget package that hasn't
been officially released and is only available via the [daily builds](https://packages.grpc.io/)
source.
HINT: To download the package, please manually download the latest `.nupkg` packages from "Daily Builds" in [packages.grpc.io](https://packages.grpc.io/) into a local directory. Then add a nuget source that points to that directory (That can be [done in Visual Studio](https://docs.microsoft.com/en-us/nuget/tools/package-manager-ui#package-sources) or Visual Studio for Mac via "Configure nuget sources"). After that, nuget will also explore that directory when looking for packages.
BACKGROUND
-------------
The example project supports Xamarin.Android and Xamarin.iOS
The example project supports `Xamarin.Android` and `Xamarin.iOS`.
For this sample, we've already generated the server and client stubs from [helloworld.proto][].
PREREQUISITES
-------------
- The latest version Xamarin Studio or Visual Studio 2017 with Xamarin support installed.
- The latest version Visual Studio 2017 or Visual Studio for Mac with Xamarin support installed.
BUILD
-------
- Open the `HelloworldXamarin.sln` in Visual Studio (or Xamarin Studio)
- Open the `HelloworldXamarin.sln` in Visual Studio (or Visual Studio for Mac)
- Build the solution (Build -> Build All)
Try it!
-------
You can deploy the example apps directly through Xamarin Studio IDE.
You can deploy the example apps directly through Visual Studio IDE.
Deployments can target both Android and iOS (both support physical device
- supported architectures: arm64 (iPhone 6+) and x86_64 (iPhone simulator)
# Unity
gRPC C# currently doesn't support Unity, but some proof-of-concept
work has been done. There is in-progress effort to provide users
with a pre-built gRPC package that can be used in their projects.
gRPC C# now has experimental support for Unity. Please try using gRPC with
Unity and provide feedback!
How to test gRPC in a Unity project
1. Create a Unity project that targets .NET 4.x (Edit -> Project Settings -> Editor -> Scripting Runtime Version). gRPC uses APIs that are only available in .NET4.5+ so this is a requirement.
2. Download the latest development build of `grpc_unity_package.VERSION.zip` from
[daily builds](https://packages.grpc.io/)
3. Extract the `.zip` file in the `Assets` directory in your Unity project
4. Unity IDE will pick up all the bundled files and add them to project automatically.
You should be able to use gRPC and Protobuf in your scripts from now on.
What's currently bundled in the `grpc_unity_package`
- Grpc.Core and its dependencies
- Google.Protobuf
- Precompiled native libraries for Linux, MacOS, Windows, Android and iOS.