Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove native_viewer from the default features of rerun crate #2177

Closed
wants to merge 1 commit into from

Conversation

emilk
Copy link
Member

@emilk emilk commented May 20, 2023

Closes #1997

What

Most of our users only use the rerun library as a logging library but are still paying the cost of compiling the native viewer.

With this PR, the rerun crate will not have the native_viewer (nor web_viewer) feature on by default. This halves the compilation time on my computer. It also reduces the chance of crate mismatch (we've had users complaining about us using an older wgpu than they, even though they only use rerun for logging).

The native_viewer feature is only for users using the show or spawn features, which will hopefully be removed soon anyway:

To install the rerun binary with native_viewer and web_viewer, you now have to run cargo install rerun --features binary. This will be improved by:

To make things nicer for us developers, I've added cargo rerun as a shorthand for compiling and running rerun with the native_viewer feature, but NOT the web_viewer feature.

Checklist

PR Build Summary: https://build.rerun.io/pr/2177

Closes #1997

Most of our users only use the `rerun` library as a logging library
but are still paying the cost of compiling the native viewer.

With this PR, the `rerun` crate will not have the `native_viewer`
(not `web_viewer`) feature on by default. This halves the compilation
time on my computer.

The `native_viewer` feature is only for users using the `show`
or `spawn` features, which will hopefully be removed soon anyay:
* #2109

To install the `rerun` binary with `native_viewer` and `web_viewer`,
you now have to run `cargo install rerun --features binary`.
This will be improved by:
* #2108

To make things nicer for us developers, I've added `cargo rerun` as a
shorthand for compiling and running `rerun` with the `native_viewer`
feature, but NOT the `web_viewer` feature.
@emilk emilk added 🦀 Rust API Rust logging API 🧑‍💻 dev experience developer experience (excluding CI) ⏱ build-times compilation times labels May 20, 2023
@emilk emilk mentioned this pull request May 20, 2023
@jleibs
Copy link
Member

jleibs commented May 20, 2023

If you now have to install the target with different flags from used in the common library case I'm not sure I see a material value compared to just having a dedicated viewer crate:

cargo install rerun-cli seems both shorter and more consistent with established conventions in other packages.

@emilk
Copy link
Member Author

emilk commented May 22, 2023

Yeah, cargo install rerun-cli should be easy enough to whip up, and sounds like a good solution to this snafu

@emilk emilk marked this pull request as draft May 22, 2023 20:13
@emilk
Copy link
Member Author

emilk commented May 22, 2023

I'm trying it out in #2183

@emilk emilk mentioned this pull request May 23, 2023
1 task
@emilk emilk closed this in #2183 May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⏱ build-times compilation times 🧑‍💻 dev experience developer experience (excluding CI) 🦀 Rust API Rust logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rerun library has native_viewer feature on by default
2 participants