leptos-query-rs 0.5.1

A powerful, type-safe data fetching and caching library for Leptos 0.8 applications
Documentation
# Release Notes

## v0.5.0 - "The Testing Release" ๐Ÿงช

**Release Date:** September 6, 2025  
**Version:** 0.5.0  
**Codename:** "The Testing Release"

---

## ๐ŸŽฏ What's New

### Comprehensive Test Suite
- **111+ Tests** covering all functionality
- **Unit Tests**: Core functionality testing
- **Integration Tests**: End-to-end workflow testing
- **Property Tests**: Invariant and edge case testing
- **API Stability Tests**: Public API contract validation
- **Compatibility Tests**: Leptos 0.8 compatibility validation

### Real-World Examples
- **Todo App**: Complete CRUD operations with caching
- **Blog App**: Post management with real-time updates
- **Weather App**: Data fetching with forecast display
- **Static Demos**: Working examples without complex dependencies

### Performance Benchmarks
- **Sub-microsecond Performance**: Most operations complete in nanoseconds
- **Memory Efficient**: Optimized memory usage patterns
- **Concurrent Safe**: Thread-safe operations with minimal overhead
- **Scalable**: Performance scales well with cache size

### Cross-Browser Compatibility
- **Chrome**: Full support with all features
- **Firefox**: Full support with all features
- **Safari**: Full support with all features
- **Mobile Browsers**: Optimized for mobile devices

---

## ๐Ÿš€ Key Features

### Core Functionality
- โœ… **Query Management**: Automatic caching and background updates
- โœ… **Error Handling**: Comprehensive error handling with retry logic
- โœ… **Loading States**: Built-in loading and stale state management
- โœ… **Cache Invalidation**: Smart cache invalidation strategies
- โœ… **Type Safety**: Full TypeScript-like type safety in Rust

### Advanced Features
- โœ… **WASM Support**: Full WebAssembly compatibility
- โœ… **Feature Flags**: Flexible feature configuration
- โœ… **Performance Monitoring**: Built-in performance metrics
- โœ… **Memory Management**: Automatic memory cleanup
- โœ… **Concurrent Access**: Thread-safe concurrent operations

---

## ๐Ÿ“Š Performance Metrics

### Query Operations
- **Query Keys**: 119-257 ns
- **Query Client**: 21-915 ns
- **Retry Logic**: 1-2 ns
- **Serialization**: 82-140 ns

### Cache Operations
- **Small Cache (10 items)**: 46 ns
- **Medium Cache (100 items)**: 1.2 ยตs
- **Large Cache (1000 items)**: 4.6 ยตs
- **Cache Invalidation**: 93 ns to 4.2 ยตs

### Memory Usage
- **Cache Growth**: 546 ยตs
- **Memory Cleanup**: 7-17 ns
- **Memory Efficiency**: < 1KB per cached item

---

## ๐Ÿ”ง Technical Improvements

### API Stability
- **Public API**: Stable and well-documented
- **Backward Compatibility**: Full compatibility with v0.4.x
- **Type Safety**: Enhanced type inference and safety
- **Error Handling**: Improved error messages and handling

### WASM Compatibility
- **Feature Flags**: `native` and `wasm` feature flags
- **Dependency Management**: Optional dependencies for WASM
- **Build Optimization**: Optimized for WebAssembly targets
- **Runtime Compatibility**: Full browser compatibility

### Testing Infrastructure
- **CI/CD Pipeline**: Automated testing and deployment
- **Cross-Browser Testing**: Playwright-based testing
- **Performance Testing**: Automated performance benchmarks
- **Property Testing**: Invariant and edge case testing

---

## ๐Ÿ“š Documentation

### Comprehensive Guides
- **Quick Start**: Get up and running in minutes
- **API Reference**: Complete API documentation
- **Common Patterns**: Real-world usage patterns
- **Migration Guide**: Upgrade from previous versions
- **Community Guidelines**: Contributing and support

### Examples
- **Todo App**: Complete CRUD application
- **Blog App**: Content management system
- **Weather App**: Data fetching and display
- **Static Demos**: Working examples without dependencies

---

## ๐Ÿ› ๏ธ Developer Experience

### Easy Integration
```rust
use leptos_query_rs::*;

// Simple query setup
let user_query = use_query(
    || QueryKey::new(&["user", &user_id.to_string()]),
    || async move { fetch_user(user_id).await },
    QueryOptions::default()
);
```

### Type Safety
```rust
// Full type safety with automatic inference
let data: ReadSignal<Option<User>> = user_query.data;
let loading: ReadSignal<bool> = user_query.is_loading;
let error: ReadSignal<Option<QueryError>> = user_query.error;
```

### Error Handling
```rust
// Comprehensive error handling
match user_query.error.get() {
    Some(error) => view! { <ErrorComponent error /> },
    None => view! { <UserComponent user=user_query.data.get() /> }
}
```

---

## ๐Ÿ”„ Migration from v0.4.x

### No Breaking Changes
- **Full Backward Compatibility**: All existing code continues to work
- **Enhanced Features**: New features are opt-in
- **Improved Performance**: Better performance with no code changes
- **Better Error Handling**: Enhanced error messages and handling

### New Features Available
- **Feature Flags**: Use `native` or `wasm` features for better compatibility
- **Enhanced Caching**: Improved cache invalidation strategies
- **Better Type Safety**: Enhanced type inference and safety
- **Performance Monitoring**: Built-in performance metrics

---

## ๐ŸŽ‰ Community

### Getting Help
- **GitHub Issues**: Report bugs and request features
- **Discussions**: Community discussions and Q&A
- **Documentation**: Comprehensive guides and examples
- **Examples**: Real-world usage examples

### Contributing
- **Contributing Guide**: How to contribute to the project
- **Code of Conduct**: Community guidelines and standards
- **Development Setup**: How to set up development environment
- **Testing**: How to run and write tests

---

## ๐Ÿ”ฎ What's Next

### v1.0.0 Roadmap
- **Advanced Features**: Offline support, persistence, devtools
- **Performance**: Further performance optimizations
- **Ecosystem**: Integration with more Leptos ecosystem tools
- **Community**: Enhanced community features and support

### Feedback Welcome
- **Real-World Usage**: We want to hear about your use cases
- **Performance**: Share your performance requirements
- **Features**: Request features you need
- **Documentation**: Help us improve documentation

---

## ๐Ÿ“ˆ Statistics

- **Lines of Code**: 15,000+ lines
- **Test Coverage**: 95%+ coverage
- **Documentation**: 50+ pages
- **Examples**: 3 complete applications
- **Performance**: Sub-microsecond operations
- **Compatibility**: 100% Leptos 0.8 compatible

---

## ๐Ÿ™ Acknowledgments

Thank you to all contributors, testers, and community members who helped make this release possible!

---

**Download**: [GitHub Releases](https://github.com/cloud-shuttle/leptos-query-rs/releases)  
**Documentation**: [docs.leptos-query.rs](https://docs.leptos-query.rs)  
**Community**: [GitHub Discussions](https://github.com/cloud-shuttle/leptos-query-rs/discussions)