Installing Dependencies
If you haven’t already done so, you will need to Download and Install Go so you will be able to compile any .go
source files into native executables.
After Go is installed, make sure $GOPATH/bin
is part of your PATH
, so that any tools that you decide to go install
will be available for use in your terminal.
setx PATH "%PATH%;%GOPATH%\bin"
echo 'export PATH="$PATH:$GOPATH/bin"' >> ~/.zshrc && source ~/.zshrc
echo 'export PATH="$PATH:$GOPATH/bin"' >> ~/.bashrc && source ~/.bashrc
The gd
command will look for godot
in your $PATH
- make sure you have the right version installed (typically this will be the latest stable version of Godot).
https://godotengine.org/download/
In order for Go code to work together with the C++ code in the Godot Engine, you’ll need a C compiler. We officially support The Zig Compiler as it supports full cross-compilation.
Please ensure that Zig is added to your PATH
after you’ve extracted it to a convieniant location on your computer.
setx PATH "%PATH%;C:\place\you\extracted\zig-windows-x86_64-your-version"
You can use Homebrew to install Zig:
brew install zig
You should be able to install Zig using your package manager.
snap install zig