Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
50991d5
0.15.1
BTOdell Sep 27, 2025
7efc00f
fix delete hanging
BTOdell Sep 27, 2025
a065968
post policy 1
BTOdell Sep 27, 2025
13843a9
working
BTOdell Sep 28, 2025
89a1f83
cleanup
BTOdell Sep 28, 2025
97f7ac5
wtf
BTOdell Sep 28, 2025
bb08dab
bruh
BTOdell Sep 28, 2025
a061730
minor change
BTOdell Sep 28, 2025
577d3fb
memory
BTOdell Sep 28, 2025
718caf3
oops
BTOdell Sep 28, 2025
9879a6f
docs
BTOdell Sep 28, 2025
baee3b2
re-enabled unit tests
BTOdell Sep 29, 2025
8bb71b1
more changes
BTOdell Sep 29, 2025
7dcfaf9
almost there
BTOdell Sep 30, 2025
e8bc132
done
BTOdell Sep 30, 2025
c7c884e
just realized all these tests are AI generated.... great
BTOdell Sep 30, 2025
a5da8d7
remove object key from post_url
dwolrdcojp Oct 24, 2025
e0db71f
Safety check to guard reader.discardRemaining bug.
avahe-kellenberger Dec 11, 2025
5585ded
Merge pull request #1 from C4-Loop/fix/reader-bug
avahe-kellenberger Dec 13, 2025
9d705e4
wip
dwolrdcojp Feb 22, 2026
b0ce87d
tests pass
dwolrdcojp Feb 22, 2026
920bb55
refactor
dwolrdcojp Feb 23, 2026
5b12a35
move
dwolrdcojp Feb 24, 2026
b219a57
remove multiple arena allocations
dwolrdcojp Feb 24, 2026
15c636e
remove allocating in for loop
dwolrdcojp Feb 24, 2026
08c8252
cleanup
dwolrdcojp Feb 24, 2026
181b759
hello
dwolrdcojp Feb 26, 2026
076f34f
remove amz date wrapper functions
dwolrdcojp Feb 26, 2026
2c2515d
change headers to params
dwolrdcojp Feb 26, 2026
a6d887b
cleanup
dwolrdcojp Feb 26, 2026
9a0ca62
Merge pull request #2 from C4-Loop/presigned-get
dwolrdcojp Feb 26, 2026
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
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
MINIO_ACCESS_KEY=kJ1sAPIURDyj5HKjeoqq
MINIO_SECRET_KEY=8Sv8jYmW8uOeAwE4c6cimaRnZLcAsfjPI4qxjt9f
MINIO_PUBLIC_ENDPOINT="https://bucket-production-05b8.up.railway.app:443"
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
MINIO_PUBLIC_ENDPOINT="http://localhost:9000"
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ zig-out/
*.so
*.dylib
*.a
!archive/
!archive/**
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ pub fn main() !void {
var client = try s3.S3Client.init(allocator, .{
.access_key_id = "your-key",
.secret_access_key = "your-secret",
.region = "us-east-1",
// Optional: Use with MinIO or other S3-compatible services
// .endpoint = "http://localhost:9000",
});
Expand All @@ -114,7 +113,6 @@ The main client interface for S3 operations.
const client = try s3.S3Client.init(allocator, .{
.access_key_id = "your-key",
.secret_access_key = "your-secret",
.region = "us-east-1",
.endpoint = "http://localhost:9000", // Optional, for S3-compatible services
});
```
Expand Down
Binary file removed archive/v0.2.0.tar.gz
Binary file not shown.
35 changes: 22 additions & 13 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ pub fn build(b: *std.Build) void {
});

// Create the library that others can use as a dependency
const lib = b.addStaticLibrary(.{
const lib = b.addLibrary(.{
.name = "s3-client",
.root_source_file = b.path("src/s3/lib.zig"),
.target = target,
.optimize = optimize,
.linkage = .static,
.root_module = b.createModule(.{
.root_source_file = b.path("src/s3/lib.zig"),
.target = target,
.optimize = optimize,
}),
});
lib.root_module.addImport("s3", s3_module);
lib.root_module.addImport("dotenv", dotenv_dep.module("dotenv"));
Expand All @@ -29,9 +32,11 @@ pub fn build(b: *std.Build) void {
// Create the example executable
const exe = b.addExecutable(.{
.name = "s3-example",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
}),
});
exe.root_module.addImport("s3", s3_module);
exe.root_module.addImport("dotenv", dotenv_dep.module("dotenv"));
Expand All @@ -48,9 +53,11 @@ pub fn build(b: *std.Build) void {

// Unit tests
const unit_tests = b.addTest(.{
.root_source_file = b.path("src/s3/lib.zig"),
.target = target,
.optimize = optimize,
.root_module = b.createModule(.{
.root_source_file = b.path("src/s3/lib.zig"),
.target = target,
.optimize = optimize,
}),
});
unit_tests.root_module.addImport("dotenv", dotenv_dep.module("dotenv"));
const run_unit_tests = b.addRunArtifact(unit_tests);
Expand All @@ -59,9 +66,11 @@ pub fn build(b: *std.Build) void {

// Integration tests
const integration_tests = b.addTest(.{
.root_source_file = b.path("tests/integration/s3_client_test.zig"),
.target = target,
.optimize = optimize,
.root_module = b.createModule(.{
.root_source_file = b.path("tests/integration/s3_client_test.zig"),
.target = target,
.optimize = optimize,
}),
});
integration_tests.root_module.addImport("s3", s3_module);
integration_tests.root_module.addImport("dotenv", dotenv_dep.module("dotenv"));
Expand Down
6 changes: 3 additions & 3 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
.name = .zig_s3,
.version = "0.2.0",
.fingerprint = 0xf58a772c84221497,
.minimum_zig_version = "0.13.0",
.minimum_zig_version = "0.15.1",
.dependencies = .{
.dotenv = .{
.url = "https://github.com/dying-will-bullet/dotenv/archive/refs/tags/v0.2.0.tar.gz",
.hash = "12201347c20e8c4cb161f16bba30e51da17c32b89ef887b9b8932d6ed135ee5a6d01",
.url = "git+https://github.com/dying-will-bullet/dotenv?ref=master#82a53e32b25371ab255f150aee089e5f8ffba8c1",
.hash = "dotenv-0.2.2-ikMfwBB3AAC89NhL0EVbn6mRYA5z4fec8PcNKJ-P8m16",
},
},
.paths = .{
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
minio:
image: minio/minio
ports:
- 9000:9000
command: "server /data"
5 changes: 3 additions & 2 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ fn loadEnvVars() !s3.S3Config {
return s3.S3Config{
.access_key_id = access_key.?,
.secret_access_key = secret_key.?,
.region = "us-west-1",
.endpoint = endpoint.?,
};
}
Expand Down Expand Up @@ -88,7 +87,9 @@ pub fn main() !void {
}

// Print bucket information
const stdout = std.io.getStdOut().writer();
var stdout_buffer: [1024]u8 = undefined;
var stdout_writer = std.fs.File.stdout().writer(&stdout_buffer);
const stdout = &stdout_writer.interface;
try stdout.writeAll("\nAvailable buckets:\n");
for (buckets) |bucket| {
std.log.info("Bucket found: {s}", .{bucket.name});
Expand Down
11 changes: 0 additions & 11 deletions src/root.zig

This file was deleted.

Loading