Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abhinav/temp.zig
Create temporary files and directories
https://github.com/abhinav/temp.zig
zig
Last synced: 3 months ago
JSON representation
Create temporary files and directories
- Host: GitHub
- URL: https://github.com/abhinav/temp.zig
- Owner: abhinav
- License: bsd-3-clause
- Created: 2024-01-21T15:34:42.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-09-02T23:52:36.000Z (4 months ago)
- Last Synced: 2024-10-04T20:43:21.839Z (3 months ago)
- Topics: zig
- Language: Zig
- Homepage: https://abhinav.github.io/temp.zig/
- Size: 24.4 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 🗑️ temp.zig [![CI](https://github.com/abhinav/temp.zig/actions/workflows/ci.yml/badge.svg)](https://github.com/abhinav/temp.zig/actions/workflows/ci.yml) [![codecov](https://codecov.io/github/abhinav/temp.zig/graph/badge.svg?token=9CB5MRYCH5)](https://codecov.io/github/abhinav/temp.zig)
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 schemesSupported operating systems:
Unix-like systems and Windows.## API reference
Auto-generated API Reference for the library is available at
.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.)```bash
zig fetch --save "https://github.com/abhinav/temp.zig/archive/0.3.0.tar.gz"
```Then, import the dependency in your build.zig:
```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:
```zig
const exe = b.addExecutable(.{
// ...
});
exe.root_module.addImport("temp", temp.module("temp"));
```## License
This software is made available under the BSD3 license.