Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow defining intended scope of AnyCPU #366

Open
AArnott opened this issue Aug 18, 2021 · 0 comments
Open

Allow defining intended scope of AnyCPU #366

AArnott opened this issue Aug 18, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@AArnott
Copy link
Member

AArnott commented Aug 18, 2021

Inferring that Pack=4 on x86 when there is no explicit packing sounds reasonable to me.

That being said, it seems odd to me that if the metadata adds support for more architectures, it could mean that CsWin32 could suddenly lose more types for AnyCpu projects. It feels weird that coverage of CsWin32 depends on the metadata having "less coverage" of various architectures.

One way CsWin32 could mitigate this would be to allow AnyCpu projects to specify a set of architectures it will actually support. This way if the metadata adds support for architecture X, AnyCpu projects won't suddenly lose some of the API because architecture X has some weird one-off definitions. I think this extra option would allow CsWin32 to cover these 3 main use cases:

  1. Use Cpu-Specific to get access to full API
  2. Use AnyCpu with limited Architecture set to get access to the api that is common to all supported architectures
  3. Use AnyCpu with no limits on architectures to get the truly common API for everything that metadata supports

Originally posted by @marler8997 in microsoft/win32metadata#613 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant