aws / porting-advisor-for-graviton

Apache License 2.0
159 stars 27 forks source link

C# / .Net support #12

Open jeroenhabets opened 1 year ago

jeroenhabets commented 1 year ago

Description

According to the Readme .Net / C# (dotnet) is not supported by I got my hopes up after I found sample-projects/dotnet-samples/ with a sample .csproj. However I get "0 files scanned".

Solution idea(s)

Additional context

We're using .Net 6 (LTS). Though I read somewhere that also 4.8 supports ARM nowadays.

Output of python3 src/porting-advisor.py ./sample-projects/dotnet-samples (on macOS 13.2, Darwin Kernel Version 22.3.0, Python 3.10.9):

| Elapsed Time: 0:00:00

Porting Advisor for Graviton v1.0.0
Report date: 2023-02-09 12:16:29

0 files scanned.
No issues found.
Beau-Gosse-dev commented 1 year ago

We're looking into adding .NET support to this and will keep you posted about release timelines as we make progress. However if you want to contribute to this codebase, we would love to work with you.

+jamolina

Kirkaiya commented 1 year ago

In general, modern versions of .NET (especially starting with .NET 5, which added many optimizations for arm64, including support for some hardware extensions) runs without any issue on arm64 and x64 (x86_64) both. The vast majority of NuGet packages that are not Windows-specific will also run fine on arm64 - the .NET CLR abstracts away instruction-set specifics, so that the IL (intermediate-language) code to which .NET source code compiles will be just-in-time compiled into native code appropriate for the chip instruction set/architecture. Or, if you're using AOT, the proper native code will be generated at compile time. In either case, .NET versions like .NET 5, .NET 6, and .NET 7 are "write once, run anywhere (anywhere there is a runtime)". You should, of course, specify the runtime identifier for the target platform (e.g., linux-arm64), which causes NuGet to check for any platform-specific packages, just in case.

With that said, there have been reports of occasional NuGet packages that fail on arm64 - I am aware of one in particular, from a vendor that provides tracing/logging tools, but they fixed it quickly once the issue was raised.

jeroenhabets commented 1 year ago

... With that said, there have been reports of occasional NuGet packages that fail on arm64

And therefore adding C# / .Net support to the porting-advisor-for-graviton still makes a lot of solid sense. @Kirkaiya

sb-ruisms commented 1 year ago

... With that said, there have been reports of occasional NuGet packages that fail on arm64

And therefore adding C# / .Net support to the porting-advisor-for-graviton still makes a lot of solid sense. @Kirkaiya

I think it does and we are looking into it. Thanks for your interest, Jeroen. Would you be interested in hopping on a call to discuss more on this and maybe share with us your use cases?

jeroenhabets commented 1 year ago

@sb-ruisms sure! let's have a call. I've sent you a mail.

jeroenhabets commented 11 months ago

Hi @sb-ruisms, it was great talking to you this Summer. Did you progress on C# support? FYI: We're in the process of migrating to .Net 8 and Graviton3 and for .Net we have not run into any issues so far. The only issue was getting Chromium or Chrome to run inside our Docker (i.e. nothing to do with this project, I suppose).