rvolosatovs edited PR #6486:
Refs #6390
I used https://github.com/bytecodealliance/wit-deps to populate the
wit/deps
directories, I checked in the correspondingdeps.toml
anddeps.lock
files for futurewit-deps update
usage, but I did not add a dependency on the tool (yet?) by eitherbuild.rs
integration or direct binary usage like was requested in https://github.com/bytecodealliance/preview2-prototyping/pull/136 earlierI also did not touch
crates/wasi/wit/deps
other thanpreview
, since package is using dependency versions, which are different from upstream
- update outdated WIT files
- move
crates/wasi/wit/deps/preview
tocrates/wasi/wit
, sincepreview
package is the WASI package- fix
cargo vendor
use cases (downstream crates utilizing Wasmtime viacargo vendor
) by ensuring that all WIT-using crates are self-contained- use consistent naming and location scheme for dependencies (e.g.
deps/cli-base
forwasi:cli-base
, just likedeps/io
is used forwasi:io
)
rvolosatovs has marked PR #6486 as ready for review.
rvolosatovs requested pchickey for a review on PR #6486.
rvolosatovs requested wasmtime-core-reviewers for a review on PR #6486.
rvolosatovs requested wasmtime-default-reviewers for a review on PR #6486.
rvolosatovs updated PR #6486.
rvolosatovs edited PR #6486:
Refs #6390
- Move
crates/wasi/wit/deps/preview
tocrates/wasi/wit
- Move
crates/wasi/wit/test.wit
tocrates/test-programs/reactor-tests/wit/test.wit
- Sync dependencies with upstream
- Rename
wasi:cli-base
towasi:cli
to better match upstream- Introduce
wasmtime-wit-deps
development command to validate and update WIT dependencies
rvolosatovs edited PR #6486:
Refs #6390
- Move
crates/wasi/wit/deps/preview
tocrates/wasi/wit
- Move
crates/wasi/wit/test.wit
tocrates/test-programs/reactor-tests/wit/test.wit
- Move custom standard packages used by
wasi
crate tocrates/wasi/{filesystem,clocks,cli}
- Sync dependencies with upstream
- Rename
wasi:cli-base
towasi:cli
to better match upstream- Introduce
wasmtime-wit-deps
development command to validate and update WIT dependenciesTo update dependencies:
cargo run -p wasmtime-wit-deps update
To "lock" (e.g. to propagate local changes in
crates/wasi
to other crates without updating any dependencies from network)cargo run -p wasmtime-wit-deps lock
Example of a lock operation:
Diff like:
diff --git a/crates/wasi/wit/filesystem/filesystem.wit b/crates/wasi/wit/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi/wit/filesystem/filesystem.wit +++ b/crates/wasi/wit/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead.
followed by
cargo run -p wasmtime-wit-deps lock
would produce the following diff in the rest of the codebase:diff --git a/crates/test-programs/reactor-tests/wit/deps.lock b/crates/test-programs/reactor-tests/wit/deps.lock index f2ad0e1e5..475c51d56 100644 --- a/crates/test-programs/reactor-tests/wit/deps.lock +++ b/crates/test-programs/reactor-tests/wit/deps.lock @@ -7,8 +7,8 @@ sha256 = "e52b48c854965405223e61fded08da1450cf1ee7a0e5e546433f5fb0df7e1aff" sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f3165029efbec49e3c6b3e9b893d6102d31aae1d8119eb38222233afc9ce62" [filesystem] -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] sha256 = "3d41ce13364177bdf7eea92d78d9ab302ccd5d9462cfdf074677d50244c565b1" diff --git a/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit b/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit +++ b/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. diff --git a/crates/wasi-preview1-component-adapter/wit/deps.lock b/crates/wasi-preview1-component-adapter/wit/deps.lock index 5c1e9d2f8..7897bb2dd 100644 --- a/crates/wasi-preview1-component-adapter/wit/deps.lock +++ b/crates/wasi-preview1-component-adapter/wit/deps.lock @@ -7,8 +7,8 @@ sha256 = "e52b48c854965405223e61fded08da1450cf1ee7a0e5e546433f5fb0df7e1aff" sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f3165029efbec49e3c6b3e9b893d6102d31aae1d8119eb38222233afc9ce62" [filesystem] -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] sha256 = "3d41ce13364177bdf7eea92d78d9ab302ccd5d9462cfdf074677d50244c565b1" diff --git a/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit b/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit +++ b/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. diff --git a/crates/wasi/wit/deps.lock b/crates/wasi/wit/deps.lock index 06e56aff9..55ae6d181 100644 --- a/crates/wasi/wit/deps.lock +++ b/crates/wasi/wit/deps.lock @@ -10,8 +10,8 @@ sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f316 [filesystem] path = "filesystem" -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] url = "https://github.com/WebAssembly/wasi-http/archive/main.tar.gz" diff --git a/crates/wasi/wit/deps/filesystem/filesystem.wit b/crates/wasi/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi/wit/deps/filesystem/filesystem.wit +++ b/crates/wasi/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead.
rvolosatovs updated PR #6486.
rvolosatovs updated PR #6486.
rvolosatovs edited PR #6486:
Refs #6390
- Move
crates/wasi/wit/deps/preview
tocrates/wasi/wit
- Move
crates/wasi/wit/test.wit
tocrates/test-programs/reactor-tests/wit/test.wit
- Move custom standard packages used by
wasi
crate tocrates/wasi/{filesystem,clocks,cli}
- Sync dependencies with upstream
- Rename
wasi:cli-base
towasi:cli
to better match upstream- Introduce
wasmtime-wit-deps
development command to validate and update WIT dependenciesNOTE: I have originally made the tool part of the workspace, but that required me to vet 71 new dependency, so I moved it outside the workspace to remove the need for doing that, after all it should not influence the wasmtime dependency graph and we would not do this audit if we used https://github.com/bytecodealliance/wit-deps as a binary directly
To update dependencies:
cargo run --manifest-path ./crates/wit-deps/Cargo.toml update
To "lock" (e.g. to propagate local changes in
crates/wasi
to other crates without updating any dependencies from network)cargo run --manifest-path ./crates/wit-deps/Cargo.toml lock
Example of a lock operation:
Diff like:
diff --git a/crates/wasi/wit/filesystem/filesystem.wit b/crates/wasi/wit/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi/wit/filesystem/filesystem.wit +++ b/crates/wasi/wit/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead.
followed by
cargo run -p wasmtime-wit-deps lock
would produce the following diff in the rest of the codebase:diff --git a/crates/test-programs/reactor-tests/wit/deps.lock b/crates/test-programs/reactor-tests/wit/deps.lock index f2ad0e1e5..475c51d56 100644 --- a/crates/test-programs/reactor-tests/wit/deps.lock +++ b/crates/test-programs/reactor-tests/wit/deps.lock @@ -7,8 +7,8 @@ sha256 = "e52b48c854965405223e61fded08da1450cf1ee7a0e5e546433f5fb0df7e1aff" sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f3165029efbec49e3c6b3e9b893d6102d31aae1d8119eb38222233afc9ce62" [filesystem] -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] sha256 = "3d41ce13364177bdf7eea92d78d9ab302ccd5d9462cfdf074677d50244c565b1" diff --git a/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit b/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit +++ b/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. diff --git a/crates/wasi-preview1-component-adapter/wit/deps.lock b/crates/wasi-preview1-component-adapter/wit/deps.lock index 5c1e9d2f8..7897bb2dd 100644 --- a/crates/wasi-preview1-component-adapter/wit/deps.lock +++ b/crates/wasi-preview1-component-adapter/wit/deps.lock @@ -7,8 +7,8 @@ sha256 = "e52b48c854965405223e61fded08da1450cf1ee7a0e5e546433f5fb0df7e1aff" sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f3165029efbec49e3c6b3e9b893d6102d31aae1d8119eb38222233afc9ce62" [filesystem] -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] sha256 = "3d41ce13364177bdf7eea92d78d9ab302ccd5d9462cfdf074677d50244c565b1" diff --git a/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit b/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit +++ b/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. diff --git a/crates/wasi/wit/deps.lock b/crates/wasi/wit/deps.lock index 06e56aff9..55ae6d181 100644 --- a/crates/wasi/wit/deps.lock +++ b/crates/wasi/wit/deps.lock @@ -10,8 +10,8 @@ sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f316 [filesystem] path = "filesystem" -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] url = "https://github.com/WebAssembly/wasi-http/archive/main.tar.gz" diff --git a/crates/wasi/wit/deps/filesystem/filesystem.wit b/crates/wasi/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi/wit/deps/filesystem/filesystem.wit +++ b/crates/wasi/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead.
rvolosatovs edited PR #6486:
Refs #6390
- Move
crates/wasi/wit/deps/preview
tocrates/wasi/wit
- Move
crates/wasi/wit/test.wit
tocrates/test-programs/reactor-tests/wit/test.wit
- Move custom standard packages used by
wasi
crate tocrates/wasi/{filesystem,clocks,cli}
- Sync dependencies with upstream
- Rename
wasi:cli-base
towasi:cli
to better match upstream- Introduce
wasmtime-wit-deps
development command to validate and update WIT dependenciesNOTE: I have originally made the tool part of the workspace, but that required me to vet 71 dependency changes (additions/updates), so I moved it outside the workspace to remove the need for doing that, after all it should not influence the wasmtime dependency graph and we would not do this audit if we used https://github.com/bytecodealliance/wit-deps as a binary directly
To update dependencies:
cargo run --manifest-path ./crates/wit-deps/Cargo.toml update
To "lock" (e.g. to propagate local changes in
crates/wasi
to other crates without updating any dependencies from network)cargo run --manifest-path ./crates/wit-deps/Cargo.toml lock
Example of a lock operation:
Diff like:
diff --git a/crates/wasi/wit/filesystem/filesystem.wit b/crates/wasi/wit/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi/wit/filesystem/filesystem.wit +++ b/crates/wasi/wit/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead.
followed by
cargo run -p wasmtime-wit-deps lock
would produce the following diff in the rest of the codebase:diff --git a/crates/test-programs/reactor-tests/wit/deps.lock b/crates/test-programs/reactor-tests/wit/deps.lock index f2ad0e1e5..475c51d56 100644 --- a/crates/test-programs/reactor-tests/wit/deps.lock +++ b/crates/test-programs/reactor-tests/wit/deps.lock @@ -7,8 +7,8 @@ sha256 = "e52b48c854965405223e61fded08da1450cf1ee7a0e5e546433f5fb0df7e1aff" sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f3165029efbec49e3c6b3e9b893d6102d31aae1d8119eb38222233afc9ce62" [filesystem] -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] sha256 = "3d41ce13364177bdf7eea92d78d9ab302ccd5d9462cfdf074677d50244c565b1" diff --git a/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit b/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit +++ b/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. diff --git a/crates/wasi-preview1-component-adapter/wit/deps.lock b/crates/wasi-preview1-component-adapter/wit/deps.lock index 5c1e9d2f8..7897bb2dd 100644 --- a/crates/wasi-preview1-component-adapter/wit/deps.lock +++ b/crates/wasi-preview1-component-adapter/wit/deps.lock @@ -7,8 +7,8 @@ sha256 = "e52b48c854965405223e61fded08da1450cf1ee7a0e5e546433f5fb0df7e1aff" sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f3165029efbec49e3c6b3e9b893d6102d31aae1d8119eb38222233afc9ce62" [filesystem] -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] sha256 = "3d41ce13364177bdf7eea92d78d9ab302ccd5d9462cfdf074677d50244c565b1" diff --git a/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit b/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit +++ b/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. diff --git a/crates/wasi/wit/deps.lock b/crates/wasi/wit/deps.lock index 06e56aff9..55ae6d181 100644 --- a/crates/wasi/wit/deps.lock +++ b/crates/wasi/wit/deps.lock @@ -10,8 +10,8 @@ sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f316 [filesystem] path = "filesystem" -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] url = "https://github.com/WebAssembly/wasi-http/archive/main.tar.gz" diff --git a/crates/wasi/wit/deps/filesystem/filesystem.wit b/crates/wasi/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi/wit/deps/filesystem/filesystem.wit +++ b/crates/wasi/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead.
rvolosatovs edited PR #6486:
Refs #6390
- Move
crates/wasi/wit/deps/preview
tocrates/wasi/wit
- Move
crates/wasi/wit/test.wit
tocrates/test-programs/reactor-tests/wit/test.wit
- Move custom standard packages used by
wasi
crate tocrates/wasi/{filesystem,clocks,cli}
- Sync dependencies with upstream
- Rename
wasi:cli-base
towasi:cli
to better match upstream- Introduce
wasmtime-wit-deps
development command to validate and update WIT dependenciesNOTE: I have originally made the tool part of the workspace, but that required me to vet 71 dependency changes (additions/updates), so I moved it outside the workspace to remove the need for doing that, after all it should not influence the wasmtime dependency graph and we would not do this audit if we used https://github.com/bytecodealliance/wit-deps as a binary directly (see https://github.com/bytecodealliance/wasmtime/pull/6486/commits/d6d6b1c633ac9469e71f7c3877fc2ba52d4368bf)
To update dependencies:
cargo run --manifest-path ./crates/wit-deps/Cargo.toml update
To "lock" (e.g. to propagate local changes in
crates/wasi
to other crates without updating any dependencies from network)cargo run --manifest-path ./crates/wit-deps/Cargo.toml lock
Example of a lock operation:
Diff like:
diff --git a/crates/wasi/wit/filesystem/filesystem.wit b/crates/wasi/wit/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi/wit/filesystem/filesystem.wit +++ b/crates/wasi/wit/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead.
followed by
cargo run -p wasmtime-wit-deps lock
would produce the following diff in the rest of the codebase:diff --git a/crates/test-programs/reactor-tests/wit/deps.lock b/crates/test-programs/reactor-tests/wit/deps.lock index f2ad0e1e5..475c51d56 100644 --- a/crates/test-programs/reactor-tests/wit/deps.lock +++ b/crates/test-programs/reactor-tests/wit/deps.lock @@ -7,8 +7,8 @@ sha256 = "e52b48c854965405223e61fded08da1450cf1ee7a0e5e546433f5fb0df7e1aff" sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f3165029efbec49e3c6b3e9b893d6102d31aae1d8119eb38222233afc9ce62" [filesystem] -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] sha256 = "3d41ce13364177bdf7eea92d78d9ab302ccd5d9462cfdf074677d50244c565b1" diff --git a/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit b/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit +++ b/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. diff --git a/crates/wasi-preview1-component-adapter/wit/deps.lock b/crates/wasi-preview1-component-adapter/wit/deps.lock index 5c1e9d2f8..7897bb2dd 100644 --- a/crates/wasi-preview1-component-adapter/wit/deps.lock +++ b/crates/wasi-preview1-component-adapter/wit/deps.lock @@ -7,8 +7,8 @@ sha256 = "e52b48c854965405223e61fded08da1450cf1ee7a0e5e546433f5fb0df7e1aff" sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f3165029efbec49e3c6b3e9b893d6102d31aae1d8119eb38222233afc9ce62" [filesystem] -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] sha256 = "3d41ce13364177bdf7eea92d78d9ab302ccd5d9462cfdf074677d50244c565b1" diff --git a/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit b/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit +++ b/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. diff --git a/crates/wasi/wit/deps.lock b/crates/wasi/wit/deps.lock index 06e56aff9..55ae6d181 100644 --- a/crates/wasi/wit/deps.lock +++ b/crates/wasi/wit/deps.lock @@ -10,8 +10,8 @@ sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f316 [filesystem] path = "filesystem" -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] url = "https://github.com/WebAssembly/wasi-http/archive/main.tar.gz" diff --git a/crates/wasi/wit/deps/filesystem/filesystem.wit b/crates/wasi/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi/wit/deps/filesystem/filesystem.wit +++ b/crates/wasi/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead.
rvolosatovs updated PR #6486.
rvolosatovs edited PR #6486:
Refs #6390
- Move
crates/wasi/wit/deps/preview
tocrates/wasi/wit
- Move
crates/wasi/wit/test.wit
tocrates/test-programs/reactor-tests/wit/test.wit
- Move custom standard packages used by
wasi
crate tocrates/wasi/{filesystem,clocks,cli}
- Sync dependencies with upstream
- Rename
wasi:cli-base
towasi:cli
to better match upstream- Introduce
wasmtime-wit-deps
development command to validate and update WIT dependenciesNOTE: I have originally made the tool part of the workspace, but that required me to vet 71 dependency changes (additions/updates), so I moved it outside the workspace to remove the need for doing that, after all it should not influence the wasmtime dependency graph and we would not do this audit if we used https://github.com/bytecodealliance/wit-deps as a binary directly (see https://github.com/bytecodealliance/wasmtime/pull/6486/commits/b22c571b911c1bbdd2d9356d72de18606d3e08ce)
To update dependencies:
cargo run --manifest-path ./crates/wit-deps/Cargo.toml update
To "lock" (e.g. to propagate local changes in
crates/wasi
to other crates without updating any dependencies from network)cargo run --manifest-path ./crates/wit-deps/Cargo.toml lock
Example of a lock operation:
Diff like:
diff --git a/crates/wasi/wit/filesystem/filesystem.wit b/crates/wasi/wit/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi/wit/filesystem/filesystem.wit +++ b/crates/wasi/wit/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead.
followed by
cargo run -p wasmtime-wit-deps lock
would produce the following diff in the rest of the codebase:diff --git a/crates/test-programs/reactor-tests/wit/deps.lock b/crates/test-programs/reactor-tests/wit/deps.lock index f2ad0e1e5..475c51d56 100644 --- a/crates/test-programs/reactor-tests/wit/deps.lock +++ b/crates/test-programs/reactor-tests/wit/deps.lock @@ -7,8 +7,8 @@ sha256 = "e52b48c854965405223e61fded08da1450cf1ee7a0e5e546433f5fb0df7e1aff" sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f3165029efbec49e3c6b3e9b893d6102d31aae1d8119eb38222233afc9ce62" [filesystem] -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] sha256 = "3d41ce13364177bdf7eea92d78d9ab302ccd5d9462cfdf074677d50244c565b1" diff --git a/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit b/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit +++ b/crates/test-programs/reactor-tests/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. diff --git a/crates/wasi-preview1-component-adapter/wit/deps.lock b/crates/wasi-preview1-component-adapter/wit/deps.lock index 5c1e9d2f8..7897bb2dd 100644 --- a/crates/wasi-preview1-component-adapter/wit/deps.lock +++ b/crates/wasi-preview1-component-adapter/wit/deps.lock @@ -7,8 +7,8 @@ sha256 = "e52b48c854965405223e61fded08da1450cf1ee7a0e5e546433f5fb0df7e1aff" sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f3165029efbec49e3c6b3e9b893d6102d31aae1d8119eb38222233afc9ce62" [filesystem] -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] sha256 = "3d41ce13364177bdf7eea92d78d9ab302ccd5d9462cfdf074677d50244c565b1" diff --git a/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit b/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit +++ b/crates/wasi-preview1-component-adapter/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. diff --git a/crates/wasi/wit/deps.lock b/crates/wasi/wit/deps.lock index 06e56aff9..55ae6d181 100644 --- a/crates/wasi/wit/deps.lock +++ b/crates/wasi/wit/deps.lock @@ -10,8 +10,8 @@ sha512 = "62a781f27f60c9f882f878578ffc2c0c0ad92bbdbed8c727ec588ca345da348690f316 [filesystem] path = "filesystem" -sha256 = "2bfd4a753f7b937c1c32d40c785a2a43414fe3ba062be4b6c6264e07efd8e0d9" -sha512 = "4c1f68f9b57bb9fc0564062ae848fdecfba1b33116d03fb17014a23e9fb5ed3f0a1ceaf853397216d40288079c835d11c7f7a9830656da2812cdbddf87247dc5" +sha256 = "6f15b1a87e7de09972af5fdd9114cabda085e81a0aa3669ab4e86a6faa982f9a" +sha512 = "c9c81eda59bb9286d5ad0b830a5c720279bcf9f57cf8bf65a7febc50275a8b6883f445edf6f382fdaa19088a8093ded5e210801e7012bec8f4c5ce990f674120" [http] url = "https://github.com/WebAssembly/wasi-http/archive/main.tar.gz" diff --git a/crates/wasi/wit/deps/filesystem/filesystem.wit b/crates/wasi/wit/deps/filesystem/filesystem.wit index 930f37567..3a60fe5c4 100644 --- a/crates/wasi/wit/deps/filesystem/filesystem.wit +++ b/crates/wasi/wit/deps/filesystem/filesystem.wit @@ -1,5 +1,6 @@ package wasi:filesystem + /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead.
rvolosatovs updated PR #6486.
rvolosatovs updated PR #6486.
rvolosatovs edited PR #6486:
(I have removed the old description, since it's no longer relevant)
Duplicate WIT dependencies ofwasi
crate inwasi-preview1-component-adapter
to avoid using relative paths inwit-bindgen
invocations fixing downstream dependencies onwasi-preview1-component-adapter
usingcargo vendor
rvolosatovs edited PR #6486:
(I have removed the old description, since it's no longer relevant)
Duplicate WIT dependencies ofwasi
crate inwasi-preview1-component-adapter
to avoid using relative paths inwit-bindgen
invocations fixing downstream dependencies onwasi-preview1-component-adapter
usingcargo vendor
This is checked in CI, but developers are free to use whichever tool they chose to achieve this. Running
wit-deps lock
fromcrates/wasi-preview1-component-adapter
is one way to do it
Last updated: Nov 22 2024 at 17:03 UTC