R3 is an open-source, S3-compatible storage service written in Rust. Designed for robustness, performance, and scalability, R3 offers a reliable storage solution for various applications, providing seamless integration with existing S3 clients and tools.
- User registration and login
- Secure password storage
- Session management
- Create buckets
- Delete buckets
- Read bucket information
- Update bucket settings
- Bucket policies management
- Set bucket policies
- Get bucket policies
- Upload objects
- Download objects
- Delete objects
- Read object metadata
- Initiate multipart uploads
- Upload parts
- Complete multipart uploads
- Abort multipart uploads
- Part management with ETags
- Enable/disable bucket versioning
- List object versions
- Get specific object versions
- Delete object versions
- S3 Compatibility: Full support for the S3 API, enabling easy integration with existing S3 clients
- High Performance: Built with Rust for optimal performance and safety
- RESTful API: Clean and intuitive API design
- Error Handling: Comprehensive error handling and reporting
- Unit Tests: Extensive test coverage for all features
- Modular Design: Clean architecture with separate modules for different functionalities
-
Clone the repository:
git clone https://github.com/yourusername/r3.git cd r3
-
Build the project:
cargo build --release
-
Run the server:
cargo run --release
The server will start on http://localhost:8080
by default.
POST /register
Content-Type: application/json
{
"username": "your_username",
"password": "your_password"
}
POST /login
Content-Type: application/json
{
"username": "your_username",
"password": "your_password"
}
POST /{bucket} # Create bucket
DELETE /{bucket} # Delete bucket
GET /{bucket} # Get bucket info
PUT /{bucket} # Update bucket
PUT /{bucket}/{key} # Upload object
GET /{bucket}/{key} # Download object
DELETE /{bucket}/{key} # Delete object
POST /{bucket}/{key}?uploads # Initiate multipart upload
PUT /{bucket}/{key}?uploadId={uploadId}&partNumber={partNumber} # Upload part
POST /{bucket}/{key}?uploadId={uploadId} # Complete multipart upload
DELETE /{bucket}/{key}?uploadId={uploadId} # Abort multipart upload
PUT /{bucket}?versioning # Enable/disable versioning
GET /{bucket}?versions # List object versions
GET /{bucket}/{key}?versionId={versionId} # Get specific version
DELETE /{bucket}/{key}?versionId={versionId} # Delete specific version
cargo test
The project follows Rust's standard formatting guidelines. To format your code:
cargo fmt
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.