grpc / grpc/grpc

Feature Request: Native `macosx_arm64` binaries in `Grpc.Tools` NuGet package

Open
#42,251 0 comments 8 reactions 0 assignees View on GitHub
lang/C#
Dominant language
C++
Stars
45.3k
Forks
11.4k
Avg merge
2d 12h
Merged PRs (30d)
47

Description

Apple will stop supporting non-arm devices soon. Since you already support linux on ARM, supporting Mac OS on ARM should not be an issue and is likely a less than 1 day job.

Since binaries for all other platforms exists, it makes no sense the most modern and optimized platform used by all new Apple computers is not natively supported.

### What version of gRPC and what language are you using?
- Grpc.Tools Version: 2.76.0 (and earlier)
- Language: C# / .NET 10.0
- OS: macOS (Apple Silicon / ARM64)

### What did you do?
Attempted to run `dotnet build` on a .NET project referencing the `Grpc.Tools` NuGet package on an Apple Silicon Mac (M1/M2/M3/M4) without Rosetta 2 installed.

### What did you expect to see?
The build should succeed natively on ARM64 architecture by utilizing a `macosx_arm64` protoc executable provided by the `Grpc.Tools` package.

### What did you see instead?
The build fails because `Grpc.Tools` attempts to run the `macosx_x64` executable natively on an ARM64 system, resulting in a "Bad CPU type in executable" error:

```text
/Users/.../.nuget/packages/grpc.tools/2.76.0/build/_protobuf/Google.Protobuf.Tools.targets(291,5): error MSB6003:
The specified task executable "/Users/.../.nuget/packages/grpc.tools/2.76.0/tools/macosx_x64/protoc" could not be run.
System.ComponentModel.Win32Exception (86): An error occurred trying to start process '/Users/.../.nuget/packages/grpc.tools/2.76.0/tools/macosx_x64/protoc'
with working directory '...'. Bad CPU type in executable

Contributor guide

Open the contributing guide

Research direction

Start with the Grpc.Tools NuGet package layout and Google.Protobuf.Tools.targets, especially the existing tools/macosx_x64/protoc selection shown in the report. Trace how dotnet build chooses the platform executable, then verify that an Apple Silicon build uses macosx_arm64 and succeeds without Rosetta 2.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.