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

Add Rust example that plots GitHub stars over time #1358

Closed
wants to merge 48 commits into from

Conversation

emilk
Copy link
Member

@emilk emilk commented Feb 19, 2023

cargo r -p github_star_history -- rerun-io/rerun

I think this is a too much code and extra dependencies to bring on, but it is an interesting use-case, because it shows data over a long span of time, something we haven't tried before (though we know of users that do).

And indeed, this dog-fooding found a plethora of problem, with these fixes:

image

Perhaps the same thing could be accomplished with some short python code instead.

@emilk emilk added 🦀 Rust API Rust logging API examples Issues relating to the Rerun examples labels Feb 19, 2023
@emilk emilk mentioned this pull request Feb 21, 2023
3 tasks
@emilk emilk force-pushed the emilk/github-stars-example branch from c04af80 to 797e1c0 Compare February 22, 2023 13:21
emilk and others added 24 commits March 2, 2023 09:12
* Add a test of memory use when logging a lot of big images

* copy-pasta

Co-authored-by: Clement Rey <[email protected]>

* copy-pasta

Co-authored-by: Clement Rey <[email protected]>

* Add store archiving to the stack shortening

* fix feature name

---------

Co-authored-by: Clement Rey <[email protected]>
* Switch linting to ruff

* Updates from ruff linter

* Format pyproject.toml

* Document the ruff configuration

* Remove .flake8

* Add recommendation for ruff extension and config to use our pyproject.toml
* Don't convert u8 segmentation images to u16

* lints
* Fix analytics recording_source for Rust

We would always log `Python SDK` as the source

* New analytics event: data source

* Refactor: remove unused App::new

* new_recording -> open_recording

* Log `open_recording` event when opening files

* Store data_source as part of the LogDb and put it in the same avent

* Register what app environment we are running the viewer in

* Also register web viewer

* Add Python version

* More explicitly handle recording source in analytics

* compilation fix

* Fix web build

* Silence some clippy warnings on wasm builds

* rerun_cli

Co-authored-by: Clement Rey <[email protected]>

---------

Co-authored-by: Clement Rey <[email protected]>
* Serve a `serve_wasm` analytics event when serving a .wasm file

* silence warning on CI
* Add CpuWriteGpuReadBelt and use it for frameuniform buffer and colors as poc
* Limit number of in-flight queue submissions
* streamline host vs recording python/rust versions

* can't have it all

* just format

* no anonymous strings

* the Rerun CLI does carry a Rust version too

* fmt
* Put all all analytics into the prod bucket

* Add properties for debug-build and workspace

