Add a cli interface

未關閉
#69 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 2 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
45/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
rust
領域
cli

研究方向

首先定位 hyperlight-sandbox 二進位檔的進入點和現有的後端介面。梳理 run 命令將如何選擇後端、載入 TOML 設定,以及套用檔案系統、網路、堆積和堆疊選項;當提議的命令和文件中記錄的 flags 能夠用於所列出的後端時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

This would make it easier to use in agent skills and and other tools.

Add a hyperlight-sandbox CLI binary so users can run scripts in an isolated sandbox directly from the terminal without writing a host program.

hyperlight-sandbox run script.py --backend wasm-python --allow-domain https://httpbin.org

Proposed CLI surface

hyperlight-sandbox run <SCRIPT> [OPTIONS]

Options:
  --backend <wasm-python|wasm-js|hyperlightjs|nanvix-js|nanvix-python>
                          Sandbox backend [default: wasm-python]
  --module <PATH>         AOT-compiled guest module (uses backend default if omitted)
  --input <DIR>           Read-only host dir mounted at /input
  --output <DIR>          Writable host dir mounted at /output
  --allow-domain <URL>    Allow network access (repeatable)
  --config <FILE>         TOML config file (flags override)
  --heap-size <BYTES>     Guest heap size
  --stack-size <BYTES>    Guest stack size
  -v, --verbose           Debug logging

Config file (TOML)

Possible config file.

backend = "wasm-python"
module = "python-sandbox.aot"

[network]
allow_domains = ["https://httpbin.org"]

[fs]
input = "./data"
output = "./results"
主要語言
Rust
星號
83
分支
8
平均合併
2 天 20 小時
30 天內合併 PR
29

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

hyperlight-dev/hyperlight-sandbox 的其他 Issue

查看 hyperlight-dev/hyperlight-sandbox 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。