Skip to main content

Crate re_web_viewer_server

Crate re_web_viewer_server 

Source
Expand description

Serves the web viewer wasm/html.

§Feature flags

  • __disable_server — This crate embeds the web viewer .wasm, and so before building this crate you must build the .wasm using pixi run rerun-build-web-release.

    If for some reason you need to build this crate without the .wasm being built, then you can do so in one of two ways:

    • Use --features __disable_server when building this crate (or --all-features).
    • Compile with the env-var RERUN_DISABLE_WEB_VIEWER_SERVER=1

    This will cause this crate to build despite the .wasm being missing, BUT it will panic at runtime! For instance: when rustdoc builds the docs for this crates, it uses --all-features, which means it can build the docs for this crate without having to build the web-viewer first. Similarly, our CI will enable RERUN_DISABLE_WEB_VIEWER_SERVER=1 before building unit tests, because none of the unit tests actually rely on us serving the .wasm file.

  • __trailing_web_viewer — Build the binary to expect web viewer assets in trailing data. This can be enabled in two ways:

    • Compile with the env-var RERUN_TRAILING_WEB_VIEWER=1
    • Use --features __trailing_web_viewer when building this crate

    When enabled, the binary will NOT include the web viewer assets at compile time. Instead, it expects them to be appended as a zip archive via a post-processing step using scripts/append_web_viewer.py. This allows parallel building of CLI and web viewer in CI, which are then combined later.

    WARNING: Binaries built this way CANNOT serve the web viewer until the post-processing step is completed. Attempting to do so will result in a panic.

  • analytics — Enable anonymized telemetry using our analytics SDK.

Structs§

WebViewerServer
HTTP host for the Rerun Web Viewer application This serves the HTTP+Wasm+JS files that make up the web-viewer.
WebViewerServerPort
Typed port for use with WebViewerServer

Enums§

WebViewerServerError
Failure to host the web viewer.

Constants§

DEFAULT_WEB_VIEWER_SERVER_PORT