mirror of
https://github.com/ziex-dev/ziex.git
synced 2026-07-20 02:29:36 -06:00
fix(cli): make exe run on the host even when custom args are passed
This commit is contained in:
parent
5d61315cb3
commit
7902e22263
@ -7,10 +7,16 @@ pub fn init(b: *std.Build, exe: *std.Build.Step.Compile, options: ZxInitOptions)
|
||||
const optimize = exe.root_module.optimize;
|
||||
const build_zig = @import("../../build.zig");
|
||||
const zx_dep = b.dependencyFromBuildZig(build_zig, .{ .target = target, .optimize = optimize });
|
||||
const zx_runner_dep = b.dependencyFromBuildZig(build_zig, .{
|
||||
.optimize = optimize,
|
||||
// Passing target here will cause it to compile for the target passed, but when the target is not the host machine we will try executing
|
||||
// zx transpile with the binary for the target machine which will fail.
|
||||
// .target = target,
|
||||
});
|
||||
|
||||
const zx_module = zx_dep.module("zx");
|
||||
const zx_wasm_module = zx_dep.module("zx_wasm");
|
||||
const zx_exe = zx_dep.artifact("zx");
|
||||
const zx_exe = zx_runner_dep.artifact("zx");
|
||||
|
||||
var opts: InitInnerOptions = .{
|
||||
.site_path = b.path("app"),
|
||||
|
||||
@ -989,7 +989,7 @@ pub fn Handler(comptime AppCtxType: type) type {
|
||||
_ = path_writer.write("/") catch break;
|
||||
}
|
||||
}
|
||||
const parent_path = path_buf[0 .. path_stream.getPos() catch break];
|
||||
const parent_path = path_buf[0..@intCast(path_stream.getPos() catch break)];
|
||||
|
||||
// Find route with matching path
|
||||
// Skip if this parent path matches the current route (avoid double application)
|
||||
|
||||
2
vendor/cachez/src/cache.zig
vendored
2
vendor/cachez/src/cache.zig
vendored
@ -100,7 +100,7 @@ pub fn Cache(comptime T: type) type {
|
||||
|
||||
fn getSegment(self: *const Self, key: []const u8) *Segment(T) {
|
||||
const hash_code = std.hash.Wyhash.hash(0, key);
|
||||
return &self.segments[hash_code & self.segment_mask];
|
||||
return &self.segments[@intCast(hash_code & self.segment_mask)];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user