No description
Find a file
2025-11-23 18:42:48 -08:00
.github/workflows Update actions/checkout action to v6 (#20) 2025-11-23 18:42:48 -08:00
src Drop support for Zig <0.15 (#19) 2025-09-11 10:18:39 -07:00
.gitignore Add Zig 0.13 support (#8) 2024-06-23 06:20:34 -07:00
build.zig Zig 0.15.1 Support (#18) 2025-09-11 10:12:26 -07:00
build.zig.zon Drop support for Zig <0.15 (#19) 2025-09-11 10:18:39 -07:00
CHANGELOG.md Drop support for Zig <0.15 (#19) 2025-09-11 10:18:39 -07:00
LICENSE Initial import 2024-01-21 21:31:10 -05:00
README.md Release 0.3.0 2024-06-23 06:21:31 -07:00
renovate.json Configure Renovate (#9) 2024-06-25 21:42:15 -07:00

🗑️ temp.zig CI codecov

Cross-platform temporary files and directories in Zig.

Features

  • Temporary files and directories in any location
  • Retain temporary artifacts on an opt-in basis
  • Customize naming schemes

Supported operating systems: Unix-like systems and Windows.

API reference

Auto-generated API Reference for the library is available at https://abhinav.github.io/temp.zig/.

Note that Zig's autodoc is currently in beta. Some links may be broken in the generated website.

Installation

Use zig fetch --save to pull a version of the library into your build.zig.zon. (This requires at least Zig 0.11.)

zig fetch --save "https://github.com/abhinav/temp.zig/archive/0.3.0.tar.gz"

Then, import the dependency in your build.zig:

pub fn build(b: *std.Build) void {
    // ...

    const temp = b.dependency("temp", .{
        .target = target,
        .optimize = optimize,
    });

And add it to the artifacts that need it:

    const exe = b.addExecutable(.{
        // ...
    });
    exe.root_module.addImport("temp", temp.module("temp"));

License

This software is made available under the BSD3 license.