Skip to content

fix(windows): unbreak src-tauri build on Windows/MSVC - #98

Open
ithun-y-ittesaf wants to merge 2 commits into
pacifio:mainfrom
ithun-y-ittesaf:fix/windows-dev-build
Open

fix(windows): unbreak src-tauri build on Windows/MSVC#98
ithun-y-ittesaf wants to merge 2 commits into
pacifio:mainfrom
ithun-y-ittesaf:fix/windows-dev-build

Conversation

@ithun-y-ittesaf

Copy link
Copy Markdown
Contributor

Description:

First clean Windows/MSVC build attempt on this repo surfaced three independent bugs blocking compilation, plus a Tauri capabilities schema Windows needs:

  1. 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.

  2. updater.rs: unconditionally imported std::os::unix::fs::FileExt, but the module is a macOS-only DMG updater (mounts DMGs, shells out to hdiutil/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.

  3. 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.

  4. Added src-tauri/gen/schemas/windows-schema.json, the generated Tauri capabilities schema for the Windows target.

  5. No behavior changes on macOS/Linux.

ithun-y-ittesaf and others added 2 commits August 5, 2026 13:22
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant