update to zig 0.12.0
Some checks failed
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Failing after 40s
Some checks failed
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Failing after 40s
This commit is contained in:
parent
b84561149c
commit
4d56fe0281
12
build.zig
12
build.zig
|
@ -1,5 +1,5 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const universal_lambda_build = @import("universal_lambda_build");
|
const universal_lambda_build = @import("universal-lambda-zig");
|
||||||
|
|
||||||
// Although this function looks imperative, note that its job is to
|
// Although this function looks imperative, note that its job is to
|
||||||
// declaratively construct a build graph that will be executed by an external
|
// declaratively construct a build graph that will be executed by an external
|
||||||
|
@ -25,8 +25,13 @@ pub fn build(b: *std.Build) !void {
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const universal_lambda_zig_dep = b.dependency("universal-lambda-zig", .{
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
});
|
||||||
// All modules should be added before this is called
|
// All modules should be added before this is called
|
||||||
try universal_lambda_build.configureBuild(b, exe);
|
try universal_lambda_build.configureBuild(b, exe, universal_lambda_zig_dep);
|
||||||
|
_ = universal_lambda_build.addImports(b, exe, universal_lambda_zig_dep);
|
||||||
|
|
||||||
// This declares intent for the executable to be installed into the
|
// This declares intent for the executable to be installed into the
|
||||||
// standard location when the user invokes the "install" step (the default
|
// standard location when the user invokes the "install" step (the default
|
||||||
|
@ -63,7 +68,8 @@ pub fn build(b: *std.Build) !void {
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
_ = try universal_lambda_build.addModules(b, unit_tests);
|
|
||||||
|
_ = universal_lambda_build.addImports(b, unit_tests, universal_lambda_zig_dep);
|
||||||
|
|
||||||
const run_unit_tests = b.addRunArtifact(unit_tests);
|
const run_unit_tests = b.addRunArtifact(unit_tests);
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,15 @@
|
||||||
.version = "0.0.1",
|
.version = "0.0.1",
|
||||||
|
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
.universal_lambda_build = .{
|
.@"universal-lambda-zig" = .{
|
||||||
.url = "https://git.lerch.org/lobo/universal-lambda-zig/archive/4c987d0959f120acccf18cce342b692231282133.tar.gz",
|
.path = "../universal-lambda-zig/",
|
||||||
.hash = "122013ce61767eaf4a099c682172e20a3912245153dc357589d9a62e67feefe9bfc7",
|
|
||||||
},
|
},
|
||||||
.flexilib = .{
|
.@"univeral-lambda-zig" = .{
|
||||||
.url = "https://git.lerch.org/lobo/flexilib/archive/3d3dab9c792651477932e2b61c9f4794ac694dcb.tar.gz",
|
.url = "https://git.lerch.org/lobo/universal-lambda-zig/archive/cf8590e3ee658779fc88465e765a1e17e3a225fa.tar.gz",
|
||||||
.hash = "1220fd7a614fe3c9f6006b630bba528e2ec9dca9c66f5ff10f7e471ad2bdd41b6c89",
|
.hash = "1220ab108c9252c7101e7bd638b5bf8762b9cf5418f48aca73adcadc223d315f1c5c",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
.paths = .{
|
||||||
|
"",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ fn handler(allocator: std.mem.Allocator, event_data: []const u8, context: interf
|
||||||
var al = std.ArrayList(u8).init(allocator);
|
var al = std.ArrayList(u8).init(allocator);
|
||||||
var writer = al.writer();
|
var writer = al.writer();
|
||||||
try writer.print("Header data passed to handler (if console, this is args+env vars)\n", .{});
|
try writer.print("Header data passed to handler (if console, this is args+env vars)\n", .{});
|
||||||
for (context.request.headers.list.items) |f| {
|
for (context.request.headers) |f| {
|
||||||
try writer.print("\t{s}: {s}\n", .{ f.name, f.value });
|
try writer.print("\t{s}: {s}\n", .{ f.name, f.value });
|
||||||
}
|
}
|
||||||
try writer.print("======================================================================\n", .{});
|
try writer.print("======================================================================\n", .{});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user