Releases: softprops/zig-lambda-runtime
Releases · softprops/zig-lambda-runtime
v0.2.0
v0.1.0
we have lift off
This initial release includes basic "it works" functionality for hosting zig based aws lambdas. See readme for more information
📼 installing
Add the following to your build.zig.zon file to declare a dependency
.{
.name = "my-first-zig-lambda",
.version = "0.1.0",
.dependencies = .{
// 👇 declare dep properties
.lambda = .{
// 👇 uri to download
.url = "https://github.com/softprops/zig-lambda-runtime/archive/refs/tags/v0.1.0.tar.gz",
// 👇 hash verification
.hash = "122084e15b7b04f9023ac9dac6f0a1f341dbf8282aa14f51ff553881be73b624361b",
}
}
}🔧 building
Add the following in your build.zig file
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
// 👇 de-reference lambda dep from build.zig.zon
const lambda = b.dependency("lambda", .{
.target = target,
.optimize = optimize,
});
// 👇 create an execuable named `bootstrap`. the name `bootstrap` is important
var exe = b.addExecutable(.{
.name = "bootstrap",
.root_source_file = .{ .path = "src/main.zig" },
.target = target,
.optimize = optimize,
});
// 👇 add the lambda module to executable
exe.addModule("lambda", lambda.module("lambda"));
b.installArtifact(exe);
}