---
date: 2024-06-11
url: https://hackmd.io/JKGHTy0GTwumYq47QUgrVQ
---
# Libs-API Meeting 2024-06-11
###### tags: `Libs Meetings` `Minutes`
**Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr
**Attendees**: Amanieu, Mara, David, Josh, TC, Chris Denton, The 8472
## Agenda
- Triage
- Anything else?
## Triage
### FCPs
18 rust-lang/rust T-libs-api FCPs
- merge rust.tf/80437 *Tracking Issue for \`box\_into\_inner\`* - (1 checkboxes left)
- merge rust.tf/82901 *Tracking Issue for \`Option::get\_or\_insert\_default\`* - (2 checkboxes left)
- merge rust.tf/83871 *Tracking Issue for CharIndices::offset function* - (3 checkboxes left)
- merge rust.tf/102012 *Tracking Issue for \`const\_waker\`* - (3 checkboxes left)
- merge rust.tf/106943 *Implement DoubleEnded and ExactSize for Take\<Repeat\> and Take\<RepeatWith\>* - (3 checkboxes left)
- merge rust.tf/62726 *Tracking issue for io\_slice\_advance* - (3 checkboxes left)
- merge rust.tf/109402 *Implement owned ops for \`HashSet\` and \`BTreeSet\`* - (3 checkboxes left)
- merge rust.tf/116113 * Generalize \`{Rc,Arc}::make\_mut()\` to unsized types.* - (3 checkboxes left)
- merge rust.tf/115974 *Split core's PanicInfo and std's PanicInfo* - (2 checkboxes left)
- merge rust.tf/101196 *Tracking Issue for \`Ready::into\_inner()\`* - (1 checkboxes left)
- merge rust.tf/106418 *Implement \`PartialOrd\` and \`Ord\` for \`Discriminant\`* - (2 checkboxes left)
- close rust.tf/56167 *Tracking issue for HashMap::raw\_entry* - (3 checkboxes left)
- merge rust.tf/113219 *Tracking Issue for \`const\_cstr\_from\_ptr\`* - (5 checkboxes left)
- merge rust.tf/55132 *Tracking issue for thread::Builder::spawn\_unchecked* - (3 checkboxes left)
- merge rust.tf/123723 *Make \`std::os::tvos\`, \`std::os::visionos\` and \`std::os::watchos\` public* - (4 checkboxes left)
- merge rust.tf/117618 *Tracking Issue for \`duration\_abs\_diff\`* - (3 checkboxes left)
- merge rust.tf/53485 *Tracking issue for RFC 2351, "Add \`is\_sorted\` to the standard library"* - (4 checkboxes left)
- close rust.tf/96097 *Tracking Issue for MaybeUninit methods for arrays* - (4 checkboxes left)
[m-ou-se (11)](https://rfcbot.rs/fcp/m-ou-se), [BurntSushi (10)](https://rfcbot.rs/fcp/BurntSushi), [scottmcm (1)](https://rfcbot.rs/fcp/scottmcm), [tmandry (1)](https://rfcbot.rs/fcp/tmandry), [dtolnay (2)](https://rfcbot.rs/fcp/dtolnay), [yaahc (2)](https://rfcbot.rs/fcp/yaahc), [joshtriplett (15)](https://rfcbot.rs/fcp/joshtriplett), [nikomatsakis (2)](https://rfcbot.rs/fcp/nikomatsakis), [pnkfelix (1)](https://rfcbot.rs/fcp/pnkfelix), [Amanieu (7)](https://rfcbot.rs/fcp/Amanieu)
### (nominated) rust.tf/63291 *Tracking issue for uninitialized constructors for Box, Rc, Arc*
Josh: It sems people need this and are happy with the interface.
Amanieu: Missing new_zeroed_slice? Oh we do have it, it's just missing from the tracking issue.
Amanieu: There's some concern about proliferation.
David: E.g.:
- new
- new_in
- new_uninit
- new_uninit_in
- new_uninit_slice
- new_uninit_slice_in
- new_zeroed
- new_zeroed_in
- new_zeroed_slice
- new_zeroed_slice_in
- try_new
- try_new_in
- try_new_uninit
- try_new_uninit_in
- try_new_uninit_slice
- try_new_zeroed
- try_new_zeroed_in
- try_new_zeroed_slice
- × {Box, ThinBox, Rc, Arc}
[wg-allocators/90](https://github.com/rust-lang/wg-allocators/issues/90)
Amanieu: Are we missing `try_new_uninit_slice_in` ?
Josh: Creating a builder could make sense, but when you only need one of these, that seems like a reasonable building block.
Amanieu: At least the "uninit" and "zeroed" versions could be deduplicated by a runtime argument (an enum that has variants for Uninit vs Zeroed) passed through to the the allocator.
Josh: We could omit the zeroed versions. You can do that yourself with new_uninit and zero that afterwards. Not ideal, but uninit is the one that we really need.
Mara: If `Box::new(MaybeUninit::uninit())` would just work, would we still want `Box::new_uninit()`? (We could maybe do that in rustc rather than llvm.)
Amanieu: I don't see how we can make that work, at least in debug builds. Maybe for `Box::new` only, but that wouldn't work if the `Box::new` is behind a few layers of functions; we would still need a `new_uninit`.
Amanieu: I think I'm more or less happy to just stabilize all of these.
Mara: Slightly prefer only stabilizing uninit, not zeroed.
Mara: Then there is the question on the type to put these methods on. They are currently on `Box<i32>` not on `Box<MaybeUninit<i32>>` even though they produce the latter.
Amanieu: The big use case for `zeroed` is for very large allocations, like 1 Megabyte where the OS can supply freshly allocated pages for cheap.
Mara: It sucks that you then need an unsafe block to get a zeroed `Box<[u8]>`, even though doing that is safe..
{some discussion on alternative API ideas..}
Separate FCP for uninit methods for now (`new_uninit`, `new_uninit_slice`, `assume_init`).
### (nominated) rust.tf/116113 *Generalize \`{Rc,Arc}::make\_mut()\` to unsized types.*
In proposed FCP for nine months. Needs another checkbox.
8472: should the implementation be redone to use `UniqueRc<MaybeUninit<T>>` instead of its own bespoke `RcUninit`? I will leave a comment.
Amanieu: checked my box
### (nominated) rust.tf/125937 *Remove lock guarantee from \`std::env::{set\_var, remove\_var}\`*
### (nominated) rust.tf/125970 *CommandExt::before\_exec: deprecate safety in edition 2024*
### (nominated) rust.tf/rfc3642 *\[RFC\] Thread spawn hook (inheriting thread locals)*
{forgot to take notes}
conclusion: "too global". try something scoped?
Mara to work out a scoped alternative for comparison.
### (waiting on team) rust.tf/119550 *Rename \`AsyncIterator\` back to \`Stream\`, introduce an AFIT\-based \`AsyncIterator\` trait*
(waiting on WG-async)
### (waiting on team) rust.tf/123723 *Make \`std::os::tvos\`, \`std::os::visionos\` and \`std::os::watchos\` public*
Josh: We have `std::os::unix` and `std::os::linux`. The latter does not re-export all the contents of unix. It only augments with Linux-specific contents. As such, it would not make sense to have `std::os::darwin` and re-export all of its contents under `tvos`+`visionos`+... as proposed.
Josh: Let's have `std::os::darwin` and if Apple introduces some other platform (`ringos`) which does not support a subset of those common APIs, we cfg out those APIs within `std::os::darwin` on that platform. That still seems better than having a half dozen different Apple modules in `std::os`
Amanieu: For `target_os` we call it "apple", not "darwin". `std::os::apple`?
David: Let's strip deprecated contents from the new module being added. I.e. no new `std::os::apple::raw`.
Josh: Zero objection.
Josh to write a comment with the requested changes.
### (waiting on team) rust.tf/125082 *Remove \`MaybeUninit::uninit\_array()\` and replace it with inline const blocks.*
Amanieu: We don't need to remove `uninit_array` right away. Now that `const { ... }` is stable, we can point people to that and if adoption appears successful, then remove `uninit_array` later on.
### (waiting on team) rust.tf/125112 *Document behavior of \`create\_dir\_all\` wrt. empty path*
(in FCP already)
### (new change proposal) rust.tf/libs388 *Extend std::fs::Permissions on Windows*
### (new change proposal) rust.tf/libs390 *Repurpose \`str::lines\_any\` to truly split on \*all\* newlines*
### (new change proposal) rust.tf/libs391 *ACP: \`isqrt\` for \`NonZero\<uN\>\`*
Sounds good
### (new change proposal) rust.tf/libs392 *Add a \`RwLock\` \`downgrade\` method*
### (new change proposal) rust.tf/libs393 *Simple random number generation \- secure or seedable, not both*
Conclusion: Split insecure-seedable to a separate ACP, mention specific APIs for future secure-seedable version.
### (stalled change proposal) rust.tf/libs262 *Add infallible variant of RangeFrom::next()*
### (stalled change proposal) rust.tf/libs67 *Replace \`feature(layout\_for\_ptr)\` with \`feature(layout\_for\_meta)\`*
### (stalled change proposal) rust.tf/libs169 *Adding locks disregarding poison*
### (stalled change proposal) rust.tf/libs148 *Expose raw std{in,out,err}*
### (stalled change proposal) rust.tf/libs207 *\`parse\_line\` method for \`Stdin\`*
_Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_