Skip to content

Commit 8036061

Browse files
Feedback
1 parent 2d48530 commit 8036061

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/standard/native-interop/abi-support.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,21 @@ Many virtual machine based languages define a foreign function interface (FFI) i
1818
* Java Virtual Machine (JVM)
1919
* CPython
2020

21+
Additional links:
22+
23+
* [CsWin32](https://github.com/microsoft/CsWin32) a source generator for access Windows Win32 API
24+
* [Java binding generator](https://github.com/dotnet/java-interop)
25+
2126
## C++
2227

2328
The [C++ language](https://isocpp.org/) has no defined ABI across all .NET supported platforms and the most popular C++ compiler implementations (that is, MSVC, clang, and GCC). This lack of a consistent ABI makes support difficult to provide.
2429

2530
The recommended way to interoperate with C++ is to export functions marked with [`extern "C"`](/cpp/cpp/extern-cpp) and call them as C functions.
2631

32+
Additional links:
33+
34+
* [ClangSharp](https://github.com/dotnet/ClangSharp) binding generator
35+
2736
## COM and `IUnknown`
2837

2938
The COM and `IUnknown` ABI was defined to align with the C language. It was specifically designed to support Object Oriented Programming, similar to C++, but to provide a stable ABI. .NET has a deep history with COM and `IUnknown` and as this ABI was originally designed to align with C, it is supported on all .NET platforms.
@@ -32,6 +41,12 @@ In .NET 5+, low-level, cross-platform, `IUnknown` lifetime support is provided b
3241

3342
The WinRT platform represents an evolution of the COM and `IUknown` ABI. Support for this is provided by the [CsWinRT toolkit](/windows/apps/develop/platform/csharp-winrt/) and is built upon <xref:System.Runtime.InteropServices.ComWrappers>.
3443

44+
Additional links:
45+
46+
* [`ComWrappers` sample](/dotnet/standard/native-interop/tutorial-comwrappers)
47+
* [COM source generator sample](/dotnet/standard/native-interop/comwrappers-source-generation)
48+
* [ClangSharp](https://github.com/dotnet/ClangSharp) binding generator
49+
3550
## Swift
3651

3752
The Swift programming environment has a well-defined stable ABI that is [supported in .NET](https://github.com/dotnet/designs/blob/main/proposed/swift-interop.md). In .NET 9+, specific APIs that support interop with Swift can be found under the <xref:System.Runtime.InteropServices.Swift> namespace.
@@ -40,6 +55,11 @@ The Swift programming environment has a well-defined stable ABI that is [support
4055

4156
The Objective-C language follows the C language's ABI and is [supported in .NET](https://github.com/dotnet/designs/blob/main/accepted/2021/objectivec-interop.md). In .NET 8+, specific APIs that support interop with Objective-C can be found under the <xref:System.Runtime.InteropServices.ObjectiveC> namespace.
4257

58+
Additional links:
59+
60+
* [Objective-Sharpie](/previous-versions/xamarin/cross-platform/macios/binding/)
61+
* [Objective-C binding](/dotnet/maui/migration/ios-binding-projects) sample
62+
4363
## golang
4464

4565
The Go programming language is not supported for in-process interoperability. The Go runtime [imposes requirements](https://pkg.go.dev/os/signal#hdr-Non_Go_programs_that_call_Go_code) on being hosted in a process with another run-time. Specifically, the use of the `SA_ONSTACK` flag on threads that run signal handlers. These requirements are not currently met by .NET.

0 commit comments

Comments
 (0)