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

Introduce re_types_core #3878

Merged
merged 13 commits into from Oct 16, 2023
Merged

Introduce re_types_core #3878

merged 13 commits into from Oct 16, 2023

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Oct 16, 2023

This PR introduces a new crate: re_types_core.

re_types_core only contains the fundamental traits and types that make up Rerun's data model.
It is split off from the existing re_types.

This makes it possible to work with our data model abstractions without having to depend on the re_types behemoth.
This is more than a DX improvement: since so many things depend directly or indirectly on re_types, it is very easy to end-up with unsolvable dependency cycles. This helps with that in some cases (though certainly not all).

In particular, re_tuid (and by extension re_format) are now completely free of re_types.

For convenience, re_types reexports all of re_types_core, so the public API looks unchanged.
In a handful of instances (re_arrow_store, re_data_store, re_log_types, re_query), I've went the extra mile and started porting these crates towards raw re_types_core rather than relying on the reexports.
The reason is that, upon closer inspection, these crates are very close to being able to live free of re_types. In the future, the custom crate and custom module attributes coming with #3741 might allow us to make these independent.

Similarly, the codegen now uses re_types_core directly, as that makes the life of the upcoming "serde-codegen" work much easier.

What

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested demo.rerun.io (if applicable)
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@teh-cmc teh-cmc added 🦀 Rust API Rust logging API 🧑‍💻 dev experience developer experience (excluding CI) 🚜 refactor Change the code, not the functionality include in changelog 🔩 data model labels Oct 16, 2023
@Wumpf Wumpf self-requested a review October 16, 2023 16:31
@Wumpf
Copy link
Member

Wumpf commented Oct 16, 2023

just because I was curious, here's the dependency graph for this branch
image

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.

mostly only looked at toml and md files

I like where this is going: This should also make python and rerun_c a lot smaller once re_sdk is free of built-in types other than re_types_core 👍

crates/re_types_core/src/lib.rs Outdated Show resolved Hide resolved
crates/re_types_core/src/lib.rs Outdated Show resolved Hide resolved
crates/re_types/Cargo.toml Show resolved Hide resolved
crates/re_query/Cargo.toml Show resolved Hide resolved
@teh-cmc teh-cmc merged commit 11dee21 into main Oct 16, 2023
28 of 31 checks passed
@teh-cmc teh-cmc deleted the cmc/re_type_traits branch October 16, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔩 data model 🧑‍💻 dev experience developer experience (excluding CI) include in changelog 🚜 refactor Change the code, not the functionality 🦀 Rust API Rust logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants