Releases: 1amageek/Bleu
Releases · 1amageek/Bleu
2.0.2
What's Changed
Improvements
- Add shutdown and legacy packet handling to BLEActorSystem
- Add cancellation tracking and cleanup for calls
Bug Fixes
- Fix race condition in EmulatedBLEPeripheralManager.startAdvertising
Other
- Refactor MinimalEmulatorTest for better clarity and flow
- Add GitHub Sponsors button to README
Full Changelog: 2.0.1...2.0.2
2.1.0
What's Changed
Bug Fixes
- Fix race condition in
startAdvertising(): TheEmulatedBLEPeripheralManager.startAdvertising()method now properly waits for theperipheralManagerDidStartAdvertisingcallback before returning. This ensures that centrals can discover peripherals immediately after advertising starts.
2.0.1
Bleu 2.0.0 - Protocol-Oriented BLE with @Resolvable
🎯 Major Features
Protocol-Oriented BLE with @resolvable
- Define custom distributed actor protocols with
@Resolvablemacro - Automatic stub generation for protocol-based actor resolution
- Zero boilerplate, maximum simplicity
- Call BLE methods as if they were local
Distributed Actor Architecture
- Transparent RPC over BLE using Swift's distributed actors
- Type-safe remote method invocation
- Automatic serialization and error handling
- Actor isolation for thread safety
High Performance
- Binary packet fragmentation with 24-byte headers
- Efficient data transport with checksums
- Adaptive MTU negotiation
- Automatic packet reassembly
✨ What's New in 2.0.0
@ResolvableProtocol Support: Define your BLE device APIs as protocols- Custom Protocol Testing: Comprehensive test suite for
@Resolvableusage - Enhanced Documentation: Clear examples showing protocol-oriented design
- Compiler Warning Fixes: Clean build with zero warnings
- GitHub Actions CI: Automated testing on macOS 26
🚀 Quick Start
// 1. Define your BLE device API as a protocol
@Resolvable
protocol TemperatureSensor: PeripheralActor {
distributed func getTemperature() async throws -> Double
}
// 2. Peripheral: Implement the protocol
distributed actor MyThermometer: TemperatureSensor {
typealias ActorSystem = BLEActorSystem
distributed func getTemperature() async throws -> Double {
return 25.5
}
}
// 3. Central: Resolve and call methods over BLE
let sensor = try $TemperatureSensor.resolve(id: sensorID, using: actorSystem)
let temp = try await sensor.getTemperature() // 🎉 That's it!📝 Documentation
- Updated README with
@Resolvablequick start guide - Step-by-step protocol definition examples
- Clear separation between protocol-based and concrete actor approaches
- Links to Swift Evolution proposal SE-0428
🧪 Testing
- New
ResolvableTestssuite demonstrating custom protocols - All tests passing on macOS 26
- Continuous integration via GitHub Actions
📦 Installation
Add Bleu to your project using Swift Package Manager:
dependencies: [
.package(url: "https://github.com/1amageek/Bleu.git", from: "2.0.0")
]