---
# System prepended metadata

title: Libs-API Meeting 2024-07-30
tags: [Minutes, Libs Meetings]

---

# Libs-API Meeting 2024-07-30

###### tags: `Libs Meetings` `Minutes`

**Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr
**Attendees**: Amanieu, Mara, Josh, David, The 8472, Chris Denton, Urgau, Eric Holk

## Agenda

- Triage
- Anything else?

## Triage

### FCPs

14 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/106943 *Implement DoubleEnded and ExactSize for Take\<Repeat\> and Take\<RepeatWith\>* - (3 checkboxes left)
  - merge rust.tf/109402 *Implement owned ops for \`HashSet\` and \`BTreeSet\`* - (3 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/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/120141 *Tracking Issue for enum access in offset\_of* - (6 checkboxes left)
  - close rust.tf/44286 *Tracking issue for HashMap \`OccupiedEntry::{replace\_key, replace\_entry}\`* - (3 checkboxes left)
  - merge rust.tf/126877 *CloneToUninit impls* - (3 checkboxes left)
  - merge rust.tf/126383 *Tracking Issue for is\_none\_or* - (3 checkboxes left)

[scottmcm (2)](https://rfcbot.rs/fcp/scottmcm), [nikomatsakis (2)](https://rfcbot.rs/fcp/nikomatsakis), [pnkfelix (1)](https://rfcbot.rs/fcp/pnkfelix), [yaahc (2)](https://rfcbot.rs/fcp/yaahc), [tmandry (1)](https://rfcbot.rs/fcp/tmandry), [BurntSushi (10)](https://rfcbot.rs/fcp/BurntSushi), [Amanieu (2)](https://rfcbot.rs/fcp/Amanieu), [joshtriplett (10)](https://rfcbot.rs/fcp/joshtriplett), [dtolnay (2)](https://rfcbot.rs/fcp/dtolnay), [m-ou-se (8)](https://rfcbot.rs/fcp/m-ou-se)

### (nominated) rust.tf/libs399 *New failable API for SmartPointer\<OsStr\> to SmartPointer\<str\>, etc*

Josh: we have methods to go from str to osstr, and methods to go from osstr to str, they are just not yet exposed in the form of From/TryFrom impls

Amanieu: lgtm, but also for the owned string types (`TryFrom<OsString> for String`)

8472: were methods like OsStr::to_str a mistake by not mentioning the specific kind of conversion in the method name? Adding TryFrom would compound on the mistake
    
8472: on unix, OS strings are allowed to contain arbitrary bytes that might not align in semantics with utf-8 whatsoever

8472: put differently, would we be equally willing to add a TryFrom conversion from `[u8]` to utf-8 string?

Amanieu: we have already made the decision that OS strings are a UTF-8 superset, with the subset that is UTF-8 having the semantics of UTF-8 when handled by standard library APIs

Josh to comment (and recommend a few other impls?)

Needs FCP on PR

### (nominated) rust.tf/128254 *Rewrite binary search implementation*

Mara: we've changed binary_search behavior before; it broke some blockchain stuff

Amanieu: should this require a Crater run?

8472/Josh: the beta Crater runs are sufficient here

### (nominated) rust.tf/rfc3469 *CPU feature detection in core*

Ready for someone to start FCP

Mara will FCP

### (waiting on team) rust.tf/119550 *Rename \`AsyncIterator\` back to \`Stream\`, introduce an AFIT\-based \`AsyncIterator\` trait*

Waiting on WG-async

### (new change proposal) rust.tf/libs416 *Add new API for named fifo*

We recently accepted a similar ACP for anonymous pipes (rust.tf/libs375)

Amanieu: can we string this on `File` instead? You can open a named pipe as a File

Mara: We have the Fd types for a reason, we purposely don't use File for all FDs..

Josh: If we provide this for unix only, File is reasonable. For cross platform, a separate Fifo type makes sense.

Amanieu will ask whether a unix-specific extension on File is good enough, or are we aiming for a general cross-platform API

### (new change proposal) rust.tf/libs417 *ACP: BufReader::peek*

Amanieu: I don't like that this exposes the buffer capacity as a constraint, where that is not exposed anywhere else in BufReader's behavior

8472: there is even an explicit `capacity` method on BufReader

Josh: let's consider the listed alternative where it automatically allocates a bigger buffer if you ask for `n` bigger than capacity

David: we can call this out as behavior that might change in the future; it won't break anyone

Mara: if you ask for `n` bigger than the bufreader's capacity, is that an error or a bug (panic)? I think it should panic, not return Err, just like the index operator panics. And silently returning a shorter slice also seems too easy to miss.

Amanieu, Josh: +1

The 8472: It should be an Err for when you give a untrusted value to peek().

Mara: Disagree.

8472: Counterproposal: a `.backshift(n)` method + `.read_more()` method. `read_more` performs the read syscall using whatever space is currently left in the buffer. You do not tell it an `n`. Then you use `.buffer()` to get whatever was read. One can build `peek` on top of such a primitive.

Amanieu: are there other patterns someone would build on top of those primitives? Or is `peek` the only one, in which case we should just provide `peek` directly

Consensus: we like `peek`, defer open question about error vs panic, open question about short read

8472 to leave a comment

### rust.tf/libs323 *Add ptr::fn_addr_eq to compare functions pointers*

### (new change proposal) rust.tf/libs418 *Box/Vec/slice convenience NonNull methods*

### (new change proposal) rust.tf/libs419 *Enable specialisation of \`std::io::copy\` for non stdlib types*

### (new change proposal) rust.tf/libs420 *Add basic tempfile API to stdlib*


### (stalled change proposal) rust.tf/libs131 *Add \`std::fs::rename\_noreplace\`*

### (stalled change proposal) rust.tf/libs271 *Unix Domain Sockets on Windows*

### (stalled change proposal) rust.tf/libs253 *Provide way to deconstruct std::iter::Rev*

### (stalled change proposal) rust.tf/libs92 *Add \`InProgress\` variant to \`io::ErrorKind\`*

### (stalled change proposal) rust.tf/libs311 *ACP: Pattern methods for \`OsStr\` without \`OsStr\` patterns*


_Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_
