diff --git a/Cargo.lock b/Cargo.lock index 9db4a6e5b6fa..ac4a637b1774 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3183,7 +3183,7 @@ dependencies = [ "http 1.1.0", "hyper 1.5.0", "hyper-util", - "rustls 0.23.16", + "rustls 0.23.18", "rustls-native-certs", "rustls-pki-types", "tokio", @@ -5136,7 +5136,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.0.0", - "rustls 0.23.16", + "rustls 0.23.18", "socket2", "thiserror", "tokio", @@ -5153,7 +5153,7 @@ dependencies = [ "rand", "ring", "rustc-hash 2.0.0", - "rustls 0.23.16", + "rustls 0.23.18", "slab", "thiserror", "tinyvec", @@ -6862,7 +6862,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.16", + "rustls 0.23.18", "rustls-native-certs", "rustls-pemfile 2.2.0", "rustls-pki-types", @@ -7410,9 +7410,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.16" +version = "0.23.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" +checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" dependencies = [ "log", "once_cell", @@ -8423,7 +8423,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.16", + "rustls 0.23.18", "rustls-pki-types", "tokio", ] @@ -8659,7 +8659,7 @@ dependencies = [ "httparse", "log", "rand", - "rustls 0.23.16", + "rustls 0.23.18", "rustls-pki-types", "sha1", "thiserror", @@ -8776,7 +8776,7 @@ dependencies = [ "flate2", "log", "once_cell", - "rustls 0.23.16", + "rustls 0.23.18", "rustls-pki-types", "serde", "serde_json", diff --git a/README.md b/README.md index 5ae94c682b7b..e8965621452f 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,12 @@ rr.log("path/to/points", rr.Points3D(positions, colors=colors)) ### Installing the Rerun Viewer binary To stream log data over the network or load our `.rrd` data files you also need the `rerun` binary. -It can be installed with `pip install rerun-sdk` or with `cargo install rerun-cli --locked`. +It can be installed with `pip install rerun-sdk` or with `cargo install rerun-cli --locked --features nasm` (see note below). Note that only the Python SDK comes bundled with the Viewer whereas C++ & Rust always rely on a separate install. +**Note**: the `nasm` Cargo feature requires the [`nasm`](https://www.nasm.us) CLI to be installed and available in your path. +Alternatively, you may skip enabling this feature, but this may result in inferior video decoding performance. + You should now be able to run `rerun --help` in any terminal. diff --git a/crates/top/rerun-cli/Cargo.toml b/crates/top/rerun-cli/Cargo.toml index 1facea35fddb..90ec7ac42d51 100644 --- a/crates/top/rerun-cli/Cargo.toml +++ b/crates/top/rerun-cli/Cargo.toml @@ -41,11 +41,30 @@ doc = false ## so we have all the bells and wistles here, except those that may require extra tools ## (like "nasm"). ## That is: `cargo install rerun-cli --locked` should work for _everyone_. -default = ["native_viewer", "web_viewer"] +default = ["native_viewer", "web_viewer", "map_view"] + + +# !!!IMPORTANT!!! +# +# Do you _really_ want to add features in `release` that are not in `default`? +# +# Here are some reasons not to: +# - These features will be missing from the `cargo install rerun-cli` command our users will inevitably use. +# - These features will not be picked up in places where we cannot use the `release` feature set (e.g. rerun_js). +# - This list is not exhaustive and will unexpectedly grow in the future. +# +# If you insist on adding a feature here, please make sure you address all the concerns above. +# +# `nasm` +# ------ +# +# This requires external build tools (the `nasm` cli) and would break any build on a system without it. Mitigation: a +# warning with instructions is printed when building `rerun-cli` in release mode without the `nasm` feature (see +# `build.rs`). ## The features we enable when we build the pre-built binaries during our releases. -## This may enable features that require extra build tools that not everyone heas. -release = ["default", "nasm", "map_view"] +## This may enable features that require extra build tools that not everyone has. +release = ["default", "nasm"] ## Enable faster native video decoding with assembly. ## You need to install [nasm](https://nasm.us/) to compile with this feature. @@ -57,7 +76,6 @@ native_viewer = ["rerun/native_viewer"] ## Support the map view. ## This adds a lot of extra dependencies. -#TODO(#7876): remove this feature when we have fewer dependencies map_view = ["rerun/map_view"] ## Enable the gRPC Rerun Data Platform data source. diff --git a/crates/top/rerun-cli/README.md b/crates/top/rerun-cli/README.md index 77eda956da93..c48ab0f2f51f 100644 --- a/crates/top/rerun-cli/README.md +++ b/crates/top/rerun-cli/README.md @@ -13,9 +13,12 @@ ## Rerun command-line tool -You can install the binary with `cargo install rerun-cli --locked` +You can install the binary with `cargo install rerun-cli --locked --features nasm`. -This can act either as a server, a viewer, or both, depending on which options you use when you start it. +**Note**: this requires the [`nasm`](https://www.nasm.us) CLI to be installed and available in your path. +Alternatively, you may skip enabling the `nasm` feature, but this may result in inferior video decoding performance. + +The `rerun` CLI can act either as a server, a viewer, or both, depending on which options you use when you start it. Running `rerun` with no arguments will start the viewer, waiting for an SDK to connect to it over TCP. diff --git a/crates/top/rerun-cli/build.rs b/crates/top/rerun-cli/build.rs index fdda3dae46d5..737c971d76fa 100644 --- a/crates/top/rerun-cli/build.rs +++ b/crates/top/rerun-cli/build.rs @@ -1,3 +1,14 @@ fn main() { re_build_tools::export_build_info_vars_for_crate("rerun-cli"); + + // Warn about not using the `nasm` feature in a release build. + let is_release = std::env::var("PROFILE") == Ok("release".to_owned()); + let has_nasm_feature = std::env::var("CARGO_FEATURE_NASM").is_ok(); + if is_release && !has_nasm_feature { + println!( + "cargo:warning=Rerun is compiled in release mode without the `nasm` feature activated. \ + Enabling the `nasm` feature is recommended for better video decoding performance. \ + This requires that the `nasm` CLI is installed and available in the current PATH." + ); + } } diff --git a/crates/top/rerun/Cargo.toml b/crates/top/rerun/Cargo.toml index c0723b4061f2..068c98028fdd 100644 --- a/crates/top/rerun/Cargo.toml +++ b/crates/top/rerun/Cargo.toml @@ -31,6 +31,7 @@ default = [ "glam", "image", "log", + "map_view", "sdk", "server", ] @@ -85,11 +86,10 @@ native_viewer = ["dep:re_viewer"] ## Support the map view. ## This adds a lot of extra dependencies. -#TODO(#7876): remove this feature when we have fewer dependencies map_view = ["re_viewer?/map_view"] ## Enable the gRPC Rerun Data Platform data source. -grpc = ["re_viewer/grpc"] +grpc = ["re_viewer?/grpc"] ## Add support for the [`run()`] function, which acts like a main-function for a CLI, ## acting the same as [the `rerun` binary](https://crates.io/crates/rerun-cli). diff --git a/crates/top/rerun/README.md b/crates/top/rerun/README.md index 3882f1f038e5..f5b3513cbb96 100644 --- a/crates/top/rerun/README.md +++ b/crates/top/rerun/README.md @@ -41,15 +41,17 @@ You can add the `rerun` crate to your project with `cargo add rerun`. To get started, see [the examples](https://github.com/rerun-io/rerun/tree/latest/examples/rust). ## Binary -You can install the binary with `cargo install rerun-cli --locked` +You can install the binary with `cargo install rerun-cli --locked --features nasm`. -This can act either as a server, a viewer, or both, depending on which options you use when you start it. +**Note**: this requires the [`nasm`](https://www.nasm.us) CLI to be installed and available in your path. +Alternatively, you may skip enabling the `nasm` feature, but this may result in inferior video decoding performance. + +The `rerun` CLI can act either as a server, a viewer, or both, depending on which options you use when you start it. Running `rerun` with no arguments will start the viewer, waiting for an SDK to connect to it over TCP. Run `rerun --help` for more. - ### Running a web viewer The web viewer is an experimental feature, but you can try it out with: diff --git a/crates/viewer/re_viewer/data/quick_start_guides/cpp_connect.md b/crates/viewer/re_viewer/data/quick_start_guides/cpp_connect.md index fbafb40a0d0a..e27546ddeb9d 100644 --- a/crates/viewer/re_viewer/data/quick_start_guides/cpp_connect.md +++ b/crates/viewer/re_viewer/data/quick_start_guides/cpp_connect.md @@ -4,9 +4,12 @@ The Rerun C++ SDK works by connecting to an awaiting Rerun Viewer over TCP. If you need to install the viewer, follow the [installation guide](https://www.rerun.io/docs/getting-started/installing-viewer). Two of the more common ways to install the Rerun are: -* Via cargo: `cargo install rerun-cli --locked` +* Via cargo: `cargo install rerun-cli --locked --features nasm` (see note below) * Via pip: `pip install rerun-sdk` +**Note**: the `nasm` Cargo feature requires the [`nasm`](https://www.nasm.us) CLI to be installed and available in your path. +Alternatively, you may skip enabling this feature, but this may result in inferior video decoding performance. + After you have installed it, you should be able to type `rerun` in your terminal to start the viewer. ## Using the Rerun C++ SDK with CMake diff --git a/crates/viewer/re_viewer/data/quick_start_guides/cpp_spawn.md b/crates/viewer/re_viewer/data/quick_start_guides/cpp_spawn.md index 0837c2db6f3c..231c8f419b0f 100644 --- a/crates/viewer/re_viewer/data/quick_start_guides/cpp_spawn.md +++ b/crates/viewer/re_viewer/data/quick_start_guides/cpp_spawn.md @@ -4,9 +4,12 @@ The Rerun C++ SDK works by connecting to an awaiting Rerun Viewer over TCP. If you need to install the viewer, follow the [installation guide](https://www.rerun.io/docs/getting-started/installing-viewer). Two of the more common ways to install the Rerun are: -* Via cargo: `cargo install rerun-cli --locked` +* Via cargo: `cargo install rerun-cli --locked --features nasm` (see note below) * Via pip: `pip install rerun-sdk` +**Note**: the `nasm` Cargo feature requires the [`nasm`](https://www.nasm.us) CLI to be installed and available in your path. +Alternatively, you may skip enabling this feature, but this may result in inferior video decoding performance. + After you have installed it, you should be able to type `rerun` in your terminal to start the viewer. ## Using the Rerun C++ SDK with CMake diff --git a/crates/viewer/re_viewer/src/app.rs b/crates/viewer/re_viewer/src/app.rs index 42259a0af26b..1ac99eb268a0 100644 --- a/crates/viewer/re_viewer/src/app.rs +++ b/crates/viewer/re_viewer/src/app.rs @@ -1307,7 +1307,6 @@ impl App { .archetype_reflection_from_short_name(&archetype_name) { for &view_type in archetype.view_types { - // TODO(#7876): remove once `map_view` feature is gone if !cfg!(feature = "map_view") && view_type == "MapView" { re_log::warn_once!("Found map-related archetype, but viewer was not compiled with the `map_view` feature."); } diff --git a/deny.toml b/deny.toml index a4594b408459..893e6dfd2925 100644 --- a/deny.toml +++ b/deny.toml @@ -43,7 +43,6 @@ deny = [ { name = "egui_glow" }, # We use wgpu { name = "openssl-sys" }, # We prefer rustls { name = "openssl" }, # We prefer rustls - # { name = "reqwest" }, # We prefer ureq - less dependencies TODO(#7876): reenable that when `walkers` is updated ] skip = [ { name = "ahash" }, # Popular crate + fast release schedule = lots of crates still using old versions diff --git a/lychee.toml b/lychee.toml index 127e5ebea33f..5c71ec07179a 100644 --- a/lychee.toml +++ b/lychee.toml @@ -89,9 +89,10 @@ exclude = [ # Local links that require further setup. 'http://127.0.0.1', 'http://localhost', - 'recording:/', # rrd recording link. + 'recording:/', # rrd recording link. 'ws:/', - 're_viewer.js', # Build artifact that html is linking to. + 're_viewer.js', # Build artifact that html is linking to. + 'http://0.0.0.0:51234', # Api endpoints. 'https://fonts.googleapis.com/', # Font API entrypoint, not a link. diff --git a/pixi.toml b/pixi.toml index 09e724424c41..b275c3376ef0 100644 --- a/pixi.toml +++ b/pixi.toml @@ -173,13 +173,13 @@ rerun-web = { cmd = "cargo run --package rerun-cli --no-default-features --featu # # This installs the `wasm32-unknown-unknown` rust target if it's not already installed. # (this looks heavy but takes typically below 0.1s!) -rerun-build-web = "rustup target add wasm32-unknown-unknown && cargo run -p re_dev_tools -- build-web-viewer --features analytics,map_view,grpc --debug" +rerun-build-web = "rustup target add wasm32-unknown-unknown && cargo run -p re_dev_tools -- build-web-viewer --features analytics,grpc --debug" # Compile the web-viewer wasm and the cli. # # This installs the `wasm32-unknown-unknown` rust target if it's not already installed. # (this looks heavy but takes typically below 0.1s!) -rerun-build-web-cli = "rustup target add wasm32-unknown-unknown && cargo run -p re_dev_tools -- build-web-viewer --features analytics,map_view,grpc --debug && cargo build --package rerun-cli --no-default-features --features web_viewer" +rerun-build-web-cli = "rustup target add wasm32-unknown-unknown && cargo run -p re_dev_tools -- build-web-viewer --features analytics,grpc --debug && cargo build --package rerun-cli --no-default-features --features web_viewer" # Compile and run the web-viewer in release mode via rerun-cli. # @@ -195,7 +195,7 @@ rerun-web-release = { cmd = "cargo run --package rerun-cli --no-default-features # # This installs the `wasm32-unknown-unknown` rust target if it's not already installed. # (this looks heavy but takes typically below 0.1s!) -rerun-build-web-release = "rustup target add wasm32-unknown-unknown && cargo run -p re_dev_tools -- build-web-viewer --features analytics,map_view,grpc --release -g" +rerun-build-web-release = "rustup target add wasm32-unknown-unknown && cargo run -p re_dev_tools -- build-web-viewer --features analytics,grpc --release -g" rs-check = { cmd = "rustup target add wasm32-unknown-unknown && python scripts/ci/rust_checks.py", depends_on = [ "rerun-build-web", # The checks require the web viewer wasm to be around. diff --git a/rerun_js/web-viewer/build-wasm.mjs b/rerun_js/web-viewer/build-wasm.mjs index 70522e6f59b0..3e54e5020119 100644 --- a/rerun_js/web-viewer/build-wasm.mjs +++ b/rerun_js/web-viewer/build-wasm.mjs @@ -15,20 +15,26 @@ const exec = (cmd) => { }; function buildWebViewer(mode) { + let modeFlags = ""; switch (mode) { - case "debug": { - return exec( - "cargo run -p re_dev_tools -- build-web-viewer --debug --target no-modules-base -o rerun_js/web-viewer", - ); - } - case "release": { - return exec( - "cargo run -p re_dev_tools -- build-web-viewer --release -g --target no-modules-base -o rerun_js/web-viewer", - ); - } + case "debug": + modeFlags = "--debug"; + break; + case "release": + modeFlags = "--release -g"; + break; default: throw new Error(`Unknown mode: ${mode}`); } + return exec( + [ + "cargo run -p re_dev_tools -- build-web-viewer", + modeFlags, + "--target no-modules-base", + "--features grpc", + "-o rerun_js/web-viewer", + ].join(" "), + ); } function re_viewer_js() {