No description
Find a file
2026-01-26 23:22:49 +06:00
.github/workflows ci: enable ci on win 2026-01-26 11:55:10 +06:00
example refactor: wrap c enums 2026-01-26 13:18:05 +06:00
src fix(zoned): fix timezoneid 2026-01-26 23:22:49 +06:00
test test: improve test printing 2026-01-26 13:00:00 +06:00
.gitignore refactor: use temporal_rs as pkg 2026-01-26 11:34:26 +06:00
build.zig fix: use correct path for win 2026-01-26 12:19:32 +06:00
build.zig.zon feat: more native zig types 2026-01-26 14:23:31 +06:00
Cargo.lock refactor: use temporal_rs as pkg 2026-01-26 11:34:26 +06:00
Cargo.toml refactor: use temporal_rs as pkg 2026-01-26 11:34:26 +06:00
LICENCE chore: improve readme 2026-01-26 12:38:42 +06:00
README.md feat(plain): add initial wrapper 2026-01-26 21:50:48 +06:00
SPEC.md fix(Instant): align with spec 2026-01-23 23:57:14 +06:00

Temporalz

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.15.2
  • Rust toolchain (only required if prebuilt binaries are not available for your platform)

Add as a Dependency

zig fetch --save https://github.com/nurulhudaapon/temporalz/archive/refs/tags/v0.1.2.tar.gz

Use in build.zig

Add temporalz to your executable in build.zig:

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

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

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

Checklist

  • Instant
  • Duration
  • PlainDate
  • PlainTime
  • PlainDateTime
  • PlainYearMonth
  • PlainMonthDay
  • ZonedDateTime

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

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