Skip to content

Commit

Permalink
Add global comptime assertion for target ptr size (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
InKryption authored Jan 6, 2025
1 parent e7495af commit 47a84ab
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/sig.zig
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@ pub const TEST_STATE_DIR = "data/test-state/";
pub const FUZZ_DATA_DIR = "data/fuzz-data/";
pub const BENCHMARK_RESULTS_DIR = "results/";
pub const GENESIS_DIR = "data/genesis-files/";

comptime {
// sig's global assertions/assumptions

const target = @import("builtin").target;
if (target.ptrBitWidth() != 64) {
@compileError("sig only supports 64-bit targets");
}
}

0 comments on commit 47a84ab

Please sign in to comment.