Added docs dedicated to projections.
This commit is contained in:
Родитель
d093d603d1
Коммит
bbae454247
|
@ -6,7 +6,7 @@ Historically, this has required manually [redefining the APIs](http://pinvoke.ne
|
|||
|
||||
This project aims to provide metadata for Win32 APIs such that idiomatic projections and projects like the ones above can be generated for all languages and frameworks in a more automated way and with more complete API coverage.
|
||||
|
||||
See the [roadmap](./docs/roadmap.md) and [FAQ](./docs/faq.md) for more details.
|
||||
See the [roadmap](./docs/roadmap.md) and [FAQ](./docs/faq.md) for more details and [projections](./docs/projections.md) for how to consume Win32 APIs from various languages.
|
||||
|
||||
# Architecture
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
A. Producing metadata for Win32 APIs enables programmatic generation of language projections with maximum API coverage and minimal maintenance. Language projections produced from this metadata will make Win32 APIs more accessible from more languages with improved API coverage and a better developer experience.
|
||||
|
||||
**Q. How do I use the metadata to call Win32 APIs from my preferred language?**<br />
|
||||
A. Most developers will not consume the metadata directly and will instead use language projections that themselves consume the metadata and project the APIs into the idiomatic patterns of the languages. We intend to support [C#](https://github.com/microsoft/CsWin32), C++, and Rust projections initially with plans to coordinate with the community to support additional language projections based on demand. Language projections will be developed independently of the metadata tooling and will live in their own repos.
|
||||
A. Most developers will not consume the metadata directly and will instead use [language projections](projections.md) that themselves consume the metadata and project the APIs into the idiomatic patterns of the languages. We intend to support [C#](https://github.com/microsoft/CsWin32), C++, and Rust projections initially with plans to coordinate with the community to support additional language projections based on demand. Language projections will be developed independently of the metadata tooling and will live in their own repos.
|
||||
|
||||
**Q. Can .NET code reference the metadata binary and call its APIs directly?**<br />
|
||||
A. No. While the metadata binary is compiled based on the ECMA-335 spec, it does not contain the same attributes that the .NET runtime requires to successfully P/Invoke into the functions exported by Windows. .NET code should use an appropriate language projection like [C#/Win32](https://github.com/microsoft/CsWin32).
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# Projections
|
||||
|
||||
Language projections built on top of Win32 metadata are what developers should use to call Win32 APIs from various languages.
|
||||
|
||||
## Principles
|
||||
|
||||
Below are some principles that all language projections should follow:
|
||||
|
||||
* Language projections should provide maximum API coverage
|
||||
* Language projections should provide friendly adaptations of APIs and types where appropriate
|
||||
* Language projections should provide Intellisense sourced from official documentation
|
||||
* Language projections should enable developers to target a specific set of APIs and link or include only the artifacts necessary to provide support for those APIs
|
||||
|
||||
## Projections
|
||||
* C# - https://github.com/microsoft/CsWin32
|
Загрузка…
Ссылка в новой задаче