From 5c491c54a22044ef1570c3fb709e14264e367fb1 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 15:10:56 +0000 Subject: fix(driver): cache the embedded standard library per user Co-Authored-By: Claude Sonnet 5.5 --- AGENTS/SUBSYSTEMS/STDLIB.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'AGENTS') diff --git a/AGENTS/SUBSYSTEMS/STDLIB.md b/AGENTS/SUBSYSTEMS/STDLIB.md index a4e260a..196ed28 100644 --- a/AGENTS/SUBSYSTEMS/STDLIB.md +++ b/AGENTS/SUBSYSTEMS/STDLIB.md @@ -10,7 +10,11 @@ import rules: [CONVENTIONS/EXCEPTIONS_AND_UNITS.md](../CONVENTIONS/EXCEPTIONS_AN - The default build compiles each .cc with the host compiler into build/pseudocode-lib/*.o, copies .cps units beside them, and embeds all these outputs in cpsc. -- StandardLibrary extracts the resources through linking/execution; the driver +- StandardLibrary extracts the resources through linking/execution into a per-user, + content-keyed cache (`llvm::sys::path::cache_directory()/cpsc/std-`). Files are + reused when identical, otherwise published by atomic rename; the cache is never deleted, so + a killed run leaks nothing. Only if no cache directory is usable does it fall back to a + temporary `cpsc-std` directory removed on exit. The driver implicitly imports std.cps unless -no-std is set. std.cps imports string.cps. - Source/object resources are embedded in installed/released cpsc, which needs no separate library directory; manually linking saved IR still requires the matching -- cgit v1.3.1-4-g156e