---
agent:
  instructions: "Search published articles with space-separated keywords. All terms must occur in the article text. Results are Markdown excerpts with canonical links, newest first."
  endpoint: "https://www.zaihua.news/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://www.zaihua.news/docs/api/#agent-search"
---

# CPython 核心开发者提议引入 Rust 语言以提升内存安全性

Source: https://www.zaihua.news/article/37485/

[返回新闻流](https://www.zaihua.news/)
2025年11月18日 · 16:00 · [在花新闻](https://www.zaihua.news/about/)

# CPython 核心开发者提议引入 Rust 语言以提升内存安全性

CPython 核心开发者 Emma Smith 等人提出了一项将 Rust 编程语言引入 CPython 的提案。该提案计划分阶段实施：Python 3.15 版本开始在构建环境中缺少 Rust 时发出警告，Python 3.16 版本将要求 Rust 作为构建依赖（除非明确禁用），到 Python 3.17 版本可能完全要求 Rust 才能构建。

提案的主要动机是利用 Rust 的内存安全特性来消除整类 bug、崩溃和安全漏洞。Rust 通过所有权模型在编译时防止数据竞争，这对于即将正式支持的自由线程 Python 尤为重要。目前已有 25-33% 的第三方 Python 扩展模块使用 Rust，引入 Rust 将有助于鼓励更多贡献者参与扩展模块开发。实施方案包括在 Modules/ 目录中添加基于 Rust 的扩展模块，并使用 bindgen 工具自动生成 Rust FFI 绑定。

[Python.org](https://discuss.python.org/t/pre-pep-rust-for-cpython/104906)

🍀[在花频道](http://t.me/zaihuanews) 🍵[茶馆](http://t.me/zaihuachat) 📮[投稿新鲜事](http://t.me/ZaiHuabot)

[上一条Kimi K2 Thinking被Perplexity接入，系接入的唯一国产模型](https://www.zaihua.news/article/37484/)[下一条Epic 游戏商城正式上线赠礼功能，支持向好友赠送付费游戏](https://www.zaihua.news/article/37486/)
