安全演练场(Safety Playground)
交互式演示 PyPTO 内存安全流水线——PyPTO .py → stage-1 PTO MLIR → 生成的
Rust → rustc 判定——展示每一类内存安全错误在哪里被捕获(释放后重分配使用
→ E0382,设备侧数据竞争 → E0308)。
在左侧选择一个示例,然后用流程按钮将其下降(lower)、生成 Rust、运行检查。当某一步
产生多个产物(例如 bug/ok 成对)时,用 ◀ ▶ 循环切换。整条流水线在你的浏览器中
运行(WebAssembly),不向服务器发送任何内容。
⬇ 下载桌面应用(Windows x86-64)
Linux x86-64
实时运行 rustc · 详见下方说明
无法加载?请全屏打开 safety-playground/。
这与 Playground(用于编辑内核的编译/模拟服务)不同。 安全演练场是一个自包含、客户端运行的安全检查流水线及其固件之旅。
下载桌面应用
同一个演练场也可作为原生桌面应用运行。与浏览器版本不同,桌面版在检测到 Rust
工具链时会实时运行 rustc 来判定生成的 Rust(否则回退到内置结果)。
| 平台 | 下载 | 运行 |
|---|---|---|
| Windows x86-64(推荐) | playground_desktop-windows-x86_64.zip | 解压后双击 playground_desktop-windows-x86_64.exe |
| Linux x86-64 | playground_desktop-linux-x86_64.gz | gunzip playground_desktop-linux-x86_64.gz && chmod +x playground_desktop-linux-x86_64 && ./playground_desktop-linux-x86_64 |
Windows 版为原生 64 位 .exe,是 Windows 上最简单的选择(包括在 WSL 下——请从
Windows 本身运行该 .exe,而非从 Linux shell)。Linux 版为静态链接(musl):
不依赖任何 glibc 版本,可在任意 x86-64 Linux 上运行,并同时链接 X11 与 Wayland。
桌面应用需要图形显示。 在 Windows 上,
.exe可原生运行。在 WSL 中运行 Linux 二进制需要 WSLg(Windows 11 / 较新 Windows 10 的 WSL2 X11/Wayland 支持)—— 没有它就没有显示,任何原生 Linux GUI 都无法打开。若echo $DISPLAY为空,请改用 Windows.exe或上方的浏览器版本。
SHA-256:
linux-x86_64.gz e890e4a14c784c2de8ba9526481f27274ba44762f6256802eac68314eb3df0af
windows-x86_64.zip dde9b2e965a9eadb16d95567227ef64c96f12fd6ed761be9591d68773764dbd8
…或附带 Rust 工具链版本(实时判定,无需安装)
上面的小体积下载,除非你已安装 rustc,否则显示的是预计算判定。下面这些较大的
打包在二进制旁附带了裁剪过的 Rust 工具链,因此 Check 步骤会在任意机器上实时
运行 rustc(--emit=metadata——无需链接器即可得到借用/类型判定),无需安装 Rust。
应用相同;约 150 MB,因为包含了工具链。
| 平台 | 下载(附带 rustc) | 运行 |
|---|---|---|
| Windows x86-64 | …-windows-x86_64-with-rustc.zip(约 154 MB) | 解压后运行 .exe(保留旁边的 rust/ 目录) |
| Linux x86-64 | …-linux-x86_64-with-rustc.tar.xz(约 135 MB) | tar xf …-with-rustc.tar.xz && ./playground_desktop-linux-x86_64 |
SHA-256:
linux-…-with-rustc.tar.xz eac7393dc2bc85177b1b4f0beccde46c2bfbe7f9131590e738cd3ae3e3639796
windows-…-with-rustc.zip 0feba6010787663db0c6272aa46ffa9102be8563aee5c72678f81fc45d1aeb65
macOS: 未提供预编译二进制(构建 macOS 应用需要 Apple 的 SDK,无法再分发)。 在 Mac 上可一步从源码构建——安装 Rust 后运行:
git clone <ascend-rs repo> # safety_playground/ 工作区
cd safety_playground
cargo run --release --bin playground_desktop