Git Product home page Git Product logo

Comments (6)

dasMulli avatar dasMulli commented on July 18, 2024 1

The managed DLLs don't contain any architecture-specific code and you should be able to run them on all runtimes, provided you don't expect certain features to exists (e.g. directly accessing x64 hardware intrinsics in .net core libraries without checking for support on the current machine)

from standard.

joperezr avatar joperezr commented on July 18, 2024

Net Standard is by definition runtime-agnostic since it isn't even a runnable framework to begin with. In reality it is just an API spec that you can be guaranteed is implemented on all platforms that support it. If your library has API that should behave differently on ARM architecture, my suggestion would be to perform a runtime check when your method gets called so that if you are running on arm you do whatever you need to do like:

public void Foo()
{
  if (RuntimeInformation.ProcessArchitecture == Architecture.Arm)
  {
    // do your arm things
  }
  else
  {
    // ...
  }
}

This way your library is still platform-agnostic in the sense that it still works when consumed on arm vs other archs, but you can fork your implementation to react accordingly.

from standard.

joperezr avatar joperezr commented on July 18, 2024

Also, regarding cross-compiling for different RIDs, this is not supported by the SDK today. You can cross-compile for different frameworks (netcoreapp, net461, netstandard) but not for different Rids (linux, win, etc.)

from standard.

viralmodi avatar viralmodi commented on July 18, 2024

Thanks @joperezr We do not have anything in our library that needs to behave differently on ARM platform. Does that mean that our compiled code for a specific target framework ( netstandard2.0) will work on an ARM based device with no changes. I was under the impression that the dll that gets built would be different for x86/x64 vs ARM. Can you confirm this?

from standard.

joperezr avatar joperezr commented on July 18, 2024

Right, as @dasMulli points out you can assume that if you don't use anything that will be processor-specific then your library should already be working on arm.

from standard.

joperezr avatar joperezr commented on July 18, 2024

Closing issue as the question seems to be answered now, but @viralmodi feel free to reopen if you feel otherwise or if you have any follow ups, we are happy to help.

from standard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.