RomainNeup / Grpc.Core.M1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Grpc.Core.M1

Nuget

The purpose of this project is to provide a prebuilt version of the needed native .dylib for  M1 CPUs when using the legacy C# Grpc library.

The future of Grpc and C# is described here.

Building a new lib

This package relies on having to build a native .dylib and put into this folder. Get the tooling installed as described here and then perform the build using cmake as described here. We want to have the shared libraries, so the cmake process should be:

$ mkdir -p cmake/build
$ cd cmake/build
$ cmake ../../ -DBUILD_SHARED_LIBS=ON
$ make

Usage

In addition to your Grpc package reference, just add a reference to this package in your .csproj file:

<ItemGroup>
    <PackageReference Include="Grpc" Version="2.41.0" />
    <PackageReference Include="Contrib.Grpc.Core.M1" Version="2.41.0" />
</ItemGroup>

Note: The version number for this package matches the official Grpc package and I'll be building from source every now and then. But chances are its not critical for NuGet and versioning, as it is the underlying library that is packaged.

If you're leveraging another package that implicitly pulls this in, you might need to explicitly include a package reference to the Grpc package anyways - if your library works with the version this package is built for.

About

License:MIT License


Languages

Language:Shell 100.0%