refactor: cleanup build.zig

This commit is contained in:
Nurul Huda (Apon) 2026-03-14 16:10:45 +06:00
parent 81a64af4b8
commit 6d1d25df83
4 changed files with 5 additions and 15 deletions

View file

@ -63,7 +63,7 @@ pub fn build(b: *std.Build) !void {
.target = target,
.optimize = optimize,
});
mod.linkLibrary(temporal_rs_local.artifact("temporal_rs_lib"));
mod.addImport("temporal_rs", temporal_rs_local.module("temporal_rs"));
}
// --- Rust Misc Deps --- //

View file

@ -19,9 +19,9 @@
.paths = .{
"build.zig",
"build.zig.zon",
"Cargo.toml",
"Cargo.lock",
"README.md",
"LICENCE",
"src",
"lib",
"pkg",
},
}

View file

@ -45,17 +45,6 @@ pub fn build(b: *std.Build) !void {
});
mod.addObjectFile(lib_file);
// --- Library Artifact (for explicit linking) --- //
const lib_artifact = b.addLibrary(.{
.name = "temporal_rs_lib",
.root_module = b.createModule(.{
.target = target,
.optimize = optimize,
}),
});
lib_artifact.root_module.addObjectFile(lib_file);
b.installArtifact(lib_artifact);
// --- Steps: Build all platforms --- //
{
const build_lib_step = b.step("lib", "Build libraries for all common platforms");

View file

@ -0,0 +1 @@
// Empty root file for zig module