-
Notifications
You must be signed in to change notification settings - Fork 9
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
Roadmap #48
Comments
Updated OP. |
@TimDiekmann what are next steps? Are we waiting for potential feedback from users on our changes to the API before we proceed? |
I'm currently testing the API with |
I think those downside of |
Actively emitting deprecation warnings causes churn. What benefit does this bring in exchange?
|
Isn't that the point of deprecation warnings?
Fair point. |
@TimDiekmann Could you update the roadmap with recent changes and what's left for us to do? Also, can we proceed with #7 now that unstable generic trait instantiations are supported? |
Updated the roadmap.
rust-lang/rust#72314 is not merged yet as @varkor asked for a few more tests. I will open a new issue for each collection when it's merged. |
Thanks for cleaning up the roadmap and outstanding issues 👍 |
Should |
Hey I see that the last message in this issue is 3yo, what's the current status? Is there any way to get involved and help move the needle a bit? |
@MarinPostma If you use nightly, allocators are very much usable already (and have been since 2021-ish). I figure most people that need allocators already use them, and you can too. You can make your own allocators and your own allocator-aware collections, and these days even most of alloc/std collections already work custom allocators (#7), with String being the notable holdout (there's a history of attempts to make it happen, current HEAD here rust-lang/rust#101551). Regarding allocators on stable: if you look at issues in this repository, you'll see we are still a long way off. Personally, I'd want to have some kind of MVP stabilized sooner, possibly at the expense of completely resolving questions such as #15. Regarding involvement: I don't know of any easy things that need doing. #7 was such a list, but fruit has been picked. |
As a stopgap, I've seen many people adopt the use of https://github.com/zakarumych/allocator-api2 to get these apis in stable. This includes larger crates like hashbrown |
In the spirit of seeking an MVP, is there anything blocking the stabilization of the "required" subset of For example, consider an pub unsafe trait Allocator {
fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>;
unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout);
} The goal here would be to enable use of |
I would like to come to the listed issues in the more or less indicated order. Linked issues are not necessarily confirmed, please consult the issues for more details.
AllocRef
:GlobalAlloc::realloc’s parameters are backward #3,Support reallocating to a different alignment? #5: Support reallocating to a different alignment?AllocRef
to take&self
ReturnMaybeUninit<u8>
rather thanu8
#66/Introduce a byte-type #68: ReturnMaybeUninit<u8>
rather thanu8
/Introduce a byte typeAllocator aware types:
AllocRef
onBox
,Rc
, andArc
#54: ImplementAllocRef
onBox
GlobalAlloc
:GlobalAlloc
andAlloc
AllocRef
onSystem
withoutGlobalAlloc
#43: ImplementAllocRef
onSystem
withoutGlobalAlloc
GlobalAlloc
when stabilizingAllocRef
GlobalAlloc
whenAllocRef
is stabilized at least three months (two versions)Documentation:
AllocRef
allocator#[global_allocator]
*really* means #25: Define what#[global_allocator]
really meansOther:
The text was updated successfully, but these errors were encountered: