Help with Spir-V compilation

It seems Zig can compile to Spir-V bytecode (#2935). Any pointers on how to actually do it?
Here’s what I’ve tried.

// src/main.zig
pub fn main() void {}
// build.zig
const std = @import("std");

pub fn build(b: *std.Build) void {
    const arch: std.Target.Cpu.Arch = .spirv64;
    const tag: std.Target.Os.Tag = .vulkan;
    const os: std.Target.Os = .{
        .tag = tag,
        .version_range = std.Target.Os.VersionRange.default(

    const target = std.Target{
        .cpu = std.Target.Cpu.baseline(arch),
        .os = os,
        .abi = std.Target.Abi.default(
        .ofmt = .spirv,
    const crossTarget = std.zig.CrossTarget.fromTarget(target);
    const optimize = b.standardOptimizeOption(.{});

    const exe = b.addExecutable(.{
        .name = "zigspir",
        .root_source_file = .{ .path = "src/main.zig" },
        .target = crossTarget,
        .optimize = optimize,

When running “zig build”, I get an error code 5, with very little information.

zig build-exe zigspir Debug spirv64-vulkan-none: error: the following command exited with error code 5:
C:\Program Files\Zig\zig.exe build-exe D:\Users\Lucas\Downloads\zigspir\src\main.zig --cache-dir D:\Users\Lucas\Downloads\zigspir\zig-cache --global-cache-dir 
C:\Users\Lucas\AppData\Local\zig --name zigspir -target spirv64-vulkan-none -mcpu generic --listen=-
Build Summary: 0/3 steps succeeded; 1 failed (disable with -fno-summary)
install transitive failure
+- install zigspir transitive failure
   +- zig build-exe zigspir Debug spirv64-vulkan-none failure
error: the following build command failed with exit code 1:
D:\Users\Lucas\Downloads\zigspir\zig-cache\o\83f3298a610dc3ab3d3817f25694f578\build.exe C:\Program Files\Zig\zig.exe D:\Users\Lucas\Downloads\zigspir D:\Users\Lucas\Downloads\zigspir\zig-cache C:\Users\Lucas\AppData\Local\zig

I also tried with b.addStaticLibrary() instead of addExecutable, and with .spirv32 instead of .spirv64, but got the same error.
Also, how do I define the inputs and outputs for the shader?