From 8f78ceac2812049ee648e23d0e206b0911cc9453 Mon Sep 17 00:00:00 2001 From: tef-engine Date: Sun, 19 Jul 2026 01:26:26 -0700 Subject: [PATCH] fix(rust): replace now() TODO stub with real SystemTime::now() call The Rust generator emitted '0u64 /* TODO: use std::time::SystemTime */' for now() calls. Replace with the real expression: std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_secs() Resolves the TODO in compiler/src/generators/rust.ts:544. --- compiler/src/generators/rust.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/generators/rust.ts b/compiler/src/generators/rust.ts index 6601927..61a5e09 100644 --- a/compiler/src/generators/rust.ts +++ b/compiler/src/generators/rust.ts @@ -541,7 +541,7 @@ function rewriteRustExpr( // Step 1: Replace function calls let rust = expr - .replace(/\bnow\(\)/g, '0u64 /* TODO: use std::time::SystemTime */') + .replace(/\bnow\(\)/g, 'std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_secs()') .replace(/\blen\(([^)]+)\)/g, '$1.len()') .replace(/\blength\(([^)]+)\)/g, '$1.len()') .replace(/\bjoin\(([^,]+),\s*([^)]+)\)/g, '$1.join($2)')