Stream: git-wasmtime

Topic: wasmtime / PR #6486 update and reorganize WIT, fix `cargo...


view this post on Zulip Wasmtime GitHub notifications bot (May 31 2023 at 19:31):

rvolosatovs edited PR #6486:

Refs #6390

I used https://github.com/bytecodealliance/wit-deps to populate the wit/deps directories, I checked in the corresponding deps.toml and deps.lock files for future wit-deps update usage, but I did not add a dependency on the tool (yet?) by either build.rs integration or direct binary usage like was requested in https://github.com/bytecodealliance/preview2-prototyping/pull/136 earlier

I also did not touch crates/wasi/wit/deps other than preview, since package is using dependency versions, which are different from upstream

view this post on Zulip Wasmtime GitHub notifications bot (May 31 2023 at 19:32):

rvolosatovs has marked PR #6486 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (May 31 2023 at 19:32):

rvolosatovs requested pchickey for a review on PR #6486.

view this post on Zulip Wasmtime GitHub notifications bot (May 31 2023 at 19:32):

rvolosatovs requested wasmtime-core-reviewers for a review on PR #6486.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2023 at 10:29):

rvolosatovs requested wasmtime-default-reviewers for a review on PR #6486.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2023 at 10:29):

rvolosatovs updated PR #6486.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2023 at 10:30):

rvolosatovs edited PR #6486:

Refs #6390

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2023 at 10:36):

rvolosatovs edited PR #6486:

Refs #6390

To 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.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2023 at 10:37):

rvolosatovs updated PR #6486.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2023 at 11:12):

rvolosatovs updated PR #6486.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2023 at 11:14):

rvolosatovs edited PR #6486:

Refs #6390

NOTE: 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.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2023 at 11:15):

rvolosatovs edited PR #6486:

Refs #6390

NOTE: 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.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2023 at 11:16):

rvolosatovs edited PR #6486:

Refs #6390

NOTE: 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.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2023 at 11:16):

rvolosatovs updated PR #6486.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2023 at 11:17):

rvolosatovs edited PR #6486:

Refs #6390

NOTE: 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.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2023 at 13:21):

rvolosatovs updated PR #6486.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 15 2023 at 11:11):

rvolosatovs updated PR #6486.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 15 2023 at 11:16):

rvolosatovs edited PR #6486:

(I have removed the old description, since it's no longer relevant)
Duplicate WIT dependencies of wasi crate in wasi-preview1-component-adapter to avoid using relative paths in wit-bindgen invocations fixing downstream dependencies on wasi-preview1-component-adapter using cargo vendor

view this post on Zulip Wasmtime GitHub notifications bot (Jun 15 2023 at 11:17):

rvolosatovs edited PR #6486:

(I have removed the old description, since it's no longer relevant)
Duplicate WIT dependencies of wasi crate in wasi-preview1-component-adapter to avoid using relative paths in wit-bindgen invocations fixing downstream dependencies on wasi-preview1-component-adapter using cargo vendor

This is checked in CI, but developers are free to use whichever tool they chose to achieve this. Running wit-deps lock from crates/wasi-preview1-component-adapter is one way to do it


Last updated: Nov 22 2024 at 17:03 UTC