--- date: 2025-04-29 url: https://hackmd.io/Ck3h9PJRQX-NSM1sEdb-AA --- # Libs-API Meeting 2025-04-29 ###### tags: `Libs Meetings` `Minutes` **Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr **Attendees**: Amanieu, Mara, David, Josh, Chris Denton, TC ## Agenda - Triage - Anything else? ## Triage ### FCPs 10 rust-lang/rust T-libs-api FCPs - merge rust.tf/80437 *Tracking Issue for \`box\_into\_inner\`* - (1 checkboxes left) - merge rust.tf/138498 *Implement Deref\<Target=ByteStr\> for CStr* - (3 checkboxes left) - merge rust.tf/106418 *Implement \`PartialOrd\` and \`Ord\` for \`Discriminant\`* - (2 checkboxes left) - merge rust.tf/130823 *Tracking Issue for \`non\_null\_from\_ref\`* - (3 checkboxes left) - merge rust.tf/122661 *Change the desugaring of \`assert!\` for better error output* - (3 checkboxes left) - merge rust.tf/137992 *Stabilise \`os\_string\_pathbuf\_leak\`* - (4 checkboxes left) - merge rust.tf/115585 *Tracking issue for \`cfg\_match\`* - (2 checkboxes left) - merge rust.tf/138016 *Added \`Clone\` implementation for \`ChunkBy\`* - (3 checkboxes left) - merge rust.tf/111137 *Tracking Issue for AVX512 intrinsics* - (3 checkboxes left) - merge rust.tf/139087 *Fallback \`{float}\` to \`f32\` when \`f32: From\<{float}\>\` and add \`impl From\<f16\> for f32\`* - (10 checkboxes left) [BurntSushi (8)](https://rfcbot.rs/fcp/BurntSushi), [m-ou-se (6)](https://rfcbot.rs/fcp/m-ou-se), [joshtriplett (5)](https://rfcbot.rs/fcp/joshtriplett), [dtolnay (2)](https://rfcbot.rs/fcp/dtolnay), [Amanieu (6)](https://rfcbot.rs/fcp/Amanieu) ### (nominated) rust.tf/129121 *Stabilize \`tcp\_quickack\`* FCP proposed. David: deferaccept? unrelated? rust.tf/119639 JoshT: unrelated option, but we might as well stabilize that one too Amanieu: I have a concern about this. The argument type for seconds is u32. The 8472: These kind of apis tend to get a nanosecond version later. We should take a Duration JoshT: How do we round to whole seconds? Truncating is fine. TC: Or panic when it's not a whole number of seconds. Amanieu: Bad for portability. JoshT: not a question of portability, but i agree we shouldn't do it. Options: - `set_deferaccept(u32)` (seconds) - `set_deferaccept(Duration)` (round down) - `set_deferaccept(Duration)` (panic on not exact seconds) - `set_deferaccept(Duration)` (io::ErrorKind::InvalidInput) - `set_deferaccept_seconds(u32)` Amanieu: let's have this discussion on the tracking issue. JoshT to post a comment there. ### (nominated) rust.tf/129334 *Implement (part of) ACP 429: add \`DerefMut\` to \`Lazy\[Cell/Lock\]\`* Amanieu: Seems fine Mara: it also adds force_mut to both types. Seems fine. ### (nominated) rust.tf/130703 *Tracking Issue for secure random data generation in \`std\`* Amanieu: Perhaps we should discuss this at the all-hands. ### (nominated) rust.tf/138023 *Add \`std::io::Seek\` instance for \`std::io::Take\`* JoshT: Looks fine. Will propose FCP. ### (nominated) rust.tf/138340 *Remove some unsized tuple impls now that we don't support unsizing tuples anymore* ### (nominated) rust.tf/138879 *Ensure non\-empty buffers for large vectored I/O* JoshT: Slices off the empty buffers from the start, to avoid Ok(0). JoshT: I don't think we want to remove all empty buffers. But if we're already checking the limit anyway, it doesn't matter if we do this. Amanieu: In nearly all cases, the first buffer is going to be nonempty, so this is going to be a O(1) check basically. The 8472: Should we steer people towards the advance method? Amanieu: We already do Josht: I think this is ready for FCP. Amanieu: Ok(0) meaning eof is guaranteed on read() but not the vectorized variants. JoshT: It is the expectation though. Amanieu: It does say "like read()". ### (nominated) rust.tf/139901 *Change proc\_macro::Span::byte\_range \-\> byte\_offset.* Discussed last time. ### (nominated) rust.tf/139903 *Naming of proc\_macro::Span::local\_file()* Discussed last time. ### (nominated) rust.tf/139916 *make std::intrinsic functions actually be intrinsics* Separate crater run? Seems unlikely this breaks anything. Let's rely on the beta crate run. ### (nominated) rust.tf/139994 *\`impl Display for CStr{,ing}\`* Rejected in ACP. Amanieu to reply. ### (nominated) rust.tf/140151 *remove intrinsics::drop\_in\_place* Accidentally stable. Crater detected no regressions. FCP ### (nominated) rust.tf/140250 *u16 format precision change, breach of the Rust stability guarantee* JoshT: Agree with Mara's analysis ### (waiting on team) rust.tf/136687 *Improve the documentation of \`Display\` and \`FromStr\`, and their interactions* ### (new change proposal) rust.tf/libs577 *Option::try\_get\_or\_insert\_with* ### (new change proposal) rust.tf/libs576 *Add \`Chars::single(&self) \-\> Option\<char\>\` for getting exactly one character* ### (new change proposal) rust.tf/libs575 *ACP: \`Option::update\_or\_default\`* ### (new change proposal) rust.tf/libs574 *ACP: str::advance\_char* ### (new change proposal) rust.tf/libs573 *ACP: \[perf\] \`proc\-macro\` \`Ident\` should have method \`as\_str\`* ### (new change proposal) rust.tf/libs572 *Add \`Cell::get\` for \`Rc\`\-like shallow\-copying types* ### (new change proposal) rust.tf/libs570 *actually checked bitshifts* Right shifting a 1-bit out is overflow? Amanieu: yes? JoshT: No? TC: underflow? Amanieu: checked_lossless_shift_left? Amanieu: deprecate all the overflowing shift methods. bad api design. No consensus to add these methods. --- TC: Description of what LLVM has exactly: https://github.com/rust-lang/libs-team/issues/570#issuecomment-2839591488 Amanieu: Some consideration for deprecating some methods, such as `overflowing_shl`. Current shift methods: - shl (Shl trait) - checked_shl - overflowing_shl - strict_shl (unstable) - unbounded_shl (stabilized in beta) - unchecked_shl - wrapping_shl Proposed new methods: - checked_exact_shl -> Option - unchecked_exact_shl -> T Preconditions: - shift in range 0..BITS - value preserved when shifted back TC: Alternate names?: - exact_shl -> Option - exact_shl_unchecked -> T, unsafe The 8472: We should update this for `exact_div` then also. Amanieu: I'm happy with that. exact_div tracking issue: https://github.com/rust-lang/rust/issues/139911 ### (new change proposal) rust.tf/libs569 *ACP: abstract \`BufReader::peek\`* The 8472 to comment on BufReader::peek. Amanieu to accept with some renaming and API changes. ### (new change proposal) rust.tf/libs568 *Implement \`Read\` and \`Write\` traits for \`BorrowedFd\` and \`OwnedFd\`* ### (new change proposal) rust.tf/libs562 *Add ability to customize STARTUPINFO structure in Command API* ### (stalled change proposal) rust.tf/libs210 *Add associated consts to f32, f64 for mathematical constants* TC: This is more of a lang thing, but in the context of: https://github.com/rust-lang/rust/issues/134691 We could imagine wanting: ```rust! trait Tr { const C: u8; } use Tr::C; // And also: struct S; impl Tr for S { const C: u8 = 0; } use <S as Tr>::C; // And also: impl S { const C: u8 = 0; } use S::C; ``` ### (stalled change proposal) rust.tf/libs366 *Implementing UnixSocketExt traits for solaris/illumos ; starting with the unix\_socket\_exclbind feature* ### (stalled change proposal) rust.tf/libs194 *Fix:Introduce an interface to expose the current \`Command\` captured env var logic* ### (stalled change proposal) rust.tf/libs111 *Restructure ptr\_metadata to minimal support* ### (stalled change proposal) rust.tf/libs296 *ACP: Designing an alternative \`FromStr\`* ### (stalled change proposal) rust.tf/libs383 *Add \`FRAC\_1\_SQRT\_2PI\` constant* Re-pinged Mara. ### (stalled change proposal) rust.tf/libs335 *ACP: \`PathBuf::has\_dir\_suffix\`* ### (stalled change proposal) rust.tf/libs331 *Support permanently skipping tests on a specific system* ### (stalled change proposal) rust.tf/libs207 *\`parse\_line\` method for \`Stdin\`* Josh: There's a new RFC for something like this: https://github.com/rust-lang/rfcs/pull/3799 ### (stalled change proposal) rust.tf/libs380 *\`Result::ignore\`* _Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_