Using Any C++ Library In Godot
AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

Prime Big Deal Days · Oct 6–7Offer from Amazon

Get the latest gadgets delivered free — and shop member deals

  • Fast, free delivery on millions of items
  • Access to Prime Big Deal Days deals on October 6–7
  • Prime Video, Amazon Music and more included
Start your free Prime trial Free trial for eligible customers · Cancel anytime
As an affiliate, we earn on qualifying purchases.

A Conan blog post published September 29, 2026 explains how to use any C++ library in Godot using GDExtension and the newly available godot-cpp 10 package in ConanCenter. The post demonstrates the approach by simulating 100,000 particles with the flecs ECS library inside a Godot scene. The key benefit is centralized, cross-platform dependency management instead of per-project vendoring and building.

Conan, the C++ package manager, published a guide on September 29, 2026 showing how developers can use any C++ library inside the Godot game engine, aided by godot-cpp 10, which is now available as a package in ConanCenter. The post, written by the Conan team, walks through how Godot’s GDExtension mechanism loads native C++ code at runtime, and demonstrates the workflow by wrapping flecs, an Entity Component System library, to simulate 100,000 particles inside a Godot scene.

Godot games are typically written in GDScript, the engine’s Python-like scripting language. GDScript cannot call native code directly, but Godot can load compiled C++ through GDExtension, which loads a shared library (.dll, .so, .dylib, or .wasm) into an unmodified, official Godot build at runtime. According to the post, GDExtension is the recommended approach for most projects and is how many popular plugins are distributed.

The Godot team maintains godot-cpp, C++ bindings that wrap GDExtension’s verbose C interface with an API close to the engine’s own internals. Classes written with godot-cpp become regular engine classes: they appear in the editor alongside built-in nodes, expose properties in the Inspector, and can be used from GDScript like any other node. Since version 10.0, a single godot-cpp release works with any Godot version from 4.3 onwards; developers select a target via the api_version build option. An extension built for Godot 4.3 also runs in newer versions, but not older ones, so the post recommends targeting the oldest Godot version you intend to support.

The post identifies the build as the main pain point: the standard workflow — adding godot-cpp as a git submodule and building with SCons — requires every project to compile its own godot-cpp for each target, platform and architecture, and any third-party library must be vendored and built with matching flags for every platform Godot exports to. With the godot-cpp recipe now in ConanCenter, godot-cpp becomes a regular Conan package, and the same dependency management applies to wrapped libraries such as physics engines or machine learning runtimes.

At a glance
reportWhen: published September 29, 2026
The developmentConan published a guide showing that godot-cpp 10 is now available as a package in ConanCenter, letting Godot developers manage C++ extension builds and third-party libraries through Conan.
Top Steam deals right now
Persona 3 Reload-70%$17.99
Persona 5 Royal-70%$17.99
The Witcher 3: Wild Hunt — Remastered-50%$24.99
DARK SOULS™: REMASTERED-50%$19.99
DARK SOULS III Deluxe Edition-50%$42.49
Dune: Awakening-50%$24.99
DARK SOULS™ II: Scholar of the First Sin-50%$19.99
The Last of Us™ Part II Remastered-33%$33.49
Live · Steam store (current discounts)

What This Changes for Godot C++ Teams

The development matters because build complexity, not C++ coding, is the main barrier to using native libraries in Godot. According to the Conan post, writing the C++ code is “the easy part”, while ensuring godot-cpp matches your Godot version and that every dependency compiles for each shipping platform is the hard part. Packaging godot-cpp and third-party libraries in ConanCenter addresses a recurring cost for teams that need simulation libraries, databases, networking protocols, or machine learning runtimes in their games — capabilities that already exist as C or C++ libraries but were previously awkward to integrate.

It also matters for the broader Godot ecosystem. Godot has become one of the most popular game engines in recent years, and the post notes it is free, open source under the MIT license, and small enough to download and use in minutes. Lowering the barrier to native extensions could widen the range of technically ambitious projects built on the engine.

How Godot Extensions Work Today

Godot is a general-purpose 2D and 3D engine built around two concepts: nodes, building blocks with types, editable properties, and callbacks such as _ready() and _process(); and scenes, trees of nodes saved as .tscn files. The engine itself is written in C++ and can load C++ extensions without being recompiled.

There are two ways to add C++ code: engine modules, compiled into the engine itself with full internal access but requiring custom Godot builds and export templates for every platform, and GDExtension, which loads shared libraries at runtime through a stable C interface. godot-cpp is compiled for one of three targets — template_debug (editor and debug exports), template_release (release exports), and editor (editor-only libraries). A small .gdextension file maps platform and debug/release feature tags to library paths, deciding which binary Godot loads at runtime.

Limits of the Tutorial’s Claims

The post is a vendor-published tutorial from Conan’s own blog, and its framing of build pain points serves Conan’s product; the claimed benefits of package-based dependency management were not independently evaluated here. Performance figures, such as the 100,000-particle flecs simulation, come from the post’s own demo and no benchmarking methodology or hardware details were provided. The source material is also truncated mid-section, so the full build configuration steps with Conan and CMake are not fully described in the available text.

Adoption and Recipe Development

Developers can try the workflow now using the godot-cpp 10 recipe in ConanCenter and the flecs example from the post. Future developments to watch include broader coverage of commonly wrapped C++ libraries as Conan recipes, and any updates to the godot-cpp recipe as new Godot versions are released. Teams already using the git submodule and SCons workflow can evaluate a migration incrementally, since GDExtension itself works identically under either build system.

Key Questions

Can GDScript call C++ libraries directly?

No. According to the post, GDScript cannot call native code. Instead, C++ code is exposed through GDExtension and godot-cpp, which makes it available to GDScript as regular engine classes and nodes.

Which Godot versions does godot-cpp 10 support?

Since godot-cpp 10.0, one release works with any Godot version from 4.3 onwards, selected via the api_version build option. Extensions built for an older version also run in newer Godot releases, but not the reverse.

What problem does Conan solve for Godot developers?

The standard workflow requires each project to build godot-cpp and every vendored third-party library for each target, platform and architecture. Conan treats godot-cpp and wrapped libraries as versioned packages, centralizing those builds.

What is the difference between engine modules and GDExtension?

Engine modules are compiled into Godot itself and require custom engine builds and export templates. GDExtension loads shared libraries into an official, unmodified Godot build at runtime and is the recommended approach for most projects.

Source: hn

FALL

Fall Picks

As an affiliate, we earn on qualifying purchases.

You May Also Like

Interview with Mitchell Hashimoto about Ghostty and Zig

Mitchell Hashimoto shares insights on Ghostty and Zig, highlighting their roles in modern infrastructure and programming languages, in an exclusive interview.

Show HN: I’m A 15 Year Old Wannabe Engineer, This Is A Cycloidal Gearbox I Built

A 15-year-old aspiring engineer posts a project showcasing a self-made cycloidal gearbox on Hacker News, demonstrating early technical skills.

How to Choose Wireless Earbuds For Travel

Pack, configure, and use wireless earbuds for travel, with practical checks for battery life, fit, noise control, and common problems.

Top 3 Achieved! Kimi K3’s Position On VigilSAR’s AI Leaderboard

Moonshot’s Kimi K3 debuts at #3 on VigilSAR’s AI benchmark, surpassing many GPT and Gemini models in defense-ISR tasks.