# How Extension Entry Point Initialization Works in gdext-nim

> Discover how gdext-nim initializes its extension entry point. Learn how the init_library function bootstraps the Godot API and registers your custom code.

- Repository: [godot-nim 4+/gdext-nim](https://github.com/godot-nim/gdext-nim)
- Tags: internals
- Published: 2026-03-02

---

**The gdext-nim library exports a C-compatible `entryPoint` function symbol (`init_library` by default) that bootstraps the Godot API interface, registers initialization callbacks, and executes user-defined registration code when Godot loads the Nim shared library.**

The gdext-nim project provides Nim bindings for Godot 4's GDExtension API. Understanding the **extension entry point initialization** process is essential for developers creating native extensions, as it defines exactly how Godot recognizes and initializes your compiled Nim library as a valid plugin.

## Entry Point Symbol and Export Convention

In `src/gdext/private/buildsettings.nim` at line 64, the constant `Extension.entrySymbol` defines the entry point symbol that Godot expects when loading the shared library. For the `for-4.6-stable` branch, this defaults to `"init_library"`.

The actual entry point implementation resides in `src/gdext.nim` at lines 142-167. The `entryPoint` procedure is exported with the