Skip to content

v2.0.0 - Zig 0.15.1 update

Latest

Choose a tag to compare

@Mario-SO Mario-SO released this 09 Oct 21:47
· 377 commits to main since this release

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.

[2.0.0] - 2025-10-09

🚀 Compatibility & Tooling

Build System

  • Reworked build.zig for Zig 0.15+: executables/tests/benchmarks now share helper-generated modules, and
    the static archive installs via b.addLibrary.
  • Exported module name stays stable for dependents (@import("ohlcv")), removing the old lib/ohlcv.zig
    path requirement.
  • zig build run, zig build test, and benchmark steps (zig build benchmark, zig build benchmark-streaming, etc.) stay available through new helper wiring.

HTTP & IO Updates

  • HTTP data source now streams into a managed ArrayList writer adapted with writer.adaptToNewApi(...),
    passing the new response_writer on Zig 0.15’s std.http.Client.fetch.
  • Demo stdout uses std.fs.File.stdout().writer(...) and guards against std.Io.Writer.Error.WriteFailed
    (common when piping output).

🧠 Library Improvements

Parsers & Time Series

  • CSV parser, streaming parser, and time-series utilities now rely on std.array_list.Managed, preserving
    .init, .writer, and capacity helpers under Zig 0.15.
  • Benchmarks allocate via the managed lists, matching parser semantics for non-streaming and streaming
    runs.

Consumer Experience

  • README now highlights Zig 0.15+ support, with import instructions showing const ohlcv = @import("ohlcv");.
  • Build instructions clarify dependency wiring:
    const ohlcv_dep = b.dependency("ohlcv", .{ .target = target, .optimize = optimize });
    exe.root_module.addImport("ohlcv", ohlcv_dep.module("ohlcv"));
    

✅ Verification

  • Commands executed on macOS arm64 with Zig 0.15.1:
    • zig build
    • zig build test
    • zig build benchmark, zig build benchmark-streaming, zig build benchmark-performance
    • zig build profile-memory
  • Downstream sample (rayzig) compiles once imports switch to @import("ohlcv") and zig fetch --save …
    refreshes the dependency.

Known Limitations

  • Requires Zig 0.15.0 or higher.
  • CSV dates before 1970 are skipped.
  • Rows with zero values are filtered out.