Repository navigation
Engine: paths and events come from the shell, not from Tauri state - #1281
Merged
Merged
Conversation
vmillet-dev
force-pushed
the
engine/paths-event-sink
branch
from
November 2, 2026 21:14
83eca24 to
4141fcf
Compare
This was referenced Nov 2, 2026
The shell manages one Arc<Engine> built from Tauri's paths and a TauriHost that emits the engine's events under their current names. The core reads automaticBackups from preferences.json itself; the clipboard and the opener are called outside the command bodies.
vmillet-dev
force-pushed
the
engine/paths-event-sink
branch
from
November 2, 2026 21:47
4141fcf to
c09aa96
Compare
…r's coverage The shell goes in phase 2 and the end-to-end scenarios exercise it.
This was referenced Nov 2, 2026
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1147
Phase 1, step 2 of
docs/egui-migration-plan.md(§ 3.3.2, § 3.3.4).Engine(engine/src/lib.rs) owns the core's state: theDbslot,Restored,Sending,Runs,Sockets, thePathsand theEventSink. The shell builds it insetupand manages oneArc<Engine>instead of five Tauri states.host.rs:Paths { profile, resources },EventSink,EngineEvent { Socket, Console, Run },RecordingSink.Pathsis a struct, not the trait the plan sketched: every host only fills in two paths, so a trait would have no second use (the plan is updated). The plaintext copies stayprofile/open/.TauriHost(src-tauri/src/host.rs) resolves the paths fromapp_data_dir()/resource_dir()and emits each event under its current name, so the front end andbindings.tsdo not change (regenerated byte for byte).app.state,app.path,app.emitandtry_stateare gone from the core:db::blockinghands its body&Engine, andblocking_on(Arc<Engine>, …)serves the HTTP flight, which now holds the engine instead of anAppHandle. WebSockets emit through the sink.automaticBackupsis read from<profile>/preferences.jsonby the core itself (serde_json);tauri-plugin-storeleaves the engine. New test: missing file,"false","true", unreadable.desktop.rsstays in the shell.tauriin the engine is the command layer itself (#[tauri::command], theAppHandleparameter,db::engine,async_runtime): it moves to the shell with #1149 (one-line wrappers) and #1148 (the runtime and the queue). Thegrepof « nouse tauriinengine» closes with those.Tests: the mock-runtime session builds an
Engineover a temporary profile, with a sink that emits on the mock app as the shell does, so the console, run and socket tests are unchanged. Local:cargo fmt --all --check,cargo clippy --workspace --lib --bins --tests --benches --all-features -D warnings,cargo test --workspace --lib --bins --testsgreen. No local e2e (the machine is in use): CI runs the 35 scenarios, notably 11 attachments and 23 backups.🤖 Generated with Claude Code