Skip to content

Commit 199f526

Browse files
Split minifb and hub out into features
1 parent df13e32 commit 199f526

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ imageproc = { version = "0.25" }
2020
ndarray = { version = "0.16.1", features = ["rayon", "serde"] }
2121
indicatif = { version = "0.17.11" }
2222
log = "0.4.26"
23-
minifb = { version = "0.28.0" }
23+
minifb = { version = "0.28.0", optional = true }
2424
rand = { version = "0.9" }
2525
http = "1.3"
26-
ureq = { version = "3", default-features = true, features = ["socks-proxy"] }
26+
ureq = { version = "3", default-features = false }
2727
serde = { version = "1.0", features = ["derive"] }
2828
serde_json = "1.0"
2929
rayon = { version = "1.10.0" }
@@ -56,7 +56,7 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter", "chrono"] }
5656

5757

5858
[features]
59-
default = [ "ort-download-binaries" ]
59+
default = [ "ort-download-binaries", "viewer", "hub" ]
6060
serde = []
6161
video = [ "dep:video-rs" ]
6262
ort-download-binaries = [ "ort", "ort/download-binaries" ]
@@ -79,3 +79,5 @@ qnn = [ "ort/qnn" ]
7979
migraphx = [ "ort/migraphx" ]
8080
vitis = [ "ort/vitis" ]
8181
azure = [ "ort/azure" ]
82+
viewer = [ "dep:minifb" ]
83+
hub = [ "ureq/native-tls" ]

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ mod results;
5757
pub mod viz;
5858

5959
pub use core::*;
60+
#[cfg(feature = "viewer")]
6061
pub use minifb::Key;
6162
#[cfg(any(feature = "ort-download-binaries", feature = "ort-load-dynamic"))]
6263
pub use models::*;

src/viz/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ pub use draw_ctx::*;
1515
pub use drawable::*;
1616
pub use styles::*;
1717
pub use text_renderer::*;
18+
#[cfg(feature = "viewer")]
1819
pub use viewer::*;

src/viz/viewer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![cfg(feature = "viewer")]
12
use anyhow::{Context, Result};
23
use minifb::{Key, ScaleMode, Window, WindowOptions};
34
#[cfg(feature = "video")]

0 commit comments

Comments
 (0)