Skip to content

Conversation

@Faolan-Rad
Copy link
Contributor

LibGodot is a system to allows Godot to be compiled as a library and connected into it using GDExtensions by giving a function pointer to the entry point of a GDExtension implementation before starting Godot.

LibGodot adds language support for languages that have C support but can not becompiled into a shared library.

LibGodot allows the use of different C# runtimes allowing dotnetAOT compilation, C# android support, and C# web support.

LibGodot also allows Godot to be embedded in other applications like Blender.

@Faolan-Rad Faolan-Rad requested review from a team as code owners February 8, 2023 10:57
@lyuma
Copy link
Contributor

lyuma commented Feb 8, 2023

Related to #68153 - this provides a means of loading the Godot Engine from a standard .NET 6 android project

@Faolan-Rad Faolan-Rad force-pushed the LibGodot branch 3 times, most recently from 4a2f8bf to 62fb86e Compare February 8, 2023 11:32
@akien-mga akien-mga added this to the 4.x milestone Feb 8, 2023
@Faolan-Rad Faolan-Rad force-pushed the LibGodot branch 3 times, most recently from b1f7a78 to 1a1bbf7 Compare February 8, 2023 12:21
@Zireael07
Copy link
Contributor

Zireael07 commented Feb 8, 2023

Is this slated for 4.1 or 4.0?

@YuriSizov
Copy link
Contributor

@Zireael07 You can see the milestone :) Nothing of the sort is going into 4.0 at this point. We're done with features.

@Zireael07
Copy link
Contributor

Ah. Right. Mobile GitHub and my poor eyesight are to blame.

@Calinou
Copy link
Member

Calinou commented Feb 8, 2023

Does this address godotengine/godot-proposals#4773?

@Faolan-Rad
Copy link
Contributor Author

It does for the most part the thing it doesn't do is allow someone using the Library to manually tell Godot to update

@fire
Copy link
Member

fire commented Feb 10, 2023

We discussed out-of-band how that @Faolan-Rad should tell us the story of his need for this feature and how this can benefit the wider community of C#, other languages and XR.

TL;DR: pending a new proposal.

@fire
Copy link
Member

fire commented Feb 12, 2023

The update problem was avoided by having the libgodot user make a gdextension and have it block in the gdextension class like the "_process" method.

Benefits

  1. Avoids stepping the MainLoop.
  2. Avoids handling synchronization when two different functions are called externally.

@neikeq
Copy link
Contributor

neikeq commented Feb 12, 2023

Regarding C#:

No work has started yet for porting to mobile, so I can't say what will be needed. If we can't find a better solution, we would have to go with a C# project as entry-point and Godot as a shared library. However, there's actually hope that .NET 8 or 9 could allow publishing mobile projects as libraries, which would simplify things for us.

kisg added a commit to migeran/godot that referenced this pull request Oct 14, 2024
* Based on top of the GDExtensionLoader PR: godotengine#91166
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.
* Allow specifying an external native rendering surface handle to render Godot into the UI of a host application.
  * It is also possible to embed multiple Godot windows into the UI of a host application.
  * Currently supported on MacOS and iOS

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
fire pushed a commit to V-Sekai/godot that referenced this pull request Nov 7, 2024
* Based on top of the GDExtensionLoader PR: godotengine#91166
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.
* Allow specifying an external native rendering surface handle to render Godot into the UI of a host application.
  * It is also possible to embed multiple Godot windows into the UI of a host application.
  * Currently supported on MacOS and iOS

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
fire pushed a commit to V-Sekai/godot that referenced this pull request Mar 8, 2025
* Based on top of the GDExtensionLoader PR: godotengine#91166
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.
* Allow specifying an external native rendering surface handle to render Godot into the UI of a host application.
  * It is also possible to embed multiple Godot windows into the UI of a host application.
  * Currently supported on MacOS and iOS

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
fire pushed a commit to V-Sekai/godot that referenced this pull request Mar 9, 2025
* Based on top of the GDExtensionLoader PR: godotengine#91166
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.
* Allow specifying an external native rendering surface handle to render Godot into the UI of a host application.
  * It is also possible to embed multiple Godot windows into the UI of a host application.
  * Currently supported on MacOS and iOS

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
kisg added a commit to migeran/godot that referenced this pull request Apr 2, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.
  * Now also supports creating a new Godot instance after the previous one was destroyed.
  * Keeps the StringName tables across instances.
