Stream: t-libs/wg-allocators

Topic: hello


Welcome Bot (May 02 2019 at 21:35, on Zulip):

Welcome to #t-libs/wg-allocators.

Description: Paving a path for a standard set of allocator traits to be used in collections!

Alex Crichton (May 02 2019 at 21:36, on Zulip):

@Erich Gubler :wave:

Alex Crichton (May 02 2019 at 21:37, on Zulip):

@Erich Gubler :wave: trying again...

Erich Gubler (May 02 2019 at 22:31, on Zulip):

Oh hi! :)

Erich Gubler (May 02 2019 at 22:31, on Zulip):

Okay, so, what are action items right now? Should I just comb over the Allocator API tracking issue and figure out how to summarize it?

Tim Diekmann (May 02 2019 at 22:37, on Zulip):

I think the first thing for using the allocator_api in collections is to associate Box<T, A: Alloc = Global>. #58457 did some work on this, but it requires a Default bound as DispatchFromDyn could only use PhantomData as extra fields. Two days ago I made a PR to change this. DispatchFromDyn now can take any ZST field with alignment of 1, thus Default can be dropped as bound.

I made some tests on this: TimDiekmann@97031fd
Sadly, rustc_typeck (where DispatchFromDyn is checked) is used from the stage0 compiler, thus I had to dance with #[cfg(stage0)].

Tim Diekmann (May 02 2019 at 22:38, on Zulip):

Additionally we should decide, if we use #[feature(allocator_api)] for both, the api and the association with the collections, or split it up.

Tim Diekmann (May 02 2019 at 22:40, on Zulip):

After this is finished, I think we can split up the work and associate an allocator with other collections.

Tim Diekmann (May 02 2019 at 22:42, on Zulip):

I just comb over the Allocator API tracking issue and figure out how to summarize it?

Maybe one issue per item on the wg-repository?

Mike Hommey (May 03 2019 at 01:55, on Zulip):

ZSTs are not the long term play, though... we still need a story for non-ZST A in Box<T, A>. There was also the question whether the bound on A should be left out of the struct Box definition.

Mike Hommey (May 03 2019 at 01:56, on Zulip):

Actually... without a bound that says A is a ZST, how can DispatchFromDyn be impl'ed?

Tim Diekmann (May 03 2019 at 06:19, on Zulip):

No, you are right, but in unblocks the PR. To proceed and implement it the semver compatible way, it can be implemented for Global.

Simon Sapin (May 03 2019 at 07:38, on Zulip):

I’ve added a README and filed a couple of issues in https://github.com/rust-lang/wg-allocators

Tim Diekmann (May 04 2019 at 00:51, on Zulip):

Wow, in 17 hours we filed 11 issues with 32 comments! :grinning:

Last update: Nov 15 2019 at 10:50UTC