x07-bundle
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesex07-bundle
x07-bundle
Use to produce a native executable that can be run directly on the target machine without the X07 toolchain installed at runtime.
x07 bundlex07 bundle--repair=...--repair=off使用生成原生可执行文件,无需在运行时安装X07工具链即可直接在目标机器上运行。
x07 bundle默认情况下,会运行标准的自动修复循环(),因此它可以在编译前进行格式化、代码检查并应用快速修复。调试时请使用参数。
x07 bundle--repair=...--repair=offCanonical commands
标准命令
-
Bundle an OS-world CLI executable:
x07 bundle --project x07.json --profile os --out dist/app- run it:
./dist/app --help - if bundling fails with , override:
fuel exhaustedx07 bundle --project x07.json --profile os --solve-fuel 500000000 --out dist/app
-
Bundle a policy-enforced OS-world executable:
x07 bundle --project x07.json --profile sandbox --out dist/app- requires a base policy (via or
profiles.sandbox.policy)--policy
-
打包生成适用于操作系统环境的CLI可执行文件:
x07 bundle --project x07.json --profile os --out dist/app- 运行它:
./dist/app --help - 如果打包时出现错误,可覆盖默认值:
fuel exhaustedx07 bundle --project x07.json --profile os --solve-fuel 500000000 --out dist/app
-
打包生成受策略约束的操作系统环境可执行文件:
x07 bundle --project x07.json --profile sandbox --out dist/app- 需要基础策略(通过或
profiles.sandbox.policy参数指定)--policy
Runtime ABI
运行时ABI
The bundled executable:
- reads standard process args ()
argc/argv - encodes them into input bytes
argv_v1 - calls the compiled program entrypoint ()
x07_solve_v2 - writes program output bytes directly to stdout (no framing)
打包后的可执行文件:
- 读取标准进程参数()
argc/argv - 将它们编码为输入字节
argv_v1 - 调用编译后的程序入口点()
x07_solve_v2 - 将程序输出字节直接写入标准输出(无帧处理)
Emit artifacts (debug / CI)
生成构件(调试/持续集成)
x07 bundle ... --emit-dir dist/emit- emits ,
report.json,program.freestanding.c, andwrapper.main.cbundle.combined.c - for , also emits
run-os-sandboxedpolicy.used.json
- emits
x07 bundle ... --emit-dir dist/emit- 生成、
report.json、program.freestanding.c和wrapper.main.c文件bundle.combined.c - 对于模式,还会生成
run-os-sandboxed文件policy.used.json
- 生成
Report contract
报告约定
x07 bundleschema_version: "x07.bundle.report@0.2.0"- contains the underlying runner report used to compile the native artifact
report
x07 bundleschema_version: "x07.bundle.report@0.2.0"- 字段包含用于编译原生构件的底层运行器报告
report