append ".wasm" to the compile exe name for Cloudflare
All checks were successful
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 1m23s
All checks were successful
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 1m23s
This commit is contained in:
parent
e7a6aa5f04
commit
70b0fda03b
|
@ -5,6 +5,7 @@ const CloudflareDeployStep = @import("CloudflareDeployStep.zig");
|
||||||
const script = @embedFile("index.js");
|
const script = @embedFile("index.js");
|
||||||
|
|
||||||
pub fn configureBuild(b: *std.build.Builder, cs: *std.Build.Step.Compile, function_name: []const u8) !void {
|
pub fn configureBuild(b: *std.build.Builder, cs: *std.Build.Step.Compile, function_name: []const u8) !void {
|
||||||
|
const wasm_name = try std.fmt.allocPrint(b.allocator, "{s}.wasm", .{cs.name});
|
||||||
const deploy_cmd = CloudflareDeployStep.create(
|
const deploy_cmd = CloudflareDeployStep.create(
|
||||||
b,
|
b,
|
||||||
function_name,
|
function_name,
|
||||||
|
@ -13,7 +14,7 @@ pub fn configureBuild(b: *std.build.Builder, cs: *std.Build.Step.Compile, functi
|
||||||
.primary_file_data = script,
|
.primary_file_data = script,
|
||||||
.wasm_name = .{
|
.wasm_name = .{
|
||||||
.search = "custom.wasm",
|
.search = "custom.wasm",
|
||||||
.replace = cs.name,
|
.replace = wasm_name,
|
||||||
},
|
},
|
||||||
.wasm_dir = b.getInstallPath(.bin, "."),
|
.wasm_dir = b.getInstallPath(.bin, "."),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user