initial commit
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 12m39s

Based on MIT licensed code: https://github.com/ghostty-org/ghostty/blob/main/src/tripwire.zig
This commit is contained in:
2026-06-07 10:27:33 +02:00
parent ed34903086
commit 1a44a6a4a0
6 changed files with 358 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
# Tripwire
Library to test `errdefer` code paths. It is designed to be zero cost for runtime execution and only facilitates test builds.
This is a copy of the MIT licensed original code inside of [ghostty](https://ghostty.org) and can be found [here](https://github.com/ghostty-org/ghostty/blob/main/src/tripwire.zig).
Please check out the [write up](https://mitchellh.com/writing/tripwire) for that library.
## Usage
To add or update `tripwire` as a dependency in your project run the following command:
```sh
zig fetch --save git+https://gitea.yves-biener.de/yves-biener/tripwire
```
Add the dependency to your module as follows in your *build.zig*:
```zig
const zterm: *Dependency = b.dependency("tripwire", .{
.target = target,
.optimize = optimize,
});
```