From 7a30f17d43d9154548b7adcafa3e926d6079558c Mon Sep 17 00:00:00 2001 From: "Nurul Huda (Apon)" Date: Wed, 11 Feb 2026 23:36:05 +0600 Subject: [PATCH] fix: windows arm build --- README.md | 19 +++++++++++-------- build.zig | 6 ++---- build.zig.zon | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 5b58556..93af53e 100644 --- a/README.md +++ b/README.md @@ -38,14 +38,16 @@ exe.root_module.addImport("temporalz", temporalz.module("temporalz")); ## Checklist ([Test262](https://github.com/tc39/test262/tree/main/test/built-ins/Temporal)) -- [x] Instant -- [x] Duration -- [x] PlainDate -- [x] PlainTime -- [x] PlainDateTime -- [x] PlainYearMonth -- [x] PlainMonthDay -- [x] ZonedDateTime +| Namespace | Test262 (todo) | +| --- | --- | +| Instant | 0/0 | +| Duration | 0/0 | +| PlainDate | 0/0 | +| PlainTime | 0/0 | +| PlainDateTime | 0/0 | +| PlainYearMonth | 0/0 | +| PlainMonthDay | 0/0 | +| ZonedDateTime | 0/0 | ## Prebuilt @@ -57,6 +59,7 @@ Prebuilt libraries are included for the following platforms: - `x86_64-linux-gnu` - `x86_64-windows-gnu` - `aarch64-windows-gnu` +- `wasm32-freestanding` For other platforms, the library will build from source; you need the Rust toolchain installed. diff --git a/build.zig b/build.zig index 7448f7f..d2f08a4 100644 --- a/build.zig +++ b/build.zig @@ -4,7 +4,7 @@ const build_crab = @import("build_crab"); pub fn build(b: *std.Build) !void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); - const is_wasm_freestanding = target.result.cpu.arch.isWasm() and target.result.os.tag == .freestanding; + const is_wasm_freestanding = target.result.cpu.arch.isWasm(); // --- Zig Module: temporalz --- // const mod = b.addModule("temporalz", .{ @@ -12,9 +12,7 @@ pub fn build(b: *std.Build) !void { .target = target, .optimize = optimize, }); - if (is_wasm_freestanding) { - mod.addIncludePath(b.path("src/stubs/c_headers")); - } + mod.addIncludePath(b.path("src/stubs/c_headers")); // --- Rust C ABI: temporal_capi --- // const temporal_rs = b.dependency("temporal_rs", .{ diff --git a/build.zig.zon b/build.zig.zon index 7002592..d94022f 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -2,7 +2,7 @@ .name = .temporalz, .version = "0.1.2", .fingerprint = 0xd8d79d59acc4faae, - .minimum_zig_version = "0.16.0-dev.2535", + .minimum_zig_version = "0.16.0-dev.2535+b5bd49460", .dependencies = .{ .temporal_rs = .{ .url = "git+https://github.com/boa-dev/temporal#v0.1.2",