You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/standard/native-interop/abi-support.md
+19-9Lines changed: 19 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Native interoperability ABI support - .NET
3
3
description: Defines the current support for interoperability with various ABIs.
4
-
ms.date: 10/27/2024
4
+
ms.date: 10/28/2024
5
5
---
6
6
# Native interoperability ABI support
7
7
@@ -13,15 +13,9 @@ The C language represents a stable ABI across all platforms where .NET is suppor
13
13
14
14
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.
15
15
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
-
21
16
Additional links:
22
17
23
-
*[CsWin32](https://github.com/microsoft/CsWin32) a source generator for access Windows Win32 API
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.
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]
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)
0 commit comments