feat(calculator): initialize basic SoulverCore library

This commit adds a native calculation engine by integrating the pre-compiled SoulverCore Swift library. A Swift package (`SoulverWrapper`) was created to act as a C-compatible FFI bridge, allowing the Rust backend to call into the library (because the library does not include de-mangled names). The build process was updated to compile this Swift wrapper and correctly bundle the necessary shared libraries and resources for both development and production environments. A new Tauri command, `calculate_soulver`, exposes this functionality to the Svelte frontend.

In the future, we will be using this functionality to improve the built-in calculator.
This commit is contained in:
ByteAtATime 2025-06-28 20:08:43 -07:00
parent c75383b714
commit 5f1ad1c84a
No known key found for this signature in database
88 changed files with 67161 additions and 3 deletions

View file

@ -13,6 +13,7 @@ mod frecency;
mod oauth;
mod quicklinks;
mod snippets;
mod soulver;
mod system;
use crate::snippets::input_manager::{EvdevInputManager, InputManager};
@ -281,7 +282,8 @@ pub fn run() {
ai::get_ai_usage_history,
ai::get_ai_settings,
ai::set_ai_settings,
ai::ai_can_access
ai::ai_can_access,
soulver::calculate_soulver
])
.setup(|app| {
let app_handle = app.handle().clone();
@ -312,6 +314,14 @@ pub fn run() {
setup_global_shortcut(app)?;
setup_input_listener(app.handle());
let soulver_core_path = app
.path()
.resource_dir()
.unwrap()
.join("SoulverWrapper/Vendor/SoulverCore-linux");
soulver::initialize(soulver_core_path.to_str().unwrap());
Ok(())
})
.build(tauri::generate_context!())