paritytech/polkadot-sdk

GitHub: paritytech/polkadot-sdk

Polkadot SDK 是一个基于 Rust 的综合开发框架,用于构建可互操作的区块链、平行链及去中心化应用运行时环境。

Stars: 2745 | Forks: 1181

![SDK Logo](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/caee8c231b064121.png) ![SDK Logo](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/17b7082a14064122.png) # Polkadot SDK
## ⚡ 快速开始 如果您想快速运行一个示例节点,可以执行以下入门脚本: ``` curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/scripts/getting-started.sh | bash ``` ## 👩🏽‍💻 构建 要构建此项目,您需要安装一些依赖项,请按照[本指南](https://docs.polkadot.com/develop/parachains/install-polkadot-sdk)中的说明操作。 ### 🎯 构建目标 在构建完整的 runtime 时,WASM 构建器会处理所有必需的配置。 然而,对于单独的 crate,在针对 `no_std` 时有一些注意事项。 #### WASM 为 WASM 构建时,请设置 `RUSTFLAGS="--cfg substrate_runtime"`。请参阅 Polkadot SDK 文档中的 [WASM 构建](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/substrate/index.html#wasm-build) 。 #### PolkaVM PolkaVM 构建需要一些 `riscv32` 或 `riscv64` 目标架构。 请参阅 CI 示例:[RiscV 构建](https://github.com/paritytech/polkadot-sdk/blob/6de451a105ca0a5feb675a215d4e8de5207febf6/.github/workflows/build-misc.yml#L55)。 ## 📚 文档 * [Polkadot 文档门户](https://docs.polkadot.com) * [🦀 rust-docs](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/index.html):我们在其中追踪 我们 Rust crate 的 API 文档。包括: * Polkadot SDK 每个组件的[介绍](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html) :Substrate、FRAME、Cumulus 和 XCM * [指南](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/index.html) ,即如何构建您的第一个 FRAME pallet * [模板](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/templates/index.html) 用于启动新项目。 * [外部资源](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/external_resources/index.html) * 有问题?您可以在 Polkadot SDK 开发者聊天中提问。 这两个频道的消息会相互桥接,因此您可以使用其中任何一个。 * [Telegram](https://t.me/substratedevs) * [Matrix](https://matrix.to/#/#substratedevs:matrix.org) * [Discord](https://discord.com/channels/722223075629727774/997505821955076196) * [Polkadot and Substrate StackExchange](https://substrate.stackexchange.com/) ## 🚀 发布 ![Current Stable Release](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/9d30e26f85064123.svg)  ![Next Stable Release](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/086c458d44064124.svg) Polkadot SDK 每三个月作为 `Polkadot stableYYMM` 版本发布一次。每个稳定版本会获得 为期一年的补丁支持。在 [Release Registry](https://github.com/paritytech/release-registry/) 中查看下一个即将发布的版本,并在 [RELEASE.md](./docs/RELEASE.md) 中查看更多文档。 您可以使用 [`psvm`](https://github.com/paritytech/psvm) 将所有依赖项更新到特定 版本,而无需手动为每个 crate 选择正确的版本。 ## 🛠️ 工具 [Polkadot SDK Version Manager](https://github.com/paritytech/psvm) :一个用于管理任何 Cargo.toml 文件中 Polkadot SDK 依赖项并对其进行更新的简单工具。 它会自动将 Polkadot SDK 依赖项更新为其正确的 crates.io 版本。 ## 🔐 安全性 安全政策和程序可在 [docs/contributor/SECURITY.md](./docs/contributor/SECURITY.md) 中找到。 ## 🤍 贡献与行为准则 确保您遵守我们的[贡献指南](./docs/contributor/CONTRIBUTING.md)。在每一次 互动和贡献中,本项目都遵循[贡献者公约行为准则 ](./docs/contributor/CODE_OF_CONDUCT.md)。 ### 👾 准备好贡献了吗? 查看标有 [`mentor`](https://github.com/paritytech/polkadot-sdk/labels/C1-mentor) (或者也可以查看由其中一位维护者创建的[这个](https://mentor.tasty.limo/)页面)标签的 issue 以开始吧! 对于有价值的贡献,我们总是通过向 Polkadot 网络提议链上小费 作为我们感谢的表示。 ## Polkadot Fellowship 此仓库中的开发通常与 `fellowship` 组织相辅相成。简而言之, 此仓库提供了构建 Polkadot 及其平行链所需的所有 SDK 组件。但是, 实际的 Polkadot runtime 位于 `fellowship/runtimes` 仓库中。在[此处](https://polkadot-fellows.github.io/dashboard/) 阅读更多关于 fellowship、这种分离以及 RFC 流程的信息。 ## 历史记录 此仓库是曾经构成 Polkadot SDK 的 3 个独立仓库的合并,即 Substrate、Polkadot 和 Cumulus。在[此处](https://polkadot-public.notion.site/Polkadot-SDK-FAQ-fbc4cecc2c46443fb37b9eeec2f0d85f) 阅读更多关于此次合并及其历史的信息。
标签:Cumulus, FRAME, Parachain, Polkadot, PolkaVM, RISC-V, Runtime, Rust, Substrate, WASM, Web3, XCM, 分布式账本, 加密货币, 区块链, 去中心化, 可视化界面, 平行链, 开发区发者工具, 开源, 智能合约, 波卡, 网络流量审计, 节点, 跨链, 通知系统