/gdext-nim

Nim for Godot GDExtension. A pure library and a CLI tool.

Primary LanguageNimMIT LicenseMIT

godot-nim/gdext

Godot GDExtension binding for Nim-lang.

For instance to use, see demo. See wiki to get more detail.

Features

  • Godot 4.3 full api
  • Available to define&export your Class/Function/Signal/Property
  • Available to call engine functionalities from Nim
  • GLSLang-like swizzle operator (e.g. vector3.xxxyyyzzz)
  • Commandline-helper (see wiki - gdextwiz)

Partially working

  • Hot reloading

    It works, but sometimes the editor crashes.

In preparation

  • Export enums
  • Assist to generate a .gdextension file
  • Export descriptions
  • Define/Export virtual methods
  • Develop engine plugins

Commands

install

nimble install https://github.com/godot-nim/gdext-nim

latest (devel)

nimble install https://github.com/godot-nim/gdext-nim@#head

uninstall

nimble uninstall gdext

upgrade

nimble uninstall gdext && nimble install https://github.com/godot-nim/gdext-nim

run test project

gdextwiz run testproject

run all tests

nimble test

Supported environments

OS

  • Linux
  • Macos
  • Windows

Engine

Nim compiler

  • nim-lang/nim 2.0.0 or higher

    Macos

    Use Nim installed via Homebrew, not choosenim. Due to the execution environment of Godot itself, a native AArch64/ARM64 build of Nim is required, and that choosenim installs a x86_64 build emulated via Rosetta.

Tested by author

Note

Support for environments not listed here is based on your reports. Please consider contributing.

  • OS: Linux (Arch)
  • Engine: Godot 4.3.stable.arch_linux
  • Nim: 2.0.0, 2.0.8, 2.2.0
  • CC: gcc version 14.2.1 20240910 (GCC)