* Allow specifying an external native rendering surface handle to render Godot into the UI of a host application.
  * It is also possible to embed multiple Godot windows into the UI of a host application.
  * Currently supported on MacOS and iOS
* Adds support for running Godot on a background thread

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
fire pushed a commit to V-Sekai/godot that referenced this pull request Aug 16, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.
  * Now also supports creating a new Godot instance after the previous one was destroyed.
  * Keeps the StringName tables across instances.
* Allow specifying an external native rendering surface handle to render Godot into the UI of a host application.
  * It is also possible to embed multiple Godot windows into the UI of a host application.
  * Currently supported on MacOS and iOS
* Adds support for running Godot on a background thread

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
fire pushed a commit to V-Sekai/godot that referenced this pull request Aug 16, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.
  * Now also supports creating a new Godot instance after the previous one was destroyed.
  * Keeps the StringName tables across instances.
* Allow specifying an external native rendering surface handle to render Godot into the UI of a host application.
  * It is also possible to embed multiple Godot windows into the UI of a host application.
  * Currently supported on MacOS and iOS
* Adds support for running Godot on a background thread

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
fire pushed a commit to V-Sekai/godot that referenced this pull request Aug 17, 2025
LibGodot: Expose method static and hash through get_method_list

LibGodot: Shader includes should be handled as proper dependencies for export

LibGodot: Prerequisites for reinitialization support

- Adds missing singleton destructions
- Extends ClassDB & ObjectDB with reinitialization support

LibGodot: Main Feature

* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.
  * Now also supports creating a new Godot instance after the previous one was destroyed.
  * Keeps the StringName tables across instances.
* Allow specifying an external native rendering surface handle to render Godot into the UI of a host application.
  * It is also possible to embed multiple Godot windows into the UI of a host application.
  * Currently supported on MacOS and iOS
* Adds support for running Godot on a background thread

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>

Fix: Incorrect ref error-checking.

Fix: Missing virtual destructor on class with virtual functions.

Fix: Variable shadowing caused by new MethodInfo::hash.

Fix: Missing headers in Windows.

Fix: Incorrect class name.

Fix: Incorrect #define boolean logic.

Fix: Missing registration for base class.

Update docs.

Fix: Missing header in Android.

Fix: Windows surface teardown syntax.

Revert added parameter to set_boot_image.

Fix: Missed variable name change.

Fix: Ref nullification syntax.

Fix: Incorrect function name.

Fix: Incorrect class name.

Fix: A few things that should have been function calls.

Add a default to fix a gcc warning.

Fix: Windows headers polluting global defines and breaking RenderingDeviceDriver::MemoryBarrier.

Changes to get libgodot working on linux

Formatting fixes.

Add MoltenVK Vulkan support for Apple platforms and modernize header guards

- Add MoltenVK-based Vulkan rendering context drivers for macOS and Apple platforms
- Implement new rendering native surface classes for cross-platform compatibility
- Replace traditional header guards with #pragma once across core and platform files
- Refactor Vulkan rendering pipeline to support Apple's Metal-based Vulkan implementation

Fix PCRE2 function symbol naming conflicts

Clean up Apple platform drivers: fix includes, formatting, and duplicates

- Remove duplicate axis_value declaration in joypad_apple.h
- Reorder and fix include statements across Apple drivers
- Fix indentation for CAMetalLayer forward declarations
- Correct class name capitalization: RenderingContextDriverVulkanMoltenVK

Replace DisplayServer FBO call with static system_fbo for direct-to-screen rendering

