Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

An AWS SDK for Zig, providing AWS service clients from [Smithy models](https://aws.amazon.com/blogs/aws/introducing-aws-api-models-and-publicly-available-resources-for-aws-api-definitions/), built using a Kotlin code generator.

Requires Zig 0.15.0 or later.
The latest changes require Zig 0.16.0 or later. The `zig-0.15` branch exists for Zig 0.15.x.

## Available Services

Expand Down Expand Up @@ -33,13 +33,11 @@ const std = @import("std");
const aws = @import("aws");
const s3 = @import("s3");

pub fn main() !void {
var gpa: std.heap.GeneralPurposeAllocator(.{}) = .init;
defer _ = gpa.deinit();
const allocator = gpa.allocator();
pub fn main(init: std.process.Init) !void {
const allocator = init.gpa;

// Load configuration from the environment and/or ~/.aws directory.
var config = try aws.Config.load(allocator, .{});
var config = try aws.Config.load(allocator, init.io, init.environ_map, .{});
defer config.deinit();

// Create the S3 client.
Expand Down
4 changes: 2 additions & 2 deletions examples/s3-list-buckets/build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
.minimum_zig_version = "0.15.2",
.dependencies = .{
.aws_sdk = .{
.url = "git+https://github.com/cloudboss/aws-sdk-zig.git#4be9ffd8e4e081f68504c31d0a8cb742c1b811a4",
.hash = "aws_sdk-0.0.1-ApQSL4OTMhDFbTJtcTNhB2oXNQ9J2ROPTvfV-Hvljt6x",
.url = "git+https://github.com/cloudboss/aws-sdk-zig.git#4b8e0646cbe1622f8fd07daf7e22df3bfee7c1e0",
.hash = "aws_sdk-0.0.1-ApQSL-HdixBVxS0U-xc2jrtlR4oL90TbPgVBl9BoLpJi",
},
},
.paths = .{
Expand Down
8 changes: 3 additions & 5 deletions examples/s3-list-buckets/src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ const std = @import("std");
const aws = @import("aws");
const s3 = @import("s3");

pub fn main() !void {
var gpa: std.heap.DebugAllocator(.{}) = .init;
defer _ = gpa.deinit();
const allocator = gpa.allocator();
pub fn main(init: std.process.Init) !void {
const allocator = init.gpa;

// Load configuration from the environment and/or ~/.aws directory.
var config = try aws.Config.load(allocator, .{});
var config = try aws.Config.load(allocator, init.io, init.environ_map, .{});
defer config.deinit();

// Create an S3 client.
Expand Down
Loading