diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 85b531967c62..9e38ba1cd9a1 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -88,11 +88,11 @@ Of course, this will only take us so far. In the future we plan on caching queri Here is an overview of the crates included in the project: - - - - - + + + + + @@ -163,8 +163,8 @@ Update instructions: |-----------------------|--------------------------------------------------------------------------| | re_dataframe | The Rerun public data APIs. | | re_entity_db | In-memory storage of Rerun entities | -| re_grpc_types | Rerun remote store gRPC API types | | re_log_encoding | Helpers for encoding and transporting Rerun log messages | +| re_protos | Rerun remote store gRPC API types | | re_query | Querying data in the re_chunk_store | | re_types | The built-in Rerun data types, component types, and archetypes. | | re_types_blueprint | The core traits and types that power Rerun's Blueprint sub-system. | @@ -200,7 +200,7 @@ Update instructions: | re_build_info | Information about the build. Use together with re_build_tools | | re_build_tools | build.rs helpers for generating build info | | re_dev_tools | Various tools for Rerun development. Each tool has a subcommand. | -| re_grpc_types_builder | Generates code for Rerun remote store gRPC API | +| re_protos_builder | Generates code for Rerun remote store gRPC API | | re_types_builder | Generates code for Rerun's SDKs from flatbuffers definitions. | diff --git a/Cargo.lock b/Cargo.lock index 13b44917e598..a4ed0f08ea95 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5684,9 +5684,9 @@ version = "0.20.0-alpha.1+dev" dependencies = [ "re_chunk", "re_error", - "re_grpc_types", "re_log", "re_log_types", + "re_protos", "re_smart_channel", "thiserror", "tokio", @@ -5696,28 +5696,6 @@ dependencies = [ "wasm-bindgen-futures", ] -[[package]] -name = "re_grpc_types" -version = "0.20.0-alpha.1+dev" -dependencies = [ - "prost", - "re_arrow2", - "re_dataframe", - "re_log_types", - "thiserror", - "tonic", - "tonic-web-wasm-client", -] - -[[package]] -name = "re_grpc_types_builder" -version = "0.20.0-alpha.1+dev" -dependencies = [ - "camino", - "re_log", - "tonic-build", -] - [[package]] name = "re_int_histogram" version = "0.20.0-alpha.1+dev" @@ -5852,6 +5830,28 @@ dependencies = [ "thiserror", ] +[[package]] +name = "re_protos" +version = "0.20.0-alpha.1+dev" +dependencies = [ + "prost", + "re_arrow2", + "re_dataframe", + "re_log_types", + "thiserror", + "tonic", + "tonic-web-wasm-client", +] + +[[package]] +name = "re_protos_builder" +version = "0.20.0-alpha.1+dev" +dependencies = [ + "camino", + "re_log", + "tonic-build", +] + [[package]] name = "re_query" version = "0.20.0-alpha.1+dev" @@ -6986,10 +6986,10 @@ dependencies = [ "re_chunk", "re_chunk_store", "re_dataframe", - "re_grpc_types", "re_log", "re_log_types", "re_memory", + "re_protos", "re_sdk", "re_video", "re_web_viewer_server", diff --git a/Cargo.toml b/Cargo.toml index 112d757bf640..f488da41867e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ version = "0.20.0-alpha.1+dev" re_build_info = { path = "crates/build/re_build_info", version = "=0.20.0-alpha.1", default-features = false } re_build_tools = { path = "crates/build/re_build_tools", version = "=0.20.0-alpha.1", default-features = false } re_dev_tools = { path = "crates/build/re_dev_tools", version = "=0.20.0-alpha.1", default-features = false } -re_grpc_types_builder = { path = "crates/build/re_grpc_types_builder", version = "=0.20.0-alpha.1", default-features = false } +re_protos_builder = { path = "crates/build/re_protos_builder", version = "=0.20.0-alpha.1", default-features = false } re_types_builder = { path = "crates/build/re_types_builder", version = "=0.20.0-alpha.1", default-features = false } # crates/store: @@ -49,7 +49,7 @@ re_dataframe = { path = "crates/store/re_dataframe", version = "=0.20.0-alpha.1" re_entity_db = { path = "crates/store/re_entity_db", version = "=0.20.0-alpha.1", default-features = false } re_format_arrow = { path = "crates/store/re_format_arrow", version = "=0.20.0-alpha.1", default-features = false } re_grpc_client = { path = "crates/store/re_grpc_client", version = "=0.20.0-alpha.1", default-features = false } -re_grpc_types = { path = "crates/store/re_grpc_types", version = "=0.20.0-alpha.1", default-features = false } +re_protos = { path = "crates/store/re_protos", version = "=0.20.0-alpha.1", default-features = false } re_log_encoding = { path = "crates/store/re_log_encoding", version = "=0.20.0-alpha.1", default-features = false } re_log_types = { path = "crates/store/re_log_types", version = "=0.20.0-alpha.1", default-features = false } re_query = { path = "crates/store/re_query", version = "=0.20.0-alpha.1", default-features = false } diff --git a/crates/build/re_grpc_types_builder/Cargo.toml b/crates/build/re_protos_builder/Cargo.toml similarity index 94% rename from crates/build/re_grpc_types_builder/Cargo.toml rename to crates/build/re_protos_builder/Cargo.toml index 59598142160f..2c58cf26867b 100644 --- a/crates/build/re_grpc_types_builder/Cargo.toml +++ b/crates/build/re_protos_builder/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "re_grpc_types_builder" +name = "re_protos_builder" authors.workspace = true edition.workspace = true homepage.workspace = true diff --git a/crates/build/re_grpc_types_builder/README.md b/crates/build/re_protos_builder/README.md similarity index 54% rename from crates/build/re_grpc_types_builder/README.md rename to crates/build/re_protos_builder/README.md index f8287d209b03..c5079a47d4d8 100644 --- a/crates/build/re_grpc_types_builder/README.md +++ b/crates/build/re_protos_builder/README.md @@ -1,9 +1,9 @@ -# re_grpc_types_builder +# re_protos_builder Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. -[![Latest version](https://img.shields.io/crates/v/re_grpc_types_builder.svg)](https://crates.io/crates/re_grpc_types_builder?speculative-link) -[![Documentation](https://docs.rs/re_grpc_types_builder/badge.svg)](https://docs.rs/re_grpc_types_builder?speculative-link) +[![Latest version](https://img.shields.io/crates/v/re_protos_builder.svg)](https://crates.io/crates/re_protos_builder?speculative-link) +[![Documentation](https://docs.rs/re_protos_builder/badge.svg)](https://docs.rs/re_protos_builder?speculative-link) ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) ![Apache](https://img.shields.io/badge/license-Apache-blue.svg) diff --git a/crates/build/re_grpc_types_builder/src/bin/build_re_remote_store_types.rs b/crates/build/re_protos_builder/src/bin/build_re_remote_store_types.rs similarity index 85% rename from crates/build/re_grpc_types_builder/src/bin/build_re_remote_store_types.rs rename to crates/build/re_protos_builder/src/bin/build_re_remote_store_types.rs index 939371458186..9afb8c37f9bf 100644 --- a/crates/build/re_grpc_types_builder/src/bin/build_re_remote_store_types.rs +++ b/crates/build/re_protos_builder/src/bin/build_re_remote_store_types.rs @@ -7,9 +7,9 @@ use camino::Utf8Path; -const PROTOBUF_DEFINITIONS_DIR_PATH: &str = "crates/store/re_grpc_types/proto"; +const PROTOBUF_DEFINITIONS_DIR_PATH: &str = "crates/store/re_protos/proto"; const PROTOBUF_REMOTE_STORE_V0_RELATIVE_PATH: &str = "rerun/v0/remote_store.proto"; -const RUST_V0_OUTPUT_DIR_PATH: &str = "crates/store/re_grpc_types/src/v0"; +const RUST_V0_OUTPUT_DIR_PATH: &str = "crates/store/re_protos/src/v0"; fn main() { re_log::setup_logging(); @@ -35,7 +35,7 @@ fn main() { "Running codegen for storage node types", ); - re_grpc_types_builder::generate_rust_code( + re_protos_builder::generate_rust_code( definitions_dir_path, &[PROTOBUF_REMOTE_STORE_V0_RELATIVE_PATH], rust_generated_output_dir_path, diff --git a/crates/build/re_grpc_types_builder/src/lib.rs b/crates/build/re_protos_builder/src/lib.rs similarity index 91% rename from crates/build/re_grpc_types_builder/src/lib.rs rename to crates/build/re_protos_builder/src/lib.rs index e1efe6a137ec..30315aa559ec 100644 --- a/crates/build/re_grpc_types_builder/src/lib.rs +++ b/crates/build/re_protos_builder/src/lib.rs @@ -1,5 +1,5 @@ //! This crate contains logic for generating remote store gRPC API types as defined in -//! `re_grpc_types` proto files. We are currently generating both client and server +//! `re_protos` proto files. We are currently generating both client and server //! definitions in the same file. //! diff --git a/crates/store/re_grpc_client/Cargo.toml b/crates/store/re_grpc_client/Cargo.toml index b9eccc6f8297..c3e685a2a893 100644 --- a/crates/store/re_grpc_client/Cargo.toml +++ b/crates/store/re_grpc_client/Cargo.toml @@ -24,7 +24,7 @@ re_chunk.workspace = true re_error.workspace = true re_log_types.workspace = true re_log.workspace = true -re_grpc_types.workspace = true +re_protos.workspace = true re_smart_channel.workspace = true thiserror.workspace = true diff --git a/crates/store/re_grpc_client/src/lib.rs b/crates/store/re_grpc_client/src/lib.rs index 9f98b0a59b9e..767ed1dd28f3 100644 --- a/crates/store/re_grpc_client/src/lib.rs +++ b/crates/store/re_grpc_client/src/lib.rs @@ -9,15 +9,15 @@ pub use address::{Address, InvalidAddressError}; use std::{error::Error, str::FromStr}; use re_chunk::Chunk; -use re_grpc_types::{ +use re_log_types::{ + ApplicationId, LogMsg, SetStoreInfo, StoreId, StoreInfo, StoreKind, StoreSource, Time, +}; +use re_protos::{ codec::{decode, CodecError}, v0::{ storage_node_client::StorageNodeClient, EncoderVersion, FetchRecordingRequest, RecordingId, }, }; -use re_log_types::{ - ApplicationId, LogMsg, SetStoreInfo, StoreId, StoreInfo, StoreKind, StoreSource, Time, -}; // ---------------------------------------------------------------------------- diff --git a/crates/store/re_grpc_types/.gitattributes b/crates/store/re_protos/.gitattributes similarity index 100% rename from crates/store/re_grpc_types/.gitattributes rename to crates/store/re_protos/.gitattributes diff --git a/crates/store/re_grpc_types/Cargo.toml b/crates/store/re_protos/Cargo.toml similarity index 97% rename from crates/store/re_grpc_types/Cargo.toml rename to crates/store/re_protos/Cargo.toml index 8978cae6a85a..509fff8e79ac 100644 --- a/crates/store/re_grpc_types/Cargo.toml +++ b/crates/store/re_protos/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "re_grpc_types" +name = "re_protos" authors.workspace = true edition.workspace = true homepage.workspace = true diff --git a/crates/store/re_grpc_types/README.md b/crates/store/re_protos/README.md similarity index 62% rename from crates/store/re_grpc_types/README.md rename to crates/store/re_protos/README.md index d40620fa8b7f..e180a279f974 100644 --- a/crates/store/re_grpc_types/README.md +++ b/crates/store/re_protos/README.md @@ -1,9 +1,9 @@ -# re_grpc_types +# re_protos Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. -[![Latest version](https://img.shields.io/crates/v/re_grpc_types.svg)](https://crates.io/crates/re_grpc_types?speculative-link) -[![Documentation](https://docs.rs/re_grpc_types/badge.svg)](https://docs.rs/re_grpc_types?speculative-link) +[![Latest version](https://img.shields.io/crates/v/re_protos.svg)](https://crates.io/crates/re_protos?speculative-link) +[![Documentation](https://docs.rs/re_protos/badge.svg)](https://docs.rs/re_protos?speculative-link) ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) ![Apache](https://img.shields.io/badge/license-Apache-blue.svg) diff --git a/crates/store/re_grpc_types/proto/rerun/v0/common.proto b/crates/store/re_protos/proto/rerun/v0/common.proto similarity index 100% rename from crates/store/re_grpc_types/proto/rerun/v0/common.proto rename to crates/store/re_protos/proto/rerun/v0/common.proto diff --git a/crates/store/re_grpc_types/proto/rerun/v0/remote_store.proto b/crates/store/re_protos/proto/rerun/v0/remote_store.proto similarity index 100% rename from crates/store/re_grpc_types/proto/rerun/v0/remote_store.proto rename to crates/store/re_protos/proto/rerun/v0/remote_store.proto diff --git a/crates/store/re_grpc_types/src/codec.rs b/crates/store/re_protos/src/codec.rs similarity index 100% rename from crates/store/re_grpc_types/src/codec.rs rename to crates/store/re_protos/src/codec.rs diff --git a/crates/store/re_grpc_types/src/lib.rs b/crates/store/re_protos/src/lib.rs similarity index 99% rename from crates/store/re_grpc_types/src/lib.rs rename to crates/store/re_protos/src/lib.rs index 90808755ca26..621286d66196 100644 --- a/crates/store/re_grpc_types/src/lib.rs +++ b/crates/store/re_protos/src/lib.rs @@ -1,5 +1,5 @@ //! This crate contains generated types for the remote store gRPC service API. -//! Generation is done using the `re_grpc_types_builder` crate. +//! Generation is done using the `re_protos_builder` crate. //! //! We want clear separation between 'internal' types and gRPC types and don't want //! to use gRPC types in the rerun viewer codebase. That's why we implement all the diff --git a/crates/store/re_grpc_types/src/v0/rerun.remote_store.v0.rs b/crates/store/re_protos/src/v0/rerun.remote_store.v0.rs similarity index 100% rename from crates/store/re_grpc_types/src/v0/rerun.remote_store.v0.rs rename to crates/store/re_protos/src/v0/rerun.remote_store.v0.rs diff --git a/pixi.toml b/pixi.toml index 2be729be44f8..b5c537c883e2 100644 --- a/pixi.toml +++ b/pixi.toml @@ -126,7 +126,7 @@ check-env = "python scripts/check_env.py" codegen = "cargo --quiet run --package re_types_builder -- " # Run the codegen for remote store types. -codegen-rstore = "cargo --quiet run --package re_grpc_types_builder && pixi run -e cpp format" +codegen-rstore = "cargo --quiet run --package re_protos_builder && pixi run -e cpp format" # Generate the Rerun CLI manual. diff --git a/rerun_py/Cargo.toml b/rerun_py/Cargo.toml index 775fd35caa9d..fd4833e1e10f 100644 --- a/rerun_py/Cargo.toml +++ b/rerun_py/Cargo.toml @@ -37,7 +37,7 @@ nasm = ["re_video/nasm"] remote = [ "dep:object_store", - "dep:re_grpc_types", + "dep:re_protos", "dep:re_ws_comms", "dep:tokio", "dep:tonic", @@ -85,7 +85,7 @@ uuid.workspace = true # Deps for remote feature object_store = { workspace = true, optional = true, features = ["aws"] } -re_grpc_types = { workspace = true, optional = true } +re_protos = { workspace = true, optional = true } tokio = { workspace = true, optional = true } # Not used yet, but we will need it when we start streaming data #tokio-stream = { workspace = true, optional = true } diff --git a/rerun_py/src/remote.rs b/rerun_py/src/remote.rs index 291224aad99f..7653b4d4a0c1 100644 --- a/rerun_py/src/remote.rs +++ b/rerun_py/src/remote.rs @@ -3,7 +3,7 @@ use arrow::{array::ArrayData, pyarrow::PyArrowType}; // False positive due to #[pyfunction] macro use pyo3::{exceptions::PyRuntimeError, prelude::*, types::PyDict, Bound, PyResult}; use re_chunk::TransportChunk; -use re_grpc_types::v0::{ +use re_protos::v0::{ storage_node_client::StorageNodeClient, EncoderVersion, ListRecordingsRequest, RecordingMetadata, RecordingType, RegisterRecordingRequest, }; @@ -189,7 +189,7 @@ impl MetadataLike { /// The info for a recording stored in the archive. #[pyclass(name = "RecordingInfo")] pub struct PyRecordingInfo { - info: re_grpc_types::v0::RecordingInfo, + info: re_protos::v0::RecordingInfo, } #[pymethods] diff --git a/scripts/lint.py b/scripts/lint.py index 179df6082a84..6ada62a3e54e 100755 --- a/scripts/lint.py +++ b/scripts/lint.py @@ -1204,7 +1204,7 @@ def main() -> None: "./.pytest_cache", "./CODE_STYLE.md", "./crates/build/re_types_builder/src/reflection.rs", # auto-generated - "./crates/store/re_grpc_types/src/v0/rerun.remote_store.v0.rs", # auto-generated + "./crates/store/re_protos/src/v0/rerun.remote_store.v0.rs", # auto-generated "./docs/content/concepts/app-model.md", # this really needs custom letter casing "./docs/content/reference/cli.md", # auto-generated "./docs/snippets/all/tutorials/custom-application-id.cpp", # nuh-uh, I don't want rerun_example_ here