Use a static system_fbo member instead of calling DisplayServer::window_get_native_handle()
for direct-to-screen render targets. This simplifies the code by using the OpenGL default
framebuffer (0) directly.

Refactor Metal surface creation to use RenderingNativeSurface

Replace void pointer parameter with type-safe RenderingNativeSurfaceApple
reference in surface_create method. Add proper error checking and update
layer access to use the native surface interface.

Add native window support and refactor display server

- Add native window creation, detection, and deletion methods to DisplayServer
- Add FEATURE_NATIVE_WINDOWS feature flag and OPENGL_FBO handle type
- Remove unused static and hash fields from MethodInfo in ClassDB
- Fix shader resource loader to use append_utf8 instead of parse_utf8
- Reorder includes in Metal rendering context driver

Add proper cleanup for singleton classes and static variables

- Initialize TextureStorage::system_fbo static variable
- Add destructors to singleton classes to reset singleton pointers
- Ensure EditorImportBlendRunner kills Blender process on destruction

Fix Android rendering includes and separate core platform APIs

- Replace incorrect macOS import with proper Android headers
- Add core platform API registration functions in platform builders
- Separate core and regular platform API handling

Fix unused variables and missing includes across platforms

- Remove unused method metadata from ClassDB in non-debug builds
- Move iOS-specific variable declarations inside conditional blocks
- Add missing Vulkan and native surface includes for Wayland and Windows

Refactor Wayland window creation to use RenderingNativeSurface

Replace union-based platform data with RenderingNativeSurfaceWayland
object for cleaner window creation in the Vulkan rendering path.

Replace platform data union with native surface for X11 window creation

Refactor X11 window creation to use RenderingNativeSurface objects
instead of raw platform data unions for Vulkan rendering context
initialization. This modernizes the API and provides better
encapsulation of platform-specific window data.

Suppress OpenGL deprecation warnings on macOS

Add compiler warning suppression around CAOpenGLLayer declaration
to silence deprecated-declarations warnings since OpenGL is
deprecated in macOS 10.14.

Move add_program method assignment to method initialization block

Consolidate env class method assignments by moving add_program assignment from conditional block to the main method initialization section, making it available unconditionally.

Add library build support to platform build scripts

Refactor macOS, web, and Windows build scripts to support building
Godot as static library, shared library, or executable. Separate
main entry point files from core platform library files and add
conditional build logic based on library_type setting.

Add RenderingNativeSurface abstraction for Apple embedded platforms

Replace union-based platform data handling with new RenderingNativeSurface
class to improve type safety and code organization in display server.

Implement platform-specific RenderingNativeSurface classes

Replace generic RenderingNativeSurface factory with platform-specific
implementations for Apple and Wayland. Use RenderingNativeSurfaceApple
for iOS/embedded Apple platforms and add Wayland-specific source file
to build system.

Remove unnecessary void pointer cast in Apple Vulkan drivers

Simplify the CAMetalLayer cast by removing the intermediate void pointer
cast in both MoltenVK and Apple embedded Vulkan rendering drivers.

Fix memory management in MoltenVK Metal surface layer bridging

Add Windows native surface to build and reorder includes

- Add rendering_native_surface_windows.cpp to Windows build files
- Reorder Metal includes in Apple embedded native surface

Add Metal rendering support and remove debug-only restrictions

- Initialize CAMetalLayer properties for Metal rendering driver
- Remove DEBUG_ENABLED conditionals from embedded debugger
- Add Metal framework imports and device configuration
- Enable embedded debugger functionality in release builds
kisg added a commit to migeran/godot that referenced this pull request Sep 18, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.
  * Now also supports creating a new Godot instance after the previous one was destroyed.
  * Keeps the StringName tables across instances.
* Allow specifying an external native rendering surface handle to render Godot into the UI of a host application.
  * It is also possible to embed multiple Godot windows into the UI of a host application.
  * Currently supported on MacOS and iOS
