# Libs-API Meeting 2024-07-02 ###### tags: `Libs Meetings` `Minutes` **Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr **Attendees**: Amanieu, David Tolnay, Josh Triplett, Mara Bos, The 8472, Chris Denton ## Agenda - Triage - Anything else? ## Triage ### FCPs 16 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/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/53485 *Tracking issue for RFC 2351, "Add \`is\_sorted\` to the standard library"* - (4 checkboxes left) - merge rust.tf/120141 *Tracking Issue for enum access in offset\_of* - (7 checkboxes left) - merge rust.tf/120140 *Tracking Issue for nested field access in offset\_of* - (5 checkboxes left) - close rust.tf/44286 *Tracking issue for HashMap \`OccupiedEntry::{replace\_key, replace\_entry}\`* - (3 checkboxes left) [Amanieu (3)](https://rfcbot.rs/fcp/Amanieu), [nikomatsakis (3)](https://rfcbot.rs/fcp/nikomatsakis), [BurntSushi (11)](https://rfcbot.rs/fcp/BurntSushi), [joshtriplett (12)](https://rfcbot.rs/fcp/joshtriplett), [yaahc (2)](https://rfcbot.rs/fcp/yaahc), [m-ou-se (11)](https://rfcbot.rs/fcp/m-ou-se), [tmandry (1)](https://rfcbot.rs/fcp/tmandry), [pnkfelix (2)](https://rfcbot.rs/fcp/pnkfelix), [scottmcm (3)](https://rfcbot.rs/fcp/scottmcm), [dtolnay (2)](https://rfcbot.rs/fcp/dtolnay) ### (nominated) rust.tf/libs368 *impl PathBuf::add\_extension and Path::with\_extra\_extension* Consensus: we prefer adding the pair of methods (not `add_extension` by itself) {naming bikeshedding} `add_extension` vs `append_extension` `with_extra_extension` vs `with_added_extension` Consensus: `add_extension` + `with_added_extension` Josh to reply. ### (nominated) rust.tf/libs393 *Simple secure random number generation* Error handling in the case where secure randomness is not available? panic vs result? distinguish `gen_bytes` (panic) vs `try_gen_bytes` (result)? Josh: does this need to block the initial proposal, or is it something we can defer discussing until later in stabilization process 8472: I can tell you for sure it will come up Amanieu: specific case where secure randomness would be unavailable: sometimes fuzzers set a cap on how much randomness they give out, and fail beyond that. But for this, we can make fuzzers expose their own different trait for randomness; don't need to block this API Amanieu: this isn't the first standard library API where theoretically the underlying system interface could fail, but in practice it never does. For example `Instant::now` uses a system call for which you can cause a failure using seccomp. Josh: `try_gen_bytes` is omitted because I prefer putting this API in `core::random`, not `std::random`, so it couldn't use `std::io::Error`; it would need some other bespoke error type 8472: how can core ever produce randomness? Josh: just the trait goes in core Amanieu: let's ask `rand` maintainers if they could give this API a look 8472: [`getrandom` uses result return type](https://docs.rs/getrandom/0.2.15/getrandom/fn.getrandom.html) Amanieu: *today* HashMap construction gets randomness from the OS and panicks if that fails. Nobody has ever complained or advocated for HashMap construction returning result. Josh: signature of `Random::random`: `&mut impl RandomSource` vs `&mut (impl RandomSource + ?Sized)`? ACP accepted, Amanieu to comment ### (nominated) rust.tf/53485 *Tracking issue for RFC 2351, "Add \`is\_sorted\` to the standard library"* Remaining debate: return value of `is_sorted_by`'s closure. bool vs Ordering? `is_sorted` and `is_sorted_by_key` are uncontroversial. Mara replied. Amanieu to reply with a note on `dedup_by` and `partition_point` that both use `bool`. ### (nominated) rust.tf/116237 *Scoped thread implicit join doesn't wait for thread locals to be dropped* Mara to FCP close after checking new comments. ### (nominated) rust.tf/125319 *Type inference regression on \`nightly\-2024\-05\-20\`* Acceptable/expected breakage. 1.80 is in beta now, so we'll find out from upcoming beta crater runs how many crates other than `time` are impacted David to comment. ### (nominated) rust.tf/126600 *\`std::process::exit\` is not thread\-safe* ### (nominated) rust.tf/rfc3301 *\[RFC\] AtomicPerByte (aka "atomic memcpy")* Amanieu to comment with a concern on the API. {discussion on the implementation and platform specific guarantees} Mara to start FCP after addressing Amanieu's comment. ### (waiting on team) rust.tf/119550 *Rename \`AsyncIterator\` back to \`Stream\`, introduce an AFIT\-based \`AsyncIterator\` trait* ### (new change proposal) rust.tf/libs398 *Make \`core::str::from\_utf8\*\` methods available on the \`str\` type* ### (new change proposal) rust.tf/libs399 *New failable API for SmartPointer\<OsStr\> to SmartPointer\<str\>, etc* ### (new change proposal) rust.tf/libs401 *Shove \`VaList\`, et al. into \`ffi::va\_list\`* ### (new change proposal) rust.tf/libs402 *Non\-blocking check for \`LazyLock\`s* ### (new change proposal) rust.tf/libs403 *Add \`RawStatusCode\`* ### (stalled change proposal) rust.tf/libs210 *Add associated consts to f32, f64 for mathematical constants* ### (stalled change proposal) rust.tf/libs264 *Ability to stop child process from Inheriting Handles* ### (stalled change proposal) rust.tf/libs248 *ACP: Add \`finish\_non\_exhaustive\` to \`DebugList\`, \`DebugMap\`, and\`DebugTuple\`* ### (stalled change proposal) rust.tf/libs261 *add \`write\_fmt\` method to String, to make \`write!\` macro work without imports* ### (stalled change proposal) rust.tf/libs145 *ACP: Additional NonZero conversions* _Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_