fix(windows): unbreak src-tauri build on Windows/MSVC - #98
Open
ithun-y-ittesaf wants to merge 2 commits into
Open
fix(windows): unbreak src-tauri build on Windows/MSVC#98ithun-y-ittesaf wants to merge 2 commits into
ithun-y-ittesaf wants to merge 2 commits into
Conversation
Three independent bugs, only surfaced now that this is the first clean Windows/MSVC build attempted on this repo: - browser.rs called `.visible(false)` on `tauri::webview::WebviewBuilder`, which has no such method (that's `WebviewWindowBuilder`/`WindowBuilder` only) - fails to compile on every platform, not just Windows. Swapped for `.hide()` on the built `Webview` handle, matching the "initially hidden" contract callers already relied on. - updater.rs unconditionally imported `std::os::unix::fs::FileExt`, but the whole module is a macOS-only DMG updater (mounts DMGs, shells out to hdiutil/codesign/spctl/ditto) that was never gated to `#[cfg(target_os = "macos")]`. Split into updater_macos.rs (unchanged logic) + updater_stub.rs (no-op, same public API) so lib.rs and the frontend's invoke() surface stay platform-agnostic. - tokenizers' default `esaxx_fast` feature builds esaxx-rs's C++ backend with a hardcoded static CRT (`.static_crt(true)`), which conflicts with the rest of the binary's dynamic CRT (notably `cxx`, via `usearch`) and fails MSVC linking with LNK2038. Disabled it in atlas-embed's Cargo.toml - it only speeds up training a Unigram tokenizer; loading/running pretrained ones is unaffected. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 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.
Description:
First clean Windows/MSVC build attempt on this repo surfaced three independent bugs blocking compilation, plus a Tauri capabilities schema Windows needs:
browser.rs: called.visible(false)on tauri::webview::WebviewBuilder, which has no such method (that's WebviewWindowBuilder/WindowBuilder only). Failed to compile on every platform, not just Windows. Swapped for .hide() on the built Webview handle, preserving the "initially hidden" contract callers rely on.updater.rs: unconditionally importedstd::os::unix::fs::FileExt, but the module is a macOS-only DMG updater (mounts DMGs, shells out tohdiutil/codesign/spctl/ditto) that was never gated behind #[cfg(target_os = "macos")]. Split into updater_macos.rs (unchanged logic) and updater_stub.rs (no-op, same public API) so lib.rs and the frontend's invoke() surface stay platform-agnostic.atlas-embed: tokenizers' default esaxx_fast feature builds esaxx-rs's C++ suffix-array backend with a hardcoded static CRT, which conflicts with the rest of the binary's dynamic CRT (via usearch/cxx) and fails MSVC linking with LNK2038. Disabled it — it only speeds up training a Unigram tokenizer; loading/running pretrained ones is unaffected.
Added src-tauri/gen/schemas/windows-schema.json, the generated Tauri capabilities schema for the Windows target.
No behavior changes on macOS/Linux.