This commit changes the build process to include Swift shared object files, allowing users to not need to include them at runtime. However, this requires the files to be present in src-tauri/SoulverWrapper/Vendor/SoulverCore-linux at build time.
The packaged Linux application was failing to launch with a "cannot open shared object file" error because the dynamic linker could not locate the necessary Swift shared libraries (`.so` files).
This was caused by two missing runtime search paths (rpath):
1. The main `raycast-linux` executable did not have an rpath pointing to the location of `libSoulverWrapper.so`. This is fixed by adding a `-Wl,-rpath,...` linker argument in `build.rs`.
2. The `libSoulverWrapper.so` library did not have its own rpath to locate its transitive dependency, `libSoulverCoreDynamic.so`. An rpath on an executable is not inherited by the libraries it loads. This is fixed by passing `-Xlinker -rpath` flags to the `swift build` command, embedding the path into the library itself.
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.