Skip to content

Conversation

@rampage644
Copy link
Contributor

@rampage644 rampage644 commented May 11, 2025

This splits single runtime crate into several, some ideas and invariants:

  • Prefer flat crate and directory structure
  • Single "fat" binary crate (handles all the wiring and connecting dependencies)
  • Switched to Rust 2024 edition (seem to be default for new crates for cargo init)

Some intermediate results

  • My single use case was "Update SQL query test in executor/tests/query.rs, run test" time improved 3x-4x (30s -> 8s). I also believe it could be even further improved.

Upcoming (follow up) PRs

  • Refactor error handling project-wise
  • Restore tests that weren't migrated (Only test_parallel_queries left out)
  • Refactor Recording service

Open questions

  • Crate for just traits (interfaces) such that actual implementation stays separate. This PR effort is still not great from incremental compilation perspective. Example, api-*-rest depend on ExecutorService now AND CoreExecutor (real type that implements the trait) and thus every change in CoreExecutor (not the interface!) triggers dependent crates recompilation.
  • tbd

Related #719

@rampage644
Copy link
Contributor Author

Rebased on recent main

@rampage644 rampage644 changed the title [WIP] Separating crates Separating crates May 11, 2025
@rampage644 rampage644 merged commit c69ea38 into main May 11, 2025
4 checks passed
@rampage644 rampage644 deleted the separate-crate branch May 11, 2025 18:49
This was referenced May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants