No description
  • Zig 99.4%
  • C 0.5%
  • JavaScript 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nurul Huda (Apon) 4fa4cb6668
Some checks failed
CI / Build (macos-latest) (push) Has been cancelled
CI / Build (ubuntu-latest) (push) Has been cancelled
CI / Build (windows-latest) (push) Has been cancelled
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
refactor: mv temporalz to Temporal
2026-09-28 17:51:12 +06:00
.github/workflows refactor: mv root.zig -> Temporal.zig 2026-09-28 17:16:20 +06:00
lib chore: upgrade to latest zig 2026-08-11 16:34:47 +06:00
src feat: add few additional methods 2026-09-28 17:41:45 +06:00
test refactor: mv temporalz to Temporal 2026-09-28 17:51:12 +06:00
.gitignore test: rm test262 test setup 2026-07-16 02:09:44 +06:00
build.zig refactor: mv temporalz to Temporal 2026-09-28 17:51:12 +06:00
build.zig.zon refactor: mv root.zig -> Temporal.zig 2026-09-28 17:16:20 +06:00
LICENCE chore: improve readme 2026-01-26 12:38:42 +06:00
README.md chore: upgrade to latest zig 2026-08-11 16:34:47 +06:00

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

Add as a Dependency

zig fetch --save git+https://github.com/nurulhudaapon/temporalz.git

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

Namespace Status
Instant ✅
Duration ✅
PlainDate ✅
PlainTime ✅
PlainDateTime ✅
PlainYearMonth ✅
PlainMonthDay ✅
ZonedDateTime ✅

Prebuilt

Prebuilt libraries are included for the following platforms:

  • x86_64-macos, aarch64-macos
  • x86_64-linux-gnu, aarch64-linux-gnu, x86-linux-gnu, arm-linux-gnueabihf
  • loongarch64-linux-gnu, powerpc64le-linux-gnu, riscv64-linux-gnu, s390x-linux-gnu
  • x86_64-windows-gnu, aarch64-windows-gnu, x86-windows-gnu
  • x86_64-freebsd, x86_64-netbsd
  • wasm32-freestanding, wasm32-wasi
  • x86_64-linux-musl, aarch64-linux-musl
  • aarch64-linux-android, aarch64-ios

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

# Node.js
zig build run -Dtarget=wasm32-freestanding

# wasmtime
zig build run -Dtarget=wasm32-wasi

Run Tests

zig build test