refactor: rename pkgs
This commit is contained in:
parent
2b5f1a0024
commit
ca64dae639
15 changed files with 5 additions and 22 deletions
|
|
@ -6,20 +6,18 @@ pub fn build(b: *std.Build) !void {
|
||||||
const is_wasm_freestanding = target.result.cpu.arch.isWasm() and target.result.os.tag == .freestanding;
|
const is_wasm_freestanding = target.result.cpu.arch.isWasm() and target.result.os.tag == .freestanding;
|
||||||
|
|
||||||
// --- Rust C ABI & Pre-built via temporal-rs subpackage --- //
|
// --- Rust C ABI & Pre-built via temporal-rs subpackage --- //
|
||||||
const libtemporal_src = b.dependency("libtemporal_src", .{
|
const temporal = b.dependency("temporal", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
|
||||||
// --- Zig Module: temporalz --- //
|
// --- Zig Module: temporalz --- //
|
||||||
const mod = b.addModule("temporalz", .{
|
const mod = b.addModule("temporalz", .{
|
||||||
.root_source_file = b.path("src/root.zig"),
|
.root_source_file = b.path("src/root.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
mod.addImport("temporal_rs", temporal.module("temporal_rs"));
|
||||||
// Use the comprehensive mod from the package
|
|
||||||
mod.addImport("temporal_rs", libtemporal_src.module("temporal_rs"));
|
|
||||||
|
|
||||||
// --- Zig Executable: temporalz --- //
|
// --- Zig Executable: temporalz --- //
|
||||||
const exe_root = if (is_wasm_freestanding)
|
const exe_root = if (is_wasm_freestanding)
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
.fingerprint = 0xd8d79d59acc4faae,
|
.fingerprint = 0xd8d79d59acc4faae,
|
||||||
.minimum_zig_version = "0.16.0-dev.2860+9c5460316",
|
.minimum_zig_version = "0.16.0-dev.2860+9c5460316",
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
.libtemporal_src = .{
|
.temporal = .{
|
||||||
.path = "pkg/temporal-rs",
|
.path = "pkg/temporal",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
const app_zon = fs.readFileSync('build.zig.zon', 'utf8');
|
|
||||||
function extractDep(name) {
|
|
||||||
const regex = new RegExp(`\\.${name}\\s*=\\s*\\{([\\s\\S]*?)\\},`);
|
|
||||||
return app_zon.match(regex)[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
const p1 = extractDep('temporal_rs');
|
|
||||||
const p2 = extractDep('libtemporal_prebuilt');
|
|
||||||
|
|
||||||
const pkg_zon = fs.readFileSync('pkg/temporal-rs/build.zig.zon', 'utf8');
|
|
||||||
const new_pkg_zon = pkg_zon.replace(' .dependencies = .{', ` .dependencies = .{\n ${p1}\n ${p2}`);
|
|
||||||
|
|
||||||
fs.writeFileSync('pkg/temporal-rs/build.zig.zon', new_pkg_zon);
|
|
||||||
Loading…
Add table
Reference in a new issue