Compare commits
No commits in common. "0892914c5b4f796b59bd90f0179a65f4209c9054" and "4fa30a70cc615880adc54f1ce9c240ccd32dbe08" have entirely different histories.
0892914c5b
...
4fa30a70cc
|
@ -13,15 +13,11 @@ AWS SDK for Zig
|
||||||
|
|
||||||
[![Build Status: Zig Nightly](https://git.lerch.org/lobo/aws-sdk-for-zig/actions/workflows/zig-nightly.yaml/badge.svg)](https://git.lerch.org/lobo/aws-sdk-for-zig/actions?workflow=zig-nightly.yaml&state=closed)
|
[![Build Status: Zig Nightly](https://git.lerch.org/lobo/aws-sdk-for-zig/actions/workflows/zig-nightly.yaml/badge.svg)](https://git.lerch.org/lobo/aws-sdk-for-zig/actions?workflow=zig-nightly.yaml&state=closed)
|
||||||
|
|
||||||
**NOTE ON BUILD STATUS**: The nightly/mach nominated version of this currently
|
|
||||||
panics under CI, but I have not yet reproduced this panic. Running manually on
|
|
||||||
multiple machines appears to be working properly
|
|
||||||
|
|
||||||
Current executable size for the demo is 980k after compiling with -Doptimize=ReleaseSmall
|
Current executable size for the demo is 980k after compiling with -Doptimize=ReleaseSmall
|
||||||
in x86_linux, and will vary based on services used. Tested targets:
|
in x86_linux, and will vary based on services used. Tested targets:
|
||||||
|
|
||||||
* x86_64-linux
|
* x86_64-linux
|
||||||
* riscv64-linux
|
* riscv64-linux\*
|
||||||
* aarch64-linux
|
* aarch64-linux
|
||||||
* x86_64-windows
|
* x86_64-windows
|
||||||
* arm-linux
|
* arm-linux
|
||||||
|
@ -30,6 +26,9 @@ in x86_linux, and will vary based on services used. Tested targets:
|
||||||
|
|
||||||
Tested targets are built, but not continuously tested, by CI.
|
Tested targets are built, but not continuously tested, by CI.
|
||||||
|
|
||||||
|
\* On Zig 0.12/0.13, riscv64-linux disabled due to [LLLM's O(N^2) codegen](https://github.com/ziglang/zig/issues/18872)
|
||||||
|
|
||||||
|
|
||||||
Zig-Develop Branch
|
Zig-Develop Branch
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,11 @@ const test_targets = [_]std.Target.Query{
|
||||||
.{}, // native
|
.{}, // native
|
||||||
.{ .cpu_arch = .x86_64, .os_tag = .linux },
|
.{ .cpu_arch = .x86_64, .os_tag = .linux },
|
||||||
.{ .cpu_arch = .aarch64, .os_tag = .linux },
|
.{ .cpu_arch = .aarch64, .os_tag = .linux },
|
||||||
.{ .cpu_arch = .riscv64, .os_tag = .linux },
|
// The test executable linking process just spins forever in LLVM using nominated zig 0.13 May 2024
|
||||||
|
// This is likely a LLVM problem unlikely to be fixed in zig 0.13
|
||||||
|
// Potentially this issue: https://github.com/llvm/llvm-project/issues/81440
|
||||||
|
// Zig tracker: https://github.com/ziglang/zig/issues/18872
|
||||||
|
// .{ .cpu_arch = .riscv64, .os_tag = .linux },
|
||||||
.{ .cpu_arch = .arm, .os_tag = .linux },
|
.{ .cpu_arch = .arm, .os_tag = .linux },
|
||||||
.{ .cpu_arch = .x86_64, .os_tag = .windows },
|
.{ .cpu_arch = .x86_64, .os_tag = .windows },
|
||||||
.{ .cpu_arch = .aarch64, .os_tag = .macos },
|
.{ .cpu_arch = .aarch64, .os_tag = .macos },
|
||||||
|
|
10
src/main.zig
10
src/main.zig
|
@ -97,7 +97,7 @@ pub fn main() anyerror!void {
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
inline for (@typeInfo(Tests).@"enum".fields) |f| {
|
inline for (@typeInfo(Tests).Enum.fields) |f| {
|
||||||
if (std.mem.eql(u8, f.name, arg)) {
|
if (std.mem.eql(u8, f.name, arg)) {
|
||||||
try tests.append(@field(Tests, f.name));
|
try tests.append(@field(Tests, f.name));
|
||||||
break;
|
break;
|
||||||
|
@ -105,7 +105,7 @@ pub fn main() anyerror!void {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tests.items.len == 0) {
|
if (tests.items.len == 0) {
|
||||||
inline for (@typeInfo(Tests).@"enum".fields) |f|
|
inline for (@typeInfo(Tests).Enum.fields) |f|
|
||||||
try tests.append(@field(Tests, f.name));
|
try tests.append(@field(Tests, f.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ pub fn main() anyerror!void {
|
||||||
const func = fns[0];
|
const func = fns[0];
|
||||||
const arn = func.function_arn.?;
|
const arn = func.function_arn.?;
|
||||||
// This is a bit ugly. Maybe a helper function in the library would help?
|
// This is a bit ugly. Maybe a helper function in the library would help?
|
||||||
var tags = try std.ArrayList(@typeInfo(try typeForField(services.lambda.tag_resource.Request, "tags")).pointer.child).initCapacity(allocator, 1);
|
var tags = try std.ArrayList(@typeInfo(try typeForField(services.lambda.tag_resource.Request, "tags")).Pointer.child).initCapacity(allocator, 1);
|
||||||
defer tags.deinit();
|
defer tags.deinit();
|
||||||
tags.appendAssumeCapacity(.{ .key = "Foo", .value = "Bar" });
|
tags.appendAssumeCapacity(.{ .key = "Foo", .value = "Bar" });
|
||||||
const req = services.lambda.tag_resource.Request{ .resource = arn, .tags = tags.items };
|
const req = services.lambda.tag_resource.Request{ .resource = arn, .tags = tags.items };
|
||||||
|
@ -380,8 +380,8 @@ fn proxyFromString(string: []const u8) !std.http.Client.Proxy {
|
||||||
fn typeForField(comptime T: type, comptime field_name: []const u8) !type {
|
fn typeForField(comptime T: type, comptime field_name: []const u8) !type {
|
||||||
const ti = @typeInfo(T);
|
const ti = @typeInfo(T);
|
||||||
switch (ti) {
|
switch (ti) {
|
||||||
.@"struct" => {
|
.Struct => {
|
||||||
inline for (ti.@"struct".fields) |field| {
|
inline for (ti.Struct.fields) |field| {
|
||||||
if (std.mem.eql(u8, field.name, field_name))
|
if (std.mem.eql(u8, field.name, field_name))
|
||||||
return field.type;
|
return field.type;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user