Skip to content

Commit 068bda1

Browse files
committed
Split C++ (godot-cpp) and GDExtension system info into separate categories, children of Scripting.
1 parent 1afdbaf commit 068bda1

File tree

11 files changed

+80
-68
lines changed

11 files changed

+80
-68
lines changed
Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
:allow_comments: False
22

3-
GDExtension
4-
===========
3+
.. _doc_gdextension:
4+
5+
The GDExtension System
6+
======================
7+
8+
**GDExtension** is a Godot-specific technology that lets the engine interact with
9+
native `shared libraries <https://en.wikipedia.org/wiki/Library_(computing)#Shared_libraries>`__
10+
at runtime. You can use it to run native code without compiling it with the engine.
11+
12+
.. note:: GDExtension is *not* a scripting language and has no relation to
13+
:ref:`GDScript <doc_gdscript>`.
14+
15+
This section describes how GDExtension works, and is generally aimed at people wanting to make a GDExtension from
16+
scratch, for example to create language bindings. If you want to use existing language bindings, please refer to other
17+
articles instead, such as the articles about :ref:`C++ (godot-cpp) <doc_godot_cpp>` or one of the
18+
:ref:`community-made ones <doc_what_is_gdnative_third_party_bindings>`.
519

620
.. toctree::
721
:maxdepth: 1
8-
:name: toc-tutorials-gdnative
22+
:name: toc-tutorials-gdextension
923

10-
what_is_gdextension
11-
gdextension_cpp_example
12-
gdextension_c_example
1324
gdextension_file
14-
gdextension_docs_system
25+
gdextension_c_example

tutorials/scripting/gdextension/what_is_gdextension.rst renamed to tutorials/scripting/godot_cpp/index.rst

Lines changed: 27 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
.. _doc_what_is_gdextension:
1+
:allow_comments: False
2+
.. _doc_godot_cpp:
23

3-
What is GDExtension?
4-
====================
4+
C++ (godot-cpp)
5+
===============
56

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.
89

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
1213

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
1516

16-
Differences between GDExtension and C++ modules
17+
Differences between godot-cpp and C++ modules
1718
-----------------------------------------------
1819

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
2021
run C or C++ code in a Godot project.
2122

2223
They also both allow you to integrate third-party libraries into Godot. The one
2324
you should choose depends on your needs.
2425

2526
.. warning::
2627

27-
GDExtension is currently *experimental*, which means that we may
28+
godot-cpp is currently *experimental*, which means that we may
2829
break compatibility in order to fix major bugs or include critical features.
2930

30-
Advantages of GDExtension
31-
~~~~~~~~~~~~~~~~~~~~~~~~~
3231

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>`.
3841

3942
Also:
4043

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
4545
project. With C++ modules, you have to recompile all the export templates you
4646
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.
4848
That's unlike C++ modules, which are statically compiled into the engine.
4949
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.
5151

5252
Advantages of C++ modules
5353
~~~~~~~~~~~~~~~~~~~~~~~~~
5454

5555
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:
5757

5858
- C++ modules provide deeper integration into the engine. GDExtension's access
5959
is not as deep as static modules.
@@ -67,40 +67,6 @@ GDExtension isn't enough:
6767
`godot-cpp repository <https://github.com/godotengine/godot-cpp>`__
6868
to discuss implementation options for exposing the missing functionality.
6969

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-
10470
.. _doc_what_is_gdextension_version_compatibility:
10571

10672
Version compatibility

tutorials/scripting/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ The sections below each focus on a given programming language.
2121

2222
gdscript/index
2323
c_sharp/index
24+
godot_cpp/index
25+
other_languages
2426
gdextension/index
2527

2628
Core features
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Other Languages
2+
---------------
3+
4+
The Godot developers officially support the following language bindings for
5+
GDExtension:
6+
7+
- C++ :ref:`(tutorial) <doc_gdextension_cpp_example>`
8+
9+
.. note::
10+
11+
There are no plans to support additional languages with GDExtension officially.
12+
That said, the community offers several bindings for other languages (see
13+
below).
14+
15+
.. _doc_what_is_gdnative_third_party_bindings:
16+
17+
The bindings below are developed and maintained by the community:
18+
19+
.. 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.
20+
.. Please keep languages sorted in alphabetical order.
21+
22+
- `D <https://github.com/godot-dlang/godot-dlang>`__
23+
- `Go <https://github.com/grow-graphics/gd>`__
24+
- `Nim <https://github.com/godot-nim/gdext-nim>`__
25+
- `Rust <https://github.com/godot-rust/gdext>`__
26+
- `Swift <https://github.com/migueldeicaza/SwiftGodot>`__
27+
28+
.. note::
29+
30+
Not all bindings mentioned here may be production-ready. Make sure to
31+
research options thoroughly before starting a project with one of those.
32+
Also, double-check whether the binding is compatible with the Godot version
33+
you're using.

0 commit comments

Comments
 (0)