Skip to main content

CompileArgs

Struct CompileArgs 

Source
pub struct CompileArgs {
Show 28 fields pub input: Vec<PathBuf>, pub out: Option<PathBuf>, pub zone: Option<String>, pub zones: Option<PathBuf>, pub all_supported: bool, pub link_mode: LinkModeArg, pub force: bool, pub unsupported: UnsupportedArg, pub transition_limit: usize, pub emit_style: EmitStyleArg, pub bloat: Option<BloatArg>, pub redundant_until: Option<String>, pub range: Option<String>, pub leapseconds: Option<PathBuf>, pub no_create_dirs: bool, pub localtime: Option<String>, pub localtime_name: Option<String>, pub mode: Option<String>, pub alias_map: Option<PathBuf>, pub manifest: Option<PathBuf>, pub tzdb_version: Option<String>, pub backward: Option<String>, pub backward_source: Option<PathBuf>, pub backzone: Option<String>, pub packratlist: Option<String>, pub packratlist_source: Option<PathBuf>, pub dataform: Option<String>, pub verbose: bool,
}

Fields§

§input: Vec<PathBuf>

Source file(s) or directory(ies) of tzdata.

§out: Option<PathBuf>

Output directory root. Required — there is no system default.

§zone: Option<String>

Compile a single named zone.

§zones: Option<PathBuf>

Compile the zones listed (one per line) in this file.

§all_supported: bool

Compile every zone this version supports (others are reported and skipped).

§link_mode: LinkModeArg

How to materialise links: copy (default) or symlink.

§force: bool

Overwrite existing output files.

§unsupported: UnsupportedArg

On unsupported syntax: error (default, fail closed) or skip.

§transition_limit: usize

Maximum transitions emitted per zone.

§emit_style: EmitStyleArg

Explicit-transition emission style (T8-slim). default = behaviour-matched (CORE.1-gated); zic-slim reproduces reference zic’s slim explicit-transition set; zic-fat == default. Never changes behaviour — only how many explicit transitions precede the POSIX footer.

§bloat: Option<BloatArg>

Emission bloat (reference zic’s -b {slim|fat}): a thin alias onto --emit-style (slimzic-slim, fatzic-fat). Not the TZif version, not the -R redundant tail. If both -b and a conflicting --emit-style are given, that is an error.

§redundant_until: Option<String>

Redundant-tail bound (reference zic’s -R @hi): under slim emission, keep otherwise-droppable footer-governed transitions out to this instant (@<unix-seconds>), for readers that ignore the POSIX footer. Only affects --emit-style zic-slim/-b slim (zic-rs’s default is already fat). Not bloat (-b) and not range truncation (-r); never changes behaviour or the TZif version.

§range: Option<String>

Range truncation (reference zic’s -r '[@lo][/@hi]'): restrict emitted timestamps to the @-prefixed Unix-second window. Parse-only for now (T10.4b) — a well-formed value is recognised but not yet applied (the compile fails closed rather than emit un-truncated output); truncation + the -00 unspecified-local-time placeholder land in T10.4d.

§leapseconds: Option<PathBuf>

Leap-seconds source (reference zic’s -L leapseconds): the right/ build profile. When given, the parsed leap table is applied to every compiled zone. Opt-in; never the default — without it, ordinary canonical-zone output is unchanged (no leap table).

§no_create_dirs: bool

Do not create the --out tree (reference zic’s -D); require it to already exist.

§localtime: Option<String>

Install policy (reference zic’s -l <zone>): also create a localtime link in --out pointing at this (also-selected) zone. Opt-in; never affects canonical-zone behaviour.

§localtime_name: Option<String>

Name of the localtime link (reference zic’s -t, default localtime). Constrained to a safe relative name under --out — zic-rs will not write to an arbitrary/system path.

§mode: Option<String>

File permission bits for created files (reference zic’s -m), as octal (e.g. 644). Unix-only; applies to compiled TZif files and copied links (not symlinks). Symbolic chmod expressions are not supported.

§alias_map: Option<PathBuf>

Also write an alias/canonical manifest (zones vs links + hashes) to this path.

§manifest: Option<PathBuf>

Also write a compile-provenance manifest (source hash, build-profile identity, oracle) here.

§tzdb_version: Option<String>

Optional claimed tzdb release (e.g. 2026b) recorded in the manifest and reconciled against the version detected from the source — surfaces a detected_differs_from_claim rather than silently stamping a release.

§backward: Option<String>

Optional claimed backward (legacy-alias) source-set membership, recorded in the manifest’s source_profile as a bare claim (included/excluded) — never trusted as detection. Provenance only: does not change what is compiled or linked.

§backward_source: Option<PathBuf>

Optional file the caller asserts is the backward source. The manifest hash-checks whether its bytes participated in this build (→ detected: present|absent); it does not assert the file is genuinely the IANA backward, and it does not affect compilation.

§backzone: Option<String>

Optional claimed backzone (PACKRATDATA) source-set membership, recorded in the manifest’s source_profile.backzone_evidence as a bare claim (included/excluded) — never trusted as detection. Detection is hash-anchored to the pinned reference release (T12.5b). Provenance only: does not change what is compiled or linked.

§packratlist: Option<String>

Optional claimed backzone scope (PACKRATLIST): full (all backzone) / subset (filtered, e.g. PACKRATLIST=zone.tab) / none (no backzone). Recorded in source_profile.packratlist_evidence as a bare claim — never trusted as detection (T12.5c). Provenance only.

§packratlist_source: Option<PathBuf>

Optional file the caller explicitly admits as the PACKRATLIST subset source (e.g. zone.tab). Detection confirms its bytes participated alongside backzone (→ subset); mere presence of zone.tab among inputs is not admission. Provenance only (T12.5c).

§dataform: Option<String>

Optional claimed DATAFORM encoding form: main / vanguard / rearguard. Recorded in source_profile.dataform_evidence as a bare claim — never trusted as detection. Detection is hash-backed against the pinned 2026b .zi artifacts via the compiled inputs (there is no --dataform-source: the .zi artifacts are compile sources). Provenance only (T12.5d).

§verbose: bool

Verbose diagnostics (reference zic’s -v): also surface VerboseOnly warnings — e.g. the “fewer than 3 characters” abbreviation warning and the transition-count client-compat warning. Default (quiet) prints only always-on diagnostics, matching zic without -v (T13.6). Never affects compiled output, exit status, or which warnings are collected — only what is printed.

Trait Implementations§

Source§

impl Args for CompileArgs

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Debug for CompileArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for CompileArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.