Declaration
Writer :: struct {
out_dir: string; base_url: string; dry_run: bool; errors: [..] string; files: Maps.Map(string, [] string); folders: Maps.Map(string, bool); mutex: Threads.Mutex; pool: Arena.Pool;}Concurrent output-tree metadata and collected errors. Use writer_init, then deinit after all render threads join. Read errors and check_links only after the writes finish.
w := writer_init("unused", "/docs/", dry_run = true);
defer deinit(*w);
assert(write_file(*w, "site.css", "body {}"));
assert(w.errors.count == 0);