Codespaces Zig template

GitHub Codespaces template





Zig Language Server (zls)
Formatter
Debug





Set a version you prefer.

Dockerfile

ARG ZIGVER="0.10.0"
ARG ZIGTARGET="linux-x86_64"






Hello world


zig init-exe

src/main.zig

const std = @import("std");

pub fn main() !void {
    std.debug.print("Hello, {s}!\n", .{"World"});
}

zig build
zig-out/bin/workspace




F5

debug










c.mp4







Right-click on the port and check in the browser

r.mp4

Port number is 8085, not 5900.







Check Codespaces usage

https://github.com/codespaces

If you want to get it for free, make sure it's shut down after you use it.
Delete useless containers!

To stop, click on codespeces and stop from the menu

c