# 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, }); ```