Standard LibraryM3
File I/O, Environment & UTC Time
Size-bounded file I/O, environment variables, CLI args, and RFC 3339 UTC / monotonic clocks.
5 min readUpdated: v0.8.0-rc Reference
Bounded File I/O & RFC 3339 Time
File readers require an explicit max_bytes cap and reject directories/FIFOs. UTC formatting and parsing are verified against 2,016 Python datetime oracle dates.
hadid · EN
match (time_parse_utc("2026-11-25T10:00:00Z")) { Ok(ms) => { match (time_format_utc(ms + 3600000)) { Ok(next_hr) => { print("Next hour UTC: " + next_hr); } Err(e) => { print(e); } } } Err(e) => { print(e); }}match (file_write_text("notes.txt", "Hadid M3 File IO")) { Ok(written) => { print("Written bytes: " + json_from_i64(written)); match (file_read_text("notes.txt", 1024)) { Ok(content) => { print("Read back: " + content); } Err(e) => { print(e); } } } Err(e) => { print(e); }}