How to use zig with codespaces?

How to use zig with codespaces?

I use codespaces with zig.

I just:

  • install the vscode-zig extension (installs zig and zls)
  • put the zig install location in PATH:
    echo 'PATH="$PATH:/home/codespace/.vscode-remote/data/User/globalStorage/ziglang.vscode-zig/zig_install"' >>~/.profile

After stopping and restarting the codespace, need to do a source ~/.profile to make sure zig stays in PATH.