Compare commits

..

2 Commits

Author SHA1 Message Date
62973bf4bf
update example
Some checks failed
aws-zig mach nominated build / build-zig-nominated-mach-latest (push) Successful in 3m46s
aws-zig nightly build / build-zig-nightly (push) Failing after 1m11s
2024-04-02 18:30:27 -07:00
2f5f9edb36
markdown adjustment on README 2024-04-02 18:20:37 -07:00
4 changed files with 15 additions and 12 deletions

View File

@ -27,6 +27,7 @@ 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, riscv64-linux tests get stuck forever in "LLVM Emit object" \* On Zig 0.12, riscv64-linux tests get stuck forever in "LLVM Emit object"
\*\* On Zig 0.12, x86_64-windows tests have one test skipped as LLVM consumes all available RAM on the system \*\* On Zig 0.12, x86_64-windows tests have one test skipped as LLVM consumes all available RAM on the system

View File

@ -30,12 +30,13 @@ pub fn build(b: *std.Build) void {
// .optimize = optimize, // .optimize = optimize,
// }); // });
// exe.addModule("smithy", smithy_dep.module("smithy")); // exe.addModule("smithy", smithy_dep.module("smithy"));
const aws_dep = b.dependency("aws", .{ const aws_dep = b.dependency("aws-zig", .{
// These are the two arguments to the dependency. It expects a target and optimization level. // These are the two arguments to the dependency. It expects a target and optimization level.
.target = target, .target = target,
.optimize = optimize, .optimize = optimize,
}); });
exe.addModule("aws", aws_dep.module("aws")); const aws_module = aws_dep.module("aws");
exe.root_module.addImport("aws", aws_module);
// 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
// step when running `zig build`). // step when running `zig build`).

View File

@ -1,15 +1,16 @@
.{ .{
.name = "myapp", .name = "myapp",
.version = "0.0.1", .version = "0.0.1",
.paths = .{""},
.dependencies = .{ .dependencies = .{
.aws = .{
.url = "https://git.lerch.org/api/packages/lobo/generic/aws-sdk-with-models/d08d0f338fb86f7d679a998ff4f65f4e2d0db595/d08d0f338fb86f7d679a998ff4f65f4e2d0db595-with-models.tar.gz",
.hash = "1220c8871d93592680ea2dcc88cc52fb4f0effabeed0584d2a5c54f93825741b7c66",
},
.smithy = .{ .smithy = .{
.url = "https://git.lerch.org/lobo/smithy/archive/41b61745d25a65817209dd5dddbb5f9b66896a99.tar.gz", .url = "https://git.lerch.org/lobo/smithy/archive/1e534201c4df5ea4f615faeedc69d414adbec0b1.tar.gz",
.hash = "122087deb0ae309b2258d59b40d82fe5921fdfc35b420bb59033244851f7f276fa34", .hash = "1220af63ae0498010004af79936cedf3fe6702f516daab77ebbd97a274eba1b42aad",
},
.@"aws-zig" = .{
.url = "https://git.lerch.org/api/packages/lobo/generic/aws-sdk-with-models/b1b2a6cc7a6104f5e1f6ee4cae33e6ef3ed2ec1c/b1b2a6cc7a6104f5e1f6ee4cae33e6ef3ed2ec1c-with-models.tar.gz",
.hash = "12203d7c7aea80fd5e1f892b4928b89b2c70d5688cf1843e0d03e5af79632c5a9146",
}, },
}, },
} }

View File

@ -1,14 +1,14 @@
const std = @import("std"); const std = @import("std");
const aws = @import("aws"); const aws = @import("aws");
pub const std_options = struct { pub const std_options: std.Options = .{
pub const log_level: std.log.Level = .info; .log_level = .info,
// usually log_level is enough, but log_scope_levels can be used // usually log_level is enough, but log_scope_levels can be used
// for finer grained control // for finer grained control
pub const log_scope_levels = &[_]std.log.ScopeLevel{ .log_scope_levels = &[_]std.log.ScopeLevel{
.{ .scope = .awshttp, .level = .warn }, .{ .scope = .awshttp, .level = .warn },
}; },
}; };
pub fn main() anyerror!void { pub fn main() anyerror!void {