From 62973bf4bffb097b5c0f99fa1b98621001fa3e73 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Tue, 2 Apr 2024 18:30:27 -0700 Subject: [PATCH] update example --- example/build.zig | 5 +++-- example/build.zig.zon | 13 +++++++------ example/src/main.zig | 8 ++++---- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/example/build.zig b/example/build.zig index d2ff66c..08ae963 100644 --- a/example/build.zig +++ b/example/build.zig @@ -30,12 +30,13 @@ pub fn build(b: *std.Build) void { // .optimize = optimize, // }); // 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. .target = target, .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 // standard location when the user invokes the "install" step (the default // step when running `zig build`). diff --git a/example/build.zig.zon b/example/build.zig.zon index 61b7bdd..67a673d 100644 --- a/example/build.zig.zon +++ b/example/build.zig.zon @@ -1,15 +1,16 @@ .{ .name = "myapp", .version = "0.0.1", + .paths = .{""}, .dependencies = .{ - .aws = .{ - .url = "https://git.lerch.org/api/packages/lobo/generic/aws-sdk-with-models/d08d0f338fb86f7d679a998ff4f65f4e2d0db595/d08d0f338fb86f7d679a998ff4f65f4e2d0db595-with-models.tar.gz", - .hash = "1220c8871d93592680ea2dcc88cc52fb4f0effabeed0584d2a5c54f93825741b7c66", - }, .smithy = .{ - .url = "https://git.lerch.org/lobo/smithy/archive/41b61745d25a65817209dd5dddbb5f9b66896a99.tar.gz", - .hash = "122087deb0ae309b2258d59b40d82fe5921fdfc35b420bb59033244851f7f276fa34", + .url = "https://git.lerch.org/lobo/smithy/archive/1e534201c4df5ea4f615faeedc69d414adbec0b1.tar.gz", + .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", }, }, } diff --git a/example/src/main.zig b/example/src/main.zig index 20fb68c..91c4db7 100644 --- a/example/src/main.zig +++ b/example/src/main.zig @@ -1,14 +1,14 @@ const std = @import("std"); const aws = @import("aws"); -pub const std_options = struct { - pub const log_level: std.log.Level = .info; +pub const std_options: std.Options = .{ + .log_level = .info, // usually log_level is enough, but log_scope_levels can be used // for finer grained control - pub const log_scope_levels = &[_]std.log.ScopeLevel{ + .log_scope_levels = &[_]std.log.ScopeLevel{ .{ .scope = .awshttp, .level = .warn }, - }; + }, }; pub fn main() anyerror!void {