forked from 1b-agent/opencadstudio-upstream
chore: silence native and wasm build warnings
Gate target-specific code so neither build warns about the other's items: native-only helpers (view, window icon, file dialogs, file association, plugin host/guard/registry, self-update) are cfg'd to non-wasm; the wasm-only font fallback (script_of / cjk_lang / request) is cfg'd to wasm. Drop an unused mut, allow the few genuinely-conditional dead items (mesh_click_hit, GPU layout helpers, parity stubs), and gate the embedded PlotSettings-unrelated dead constants. Both targets now build clean (only the unavoidable nom/quick-xml future-incompat dependency notice remains). Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
2de5c7668f
commit
10e4c18ba7
20 files changed
+37
-2
No files matched your search
@@ -37,6 +37,7 @@ const APP_ID: &str = "io.github.HakanSeven12.OpenCadStudio";
|
||||
/// Idempotent and best-effort; safe to call on every launch. Runs synchronously
|
||||
/// (registry / small file writes), so callers should invoke it off the UI
|
||||
/// thread.
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn register_as_handler() -> Result<(), String> {
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ const PHASE_FINALIZING: u8 = 3;
|
||||
/// Show the file picker and return the chosen path plus its size in bytes.
|
||||
/// Returning size up-front lets the loading overlay display "47.3 MB" before
|
||||
/// the parser thread starts.
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub async fn pick_open_path() -> Option<(PathBuf, u64)> {
|
||||
let handle = rfd::AsyncFileDialog::new()
|
||||
.set_title("Open CAD file")
|
||||
|
||||
Reference in new issue
Block a user