Zig projects need a build.zig file, which tells the compiler how to build the project.
Usually, it is called build.zig
.
build.zig file can be created based on a library or executable template with this command:
mkdir hello-world
cd hello-world
zig init-exec # or zig init-lib
Run this command:
zig build
zig build run
Install CodeLLDB
by Vadim Chugunov plugin in VSCode.
Add an entry in launch.json file:
{
"type": "lldb",
"request": "launch",
"name": "Debug",
"program": "./zig-lang/hello-world/zig-out/bin/hello-world",
"args": [],
"cwd": "${workspaceFolder}"
}