Hello World
Create a simple Hello World example app with Gi.
On all platforms, you must download and install Go from the Go website if you do not already have Go 1.18+ installed.
xcode-select --install
curl -O https://sdk.lunarg.com/sdk/download/latest/mac/vulkan_sdk.dmg
open vulkan_sdk.dmg
InstallVulkan.app
cd C:\TDM-GCC-64
mingwvars.bat
sudo apt-get install libgl1-mesa-dev xorg-dev
sudo dnf install libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel libXi-devel libXxf86vm-devel
Clone the Gi repository by running git clone https://github.com/goki/gi
cd gi/examples/widgets
go build
./widgets
if you are on MacOS or Linux and ./widgets.exe
if you are on Windows. This should create a window with a variety of widgets, similar to the screenshot below:
Create a simple Hello World example app with Gi.
Extend the Hello World example to support incrementing a number by clicking on a button.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.