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

Support for Rc and Arc #28

Open
LtdJorge opened this issue Jan 14, 2025 · 3 comments
Open

Support for Rc and Arc #28

LtdJorge opened this issue Jan 14, 2025 · 3 comments

Comments

@LtdJorge
Copy link

Hi Roman, will you add support for Rc and Arc? Were merged in rust-lang/rust#89132

@luketpeterson
Copy link

I started on this and did the initial pass adapting the Rc and Arc implementations from Rust 1.84.0. My work (wip) is here. https://github.com/luketpeterson/allocator-api2

I got bogged down because the Arc and Rc make heavy use of unstable memory layout APIs and allocator_api2 just imports core::alloc::Layout, etc.

It is certainly possible to avoid these APIs at the possible cost of a bit of performance - but this is where I got to today.

@luketpeterson
Copy link

As an aside, I'm also going to look at adapting triomphe to use allocator-api2 since triomphe is more like what I want anyway, and it might not be so deeply coupled to unstable (stdlib internal) memory layout features.

@luketpeterson
Copy link

Interestingly I'm not the only one running into this requirement for unstable features. https://www.youtube.com/watch?v=gr9v0FFXaZ8

This might be part of the solution. rust-lang/rust#123430

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

No branches or pull requests

2 participants