v0.1.21
Highlights
Async Boot Lifecycle (#42)
New BootBuilder and BootContext for running async initialization inside Tauri 2's synchronous setup() closure. Handles the "no Tokio reactor on macOS main thread" problem once, correctly, for all apps.
allframe_tauri::builder(router)
.on_boot(3, |ctx| async move {
let store = open_store(&ctx.data_dir()?).await
.map_err(|e| BootError::Failed(e.to_string()))?;
ctx.inject_state(store);
ctx.emit_progress("Event store opened");
// ...
Ok(())
})
.build()BootContext::inject_state()— inject state for handlers during bootBootContext::emit_progress()— emitallframe:boot-progressevents for frontend splash screens- Ephemeral
new_current_thread()Tokio runtime forblock_onduring setup - Fully backward compatible:
init(router)unchanged
Deferred State Resolution (#51)
Handler state is now resolved at call time via SharedStateMap (Arc<RwLock<HashMap<TypeId, ...>>>). Handlers can be registered before their state type is injected — enabling the boot lifecycle pattern.
Also in this release
Router::shared_states()public accessor- CQRS macro trait implementations (
#[command],#[query],#[event]) - QueryBus + Query/QueryHandler traits
- Architecture layer enforcement macros
#[derive(Obfuscate)]enum support- Saga macro improvements
- Forge integration tests and fixes
See CHANGELOG.md for full details.