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

Reduce rerun_c library size (by depending on fewer unnecessary crates) #4147

Merged
merged 17 commits into from
Nov 7, 2023

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Nov 6, 2023

What

  • Fix Make rerun_c smaller #2905
    • reduces Rerun C size from 41.0MiB to 34.2MiB (MacOS aarch64)
    • feels like there's more we should be able to do, but this PR stops the bleed of having it become larger as we add new types!
    • note that since this is a static library, typically the actual stripping occurs when linking the final binary, so while it's great that our library gets smaller for many reasons, it's not critical
  • re_log_types no longer depends on re_types
  • re_sdk no longer depends on re_memory
  • re_sdk no longer depends on re_types
    • things only come together now on rerun crate

Dependency graph before:
deps-old

Dependency graph now:
deps-new

Graphs via: cargo depgraph --all-deps --workspace-only --all-features --dedup-transitive-deps | dot -Tpng > deps.png
Rerun C checks via: cargo build -p rerun_c --release && ls -l target/release/librerun_c.a

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

@Wumpf Wumpf added enhancement New feature or request 🌊 C++ API C/C++ API specific include in changelog labels Nov 6, 2023
@Wumpf Wumpf added this to the 0.11 C++ polish milestone Nov 6, 2023
@Wumpf Wumpf force-pushed the andreas/cpp/smaller_rerun_c branch from 4f9e827 to 7ce3939 Compare November 6, 2023 15:19
@Wumpf Wumpf force-pushed the andreas/cpp/smaller_rerun_c branch from 63ba5f2 to a68bba4 Compare November 6, 2023 16:50
Copy link
Member

@jleibs jleibs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. This seems logical to me and paves an improved path for standalone packages for adding new types without cluttering the sdk/rerun_c.

@Wumpf Wumpf merged commit 316bddd into main Nov 7, 2023
37 checks passed
@Wumpf Wumpf deleted the andreas/cpp/smaller_rerun_c branch November 7, 2023 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 C++ API C/C++ API specific enhancement New feature or request include in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make rerun_c smaller
2 participants