Skip to content

Commit 742f5f4

Browse files
committed
native_viewer is now an opt-in feature of the rerun library
This improves compile-times for users that use an external rerun binary. The `rerun` binary, on the other hand, now has `native_viewer` as a _required_ feature. In is an unhappy compromise. Closes #1997
1 parent 4dbd4bb commit 742f5f4

File tree

8 files changed

+31
-8
lines changed

8 files changed

+31
-8
lines changed

crates/rerun/Cargo.toml

+9-1
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,20 @@ all-features = true
2020
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]
2121

2222

23+
[[bin]]
24+
# For the `rerun` binary, always add the `native_viewer` feature.
25+
# See https://github.com/rerun-io/rerun/issues/1997
26+
name = "rerun"
27+
required-features = ["native_viewer"]
28+
29+
2330
[features]
2431
default = [
32+
# We omit `native_viewer` to improve the default compile times.
2533
"analytics",
2634
"demo",
2735
"glam",
2836
"image",
29-
"native_viewer",
3037
"server",
3138
"sdk",
3239
]
@@ -76,6 +83,7 @@ web_viewer = [
7683
"re_ws_comms/server",
7784
]
7885

86+
7987
[dependencies]
8088
re_build_info.workspace = true
8189
re_data_store.workspace = true

examples/rust/api_demo/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ license = "MIT OR Apache-2.0"
77
publish = false
88

99
[dependencies]
10-
rerun = { path = "../../../crates/rerun", features = ["web_viewer"] }
10+
rerun = { path = "../../../crates/rerun", features = [
11+
"native_viewer",
12+
"web_viewer",
13+
] }
1114

1215
anyhow = "1.0"
1316
clap = { version = "4.0", features = ["derive"] }

examples/rust/clock/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ license = "MIT OR Apache-2.0"
77
publish = false
88

99
[dependencies]
10-
rerun = { path = "../../../crates/rerun", features = ["web_viewer"] }
10+
rerun = { path = "../../../crates/rerun", features = [
11+
"native_viewer",
12+
"web_viewer",
13+
] }
1114

1215
anyhow = "1.0"
1316
clap = { version = "4.0", features = ["derive"] }

examples/rust/dna/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
77
publish = false
88

99
[dependencies]
10-
rerun = { path = "../../../crates/rerun", features = ["web_viewer"] }
10+
rerun = { path = "../../../crates/rerun", features = ["native_viewer"] }
1111

1212
itertools = "0.10"
1313
rand = "0.8"

examples/rust/minimal/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ license = "MIT OR Apache-2.0"
77
publish = false
88

99
[dependencies]
10-
rerun = { path = "../../../crates/rerun" }
10+
rerun = { path = "../../../crates/rerun", features = ["native_viewer"] }

examples/rust/minimal_options/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ license = "MIT OR Apache-2.0"
77
publish = false
88

99
[dependencies]
10-
rerun = { path = "../../../crates/rerun", features = ["web_viewer"] }
10+
rerun = { path = "../../../crates/rerun", features = [
11+
"native_viewer",
12+
"web_viewer",
13+
] }
1114

1215
anyhow = "1.0"
1316
clap = { version = "4.0", features = ["derive"] }

examples/rust/objectron/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ publish = false
88

99

1010
[dependencies]
11-
rerun = { path = "../../../crates/rerun", features = ["web_viewer"] }
11+
rerun = { path = "../../../crates/rerun", features = [
12+
"native_viewer",
13+
"web_viewer",
14+
] }
1215

1316
anyhow = "1.0"
1417
clap = { version = "4.0", features = ["derive"] }

examples/rust/raw_mesh/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ license = "MIT OR Apache-2.0"
77
publish = false
88

99
[dependencies]
10-
rerun = { path = "../../../crates/rerun", features = ["web_viewer"] }
10+
rerun = { path = "../../../crates/rerun", features = [
11+
"native_viewer",
12+
"web_viewer",
13+
] }
1114

1215
anyhow = "1.0"
1316
bytes = "1.3"

0 commit comments

Comments
 (0)