每日 Harness 开源 · Source
返回本期 · Back to 2026-06-07

博客文章 · Blog Posts2026-06-07 · Sunday, June 7, 2026

Running Python code in a sandbox with MicroPython and WASM

simonwillison.net原文 ↗

Running Python code in a sandbox with MicroPython and WASM
Simon Willison 用 MicroPython、WebAssembly 和 wasmtime 做 Python 执行沙箱,并把它用于 Datasette Agent 的代码执行插件。实现细节包括持久 interpreter state、host function 队列、可选择暴露的宿主函数,以及约 362KB 的 WASM blob。文章的价值在于把“让 agent 跑代码”拆成内存、CPU fuel、状态驻留和宿主接口四个具体工程问题。
浏览

评论 · Comments