* workspace -> rerun_workspace
…_py (#1391)

* Make the native viewer an optional dependency of rerun, re_sdk, rerun_py

* Fix feature flag checking in code

* fix python's show() function

* Better error message

* Rename the "web" feature to "web_viewer"
* Remove derive_more dependency

* Add #[inline]
* Add the re_build_info and re_build_build_info crates

* Add datetime

* --version prints the full build info

* Add git branch and clean/dirty flag

* fix extra --dirty

* Fix analytics link

* Add note about not moving the viewer_analytics.rs file

* Add About-menu with version number, target triplet, and build date

also add link to rerun.io in it

* Add help-button to rerun menu

* Fix web build

* Add crate-level docs

* Rerun re_build_build_info when branch or commit hash changes

* Fix merge-snafu

* Ignore if the repo is dirty or clean
* Make with_prop more ergonomic

* Simplify event constructors

* Register events more ergonomic

* analytics is an acceptable label for CI
* Replace reqwest with ureq for less dependencies

* Simplify code

* Cleanup
* Refactor LogMsg-encoder to be a `struct`

* Small cleanup of Sender

* Refactor Session: extract the web-viewer connection

* Refactor Session::connect

* Log SDK: stream log data to file on disk

* Rust examples: --save streams to disk

* Python examples: start streaming to disk right away

* typo

Co-authored-by: Clement Rey <[email protected]>

---------

Co-authored-by: Clement Rey <[email protected]>
* utility function for uniform buffer from struct
* Uniform buffers are now compile time forced to be 256 bytes aligned
* CpuWriteGpuReadBelt no longer takes mutable buffer pool
* Renderers and frame_global_command_encoder are now behind locks
---------

Co-authored-by: Clement Rey <[email protected]>
* Fix dynamic resource pool handles not being stable on re-use
* Add test for dynamic resource pool handles not changing upon resource re-use
* DynamicResourcePool debug asserts now on missing resources on deallocation
…t` (#1417)

* introduce DeserializableComponent

* turn query_transform into a generic query_latest

* use DeserializableComponent everywhere it makes sense

* use SerializableComponent everywhere it makes sense

* self review

* addressed PR comments
…ring (#1419)

Or rather as a first and super easy step towards it. Also takes the first step towards supporting transparency, see #702
Replaces previous sorting key!

Very simple idea: Every `Renderer` is invoked with every `DrawPhase` it registered for.
`DrawPhase` have a strict order and implicitly describe the `wgpu::RenderPass` that is passed for drawing.

For now and forseeable future, these passes are managed by the ViewBuilder (unchanged!).
At some point we will probably make `DrawPhase` a more complex object, but this is not today!
* Parse the rust version into a semver-like struct

* Encode rust version in LogMsg streams, and warn on incompatibility

* Add explanation of how to treat alpha-releases

* Better error message

* Fix link in docstring
* Allow-list some words in our markdown docstrings

* Forbid a bunch of macros, functions and types

* name the threads

* Do not ignore errors

* Replace use of std::sync::Mutex with parking_lot::Mutex

* Warn on failure to spawn analytics threads instead of panicing
* Send analytics events with callstacks on panics and signals

* Trim everything leading up to `run_native_app`

* analytics is an acceptable label for CI

* Merge fix

* Include git branch and rust build date/time in default analytics

* Send analytics last

* Better function naming

* Include BuildInfo in crash report analytics

* Let's prefix the event names with what they are: crashes

* Unify how build-info is added to Event:s
emilk and others added 22 commits March 2, 2023 09:21
* Cut out all image dependencies except for png and jpeg

* Small refactor of re_log: split out a file

* deny.toml: remove recursive exceptions for `ring` and `winit`

* ci: cargo deny check all four target platforms

* fix cargo deny CI snafu

* Still I messed up the CI command
* Mesh renderer now takes a constant ctx
* mesh data upload works now entirely via CpuWriteGpuReadBelt
* simplify frame global uniform buffer handling
* fix calculating wrong size for mesh vertex buffer
* Remove show() function from Python SDK

* py-format/lint
* Improve PR template: remove line about changelog, and fix links

* Add instructions for how to fill our the CHANGELOG.md for new releases
* Create re_build_web_viewer

* Add a re_build_web_viewer binary

* Clean up re_build_web_viewer

* Clean up the build script

* Remove build_web.sh script

* Simplify build-script

* re_web_server binary: print out where we are hosting

* Use different .wasm and .js names for debug builds

* Fix

* add back warning

* Add crate-level docs

* Improve docstring

* Rename re_web_server to re_web_viewer_server

* Rename WebServer to WebViewerServer
Introduces `EditableAutoValue` and per-frame heuristic updates on properties. In the future we can build more properties on top of this and update them in a central place like done here
#1444)

* Add option to show performance metrics in the UI in release builds too

* Improve tooltip
* Fix: don't create a dummy LogDb when opening the Rerun Menu

* Add explanatory docstring
* Convert view_tensor to use the new native Tensors

* Limit F16 errors to the tensor module
* Fix type signature for tensor names

* Use Optional instead of |
…1438)

Overall they behave just like the labels for 2D objects because it's finally the exact same code \o/
Fixes  #429
* Add Zoom in/out/reset to command palette
* Use screen independent zoom factor and serialize it with app state
* Improve the docs of `connect` and `serve`

* Fix doctest
@emilk
Copy link
Member Author

emilk commented Mar 2, 2023

I don't know how I managed to cock-up git merge main, but I did 😭

Anyways - this pulls in far too many new dependencies. We should either port it to Python or put it in a separate repository.

@emilk emilk closed this Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Issues relating to the Rerun examples 🦀 Rust API Rust logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants