Compare commits

..

2 Commits

Author SHA1 Message Date
0892914c5b
add build status note to readme
Some checks failed
aws-zig mach nominated build / build-zig-nominated-mach-latest (push) Failing after 23s
aws-zig nightly build / build-zig-nightly (push) Failing after 28s
2024-10-17 12:00:42 -07:00
97b784f8e3
cleanup main, re-enable riscv64-linux 2024-10-17 12:00:20 -07:00
3 changed files with 11 additions and 14 deletions

View File

@ -13,11 +13,15 @@ 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)
**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
in x86_linux, and will vary based on services used. Tested targets:
* x86_64-linux
* riscv64-linux\*
* riscv64-linux
* aarch64-linux
* x86_64-windows
* arm-linux
@ -26,9 +30,6 @@ in x86_linux, and will vary based on services used. Tested targets:
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
------------------

View File

@ -10,11 +10,7 @@ const test_targets = [_]std.Target.Query{
.{}, // native
.{ .cpu_arch = .x86_64, .os_tag = .linux },
.{ .cpu_arch = .aarch64, .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 = .riscv64, .os_tag = .linux },
.{ .cpu_arch = .arm, .os_tag = .linux },
.{ .cpu_arch = .x86_64, .os_tag = .windows },
.{ .cpu_arch = .aarch64, .os_tag = .macos },

View File

@ -97,7 +97,7 @@ pub fn main() anyerror!void {
}
continue;
}
inline for (@typeInfo(Tests).Enum.fields) |f| {
inline for (@typeInfo(Tests).@"enum".fields) |f| {
if (std.mem.eql(u8, f.name, arg)) {
try tests.append(@field(Tests, f.name));
break;
@ -105,7 +105,7 @@ pub fn main() anyerror!void {
}
}
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));
}
@ -192,7 +192,7 @@ pub fn main() anyerror!void {
const func = fns[0];
const arn = func.function_arn.?;
// 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();
tags.appendAssumeCapacity(.{ .key = "Foo", .value = "Bar" });
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 {
const ti = @typeInfo(T);
switch (ti) {
.Struct => {
inline for (ti.Struct.fields) |field| {
.@"struct" => {
inline for (ti.@"struct".fields) |field| {
if (std.mem.eql(u8, field.name, field_name))
return field.type;
}