Skip to content

Commit

Permalink
Add global comptime assertion for target ptr size
Browse files Browse the repository at this point in the history
  • Loading branch information
InKryption committed Jan 6, 2025
1 parent 4570ab4 commit 102cc91
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 @@ -30,3 +30,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 102cc91

Please sign in to comment.