128 Commits

Author SHA1 Message Date
Henk-Jan Lebbink
2daacc0fcf
Fix incorrect part size in multipart copy; added missing response properties (#196)
The bug was using size (remaining bytes) instead of length (actual part size) when constructing PartInfo in the
  multipart copy loop. This would record wrong sizes for each part - especially problematic for the last part.
2025-12-01 10:11:38 +01:00
Henk-Jan Lebbink
2e94a0ee9e
Removed unnecessary intermediate Vec<Bytes> allocation in HTTP request body preparation (#192)
- Removed unnecessary intermediate `Vec<Bytes>` allocation in HTTP request body preparation
  - Directly consume `SegmentedBytes` iterator into stream using `Arc::unwrap_or_clone()`
  - Implemented zero-cost `BodyIterator` enum to avoid heap allocation and dynamic dispatch
  - Reduces memory overhead and eliminates Vec growth reallocations during request preparation
2025-11-20 15:26:27 +01:00
Henk-Jan Lebbink
ec0e79214f
refactor: consolidate codebase structure and add testing infrastructure (#194)
Reorganize project structure to improve maintainability and add comprehensive
  testing documentation and tooling support.
2025-11-19 11:09:22 -08:00
Henk-Jan Lebbink
f4b4c9086d
feat: add request hooks infrastructure (#188)
Adds RequestHooks trait to enable intercepting and modifying S3 API
  requests at key points in the request lifecycle. This enables implementing
  cross-cutting concerns like load balancing, telemetry, and debug logging
  without modifying the core request handling logic.

---------

Co-authored-by: Tobias Pütz <tobias@minio.io>
2025-11-10 14:39:12 +01:00
Copilot
1ee21b7591
Add .github/copilot-instructions.md for repository onboarding (#191)
* Initial plan

* Add comprehensive copilot-instructions.md file

Co-authored-by: HJLebbink <1561352+HJLebbink@users.noreply.github.com>

* Add PR label requirement to copilot instructions

Co-authored-by: HJLebbink <1561352+HJLebbink@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: HJLebbink <1561352+HJLebbink@users.noreply.github.com>
2025-10-30 13:42:03 +01:00
Henk-Jan Lebbink
e16d6d40cf
Use TypedBuilder derive macro for S3 API request builders (#184)
Adopt the typed-builder crate throughout the S3 API to provide compile-time
validation of builder patterns. This change improves type safety and developer
experience when constructing S3 API requests.
2025-10-16 23:06:45 +02:00
Henk-Jan Lebbink
5a90956db8
fix: update HTTP header constants to use proper capitalization (#186)
- Update all X-Amz-* headers to use capital letters after hyphens (e.g., X-Amz-Date)
  - Update standard HTTP headers to use proper case (e.g., If-Modified-Since)
  - Update X-Minio headers to follow same capitalization pattern
  - Aligns with AWS S3 API specification and HTTP standards
2025-09-29 14:40:00 +02:00
Henk-Jan Lebbink
25d424b97f
Fixed clippy issues and cleanup of unnecessary imports (#182) 2025-08-26 11:04:51 +02:00
Henk-Jan Lebbink
5080bf9b85
Refactor/cleanup errors (#179)
* error refactored: moved to thiserror
* Result type alias for better ergonomics:
* removed field from MinioErrorCode::BucketNotEmpty enum
* made field private of MinioErrorResponse
* updated XmlError
* simplified calling errors
* bumped toolchain channel form 1.86.0 to 1.87.0
* bumped toolchain channel form 1.87.0 to 1.88.0 due to clippy fixes that are not compatible with 1.87.0
2025-08-14 21:31:45 -07:00
iTrooz
e73fa1019c
fix: allow to use rustls while also using sha2 and hmac (#175) 2025-08-12 19:55:41 +02:00
Henk-Jan Lebbink
34b3e17c57
bugfix: proper handing of whitespace char in url with Form-decoding instead of Percent-decoding (#178) 2025-08-11 09:32:28 -07:00
Henk-Jan Lebbink
e244229490
tests cleanup; cargo clippy fixes, minor doc updates (#177)
* Tests cleanup; cargo clippy fixes, minor doc updates
* updated label checker workflow
2025-07-11 11:08:22 +02:00
iTrooz
e0a77fcb1a
Add documentation for copy_object (#172)
* Add documentation about source/destination of copy_object
* update copy object documentation

---------

Co-authored-by: Henk-Jan Lebbink <henkjan.lebbink@gmail.com>
2025-06-28 18:16:42 +02:00
Tobias Pütz
8497fdb4ba
feat: add a test macro (#170) 2025-06-23 13:38:40 +02:00
Henk-Jan Lebbink
720943b4bb
Duplicated code removed, and lazy response evaluation (#162)
* Duplicated code removed, and lazy response evaluation

* moved Tokio runtime from general dependency to dev dependency
2025-06-18 09:55:53 -07:00
Henk-Jan Lebbink
6f904b452a
moved Tokio runtime from general dependency to dev dependency (#167)
* moved Tokio runtime from general dependency to dev dependency
* reduced number of worker threads in tests
2025-06-18 11:26:29 +02:00
Henk-Jan Lebbink
1af3f72c12
bugfix (#166) delete_and_purge_bucket add recursive delete
This PR enhances the delete_and_purge_bucket method by enabling recursive traversal when listing objects, ensuring nested items and versions are deleted.
2025-06-17 14:14:17 +02:00
Tobias Pütz
e53e151e3e
fix: replace Arc<Box<...>> credential-provider with Arc<...> (#164)
* replace Arc<Box<...>> provider with Arc<...>
* remove need for caller to Box provider
2025-06-16 14:48:16 +02:00
Andrea Longo
7d0fcaa5a4
Typo fix in README.md (#161) v0.3.0 2025-05-30 13:12:50 -06:00
Henk-Jan Lebbink
9cbb95747f
Fixed doc warnings; fixed minor issue with trait separation in append_object (#160)
* minor issues fixed: bucket and object impl trait separated

* fixed doc warnings

* added CI, docs build and docs site to the initial icons

* inline doc updated

* more doc update

* bumped versions
2025-05-28 11:43:08 -07:00
Henk-Jan Lebbink
75602b2673
Added several tests to test_append_object (#158)
* Added several tests to test_append_object
* moved file creation to create_object_helper
2025-05-26 11:31:21 +02:00
Andrea Longo
24a1321673
Update the README with additional information (#159)
Clarify and add additional information about the Rust SDK, in preparation for automated inclusion in the public documentation.

- Minor rework of existing text
- Incorporate documentation from src/lib.rs in the readme

---------

Co-authored-by: Andrea Longo <95028+feorlen@users.noreply.github.com>
2025-05-23 10:17:32 -06:00
Aditya Manthramurthy
621669cd7d
Release v0.2.0 (#156) v0.2.0 2025-05-21 16:01:36 -07:00
Henk-Jan Lebbink
f234129163
Create rust-clippy.yml (#155)
* Create rust-clippy.yml

* Update .github/workflows/rust-clippy.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/rust-clippy.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
v0.2.0-alpha
2025-05-21 14:31:06 -07:00
Henk-Jan Lebbink
f6ca7dba03
Fixed xml parsing of bucket_lifecycle, added support for with_updated_at (#153) 2025-05-15 10:14:40 -07:00
Henk-Jan Lebbink
9495c5dcce
fixed incorrect renaming of listen_bucket_notification (#152) 2025-05-11 11:21:49 -07:00
Henk-Jan Lebbink
20d8654e34
Function names updated to reflect AWS names. Updated docs (#150)
* updated inline doc

* updated inline doc

* API naming conform AWS

* fixed clippy issues

* fixed minor API naming issues
2025-05-09 15:53:44 -07:00
Henk-Jan Lebbink
1869cfeba7
minor issues (#149) 2025-04-26 11:55:48 -07:00
Henk-Jan Lebbink
58d9203153
refactored all functions (#145)
* refactored stat_object

refactored select_object_content

refactor get_presigned_object_url

refactor get_presigned_policy_form_data

refactored upload-part-copy

* fixed object.unwrap

* update region

* made client Arc

* made client Arc

* update client

* update tests

* update segmented_bytes

* bench updated

* cleanup version handling

* cleanup of headers: multimap

* added inner in Client

* updated clients: added Into<String>in API

* Separated http_client and shared client items in Client
2025-04-23 10:18:18 -07:00
Henk-Jan Lebbink
f23572dce8
added benchmarks (#142) 2025-03-29 15:26:11 -07:00
mishi321
0cccaf1663
fix: remove copy_object !Send (#103) 2025-03-22 17:31:51 +01:00
Alfred Mathew
b26ed09e42
optimize: use ring hash and hmac implementations as an opt-in feature (#141)
Defaults to sha2 and hmac.
2025-03-22 11:30:37 +01:00
Henk-Jan Lebbink
ddec540b22
Refactor object lock config, retention, tags (#140)
* refactor make-bucket, bucket_exists, remove_bucket

* refactor disable-object-legal-hold, enable-object-legal-hold, is-object-legal-hold-enabled
2025-03-21 09:25:06 -07:00
Alfred Mathew
d2afb4d3f6
wrap region map in Arc (#136) 2025-03-16 11:21:59 +01:00
Aditya Manthramurthy
c9172cf189
Remove deprecated downloads, uploads, and multipart API (#137)
Add From<&'static str> for ObjectContent and remove deprecated API
2025-03-14 21:39:24 +01:00
Aditya Manthramurthy
46bda8f960
Remove os_info dep (#133)
os_info is too heavy, for the purposes of this library using the consts
in std::env are enough

Fixes #107
2025-03-13 08:09:31 +01:00
Henk-Jan Lebbink
8ea83b45ae
Refactor bucket tags, bucket notification, and bucket replication (#132)
* refactor get-set-delete bucket notification

* refactor get-set-delete bucket notification

* refactor get-set-delete bucket notification
2025-03-12 12:44:45 -07:00
Henk-Jan Lebbink
8134acdd09
Bumped rust edition from 2021 to 2024. Only change is some include sorting (#128) 2025-03-11 12:09:43 -07:00
Henk-Jan Lebbink
48da7630a9
refactor: split tests into separate files (#127) 2025-03-10 10:46:12 -07:00
Henk-Jan Lebbink
112c0aed1a
Refactor bucket-lifecycle, bucket-policy, bucket-encryption (#124)
* refactored from_s3response trait, and refactored get/set/delete policy

* * refactor set/get/delete bucket lifecycle

* refactored from_s3response trait,
* refactored get/set/delete bucket policy
* delete-bucket-encryption
2025-03-07 16:33:41 -08:00
Henk-Jan Lebbink
b2a6cb2655
Refactor bucket lifecycle (#121)
* bugfix & added example

* refactor set_bucket_lifecycle amd get_bucket_lifecycle
2025-03-03 17:41:04 -08:00
Henk-Jan Lebbink
c4e302dda7
refactored tests into 24 separate tests (#118)
* cleanup remove_bucket_helper

* update TextContext creation

* update tests
2025-02-28 12:42:14 -08:00
Henk-Jan Lebbink
cba673a379
Refactor set_bucket_versioning (#114) 2025-02-20 17:52:07 -08:00
Henk-Jan Lebbink
1a77ca826d
refactored set_bucket_encrypion (#116) 2025-02-04 11:59:49 -08:00
Andre Natal
7ce9ad3594
Update README.md - dead links (#112) 2025-01-31 16:41:47 -08:00
Henk-Jan Lebbink
72401be3fb
added release notes automation (#111) 2025-01-31 16:41:36 -08:00
Henk-Jan Lebbink
e98264fa3d
Refactor get bucket encryption (#110) 2025-01-31 16:38:50 -08:00
jeasai
26d67b80df
Fix object download to file (#105)
The ObjectContent::to_file() function was not working properly,
as it could not write in a temporary file (created with tokio::fs::File::open(),
which opens a file in read-only mode).

To solve this issue, modified the way temporary files are opened to be
able to write inside of it.

* Add an example to download a file

This new example demonstrates how to download an object and store its
content into a file.

---------

Co-authored-by: Henk-Jan Lebbink <henkjan.lebbink@gmail.com>
Co-authored-by: Jean Sainctavit <jean.sainctavit@qarnot-computing.com>
2025-01-23 23:42:40 +01:00
Henk-Jan Lebbink
0438f044ff
Added object_prompt support (#109) 2025-01-23 09:56:29 -08:00
Henk-Jan Lebbink
8facff7bad
fixed clippy issues (#106) 2024-12-14 19:31:51 -08:00