fully working example
This commit is contained in:
parent
9865cb9e2e
commit
b1f2e3cd60
|
@ -1,5 +1,5 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const universal_lambda_build = @import("universal_lambda_build");
|
const configureUniversalLambdaBuild = @import("universal_lambda_build").configureBuild;
|
||||||
|
|
||||||
// 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,7 +25,8 @@ pub fn build(b: *std.Build) !void {
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
|
||||||
try universal_lambda_build.configureBuild(b, exe);
|
// All modules should be added before this is called
|
||||||
|
try configureUniversalLambdaBuild(b, exe);
|
||||||
|
|
||||||
// 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
|
||||||
|
|
|
@ -5,9 +5,9 @@ pub fn main() !void {
|
||||||
try universal_lambda.run(null, handler);
|
try universal_lambda.run(null, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handler(allocator: std.mem.Allocator, event_data: []const u8, context: universal_lambda.Context) ![]const u8 {
|
pub fn handler(allocator: std.mem.Allocator, event_data: []const u8, context: universal_lambda.Context) ![]const u8 {
|
||||||
_ = allocator;
|
|
||||||
_ = event_data;
|
_ = event_data;
|
||||||
|
_ = allocator;
|
||||||
_ = context;
|
_ = context;
|
||||||
return "hello world";
|
return "hello world";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user