Hello !
I'm starting Zig, with a project to implement a sort of procfs to Windows, through WinFSP (https://github.com/winfsp/winfsp).
Obviously, since I'm targeting Windows, I would like to configure the build system to restrict it to actually only targeting Windows
I think I got a well formed std.Target, through
const target = std.Target;
const os = target.Os{ .tag = target.Os.Tag.windows, .version_range = target.Os.VersionRange{ .windows = target.Os.WindowsVersion.Range{
.min = target.Os.WindowsVersion.win10_rs1,
.max = target.Os.WindowsVersion.win10_fe,
} } };
const cpu = target.Cpu.Arch.x86_64;
const mytarget = target{ .cpu = target.Cpu.baseline(cpu), .os = os, .abi = target.Abi.default(cpu, os), .ofmt = target.ObjectFormat.default(os.tag, cpu) };
But it looks like since Zig 0.10, b.setTarget() requires a std.zig.CrossTarget.
I tried to get one through std.zig.CrossTarget.fromTarget(), but the compiler complains about expected type 'zig.CrossTarget', found 'type'.
Is there a way to convert it ? Or even better, is there something like CrossTarget.fromTriplet("x86_64-windows-msvc") ?