Skip to content

v0.1.7

Choose a tag to compare

@rosshadden rosshadden released this 24 Jun 22:05
· 51 commits to main since this release

Added version info to gdext.

Definitions:

pub struct InfoVersion {
	name        string
	description string
	major       int
	minor       int
	patch       int
	full        string
	time        time.Time
	status      string
	build       string
}

pub struct Info {
	version InfoVersion
	godot   InfoVersion
}

Usage:

pub fn init(v voidptr, l gd.GDExtensionInitializationLevel) {
	if l == .initialization_level_scene {
		gdext.register_class[services.Debug]('Node')
		gdext.register_class[actors.Player]('Node2D')

		println(gdf.info())
	}
}

Output:

gdext.Info{
    version: gdext.InfoVersion{
        name: 'gd'
        description: 'V bindings for Godot.'
        major: 0
        minor: 1
        patch: 7
        full: 'v0.1.7'
        time: 2025-06-24 18:03:36
        status: ''
        build: ''
    }
    godot: gdext.InfoVersion{
        name: 'Godot Engine'
        description: 'Multi-platform 2D and 3D game engine'
        major: 4
        minor: 5
        patch: 0
        full: 'Godot Engine v4.5.beta.custom_build'
        time: 0000-00-00 00:00:00
        status: 'beta'
        build: 'custom_build'
    }
}

Full Changelog: v0.1.6...v0.1.7