Skip to content

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

Merged
Wumpf merged 17 commits intomainfrom
andreas/cpp/smaller_rerun_c
Nov 7, 2023
Merged

Reduce rerun_c library size (by depending on fewer unnecessary crates)#4147
Wumpf merged 17 commits intomainfrom
andreas/cpp/smaller_rerun_c

Conversation

@Wumpf
Copy link
Copy Markdown
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 sdk-cpp 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
Copy Markdown
Contributor

@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
@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

enhancement New feature or request include in changelog sdk-cpp C/C++ API specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make rerun_c smaller

2 participants