Skip to content

Commit

Permalink
native_viewer is now an opt-in feature of the rerun library (#2064)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
emilk authored May 9, 2023
1 parent 4dbd4bb commit 697af91
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 8 deletions.
10 changes: 9 additions & 1 deletion crates/rerun/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,20 @@ all-features = true
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]


[[bin]]
# For the `rerun` binary, always add the `native_viewer` feature.
# See https://github.com/rerun-io/rerun/issues/1997
name = "rerun"
required-features = ["native_viewer"]


[features]
default = [
# We omit `native_viewer` to improve the default compile times.
"analytics",
"demo",
"glam",
"image",
"native_viewer",
"server",
"sdk",
]
Expand Down Expand Up @@ -76,6 +83,7 @@ web_viewer = [
"re_ws_comms/server",
]


[dependencies]
re_build_info.workspace = true
re_data_store.workspace = true
Expand Down
5 changes: 4 additions & 1 deletion examples/rust/api_demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ license = "MIT OR Apache-2.0"
publish = false

[dependencies]
rerun = { path = "../../../crates/rerun", features = ["web_viewer"] }
rerun = { path = "../../../crates/rerun", features = [
"native_viewer",
"web_viewer",
] }

anyhow = "1.0"
clap = { version = "4.0", features = ["derive"] }
Expand Down
5 changes: 4 additions & 1 deletion examples/rust/clock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ license = "MIT OR Apache-2.0"
publish = false

[dependencies]
rerun = { path = "../../../crates/rerun", features = ["web_viewer"] }
rerun = { path = "../../../crates/rerun", features = [
"native_viewer",
"web_viewer",
] }

anyhow = "1.0"
clap = { version = "4.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/dna/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
publish = false

[dependencies]
rerun = { path = "../../../crates/rerun", features = ["web_viewer"] }
rerun = { path = "../../../crates/rerun", features = ["native_viewer"] }

itertools = "0.10"
rand = "0.8"
2 changes: 1 addition & 1 deletion examples/rust/minimal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ license = "MIT OR Apache-2.0"
publish = false

[dependencies]
rerun = { path = "../../../crates/rerun" }
rerun = { path = "../../../crates/rerun", features = ["native_viewer"] }
5 changes: 4 additions & 1 deletion examples/rust/minimal_options/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ license = "MIT OR Apache-2.0"
publish = false

[dependencies]
rerun = { path = "../../../crates/rerun", features = ["web_viewer"] }
rerun = { path = "../../../crates/rerun", features = [
"native_viewer",
"web_viewer",
] }

anyhow = "1.0"
clap = { version = "4.0", features = ["derive"] }
Expand Down
5 changes: 4 additions & 1 deletion examples/rust/objectron/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ publish = false


[dependencies]
rerun = { path = "../../../crates/rerun", features = ["web_viewer"] }
rerun = { path = "../../../crates/rerun", features = [
"native_viewer",
"web_viewer",
] }

anyhow = "1.0"
clap = { version = "4.0", features = ["derive"] }
Expand Down
5 changes: 4 additions & 1 deletion examples/rust/raw_mesh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ license = "MIT OR Apache-2.0"
publish = false

[dependencies]
rerun = { path = "../../../crates/rerun", features = ["web_viewer"] }
rerun = { path = "../../../crates/rerun", features = [
"native_viewer",
"web_viewer",
] }

anyhow = "1.0"
bytes = "1.3"
Expand Down

1 comment on commit 697af91

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.25.

Benchmark suite Current: 697af91 Previous: 4dbd4bb Ratio
mono_points_arrow/generate_message_bundles 31415017 ns/iter (± 598725) 23909631 ns/iter (± 777686) 1.31
mono_points_arrow/decode_message_bundles 74012438 ns/iter (± 637995) 55662295 ns/iter (± 1435129) 1.33
mono_points_arrow_batched/generate_message_bundles 23371342 ns/iter (± 1384352) 17752618 ns/iter (± 583348) 1.32
mono_points_arrow_batched/encode_total 30025123 ns/iter (± 1672945) 23628946 ns/iter (± 585263) 1.27

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.