diff --git a/.cargo/config.toml b/.cargo/config.toml index ac2b23f8..4adc5aa8 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,3 @@ +# If we link MSVC CRT statically then it conflicts with HDF5's MSVC CRT [target.x86_64-pc-windows-msvc] -rustflags = ["-C", "target-feature=+crt-static"] +rustflags = ["-C", "target-feature=-crt-static"] diff --git a/Cargo.lock b/Cargo.lock index 03032721..f01a9ed4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1803,9 +1803,9 @@ dependencies = [ [[package]] name = "hdf5-metno" -version = "0.9.4" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c9b4d0d095403ced0b9d8b727c55212f1d09526944d84b8d3dca02ee3c0a82" +checksum = "72f8592329337a96c802cccdbd11fe5f9476cb940d5a88dcca729a2ecf82e1c9" dependencies = [ "bitflags 2.8.0", "cfg-if", diff --git a/Cargo.toml b/Cargo.toml index 88acfd0e..3476ecde 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -104,7 +104,7 @@ web-sys = "0.3.70" elevated-command.workspace = true [features] -default = ["selfupdater"] +default = ["selfupdater", "hdf"] hdf = ["dep:skytem_hdf"] selfupdater = ["dep:axoupdater"] profiling = ["dep:profiling", "dep:puffin", "dep:puffin_http"] diff --git a/crates/skytem_hdf/Cargo.toml b/crates/skytem_hdf/Cargo.toml index 1ef26f63..030fae0a 100644 --- a/crates/skytem_hdf/Cargo.toml +++ b/crates/skytem_hdf/Cargo.toml @@ -24,7 +24,7 @@ toml.workspace = true ndarray = "0.16.1" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -hdf5 = { package = "hdf5-metno", version = "0.9", features = ["static"] } +hdf5 = { package = "hdf5-metno", version = "0.10", features = ["static"] } [dev-dependencies] testresult.workspace = true diff --git a/dist-workspace.toml b/dist-workspace.toml index 5e546cfb..421801f8 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -17,3 +17,5 @@ install-path = "CARGO_HOME" install-updater = false # Which actions to run on pull requests pr-run-mode = "upload" +# Whether +crt-static should be used on msvc +msvc-crt-static = false diff --git a/src/app/util.rs b/src/app/util.rs index 49675425..2eac47db 100644 --- a/src/app/util.rs +++ b/src/app/util.rs @@ -75,13 +75,18 @@ fn list_supported_hdf_formats(ui: &mut egui::Ui) { ui.label(RichText::new("⚠ No HDF support on web ⚠")); #[cfg(not(target_arch = "wasm32"))] { - ui.label(RichText::new("⚠ Coming soon: Bifrost TX Loop Current ⚠")); - ui.label("Loop Current measurements"); + if cfg!(feature = "hdf") { + { + ui.label("Loop Current measurements"); - ui.add(Hyperlink::from_label_and_url( - "https://github.com/luftkode/bifrost-app", - "https://github.com/luftkode/bifrost-app", - )); + ui.add(Hyperlink::from_label_and_url( + "https://github.com/luftkode/bifrost-app", + "https://github.com/luftkode/bifrost-app", + )); + } + } else { + ui.label(RichText::new("⚠ Coming soon: Bifrost TX Loop Current ⚠")); + } ui.end_row(); } }