From bdb30f8ec420ee0b0ec70ee075d895896d6a237e Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Mon, 10 Apr 2023 13:09:47 -0500 Subject: [PATCH 1/3] Use depit tool to automatically manage dependency vendoring Resolves #20 --- README.md | 10 +++++----- wit/deps.lock | 19 +++++++++++++++++++ wit/deps.toml | 4 ++++ wit/deps/io/world.wit | 3 +++ wit/deps/logging/world.wit | 3 +++ wit/deps/poll/world.wit | 3 +++ wit/deps/random/world.wit | 3 +++ 7 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 wit/deps.lock create mode 100644 wit/deps.toml create mode 100644 wit/deps/io/world.wit create mode 100644 wit/deps/logging/world.wit create mode 100644 wit/deps/poll/world.wit create mode 100644 wit/deps/random/world.wit diff --git a/README.md b/README.md index 5acd566..2fc9786 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,11 @@ or can be manipulated in other ways with: wasm-tools component wit wit/ ... ``` -The HTTP proposal depends on the WASI IO and Logging proposals. For simplicity, -the Wit files for these proposals are currently copied into the `wit/deps` -directory and will be updated periodically to match their respective proposals. -As the Wit tooling develops, we should be able to avoid this form of manual -vendoring. +The `wit/deps` directory contains a live snapshot of the contents of several +other WASI proposals upon which this proposal depends. It is automatically +updated by running [`depit`](https://crates.io/crates/depit-cli) in the +root directory, which fetches the `main` branch of each proposal. As things +stablize, `wit/deps.toml` will be updated to refer to versioned releases. ### Current Phase diff --git a/wit/deps.lock b/wit/deps.lock new file mode 100644 index 0000000..846adb4 --- /dev/null +++ b/wit/deps.lock @@ -0,0 +1,19 @@ +[io] +url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz" +sha256 = "7450142aeb3f1688ee2b12853344e262caf6aee0718dc0296316f7f6b3afd91f" +sha512 = "5cc0f60d190e16d6dd52a4ca2fc862f007465e7642e98061b41c90778e1f2b00aeb2543b6fadbb6a137dd548d86e9e55edcfb30388adcc6a160b4cdc29d378ec" + +[logging] +url = "https://github.com/WebAssembly/wasi-logging/archive/main.tar.gz" +sha256 = "f378a2b6a36af096528ec5e7031da474990cecaec1949c663befc5066d719f6f" +sha512 = "ba09307b12f5428c3058d878001c9fb15df21933c6203328f785d5009a4fc0cf304950271590d4146305a2d8b8988595f396d955961168cb6bfa7ea9af1cc362" + +[poll] +url = "https://github.com/WebAssembly/wasi-poll/archive/main.tar.gz" +sha256 = "065422b0ea6ccb2a9facc6b87b902eef110c53d76fc31f341a6bc8d0b0285b6a" +sha512 = "19a55cd3072a19ae6a1774723a4962e7a155a5ce89a27175e8c76020efb4d00bc92ebb78427d92bcb8effd4f0d03ebf0a0daa747ecd981b8d31d5abc2ad86423" + +[random] +url = "https://github.com/WebAssembly/wasi-random/archive/main.tar.gz" +sha256 = "79b6417bb1ab3c82c241c56021e717f258e2a0b3ab94db93907ca11d7f92ed66" +sha512 = "1e657ac56420e65bde75eabea920a605a0ff4adc6f2ba8b7cf1c37a603710449bc1a29568dda2b61c04ae9889d2b1a82b9935d4b9d573eb48a83e0ecf9cad591" diff --git a/wit/deps.toml b/wit/deps.toml new file mode 100644 index 0000000..907c4ac --- /dev/null +++ b/wit/deps.toml @@ -0,0 +1,4 @@ +io = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz" +logging = "https://github.com/WebAssembly/wasi-logging/archive/main.tar.gz" +poll = "https://github.com/WebAssembly/wasi-poll/archive/main.tar.gz" +random = "https://github.com/WebAssembly/wasi-random/archive/main.tar.gz" diff --git a/wit/deps/io/world.wit b/wit/deps/io/world.wit new file mode 100644 index 0000000..bae7c92 --- /dev/null +++ b/wit/deps/io/world.wit @@ -0,0 +1,3 @@ +default world example-world { + import streams: pkg.streams +} diff --git a/wit/deps/logging/world.wit b/wit/deps/logging/world.wit new file mode 100644 index 0000000..b5af151 --- /dev/null +++ b/wit/deps/logging/world.wit @@ -0,0 +1,3 @@ +default world example-world { + import logging: pkg.logging +} diff --git a/wit/deps/poll/world.wit b/wit/deps/poll/world.wit new file mode 100644 index 0000000..3a002e0 --- /dev/null +++ b/wit/deps/poll/world.wit @@ -0,0 +1,3 @@ +default world example-world { + import poll: pkg.poll +} diff --git a/wit/deps/random/world.wit b/wit/deps/random/world.wit new file mode 100644 index 0000000..8d54b3b --- /dev/null +++ b/wit/deps/random/world.wit @@ -0,0 +1,3 @@ +default world example-world { + import random: pkg.random +} From 85d10fb161769965568508275c3190f2d9107a54 Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Tue, 11 Apr 2023 15:48:09 -0500 Subject: [PATCH 2/3] Update README.md to refer to 'depit update' --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2fc9786..1f2ca87 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,10 @@ wasm-tools component wit wit/ ... The `wit/deps` directory contains a live snapshot of the contents of several other WASI proposals upon which this proposal depends. It is automatically -updated by running [`depit`](https://crates.io/crates/depit-cli) in the -root directory, which fetches the `main` branch of each proposal. As things -stablize, `wit/deps.toml` will be updated to refer to versioned releases. +updated by running [`depit update`](https://crates.io/crates/depit-cli) in the +root directory, which fetches the live contents of the `main` branch of each +proposal. As things stablize, `wit/deps.toml` will be updated to refer to +versioned releases. ### Current Phase From 9bb8365cf673987b7115bc081165b04308b3b8e4 Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Tue, 11 Apr 2023 18:17:12 -0500 Subject: [PATCH 3/3] Update depit to wit-deps in README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1f2ca87..7ae657b 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ wasm-tools component wit wit/ ... The `wit/deps` directory contains a live snapshot of the contents of several other WASI proposals upon which this proposal depends. It is automatically -updated by running [`depit update`](https://crates.io/crates/depit-cli) in the -root directory, which fetches the live contents of the `main` branch of each -proposal. As things stablize, `wit/deps.toml` will be updated to refer to +updated by running [`wit-deps update`](https://crates.io/crates/wit-deps-cli) +in the root directory, which fetches the live contents of the `main` branch of +each proposal. As things stablize, `wit/deps.toml` will be updated to refer to versioned releases. ### Current Phase