get more heavy-handed with compilation requirements
This commit is contained in:
parent
e1761cc95e
commit
0c4d5808b8
|
@ -78,6 +78,10 @@ pub fn build(b: *std.Build) void {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn configureBuild(b: *std.Build, cs: *std.Build.Step.Compile, function_name: []const u8) !void {
|
pub fn configureBuild(b: *std.Build, cs: *std.Build.Step.Compile, function_name: []const u8) !void {
|
||||||
|
if (cs.rootModuleTarget().os.tag != .wasi) {
|
||||||
|
std.log.err("Error: Cloudflare builds require compilation with -Dtarget=wasm32-wasi", .{});
|
||||||
|
return error.WasiCompilationRequired;
|
||||||
|
}
|
||||||
const script = @embedFile("index.js");
|
const script = @embedFile("index.js");
|
||||||
const wasm_name = try std.fmt.allocPrint(b.allocator, "{s}.wasm", .{cs.name});
|
const wasm_name = try std.fmt.allocPrint(b.allocator, "{s}.wasm", .{cs.name});
|
||||||
const deploy_cmd = CloudflareDeployStep.create(
|
const deploy_cmd = CloudflareDeployStep.create(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user