Skip to content

godot-nim/gdext-nim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

godot-nim/gdext

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


Features

  • All classes and methods provided by the engine are available from Nim.
  • New extension classes can be defined that inherit from the engine class and exposed to editors and GDScript.
  • New methods, signals, properties, and enums can be defined in your extension classes and exposed.
  • New virtual functions can be defined and exposed, and overridden from both Nim and GDScript.
  • Recompiled GDExtension can be loaded without restarting the editor. (Hot Reloading)
  • Arithmetic operations such as Vector are more expressive than those in Godot, for example, GLSLang's swizzle operation is also available.
  • It has a CLI tool that allows you to create new extensions, compile, run projects, and so on from a unified interface. (see wiki - gdextwiz)

Limitation

  • Document comments left in Nim source are not reflected in the editor.
  • Editor plug-ins cannot be created using only pure Nim code.
  • Due to engine specifications, Nim code works in the form of calls from the engine; it is not possible to run Nim stand-alone.

Commands

install

nimble install gdext

uninstall

nimble uninstall gdext

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.12, 2.2.0
  • CC: gcc version 14.2.1 20240910 (GCC)

Project guides

Q. How does this library work for instance? See demo repository. Several runnable examples are available.
Q. What does this syntax mean? How can I do it? Refer our Wiki, especially Coding Quick Guide.
Q. Where can I ask my questions?
Q. Where can I share my work or get feedbacks?
Welcome to our Discussions. Any github user can participate.
Let's start with [New discussion].
Q. I have a feature request! Please tell us in Discussions/Ideas.
Q. I'd like to join the dev-team! Let us know in Discussions or Invitation Request.
We will send you an email invitation.