temporalz/README.md
2026-02-11 23:36:05 +06:00

1.9 KiB

Temporalz

CI

A Zig library for working with temporal types based on the Temporal Standard.

Temporalz provides Zig bindings to the Rust-based temporal_rs library for handling dates, times, and durations with proper timezone support.

Installation

Prerequisites

  • Zig 0.16.0-dev.2535+b5bd49460 or later
  • Rust toolchain (only required if prebuilt staticlibs are not available for your platform)

Add as a Dependency

zig fetch --save https://github.com/nurulhudaapon/temporalz/archive/main.tar.gz

Use in build.zig

Add temporalz to your executable in build.zig:

const temporalz = b.dependency("temporalz", .{
    .target = target,
    .optimize = optimize,
});

const exe = b.addExecutable(.{...});

exe.root_module.addImport("temporalz", temporalz.module("temporalz"));

Checklist (Test262)

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

Prebuilt libraries are included for the following platforms:

  • aarch64-macos
  • x86_64-macos
  • aarch64-linux-gnu
  • 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.

Development

Clone the Repository

git clone https://github.com/nurulhudaapon/temporalz.git
cd temporalz

Build and Run

zig build run

Run Tests

zig build test

License

MIT