2.6 KiB
2.6 KiB
Resolution
00001KVHKWNQA を完了しました。
実装内容:
- Guest-side Rust PDK crate
yoi-plugin-pdkを追加しました。 - PDK は typed JSON input/output helper、bounded
ToolError、ToolContext、run_json_tool系 helper、wit_bindgenre-export、export_component_tool!macro を提供します。 - PDK は host/runtime Yoi crates に依存せず、authority を付与しません。Host-side Plugin manifest grants が Tool execution / host API use の authority boundary のままです。
- Embedded Rust Component Tool template を
resources/plugin/templates/rust-component-tool/に追加しました。 - Template は local checkout/dev path dependency を使い、future out-of-tree git
revpattern を docs に記録しています。 resources/plugin/witをwit-bindgenが parse できる package layout に修正し、host WIT dependency をresources/plugin/wit/deps/yoi-host/yoi-host-v1.witに移動しました。- WIT keyword
listは%listescape にし、import name semantics を保持しました。 - Embedded template は empty
[workspace]により in-tree standalone package として check できます。 wit_bindgen::generate!を実際にresources/plugin/witに対して実行する probe と、embedded template のwasm32-unknown-unknowncargo-check probe を追加しました。- Plugin development docs / design docs / package docs / example source を更新しました。
yoi plugin new/check/pack、remote template fetch、crates.io publication、full packaged component execution はこの Ticket の non-goals / follow-up として残しました。
主な commit:
06287aca plugin: add rust pdk template0a9e585c plugin: fix rust pdk wit template probesedc53a6b merge: plugin rust pdk templates
Review:
- r1 は WIT parse failure と embedded template Cargo workspace issue で
request_changes。 - Coder が WIT layout /
%list/ template[workspace]/ actual probes を追加。 - r2 は
approve。
最終 validation:
cargo fmt --checkgit diff --check HEAD^1..HEADcargo test -p yoi-plugin-pdkcargo test -p manifest embedded_rust_component_tool_template_is_valid_package_shapecargo test -p pod pdk_tool_output_shape_is_accepted_by_wasm_decodercargo checkcargo tree -p yoi-plugin-pdk --edges normalcargo check --manifest-path resources/plugin/templates/rust-component-tool/Cargo.toml --target wasm32-unknown-unknownnix build .#yoi --no-link
Package impact:
nix path-info -S .#yoi:112156384
Validation log:
/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-o9gvGb.log