Skip to content

Conversation

@N1ark
Copy link
Contributor

@N1ark N1ark commented Dec 24, 2025

Fixes #127
Depends on #205

  • Properly isolate layout computations (compute_arbitrary_layout, compute_enum_layout) from layout translation from the frontend. The layout is now only computed if the frontend doesn't provide a layout; otherwise it is simply translated as-is. In particular, for the current version of Obol, only closures and tuples require manual calculation.

  • Fix the implementation of intrinsics::size_of_val and intrinsics::align_of_val, taking inspiration of the rustc implementation. The calculation should be a lot more accurate now, which is super important for e.g. the drop implementation of Box<dyn T>

  • More reliably detect uninhabited types

I thought I wanted to do more here but I think this is already better than before and doing more would be over-engineering :) don't fix what isn't broken etc etc etc

@N1ark N1ark requested a review from giltho as a code owner December 24, 2025 11:27
@N1ark N1ark mentioned this pull request Dec 24, 2025
3 tasks
@N1ark N1ark added soteria-rust Issues related to soteria-rust cleanliness Quality of life improvements, to keep the codebase clean and healthy labels Dec 24, 2025
Base automatically changed from good-layouts to main December 25, 2025 14:33
Copy link
Contributor

@giltho giltho left a comment

Choose a reason for hiding this comment

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

I'm mostly just trusting this

@N1ark N1ark added this pull request to the merge queue Jan 11, 2026
Merged via the queue into main with commit c29518e Jan 11, 2026
4 checks passed
@N1ark N1ark deleted the no-layout-magic branch January 11, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanliness Quality of life improvements, to keep the codebase clean and healthy soteria-rust Issues related to soteria-rust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle actual Rust layouts

3 participants