Skip to content

use of jiff-tzdb crate and its future #687

Open

Description

@BurntSushi

Hiya!

I was looking at the dependents of jiff-tzdb, and y'all are the only ones using it outside of Jiff itself.

I wanted to reach out to you because I am likely to be shifting jiff-tzdb around in a way that could make it more difficult for y'all to use. Right now, jiff-tzdb is just a simple wrapper around the raw TZif data as a &[u8]. It's then up to the caller to parse it as TZif and do something with it.

What I'm likely to do is instead provide each time zone as structured data that has already been parsed. It will have a dependency on a new crate called jiff-core that defines the types used by the structured data. The high level goal here is to make it possible to use this time zone data in environments without alloc and as a performance optimization to avoid some cases where Jiff otherwise has to wrap its internal TimeZone representation in an Arc.

I think that if I do this, that means there probably won't be a way to get at the raw &[u8] of the TZif data, because providing it would be strictly redundant for Jiff's purposes and would only serve to increase binary size.

Anyway, I wanted to reach out and provide y'all with an FYI and see if y'all had any feedback.

Activity

  1. nekevss commented on Mar 5, 2026

    @nekevss
    Member

    Oh hey! Hm, that seems like an understandable enough change. I'm not entirely sure what would be the best approach.

    Background: jiff-tzdb was used for CompiledTzdbProvider mostly as an early on stub (it was probably the best of the available time zone data crates at the time, if I'm recalling correctly). As you've noted though, jiff-tzdb requires parsing at runtime which was never great, so the long term goal was to have a zero copy data provider to unblock no alloc environments. The first pass at the zero copy version was merged in #662, and was part of the 0.2.0 release.

    As such though, I haven't really been sure what to do with the CompiledTzdbProvider that uses jiff-tzdb. It was really good to have the test coverage of the extra time zone data to compare ZeroCompiledTzbdProvider, FsTzdbProvider, and ZoneInfo64TzdbProvider against.

    I'll have to think about it. My immediate inclination is that the CompiledTzdbProvider would just be removed once jiff-tzdb makes the change.

  2. nekevss commented on Mar 5, 2026

    @nekevss
    Member

    Also, FWIW, if you need a zone info compiler for any data serialization, feel free to try zoneinfo_rs. It may need a bit more love and attention in some places, but it's been pretty useful when working on ZeroCompiledTzdbProvider.

  3. added
    providers
    on Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    providers

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions