winget to install
mkdir zig1
cd zig1
PS C:\work\zig1> zig run main.zig
error: failed to check cache: ‘main.zig’ file_hash FileNotFound
PS C:\work\zig1>
winget to install
mkdir zig1
cd zig1
PS C:\work\zig1> zig run main.zig
error: failed to check cache: ‘main.zig’ file_hash FileNotFound
PS C:\work\zig1>
Hello @pm100, welcome to ziggit ![]()
main.zig file is missing from the C:\word\zig1 directory.
Try to create a main.zig file using a text editor.
To display “Hello World” when running zig run main.zig put the following contents in the file:
const std = @import("std");
pub fn main() void {
std.debug.print("Hello World\n", .{});
}
zig init did that for me
nope, now I get
PS C:\work\zig1> zig run src/main.zig
src\main.zig:2:22: error: no module named 'zig1' available within module 'main'
const zig1 = @import("zig1");
^~~~~~
Since you created the project with zig init, a build.zig was also created that can build and run your project.
From zig1 directory run: zig build run