Tracking Issue for `qurt_ext`

未关闭
#166,575 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust

调研方向

Read the tracking issue and implementation PR #152084 to understand the hexagon-unknown-qurt support and its current status. The checklist shows implementation complete, with FCP and a stabilization PR still pending; follow the feature lifecycle and help resolve any questions needed before stabilization.

由索引模型根据 Issue 内容生成。

描述

C-tracking-issue O-hexagon-unknown-qurt S-tracking-unimplemented T-libs

Feature gate: #![feature(qurt_ext)]

This is a tracking issue for adding hexagon-unknown-qurt PR-152084 support in rust. hexagon-unknown-qurt currently does not provide any new features per-say, it just adds (a subset of) std library support for the platform.

Public API
// std::os::qurt::ffi contains re-exported traits for qurt
pub trait OsStrExt {
    fn from_bytes(slice: &[u8]) -> &Self;
    fn as_bytes(&self) -> &[u8];
}
pub trait OsStringExt {
    fn from_vec(vec: Vec<u8>) -> Self;
    fn into_vec(self) -> Vec<u8>;
}

// std::os::qurt::raw contains QuRT-specific raw C type aliases in  
pub type dev_t = u64;
pub type ino_t = u64;
pub type mode_t = u32;
pub type nlink_t = u32;
pub type off_t = c_long;
pub type time_t = c_long;
pub type pthread_t = libc::pthread_t;

// std::os::qurt::fs contains QuRT specific extenstions to fs::Metadata
pub trait MetadataExt {
    fn st_dev(&self) -> u64;
    fn st_ino(&self) -> u64;
    fn st_mode(&self) -> u32;
    fn st_nlink(&self) -> u64;
    fn st_uid(&self) -> u32;        // always 0 — no ownership on QuRT
    fn st_gid(&self) -> u32;        // always 0
    fn st_rdev(&self) -> u64;
    fn st_size(&self) -> u64;
    fn st_atime(&self) -> i64;
    fn st_atime_nsec(&self) -> i64; // always 0 — no sub-second precision
    fn st_mtime(&self) -> i64;
    fn st_mtime_nsec(&self) -> i64; // always 0
    fn st_ctime(&self) -> i64;
    fn st_ctime_nsec(&self) -> i64; // always 0
    fn st_blksize(&self) -> u64;    // always 0 — not tracked
    fn st_blocks(&self) -> u64;     // always 0 — not tracked
}
Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

  • Implementation: #152084
  • FCP
  • Stabilization PR^1
Unresolved Questions
  • None yet.
主要语言
Rust
星标
123k
派生
16.6k
平均合并
2 天 17 小时
30 天内合并 PR
532

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rust-lang/rust 的其他 Issue

查看 rust-lang/rust 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。