Skip to content

Commit

Permalink
Organize crates into folders
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Jul 9, 2024
1 parent 851e2bd commit 4f08070
Show file tree
Hide file tree
Showing 2,155 changed files with 2,414 additions and 2,355 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
- "**/*.rs"
- "**/*.toml"
- "**/yarn.lock"
- "crates/re_ui/data/**"
- "crates/viewer/re_ui/data/**"
rust-checks:
name: "Rust Checks"
Expand Down
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
.DS_Store

# Codegen stuff:
crates/re_types/source_hash.txt
crates/re_types_builder/source_hash.txt

# C++ and CMake stuff:
*.a
*.bin
*.o
**/arrow/
**/build/
/arrow/
/build/
**/build-msvc/
**/CMakeFiles/
**/CMakeCache.txt
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ rerun_py/docs/templates/**
rerun_js/web-viewer/re_viewer_bg.js
rerun_js/web-viewer/re_viewer.js
web_viewer/re_viewer.js
crates/re_web_viewer_server/web_viewer/re_viewer.js
crates/viewer/re_web_viewer_server/web_viewer/re_viewer.js

.pixi
/.nox
Expand Down
4 changes: 2 additions & 2 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
[files]
extend-exclude = [
".typos.toml",
"crates/re_ui/data/design_tokens.json",
"crates/re_ui/src/design_tokens.rs",
"crates/viewer/re_ui/data/design_tokens.json",
"crates/viewer/re_ui/src/design_tokens.rs",
"examples/assets",
"rerun_cpp/src/rerun/third_party/cxxopts.hpp",
]
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"--workspace",
"--message-format=json",
"--all-targets",
"--all-features" // --all-features will set the `__ci` feature flag, which stops crates/re_web_viewer_server/build.rs from building the web viewer
"--all-features" // --all-features will set the `__ci` feature flag, which stops re_web_viewer_server/build.rs from building the web viewer
],
"rust-analyzer.cargo.buildScripts.overrideCommand": [
"cargo",
Expand All @@ -27,7 +27,7 @@
"--workspace",
"--message-format=json",
"--all-targets",
"--all-features", // --all-features will set the `__ci` feature flag, which stops crates/re_web_viewer_server/build.rs from building the web viewer
"--all-features", // --all-features will set the `__ci` feature flag, which stops re_web_viewer_server/build.rs from building the web viewer
],
// Our build scripts are generating code.
// Having Rust Analyzer do this while doing other builds can lead to catastrophic failures.
Expand Down
16 changes: 8 additions & 8 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ NOTE: `.rrd` files do not yet guarantee any backwards or forwards compatibility.

## Technologies we use
### Apache Arrow
[Apache Arrow](https://arrow.apache.org/) is a language-independent columnar memory format for arbitrary data. We use it to encode the log data when transmitting it over the network or storing it in an `.rrd` file. We also use it in our in-RAM data store, [`re_chunk_store`](crates/re_chunk_store/README.md).
[Apache Arrow](https://arrow.apache.org/) is a language-independent columnar memory format for arbitrary data. We use it to encode the log data when transmitting it over the network or storing it in an `.rrd` file. We also use it in our in-RAM data store, [`re_chunk_store`](crates/store/re_chunk_store/README.md).

In Rust, we use the [`arrow2` crate](https://crates.io/crates/arrow2).

Expand All @@ -48,7 +48,7 @@ The Rerun Viewer uses the [`wgpu`](https://github.com/gfx-rs/wgpu) graphics API.

On web builds, we use WebGPU when available on the Web, but automatically fall back to a WebGL based emulation layer (with a more limited feature set).

We have written our own high-level rendering crate on top of `wgpu`, called [`re_renderer`](crates/re_renderer/README.md).
We have written our own high-level rendering crate on top of `wgpu`, called [`re_renderer`](crates/viewer/re_renderer/README.md).

### `egui`
The GUI in the Rerun Viewer is using [`egui`](https://www.egui.rs/), a cross-platform, [immediate mode GUI](https://github.com/emilk/egui#why-immediate-mode).
Expand Down Expand Up @@ -204,16 +204,16 @@ Update instructions:
|--------------------|--------------------------------------------------------------------------------------|
| re_analytics | Rerun's analytics SDK |
| re_case | Case conversions, the way Rerun likes them |
| re_log | Helpers for setting up and doing text logging in the Rerun crates. |
| re_crash_handler | Detect panics and signals, logging them and optionally sending them to analytics. |
| re_error | Helpers for handling errors. |
| re_format | Miscellaneous tools to format and parse numbers, durations, etc. |
| re_tuid | 128-bit Time-based Unique Identifier |
| re_string_interner | Yet another string interning library |
| re_tracing | Helpers for tracing/spans/flamegraphs and such. |
| re_crash_handler | Detect panics and signals, logging them and optionally sending them to analytics. |
| re_smart_channel | A channel that keeps track of latency and queue length. |
| re_int_histogram | A histogram with `i64` keys and `u32` counts, supporting both sparse and dense uses. |
| re_log | Helpers for setting up and doing text logging in the Rerun crates. |
| re_memory | Run-time memory tracking and profiling. |
| re_smart_channel | A channel that keeps track of latency and queue length. |
| re_string_interner | Yet another string interning library |
| re_tracing | Helpers for tracing/spans/flamegraphs and such. |
| re_tuid | 128-bit Time-based Unique Identifier |



Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ if(NOT WIN32)
endif()

# ------------------------------------------------------------------------------
add_subdirectory(crates/rerun_c) # The Rerun C SDK library, must be included before the C++ SDK.
add_subdirectory(crates/top/rerun_c) # The Rerun C SDK library, must be included before the C++ SDK.
add_subdirectory(rerun_cpp) # The Rerun C++ SDK library.
add_subdirectory(examples/cpp)
add_subdirectory(tests/cpp)
Expand Down
127 changes: 72 additions & 55 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[workspace]
resolver = "2"
members = [
"crates/*",
"crates/build/*",
"crates/store/*",
"crates/top/*",
"crates/utils/*",
"crates/viewer/*",
"docs/snippets",
"examples/rust/*",
"rerun_py",
Expand All @@ -28,60 +32,73 @@ version = "0.18.0-alpha.1+dev"
# This is because we treat alpha-releases as incompatible, but semver doesn't.
# In particular: if we compile rerun 0.3.0-alpha.0 we only want it to use
# re_log_types 0.3.0-alpha.0, NOT 0.3.0-alpha.4 even though it is newer and semver-compatible.
re_analytics = { path = "crates/re_analytics", version = "=0.18.0-alpha.1", default-features = false }
re_blueprint_tree = { path = "crates/re_blueprint_tree", version = "=0.18.0-alpha.1", default-features = false }
re_build_info = { path = "crates/re_build_info", version = "=0.18.0-alpha.1", default-features = false }
re_build_tools = { path = "crates/re_build_tools", version = "=0.18.0-alpha.1", default-features = false }
re_case = { path = "crates/re_case", version = "=0.18.0-alpha.1", default-features = false }
re_chunk = { path = "crates/re_chunk", version = "=0.18.0-alpha.1", default-features = false }
re_chunk_store = { path = "crates/re_chunk_store", version = "=0.18.0-alpha.1", default-features = false }
re_context_menu = { path = "crates/re_context_menu", version = "=0.18.0-alpha.1", default-features = false }
re_crash_handler = { path = "crates/re_crash_handler", version = "=0.18.0-alpha.1", default-features = false }
re_data_loader = { path = "crates/re_data_loader", version = "=0.18.0-alpha.1", default-features = false }
re_data_source = { path = "crates/re_data_source", version = "=0.18.0-alpha.1", default-features = false }
re_data_store = { path = "crates/re_data_store", version = "=0.18.0-alpha.1", default-features = false }
re_data_ui = { path = "crates/re_data_ui", version = "=0.18.0-alpha.1", default-features = false }
re_dev_tools = { path = "crates/re_dev_tools", version = "=0.18.0-alpha.1", default-features = false }
re_edit_ui = { path = "crates/re_edit_ui", version = "=0.18.0-alpha.1", default-features = false }
re_entity_db = { path = "crates/re_entity_db", version = "=0.18.0-alpha.1", default-features = false }
re_error = { path = "crates/re_error", version = "=0.18.0-alpha.1", default-features = false }
re_format = { path = "crates/re_format", version = "=0.18.0-alpha.1", default-features = false }
re_format_arrow = { path = "crates/re_format_arrow", version = "=0.18.0-alpha.1", default-features = false }
re_int_histogram = { path = "crates/re_int_histogram", version = "=0.18.0-alpha.1", default-features = false }
re_log = { path = "crates/re_log", version = "=0.18.0-alpha.1", default-features = false }
re_log_encoding = { path = "crates/re_log_encoding", version = "=0.18.0-alpha.1", default-features = false }
re_log_types = { path = "crates/re_log_types", version = "=0.18.0-alpha.1", default-features = false }
re_memory = { path = "crates/re_memory", version = "=0.18.0-alpha.1", default-features = false }
re_query = { path = "crates/re_query", version = "=0.18.0-alpha.1", default-features = false }
re_renderer = { path = "crates/re_renderer", version = "=0.18.0-alpha.1", default-features = false }
re_sdk = { path = "crates/re_sdk", version = "=0.18.0-alpha.1", default-features = false }
re_sdk_comms = { path = "crates/re_sdk_comms", version = "=0.18.0-alpha.1", default-features = false }
re_selection_panel = { path = "crates/re_selection_panel", version = "=0.18.0-alpha.1", default-features = false }
re_smart_channel = { path = "crates/re_smart_channel", version = "=0.18.0-alpha.1", default-features = false }
re_space_view = { path = "crates/re_space_view", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_bar_chart = { path = "crates/re_space_view_bar_chart", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_dataframe = { path = "crates/re_space_view_dataframe", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_spatial = { path = "crates/re_space_view_spatial", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_tensor = { path = "crates/re_space_view_tensor", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_text_document = { path = "crates/re_space_view_text_document", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_text_log = { path = "crates/re_space_view_text_log", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_time_series = { path = "crates/re_space_view_time_series", version = "=0.18.0-alpha.1", default-features = false }
re_string_interner = { path = "crates/re_string_interner", version = "=0.18.0-alpha.1", default-features = false }
re_time_panel = { path = "crates/re_time_panel", version = "=0.18.0-alpha.1", default-features = false }
re_tracing = { path = "crates/re_tracing", version = "=0.18.0-alpha.1", default-features = false }
re_tuid = { path = "crates/re_tuid", version = "=0.18.0-alpha.1", default-features = false }
re_types = { path = "crates/re_types", version = "=0.18.0-alpha.1", default-features = false }
re_types_blueprint = { path = "crates/re_types_blueprint", version = "=0.18.0-alpha.1", default-features = false }
re_types_builder = { path = "crates/re_types_builder", version = "=0.18.0-alpha.1", default-features = false }
re_types_core = { path = "crates/re_types_core", version = "=0.18.0-alpha.1", default-features = false }
re_ui = { path = "crates/re_ui", version = "=0.18.0-alpha.1", default-features = false }
re_viewer = { path = "crates/re_viewer", version = "=0.18.0-alpha.1", default-features = false }
re_viewer_context = { path = "crates/re_viewer_context", version = "=0.18.0-alpha.1", default-features = false }
re_viewport = { path = "crates/re_viewport", version = "=0.18.0-alpha.1", default-features = false }
re_viewport_blueprint = { path = "crates/re_viewport_blueprint", version = "=0.18.0-alpha.1", default-features = false }
re_web_viewer_server = { path = "crates/re_web_viewer_server", version = "=0.18.0-alpha.1", default-features = false }
re_ws_comms = { path = "crates/re_ws_comms", version = "=0.18.0-alpha.1", default-features = false }
rerun = { path = "crates/rerun", version = "=0.18.0-alpha.1", default-features = false }

# crates/build:
re_build_info = { path = "crates/build/re_build_info", version = "=0.18.0-alpha.1", default-features = false }
re_build_tools = { path = "crates/build/re_build_tools", version = "=0.18.0-alpha.1", default-features = false }
re_dev_tools = { path = "crates/build/re_dev_tools", version = "=0.18.0-alpha.1", default-features = false }
re_types_builder = { path = "crates/build/re_types_builder", version = "=0.18.0-alpha.1", default-features = false }

# crates/store:
re_chunk = { path = "crates/store/re_chunk", version = "=0.18.0-alpha.1", default-features = false }
re_chunk_store = { path = "crates/store/re_chunk_store", version = "=0.18.0-alpha.1", default-features = false }
re_data_loader = { path = "crates/store/re_data_loader", version = "=0.18.0-alpha.1", default-features = false }
re_data_source = { path = "crates/store/re_data_source", version = "=0.18.0-alpha.1", default-features = false }
re_data_store = { path = "crates/store/re_data_store", version = "=0.18.0-alpha.1", default-features = false }
re_entity_db = { path = "crates/store/re_entity_db", version = "=0.18.0-alpha.1", default-features = false }
re_format_arrow = { path = "crates/store/re_format_arrow", version = "=0.18.0-alpha.1", default-features = false }
re_log_encoding = { path = "crates/store/re_log_encoding", version = "=0.18.0-alpha.1", default-features = false }
re_log_types = { path = "crates/store/re_log_types", version = "=0.18.0-alpha.1", default-features = false }
re_query = { path = "crates/store/re_query", version = "=0.18.0-alpha.1", default-features = false }
re_sdk_comms = { path = "crates/store/re_sdk_comms", version = "=0.18.0-alpha.1", default-features = false }
re_types = { path = "crates/store/re_types", version = "=0.18.0-alpha.1", default-features = false }
re_types_blueprint = { path = "crates/store/re_types_blueprint", version = "=0.18.0-alpha.1", default-features = false }
re_types_core = { path = "crates/store/re_types_core", version = "=0.18.0-alpha.1", default-features = false }
re_ws_comms = { path = "crates/store/re_ws_comms", version = "=0.18.0-alpha.1", default-features = false }

# crates/top:
re_sdk = { path = "crates/top/re_sdk", version = "=0.18.0-alpha.1", default-features = false }
rerun = { path = "crates/top/rerun", version = "=0.18.0-alpha.1", default-features = false }
rerun_c = { path = "crates/top/rerun_c", version = "=0.18.0-alpha.1", default-features = false }
rerun-cli = { path = "crates/top/rerun-cli", version = "=0.18.0-alpha.1", default-features = false }

# crates/utils:
re_analytics = { path = "crates/utils/re_analytics", version = "=0.18.0-alpha.1", default-features = false }
re_case = { path = "crates/utils/re_case", version = "=0.18.0-alpha.1", default-features = false }
re_crash_handler = { path = "crates/utils/re_crash_handler", version = "=0.18.0-alpha.1", default-features = false }
re_error = { path = "crates/utils/re_error", version = "=0.18.0-alpha.1", default-features = false }
re_format = { path = "crates/utils/re_format", version = "=0.18.0-alpha.1", default-features = false }
re_int_histogram = { path = "crates/utils/re_int_histogram", version = "=0.18.0-alpha.1", default-features = false }
re_log = { path = "crates/utils/re_log", version = "=0.18.0-alpha.1", default-features = false }
re_memory = { path = "crates/utils/re_memory", version = "=0.18.0-alpha.1", default-features = false }
re_smart_channel = { path = "crates/utils/re_smart_channel", version = "=0.18.0-alpha.1", default-features = false }
re_string_interner = { path = "crates/utils/re_string_interner", version = "=0.18.0-alpha.1", default-features = false }
re_tracing = { path = "crates/utils/re_tracing", version = "=0.18.0-alpha.1", default-features = false }
re_tuid = { path = "crates/utils/re_tuid", version = "=0.18.0-alpha.1", default-features = false }

# crates/viewer:
re_blueprint_tree = { path = "crates/viewer/re_blueprint_tree", version = "=0.18.0-alpha.1", default-features = false }
re_context_menu = { path = "crates/viewer/re_context_menu", version = "=0.18.0-alpha.1", default-features = false }
re_data_ui = { path = "crates/viewer/re_data_ui", version = "=0.18.0-alpha.1", default-features = false }
re_edit_ui = { path = "crates/viewer/re_edit_ui", version = "=0.18.0-alpha.1", default-features = false }
re_renderer = { path = "crates/viewer/re_renderer", version = "=0.18.0-alpha.1", default-features = false }
re_renderer_examples = { path = "crates/viewer/re_renderer_examples", version = "=0.18.0-alpha.1", default-features = false }
re_selection_panel = { path = "crates/viewer/re_selection_panel", version = "=0.18.0-alpha.1", default-features = false }
re_space_view = { path = "crates/viewer/re_space_view", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_bar_chart = { path = "crates/viewer/re_space_view_bar_chart", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_dataframe = { path = "crates/viewer/re_space_view_dataframe", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_spatial = { path = "crates/viewer/re_space_view_spatial", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_tensor = { path = "crates/viewer/re_space_view_tensor", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_text_document = { path = "crates/viewer/re_space_view_text_document", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_text_log = { path = "crates/viewer/re_space_view_text_log", version = "=0.18.0-alpha.1", default-features = false }
re_space_view_time_series = { path = "crates/viewer/re_space_view_time_series", version = "=0.18.0-alpha.1", default-features = false }
re_time_panel = { path = "crates/viewer/re_time_panel", version = "=0.18.0-alpha.1", default-features = false }
re_ui = { path = "crates/viewer/re_ui", version = "=0.18.0-alpha.1", default-features = false }
re_viewer = { path = "crates/viewer/re_viewer", version = "=0.18.0-alpha.1", default-features = false }
re_viewer_context = { path = "crates/viewer/re_viewer_context", version = "=0.18.0-alpha.1", default-features = false }
re_viewport = { path = "crates/viewer/re_viewport", version = "=0.18.0-alpha.1", default-features = false }
re_viewport_blueprint = { path = "crates/viewer/re_viewport_blueprint", version = "=0.18.0-alpha.1", default-features = false }
re_web_viewer_server = { path = "crates/viewer/re_web_viewer_server", version = "=0.18.0-alpha.1", default-features = false }

# egui-crates:
ecolor = "0.28.1"
Expand Down
1 change: 1 addition & 0 deletions crates/build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Crates run at build-time
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions crates/build/re_types_builder/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source_hash.txt
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 4f08070

Please sign in to comment.