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

cargo install rerun-cli #2183

Merged
merged 7 commits into from
May 23, 2023
Merged

cargo install rerun-cli #2183

merged 7 commits into from
May 23, 2023

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 :)

BUILD.md Outdated Show resolved Hide resolved
crates/rerun-cli/Cargo.toml Show resolved Hide resolved
emilk and others added 3 commits May 23, 2023 09:13
@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 <andreas@rerun.io>

* Improve docs

* Update RELEASES.md

* Add checking of the docs to the release process

---------

Co-authored-by: Andreas Reich <andreas@rerun.io>
@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
2 participants