1
- .. _doc_what_is_gdextension :
1
+ :allow_comments: False
2
+ .. _doc_godot_cpp :
2
3
3
- What is GDExtension?
4
- ====================
4
+ C++ (godot-cpp)
5
+ ===============
5
6
6
- Introduction
7
- ------------
7
+ This section describes how to get started with ` godot-cpp < https://github.com/godotengine/godot-cpp >`__,
8
+ the official C++ GDExtension bindings maintained as part of the Godot project.
8
9
9
- ** GDExtension ** is a Godot-specific technology that lets the engine interact with
10
- native ` shared libraries < https://en.wikipedia.org/wiki/Library_(computing)#Shared_libraries >`__
11
- at runtime. You can use it to run native code without compiling it with the engine.
10
+ .. toctree ::
11
+ :maxdepth: 1
12
+ :name: toc-tutorials-godot-cpp
12
13
13
- .. note :: GDExtension is *not* a scripting language and has no relation to
14
- :ref: ` GDScript < doc_gdscript >`.
14
+ gdextension_cpp_example
15
+ gdextension_docs_system
15
16
16
- Differences between GDExtension and C++ modules
17
+ Differences between godot-cpp and C++ modules
17
18
-----------------------------------------------
18
19
19
- You can use both GDExtension and :ref: `C++ modules <doc_custom_modules_in_cpp >` to
20
+ You can use both godot-cpp and :ref: `C++ modules <doc_custom_modules_in_cpp >` to
20
21
run C or C++ code in a Godot project.
21
22
22
23
They also both allow you to integrate third-party libraries into Godot. The one
23
24
you should choose depends on your needs.
24
25
25
26
.. warning ::
26
27
27
- GDExtension is currently *experimental *, which means that we may
28
+ godot-cpp is currently *experimental *, which means that we may
28
29
break compatibility in order to fix major bugs or include critical features.
29
30
30
- Advantages of GDExtension
31
- ~~~~~~~~~~~~~~~~~~~~~~~~~
32
31
33
- Unlike modules, GDExtension doesn't require compiling the engine's source code,
34
- making it easier to distribute your work. It gives you access to most of the API
35
- available to GDScript and C#, allowing you to code game logic with full control
36
- regarding performance. It's ideal if you need high-performance code you'd like
37
- to distribute as an add-on in the :ref: `asset library <doc_what_is_assetlib >`.
32
+ Advantages of godot-cpp
33
+ ~~~~~~~~~~~~~~~~~~~~~~~
34
+
35
+ Unlike modules, godot-cpp (and GDExtension systems in general) don't require
36
+ compiling the engine's source code, making it easier to distribute your work.
37
+ It gives you access to most of the API available to GDScript and C#, allowing
38
+ you to code game logic with full control regarding performance. It's ideal if
39
+ you need high-performance code you'd like to distribute as an add-on in the
40
+ :ref: `asset library <doc_what_is_assetlib >`.
38
41
39
42
Also:
40
43
41
- - GDExtension is not limited to C and C++. Thanks to :ref: `third-party bindings
42
- <doc_what_is_gdnative_third_party_bindings>`, you can use it with many other
43
- languages.
44
- - You can use the same compiled GDExtension library in the editor and exported
44
+ - You can use the same compiled godot-cpp library in the editor and exported
45
45
project. With C++ modules, you have to recompile all the export templates you
46
46
plan to use if you require its functionality at runtime.
47
- - GDExtension only requires you to compile your library, not the whole engine.
47
+ - godot-cpp only requires you to compile your library, not the whole engine.
48
48
That's unlike C++ modules, which are statically compiled into the engine.
49
49
Every time you change a module, you need to recompile the engine. Even with
50
- incremental builds, this process is slower than using GDExtension .
50
+ incremental builds, this process is slower than using godot-cpp .
51
51
52
52
Advantages of C++ modules
53
53
~~~~~~~~~~~~~~~~~~~~~~~~~
54
54
55
55
We recommend :ref: `C++ modules <doc_custom_modules_in_cpp >` in cases where
56
- GDExtension isn't enough:
56
+ godot-cpp (or another GDExtension system) isn't enough:
57
57
58
58
- C++ modules provide deeper integration into the engine. GDExtension's access
59
59
is not as deep as static modules.
@@ -67,40 +67,6 @@ GDExtension isn't enough:
67
67
`godot-cpp repository <https://github.com/godotengine/godot-cpp >`__
68
68
to discuss implementation options for exposing the missing functionality.
69
69
70
- Supported languages
71
- -------------------
72
-
73
- The Godot developers officially support the following language bindings for
74
- GDExtension:
75
-
76
- - C++ :ref: `(tutorial) <doc_gdextension_cpp_example >`
77
-
78
- .. note ::
79
-
80
- There are no plans to support additional languages with GDExtension officially.
81
- That said, the community offers several bindings for other languages (see
82
- below).
83
-
84
- .. _doc_what_is_gdnative_third_party_bindings :
85
-
86
- The bindings below are developed and maintained by the community:
87
-
88
- .. Binding developers: Feel free to open a pull request to add your binding if it's well-developed enough to be used in a project.
89
- .. Please keep languages sorted in alphabetical order.
90
-
91
- - `D <https://github.com/godot-dlang/godot-dlang >`__
92
- - `Go <https://github.com/grow-graphics/gd >`__
93
- - `Nim <https://github.com/godot-nim/gdext-nim >`__
94
- - `Rust <https://github.com/godot-rust/gdext >`__
95
- - `Swift <https://github.com/migueldeicaza/SwiftGodot >`__
96
-
97
- .. note ::
98
-
99
- Not all bindings mentioned here may be production-ready. Make sure to
100
- research options thoroughly before starting a project with one of those.
101
- Also, double-check whether the binding is compatible with the Godot version
102
- you're using.
103
-
104
70
.. _doc_what_is_gdextension_version_compatibility :
105
71
106
72
Version compatibility
0 commit comments