From 85f332b163fcb906b79cc6f14224b5aafe8b559d Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Fri, 14 Jun 2024 15:07:18 +0200 Subject: [PATCH] use addModule to prevent duplication error in import --- build.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.zig b/build.zig index 511109e..b6f706b 100644 --- a/build.zig +++ b/build.zig @@ -4,10 +4,9 @@ pub fn build(b: *std.Build) !void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); - const verkle_crypto_module = b.createModule(.{ - .root_source_file = .{ .cwd_relative = "src/main.zig" }, + _ = b.addModule("verkle-crypto", .{ + .root_source_file = b.path("src/main.zig"), }); - try b.modules.put(b.dupe("verkle-crypto"), verkle_crypto_module); const lib = b.addStaticLibrary(.{ .name = "verkle-crypto",