Skip to content

Releases: 1amageek/Bleu

2.0.2

19 Dec 01:32

Choose a tag to compare

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

29 Nov 01:25

Choose a tag to compare

What's Changed

Bug Fixes

  • Fix race condition in startAdvertising(): The EmulatedBLEPeripheralManager.startAdvertising() method now properly waits for the peripheralManagerDidStartAdvertising callback before returning. This ensures that centrals can discover peripherals immediately after advertising starts.

2.0.1

25 Nov 12:33

Choose a tag to compare

  • Add multi-process support to CoreBluetoothEmulator
  • Add error handling and call management for BLEActorSystem

Bleu 2.0.0 - Protocol-Oriented BLE with @Resolvable

05 Nov 02:25

Choose a tag to compare

🎯 Major Features

Protocol-Oriented BLE with @resolvable

  • Define custom distributed actor protocols with @Resolvable macro
  • 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

  • @Resolvable Protocol Support: Define your BLE device APIs as protocols
  • Custom Protocol Testing: Comprehensive test suite for @Resolvable usage
  • 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 @Resolvable quick 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 ResolvableTests suite 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")
]

🔗 Links