* Adds support for running Godot on a background thread

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
kisg added a commit to migeran/godot that referenced this pull request Sep 24, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.
  * Also supports creating a new Godot instance after the previous one was destroyed.
  * Keeps the StringName tables across instances.

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883
* Thanks to Ben Rog-Wilhelm (Zorbathut) for creating a smaller, minimal commit for easier review.
* Thanks to Ernest Lee (iFire) for his support

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
Co-Authored-By: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
kisg added a commit to migeran/godot that referenced this pull request Sep 24, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.
  * Also supports creating a new Godot instance after the previous one was destroyed.
  * Keeps the StringName tables across instances.

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883
* Thanks to Ben Rog-Wilhelm (Zorbathut) for creating a smaller, minimal commit for easier review.
* Thanks to Ernest Lee (iFire) for his support

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
Co-Authored-By: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
kisg added a commit to migeran/godot that referenced this pull request Sep 24, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.
  * Also supports creating a new Godot instance after the previous one was destroyed.
  * Keeps the StringName tables across instances.

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883
* Thanks to Ben Rog-Wilhelm (Zorbathut) for creating a smaller, minimal commit for easier review.
* Thanks to Ernest Lee (iFire) for his support

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
Co-Authored-By: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
kisg added a commit to migeran/godot that referenced this pull request Sep 24, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883
* Thanks to Ben Rog-Wilhelm (Zorbathut) for creating a smaller, minimal version for easier review.
* Thanks to Ernest Lee (iFire) for his support

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
Co-Authored-By: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
kisg added a commit to migeran/godot that referenced this pull request Oct 4, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883
* Thanks to Ben Rog-Wilhelm (Zorbathut) for creating a smaller, minimal version for easier review.
* Thanks to Ernest Lee (iFire) for his support

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
Co-Authored-By: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
kisg added a commit to migeran/godot that referenced this pull request Oct 7, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883
* Thanks to Ben Rog-Wilhelm (Zorbathut) for creating a smaller, minimal version for easier review.
* Thanks to Ernest Lee (iFire) for his support

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
Co-Authored-By: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
JoNax97 pushed a commit to Astor-Games/godot that referenced this pull request Oct 15, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883
* Thanks to Ben Rog-Wilhelm (Zorbathut) for creating a smaller, minimal version for easier review.
* Thanks to Ernest Lee (iFire) for his support

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
Co-Authored-By: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
@Repiteo
Copy link
Contributor

Repiteo commented Oct 20, 2025

Superseded by #110863

@Repiteo Repiteo closed this Oct 20, 2025
@Repiteo Repiteo removed this from the 4.x milestone Oct 20, 2025
kisg added a commit to migeran/godot that referenced this pull request Nov 2, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.
  * Now also supports creating a new Godot instance after the previous one was destroyed.
  * Keeps the StringName tables across instances.
* Allow specifying an external native rendering surface handle to render Godot into the UI of a host application.
  * It is also possible to embed multiple Godot windows into the UI of a host application.
  * Currently supported on MacOS and iOS
* Adds support for running Godot on a background thread

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
Yanxiyimengya pushed a commit to Yanxiyimengya/godot that referenced this pull request Nov 15, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883
* Thanks to Ben Rog-Wilhelm (Zorbathut) for creating a smaller, minimal version for easier review.
* Thanks to Ernest Lee (iFire) for his support

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
Co-Authored-By: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
ettiSurreal pushed a commit to ettiSurreal/godot that referenced this pull request Dec 1, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883
* Thanks to Ben Rog-Wilhelm (Zorbathut) for creating a smaller, minimal version for easier review.
* Thanks to Ernest Lee (iFire) for his support

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
Co-Authored-By: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
Synzorasize pushed a commit to Synzorasize/godot that referenced this pull request Dec 20, 2025
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: godotengine#72883
* Thanks to Ben Rog-Wilhelm (Zorbathut) for creating a smaller, minimal version for easier review.
* Thanks to Ernest Lee (iFire) for his support

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
Co-Authored-By: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.