opportune
Pure-Rust calendar availability and scheduling engine: compute bookable times across participants' calendars, working hours, buffers, notice windows, rest rules, travel holds, and workload caps, and validate proposed bookings at confirmation time.
- Deterministic and pure:
nowis an explicit input, with no ambient clock, network, or filesystem I/O. - Explicit time zone data: uses the bundled IANA time zone database (
bundled-tzdb, enabled by default) or a caller-suppliedTZifdirectory — never the host OS clock or system zoneinfo. - All seven rule kinds:
window,blackout,clearance,lead_time,status_policy,rest, andcap, plus multi-participant weighted matching and structured exclusion reasons. - Safe host scoping:
Rule::and_whointersects a selector into a rule'swho, sorule.and_who(Selector::kind(ParticipantKind::Person))keeps the defaultRole::Hostclause and reaches human hosts alone — neither rooms nor attendees.Rule::except_whoexempts one, as inrule.except_who(Selector::ids(["ceo"]));with_whoreplaceswhooutright and would also judge attendees.
Install
Disable the bundled time zone database if you supply your own TZif directory:
Quickstart
use Engine;
use ;
use presets;
use ;
Companion Crates
opportune-json: JSON wire types, RFC 6901 pointer diagnostics, Draft 2020-12 JSON Schema export, and versioned upgrades.opportune-adapters: Microsoft Graph and Google Calendar payload conversions.
Documentation
License
Dual-licensed under MIT or Apache-2.0, at your option.