Fuzzing 和验证
Vela 使用分层验证。parser tests、compiler tests、VM tests、examples、 benchmarks、fuzz targets 和 CI checks 覆盖不同失败模式。
默认完整验证目标是:
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace文档站语法高亮还提供:
cd site && npm run test:syntaxFuzzing
Section titled “Fuzzing”仓库在 fuzz/ 下包含 parser fuzz target。本地安装 cargo-fuzz 后可以运
行:
cargo fuzz run parserfuzzing 主要用于发现 parser crash、恢复问题和意外 panic。它不能替代语义 测试或 VM conformance tests。
examples/src/bin 下的可运行示例覆盖热更新、反射、宿主权限、stale host
refs、schema rejection、I/O capabilities 和 domain-neutral standard helpers。
不要删除测试来让失败通过。新的 runtime 行为应先在拥有该 contract 的层写 聚焦测试;当行为跨越子系统时,再补充更宽的 example 或 conformance fixture。