Skip to content

Conversation

@emilk
Copy link
Member

@emilk emilk commented May 22, 2023

Closes #1997
Closes #2177

Sibling PR:

What

cargo install rerun-cli installs the rerun binary.

This follows the pattern of e.g. the wasm-bindgen-cli crate which installs the wasm-bindgen binary, while there is also the wasm-bindgen library crate.

At the same time, cargo add rerun adds the rerun library dependency, but WITHOUT the native_viewer and web_viewer dependencies (the former one adds a lot of compile time). This is a great improvement for most users that are only using rerun as a logging library.

When developing, the preferred way of running the rerun binary is now with cargo rerun.

Future work

We could move the whole run.rs part of rerun to rerun-cli and have rerun_py depend on the latter instead of the former. This would allow us to remove even more dependencies from rerun, improving its compile-time further

Checklist

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

emilk added 2 commits May 22, 2023 22:13
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.
Users will now install the `rerun` binary with `cargo install rerun-cli`
@emilk emilk added 🧑‍💻 dev experience developer experience (excluding CI) dependencies concerning crates, pip packages etc ⏱ build-times compilation times labels May 22, 2023
@emilk emilk marked this pull request as ready for review May 22, 2023 21:09
@Wumpf Wumpf self-requested a review May 23, 2023 06:31
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

I like how this promotes a much faster way of working with rerun from rust (no native & webviewer, connect to installed)
it highlights though that we don't have an example illustrating that workflow though 🤔

checks all out for me, let's do this :)

@emilk emilk merged commit 9cb1685 into main May 23, 2023
@emilk emilk deleted the emilk/rerun-cli branch May 23, 2023 19:50
@emilk emilk mentioned this pull request May 24, 2023
emilk added a commit that referenced this pull request May 25, 2023
* Remove `native_viewer` from the default features of `rerun` crate

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.

* Add rerun-cli

Users will now install the `rerun` binary with `cargo install rerun-cli`

* Add a README.md

* better text about how to run examples

Co-authored-by: Andreas Reich <[email protected]>

* Improve docs

* Update RELEASES.md

* Add checking of the docs to the release process

---------

Co-authored-by: Andreas Reich <[email protected]>
@emilk emilk mentioned this pull request May 25, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⏱ build-times compilation times dependencies concerning crates, pip packages etc 🧑‍💻 dev experience developer experience (excluding CI)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rerun library has native_viewer feature on by default

3 participants