Skip to content

Commit bbe8a81

Browse files
Feedback
1 parent 8036061 commit bbe8a81

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

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

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Native interoperability ABI support - .NET
33
description: Defines the current support for interoperability with various ABIs.
4-
ms.date: 10/27/2024
4+
ms.date: 10/28/2024
55
---
66
# Native interoperability ABI support
77

@@ -13,15 +13,9 @@ The C language represents a stable ABI across all platforms where .NET is suppor
1313

1414
In .NET 7+, <xref:System.Runtime.InteropServices.LibraryImportAttribute> provides source generated support for calling C functions. When targeting .NET 6 or earlier, use <xref:System.Runtime.InteropServices.DllImportAttribute>. Refer to [Interop best practices](./best-practices.md) for additional guidance.
1515

16-
Many virtual machine based languages define a foreign function interface (FFI) in C to interoperate with other platforms. A list of examples is below.
17-
18-
* Java Virtual Machine (JVM)
19-
* CPython
20-
2116
Additional links:
2217

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)
18+
* [CsWin32](https://github.com/microsoft/CsWin32) is a source generator for accessing the Windows Win32 API surface
2519

2620
## C++
2721

@@ -47,6 +41,14 @@ Additional links:
4741
* [COM source generator sample](/dotnet/standard/native-interop/comwrappers-source-generation)
4842
* [ClangSharp](https://github.com/dotnet/ClangSharp) binding generator
4943

44+
## Java Virtual Machine (JVM) based languages
45+
46+
The Java Virtual Machine (JVM) defines a foreign function interface (FFI) in C to interoperate with other platforms. Interoperability between .NET and Java can be achieved via this interface.
47+
48+
Additional links:
49+
50+
* [Java binding generator](https://github.com/dotnet/java-interop)
51+
5052
## Swift
5153

5254
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.
@@ -58,7 +60,15 @@ The Objective-C language follows the C language's ABI and is [supported in .NET]
5860
Additional links:
5961

6062
* [Objective-Sharpie](/previous-versions/xamarin/cross-platform/macios/binding/)
61-
* [Objective-C binding](/dotnet/maui/migration/ios-binding-projects) sample
63+
* [Objective-C binding sample](/dotnet/maui/migration/ios-binding-projects)
64+
65+
## Python
66+
67+
The reference implementation of the Python run-time, [CPython](https://github.com/python/cpython), defines a foreign function interface (FFI) in C to interoperate with other platforms. Interoperability between .NET and Python can be achieved via this interface.
68+
69+
Additional links:
70+
71+
* [Providing a C API for an Extension Module](https://docs.python.org/3/extending/extending.html#providing-a-c-api-for-an-extension-module)
6272

6373
## golang
6474

0 commit comments

Comments
 (0)