Tracking Issue for `os_str_slice`
Open
Nobody has claimed this yet.
C-tracking-issue
T-libs
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Feature gate: #![feature(os_str_slice)]
This is a tracking issue for an API for taking substrings of OsStr, which in combination with OsStr::as_encoded_bytes() would make it possible to implement most string operations in (portable) safe code.
Public API
impl OsStr {
pub fn slice_encoded_bytes<R: ops::RangeBounds<usize>>(&self, range: R) -> &Self;
}
Steps / History
- ACP: https://github.com/rust-lang/libs-team/issues/306
- Implementation: #118484, #118569
- Final comment period (FCP)^1
- Stabilization PR
Unresolved Questions
- Currently this enforces the same requirements on all platforms, but on Unix (and some other platforms) the internal encoding of
OsStris already fully specified to be arbitrary bytes by means of theOsStrExttrait. Should we:- Relax the requirements on these platforms,
- Keep enforcing the lowest common denominator invariants, or
- Use strict checks now, but leave the possibility of relaxing them later?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Public API and review the ACP plus implementation references #118484 and #118569. Examine the unresolved platform-requirement questions, then follow the feature lifecycle for the pending FCP and stabilization PR; completion means the API is ready for stabilization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100