A robust Rust library providing persistent storage solutions with SQLite backend, compression, and unique identifier management for game development and data persistence needs.
- SQLite Storage Container: Full-featured SQLite database integration
- Storage Container Trait: Generic storage interface for different backends
- Unique ID Management: UUID-based unique identifier system
- Data Compression: Built-in compression support using miniz_oxide
- Binary Serialization: Efficient data serialization with bitcode
- Random Utilities Integration: Leverages hiivelabs_rand_utils_lib for enhanced functionality
hiivelabs_rand_utils_lib- Random utilities and helper functionsrusqlite- SQLite database interface (bundled SQLite included)bitcode- Binary serialization formatminiz_oxide- Pure Rust compression implementationuuid- UUID generation and managementsha2- SHA-2 cryptographic hashinghex- Hexadecimal encoding/decodingrand- Random number generationgetrandom- Cross-platform random generationlog- Logging frameworkenv_logger- Environment-based logging configuration
Add this to your Cargo.toml:
[dependencies]
hiivelabs_storage_lib = { version = "0.1.0", path = "path/to/hiivelabs_storage_lib" }use hiivelabs_storage_lib::prelude::*;
// Create a new SQLite storage container
let storage = SqliteStorageContainer::new("database.db").unwrap();
// Use the storage container to store and retrieve data
// (Implementation depends on your specific data structures)use hiivelabs_storage_lib::prelude::*;
// Implement the StorageContainer trait for custom storage backends
struct MyCustomStorage;
impl StorageContainer for MyCustomStorage {
// Implement required methods for your storage backend
}use hiivelabs_storage_lib::prelude::*;
// Generate unique identifiers for your data
struct MyData {
id: uuid::Uuid,
content: String,
}
impl UniqueId for MyData {
fn get_id(&self) -> &uuid::Uuid {
&self.id
}
}The library provides a flexible storage architecture with:
- Storage Container Interface: Abstract trait allowing multiple storage backends
- SQLite Implementation: Production-ready SQLite storage with bundled database
- Unique ID System: UUID-based identification for stored objects
- Compression Support: Automatic data compression for space efficiency
- Logging Integration: Comprehensive logging for debugging and monitoring
- SqliteStorageContainer: Main storage implementation using SQLite
- StorageContainer: Generic trait for implementing custom storage backends
- UniqueId: Trait for objects that can be uniquely identified
- Integrated Utilities: String manipulation functions from rand_utils_lib
- Bundled SQLite: No external SQLite installation required
- Thread-Safe: Designed for multi-threaded applications
- Compression: Built-in data compression to reduce storage footprint
- Cryptographic Security: SHA-2 hashing for data integrity verification
Current version: 0.1.0
MIT
This project is licensed under the MIT License - see the LICENSE file for details.
This project uses the Rust 2021 edition.