Imported Upstream version 1.34.0
[platform/upstream/grpc.git] / src / csharp / experimental / README.md
1 This directory contains useful resources for getting gRPC C# to work on
2 platforms that are not yet fully supported.
3
4 # Xamarin
5
6 gRPC C# now has experimental support for Xamarin.
7 See [HelloworldXamarin](/examples/csharp/HelloworldXamarin) for an example how to use it.
8
9 Starting from gRPC C# 2.34.x: in addition to the regular `Grpc.Core` dependency, you will also
10 need to add `Grpc.Core.Xamarin` dependency to your project (which has the mobile-specific builds of c# native extension library).
11 The `Grpc.Core` and `Grpc.Core.Xamarin` package versions must always match exactly for things to work.
12 Also note that the `Grpc.Core.Xamarin` needs to be added to your `*.Android` and `*.iOS` projects
13 in order for the native library bindings to be registered correctly (see https://github.com/grpc/grpc/issues/16250).
14
15 What's currently supported:
16
17 Xamarin.Android
18 - supported API level: Kitkat 4.4+ (= API level 19)
19 - supported ABIs: `armeabi-v7a` (vast majority of Android devices out there), 
20   `arm64-v8a` (some newer Android devices), `x86` (for emulator)
21
22 Xamarin.iOS
23 - supported architectures: armv7, arm64 (iPhone 6+) and x86_64 (iPhone simulator)
24
25 # Unity
26
27 gRPC C# now has experimental support for Unity. Please try using gRPC with
28 Unity and provide feedback!
29
30 How to test gRPC in a Unity project
31
32 1. Create a Unity project that targets .NET 4.x Equivalent (Edit -> Project Settings -> Player -> Configuration -> Scripting Runtime Version). gRPC uses APIs that are only available in .NET4.5+ so this is a requirement.
33
34 2. Download the latest development build of `grpc_unity_package.VERSION.zip` from
35    [daily builds](https://packages.grpc.io/)
36
37 3. Extract the `.zip` file in the `Assets` directory in your Unity project
38
39 4. Unity IDE will pick up all the bundled files and add them to project automatically.
40    You should be able to use gRPC and Protobuf in your scripts from now on.
41
42 What's currently bundled in the `grpc_unity_package`
43 -  Grpc.Core and its dependencies
44 -  Google.Protobuf
45 -  Precompiled native libraries for Linux, MacOS, Windows, Android and iOS.