File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ permalink: /reference-manual/python/Native-Extensions/
7
7
8
8
# Native Extensions Support
9
9
10
- CPython provides a [ native extensions API] ( https://docs.python.org/3/c-api/index.html ) { : target =" _ blank"} for writing Python extensions in C/C++.
10
+ CPython provides a [ native extensions API] ( https://docs.python.org/3/c-api/index.html ) for writing Python extensions in C/C++.
11
11
GraalPy provides experimental support for this API, which allows many packages like NumPy and PyTorch to work well for many use cases.
12
12
The support extends only to the API, not the binary interface (ABI), so extensions built for CPython are not binary compatible with GraalPy.
13
13
Packages that use the native API must be built and installed with GraalPy, and the prebuilt wheels for CPython from pypi.org cannot be used.
@@ -18,7 +18,7 @@ Please do not update `pip` or use alternative tools such as `uv`.
18
18
## Embedding limitations
19
19
20
20
Python native extensions run by default as native binaries, with full access to the underlying system.
21
- Native code is not sandboxed and can circumvent any protections Truffle or the JVM may provide, up to and including aborting the entire process .
21
+ Native code is entirely unrestricted and can circumvent any security protections Truffle or the JVM may provide.
22
22
Native data structures are not subject to the Java GC and the combination of them with Java data structures may lead to memory leaks.
23
23
Native libraries generally cannot be loaded multiple times into the same process, and they may contain global state that cannot be safely reset.
24
24
Thus, it is not possible to create multiple GraalPy contexts that access native modules within the same JVM.
You can’t perform that action at this time.
0 commit comments