diff --git a/Cargo.lock b/Cargo.lock index ecf7661..5a4d3c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,9 +16,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" [[package]] name = "base64" @@ -58,9 +58,9 @@ checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" [[package]] name = "cranelift-bitset" -version = "0.112.2" +version = "0.113.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eaa2aece6237198afd32bff57699e08d4dccb8d3902c214fc1e6ba907247ca4" +checksum = "8ab25ef3be935a80680e393183e1f94ef507e93a24a8369494d2c6818aedb3e3" dependencies = [ "serde", "serde_derive", @@ -68,9 +68,9 @@ dependencies = [ [[package]] name = "cranelift-entity" -version = "0.112.2" +version = "0.113.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14ebe592a2f81af9237cf9be29dd3854ecb72108cfffa59e85ef12389bf939e3" +checksum = "e2d770e6605eccee15b49decdd82cd26f2b6404767802471459ea49c57379a98" dependencies = [ "cranelift-bitset", "serde", @@ -143,15 +143,6 @@ dependencies = [ "wasi", ] -[[package]] -name = "gimli" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" -dependencies = [ - "indexmap", -] - [[package]] name = "gimli" version = "0.31.1" @@ -213,17 +204,17 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-component-bindgen" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f6cb9c5efabf63501bfdecf4e9200e3374afbfb0dd5920242aef85f89f4e27" +checksum = "b9deb206ef8c4bffc26eeb2626535f2b2445cf4d0266e08c4945b2b35539b55e" dependencies = [ "anyhow", "base64", "heck", "log", "semver", - "wasm-encoder 0.217.0", - "wasmparser 0.217.0", + "wasm-encoder 0.218.0", + "wasmparser 0.218.0", "wasmtime-environ", "wit-bindgen-core", "wit-component", @@ -238,9 +229,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "linux-raw-sys" @@ -284,7 +275,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51ed2b1f146b4939eb4ca7d6400441e42097de85c10b9e76cc8416b62cd4cdc5" dependencies = [ - "gimli 0.31.1", + "gimli", "log", "serde_json", "tempfile", @@ -315,9 +306,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.22" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", "syn", @@ -325,9 +316,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -373,9 +364,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" dependencies = [ "bitflags", "errno", @@ -401,18 +392,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", @@ -421,9 +412,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -458,7 +449,7 @@ dependencies = [ "js-component-bindgen", "orca-wasm", "rand", - "wasm-encoder 0.217.0", + "wasm-encoder 0.218.0", "wasmparser 0.217.0", "wit-bindgen", "wit-bindgen-core", @@ -474,9 +465,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "syn" -version = "2.0.79" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ "proc-macro2", "quote", @@ -553,19 +544,19 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.219.1" +version = "0.218.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29cbbd772edcb8e7d524a82ee8cef8dd046fc14033796a754c3ad246d019fa54" +checksum = "22b896fa8ceb71091ace9bcb81e853f54043183a1c9667cf93422c40252ffa0a" dependencies = [ "leb128", - "wasmparser 0.219.1", + "wasmparser 0.218.0", ] [[package]] name = "wasm-metadata" -version = "0.217.0" +version = "0.218.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65a146bf9a60e9264f0548a2599aa9656dba9a641eff9ab88299dc2a637e483c" +checksum = "aa5eeb071abe8a2132fdd5565dabffee70775ee8c24fc7e300ac43f51f4a8a91" dependencies = [ "anyhow", "indexmap", @@ -573,8 +564,8 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder 0.217.0", - "wasmparser 0.217.0", + "wasm-encoder 0.218.0", + "wasmparser 0.218.0", ] [[package]] @@ -593,41 +584,45 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.219.1" +version = "0.218.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c771866898879073c53b565a6c7b49953795159836714ac56a5befb581227c5" +checksum = "b09e46c7fceceaa72b2dd1a8a137ea7fd8f93dfaa69806010a709918e496c5dc" dependencies = [ + "ahash", "bitflags", + "hashbrown 0.14.5", "indexmap", + "semver", + "serde", ] [[package]] name = "wasmprinter" -version = "0.217.0" +version = "0.218.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dc568b3e0d47e8f96ea547c90790cfa783f0205160c40de894a427114185ce" +checksum = "0ace089155491837b75f474bf47c99073246d1b737393fe722d6dee311595ddc" dependencies = [ "anyhow", "termcolor", - "wasmparser 0.217.0", + "wasmparser 0.218.0", ] [[package]] name = "wasmtime-component-util" -version = "25.0.2" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ed562fbb0cbed20a56c369c8de146c1de06a48c19e26ed9aa45f073514ee60" +checksum = "cfe3c27d64af5f584014db9381c081223d27a57e1dce2f6280bbafea37575619" [[package]] name = "wasmtime-environ" -version = "25.0.2" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b72debe8899f19bedf66f7071310f06ef62de943a1369ba9b373613e77dd3d" +checksum = "f3444c1759d5b906ff76a3cab073dd92135bdd06e5d1f46635ec40a58207d314" dependencies = [ "anyhow", "cranelift-bitset", "cranelift-entity", - "gimli 0.29.0", + "gimli", "indexmap", "log", "object", @@ -635,46 +630,32 @@ dependencies = [ "semver", "serde", "serde_derive", + "smallvec", "target-lexicon", - "wasm-encoder 0.217.0", - "wasmparser 0.217.0", + "wasm-encoder 0.218.0", + "wasmparser 0.218.0", "wasmprinter", "wasmtime-component-util", - "wasmtime-types", -] - -[[package]] -name = "wasmtime-types" -version = "25.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8340d976673ac3fdacac781f2afdc4933920c1adc738c3409e825dab3955399" -dependencies = [ - "anyhow", - "cranelift-entity", - "serde", - "serde_derive", - "smallvec", - "wasmparser 0.217.0", ] [[package]] name = "wast" -version = "219.0.1" +version = "218.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f79a9d9df79986a68689a6b40bcc8d5d40d807487b235bebc2ac69a242b54a1" +checksum = "8a53cd1f0fa505df97557e36a58bddb8296e2fcdcd089529545ebfdb18a1b9d7" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.219.1", + "wasm-encoder 0.218.0", ] [[package]] name = "wat" -version = "1.219.1" +version = "1.218.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bc3cf014fb336883a411cd662f987abf6a1d2a27f2f0008616a0070bbf6bd0d" +checksum = "4f87f8e14e776762e07927c27c2054d2cf678aab9aae2d431a79b3e31e4dd391" dependencies = [ "wast", ] @@ -772,9 +753,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "wit-bindgen" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eb9327b2afd6af02ab39f8fbde6bfc7d369d14bc8c8688311d3defcda3952bd" +checksum = "8fcf26778671a2327bd237a32c6f2d1d9bb0ec077e482b0839552b00d4566544" dependencies = [ "wit-bindgen-rt", "wit-bindgen-rust-macro", @@ -782,9 +763,9 @@ dependencies = [ [[package]] name = "wit-bindgen-core" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc9cfd3f1b4e29e9a90fe04157764f24ae396cfb8530dae5753de140e73f9e56" +checksum = "4b885a00e1c428fd12b7b7c4bccc4bad8b2a3ca0abe8eaf1e0f90adabb4c7ac7" dependencies = [ "anyhow", "heck", @@ -793,18 +774,18 @@ dependencies = [ [[package]] name = "wit-bindgen-rt" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca6f307148acf7199e492fd3781cc7b79f8f3eda003c0ac3aa8079449601ccb" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" dependencies = [ "bitflags", ] [[package]] name = "wit-bindgen-rust" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf075ae0c89dc391f7d710d70c69bfd018c029c74a54f7ddfd0266dccc8ff0c5" +checksum = "542608877814a54f6bea6b24dcbe249a2e293d67d709f4f8ec578d06b1c00730" dependencies = [ "anyhow", "heck", @@ -818,9 +799,9 @@ dependencies = [ [[package]] name = "wit-bindgen-rust-macro" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ab28d36e4d326bd43d483512348874d4fffa378d8dc1da6dd6521afe2ec4f6" +checksum = "30d462025f670fff96606ddbfe62500255b4fe3de7298cd9cbabb2de3d567183" dependencies = [ "anyhow", "prettyplease", @@ -833,9 +814,9 @@ dependencies = [ [[package]] name = "wit-component" -version = "0.217.0" +version = "0.218.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7117809905e49db716d81e794f79590c052bf2fdbbcda1731ca0fb28f6f3ddf" +checksum = "aa53aa7e6bf2b3e8ccaffbcc963fbdb672a603dc0af393a481b6cec24c266406" dependencies = [ "anyhow", "bitflags", @@ -844,18 +825,18 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder 0.217.0", + "wasm-encoder 0.218.0", "wasm-metadata", - "wasmparser 0.217.0", + "wasmparser 0.218.0", "wat", "wit-parser", ] [[package]] name = "wit-parser" -version = "0.217.0" +version = "0.218.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb893dcd6d370cfdf19a0d9adfcd403efb8e544e1a0ea3a8b81a21fe392eaa78" +checksum = "0d3d1066ab761b115f97fef2b191090faabcb0f37b555b758d3caf42d4ed9e55" dependencies = [ "anyhow", "id-arena", @@ -866,7 +847,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.217.0", + "wasmparser 0.218.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f87639f..6cf494e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,14 +8,14 @@ edition = "2021" version = "0.1.0" [workspace.dependencies] -anyhow = "1.0.86" +anyhow = "1.0.91" heck = "0.5" -js-component-bindgen = "1.6.0" +js-component-bindgen = "1.7.1" rand = "0.8" -wasm-encoder = "0.217.0" +wasm-encoder = "0.218.0" wasmparser = "0.217.0" -wit-bindgen = "0.32.0" -wit-bindgen-core = "0.32.0" -wit-component = { version = "0.217.0", features = ["dummy-module"] } -wit-parser = "0.217.0" +wit-bindgen = "0.33.0" +wit-bindgen-core = "0.33.0" +wit-component = { version = "0.218.0", features = ["dummy-module"] } +wit-parser = "0.218.0" orca-wasm = "0.1.4" diff --git a/Makefile b/Makefile index d94ffc4..7cc9c0a 100644 --- a/Makefile +++ b/Makefile @@ -24,20 +24,20 @@ target/wasm32-wasi/release/spidermonkey_embedding_splicer.wasm: Cargo.toml crate lib/starlingmonkey_embedding.wasm: StarlingMonkey/cmake/* embedding/* StarlingMonkey/runtime/* StarlingMonkey/builtins/* StarlingMonkey/builtins/*/* StarlingMonkey/builtins/*/*/* StarlingMonkey/include/* | lib cmake -B build-release -DCMAKE_BUILD_TYPE=Release make -j16 -C build-release - @cp build-release/starling.wasm/starling.wasm $@ + @cp build-release/starling-raw.wasm/starling-raw.wasm $@ lib/starlingmonkey_embedding_weval.wasm: StarlingMonkey/cmake/* embedding/* StarlingMonkey/runtime/* StarlingMonkey/builtins/* StarlingMonkey/builtins/*/* StarlingMonkey/builtins/*/*/* StarlingMonkey/include/* | lib cmake -B build-release-weval -DCMAKE_BUILD_TYPE=Release -DWEVAL=ON make -j16 -C build-release-weval - @cp build-release-weval/starling.wasm/starling.wasm $@ + @cp build-release-weval/starling-raw.wasm/starling-raw.wasm $@ lib/starlingmonkey_ics.wevalcache: lib/starlingmonkey_embedding_weval.wasm - @cp build-release-weval/starling.wasm/starling-ics.wevalcache $@ + @cp build-release-weval/starling-raw.wasm/starling-ics.wevalcache $@ lib/starlingmonkey_embedding.debug.wasm: StarlingMonkey/cmake/* embedding/* StarlingMonkey/runtime/* StarlingMonkey/builtins/* StarlingMonkey/builtins/*/* StarlingMonkey/builtins/*/*/* StarlingMonkey/include/* | lib cmake -B build-debug -DCMAKE_BUILD_TYPE=RelWithDebInfo make -j16 -C build-debug - @cp build-debug/starling.wasm/starling.wasm $@ + @cp build-debug/starling-raw.wasm/starling-raw.wasm $@ obj: mkdir -p obj diff --git a/StarlingMonkey b/StarlingMonkey index 1a8077d..d3c7a28 160000 --- a/StarlingMonkey +++ b/StarlingMonkey @@ -1 +1 @@ -Subproject commit 1a8077d5d1c81cfbc9d1c90c251c82b46b153907 +Subproject commit d3c7a28252697669b50f3c5bffdefb9373ace31d diff --git a/package-lock.json b/package-lock.json index 593fed0..dba497b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "@bytecodealliance/componentize-js", - "version": "0.12.0", + "version": "0.13.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@bytecodealliance/componentize-js", - "version": "0.12.0", + "version": "0.13.0", "workspaces": [ "." ], "dependencies": { - "@bytecodealliance/jco": "^1.5.0", + "@bytecodealliance/jco": "^1.7.0", "@bytecodealliance/weval": "^0.3.2", "@bytecodealliance/wizer": "^7.0.5", "es-module-lexer": "^1.5.4" @@ -26,17 +26,17 @@ "link": true }, "node_modules/@bytecodealliance/jco": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.6.0.tgz", - "integrity": "sha512-lNvaZL88ZJQ4HgrfP+302t1hwQ6jjcNp13MMOhrpfwoJRLELHc1pIwQZGCdM7o7AAQ3gPW/2CLwPgaZ1JCUcfw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.7.0.tgz", + "integrity": "sha512-DOoYzWmCjm5N3O1WE+g9VXUHXgKEJ3OatV3KhLYgaG1t9+sj+voS3PZA0JbWuA6vEkBT73Kg4yd4bJgIe1yFXA==", "license": "(Apache-2.0 WITH LLVM-exception)", "workspaces": [ "packages/preview2-shim" ], "dependencies": { - "@bytecodealliance/componentize-js": "^0.12.0", - "@bytecodealliance/preview2-shim": "^0.16.7", - "binaryen": "^118.0.0", + "@bytecodealliance/componentize-js": "^0.13.0", + "@bytecodealliance/preview2-shim": "^0.17.0", + "binaryen": "^119.0.0", "chalk-template": "^1", "commander": "^12", "mkdirp": "^3", @@ -47,10 +47,17 @@ "jco": "src/jco.js" } }, + "node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/preview2-shim": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.17.1.tgz", + "integrity": "sha512-h1qLL0TN5KXk/zagY2BtbZuDX6xYjz4Br9RZXEa0ID4UpiPc0agUMhTdz9r89G4vX5SU/tqBg1A6UNv2+DJ5pg==", + "license": "(Apache-2.0 WITH LLVM-exception)" + }, "node_modules/@bytecodealliance/preview2-shim": { "version": "0.16.7", "resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.16.7.tgz", "integrity": "sha512-YxfbzaykY6iVCSmeHPwOqO4fnWGj6awQ5pCK3UyI0zOg9Okp7pvK4J5BkQUC5QpPdFC9vUmWdqx5QSLt9k3iyQ==", + "dev": true, "license": "(Apache-2.0 WITH LLVM-exception)" }, "node_modules/@bytecodealliance/weval": { @@ -185,9 +192,9 @@ } }, "node_modules/@emnapi/core": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.2.0.tgz", - "integrity": "sha512-E7Vgw78I93we4ZWdYCb4DGAwRROGkMIXk7/y87UmANR+J6qsWusmC3gLt0H+O0KOt5e6O38U8oJamgbudrES/w==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.3.1.tgz", + "integrity": "sha512-pVGjBIt1Y6gg3EJN8jTcfpP/+uuRksIo055oE/OBkDNcjZqVbfkWCksG1Jp4yZnj3iKWyWX8fdG/j6UDYPbFog==", "license": "MIT", "optional": true, "dependencies": { @@ -196,9 +203,9 @@ } }, "node_modules/@emnapi/runtime": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.2.0.tgz", - "integrity": "sha512-bV21/9LQmcQeCPEg3BDFtvwL6cwiTMksYNWQQ4KOxCZikEGalWtenoZ0wCiukJINlGCIi2KXx01g4FoH/LxpzQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", + "integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==", "license": "MIT", "optional": true, "dependencies": { @@ -578,9 +585,9 @@ } }, "node_modules/@napi-rs/wasm-runtime": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.4.tgz", - "integrity": "sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.5.tgz", + "integrity": "sha512-kwUxR7J9WLutBbulqg1dfOrMTwhMdXLdcGUhcbCcGwnPLt3gz19uHVdwH1syKVDbE022ZS2vZxOWflFLS0YTjw==", "license": "MIT", "optional": true, "dependencies": { @@ -600,9 +607,9 @@ } }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -711,9 +718,9 @@ } }, "node_modules/binaryen": { - "version": "118.0.0", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-118.0.0.tgz", - "integrity": "sha512-KzekjPjpLE1zk29BKQSHNWLSHPYAfa80lcsIi5bDnev8vyfDyiMCVFPjaplhfXIKs7LI3r1RPyhoAj4qsRQwwg==", + "version": "119.0.0", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-119.0.0.tgz", + "integrity": "sha512-DTdcs8ijrj2OIEftWVPVkYsgJ8MzlYH+uSsC8156g88E7CNaG8kEfWNGSXxb3tPlzadrm6sD3mgSEKKZJu4Q3g==", "license": "Apache-2.0", "bin": { "wasm-as": "bin/wasm-as", @@ -1290,9 +1297,9 @@ } }, "node_modules/get-east-asian-width": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", - "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", + "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", "license": "MIT", "engines": { "node": ">=18" @@ -2173,9 +2180,9 @@ } }, "node_modules/terser": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.33.0.tgz", - "integrity": "sha512-JuPVaB7s1gdFKPKTelwUyRq5Sid2A3Gko2S0PncwdBq7kN9Ti9HPWDQ06MPsEDGsZeVESjKEnyGy68quBk1w6g==", + "version": "5.36.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", + "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -2222,9 +2229,9 @@ } }, "node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", + "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", "license": "0BSD", "optional": true }, diff --git a/package.json b/package.json index 000cb14..86b9761 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "mocha": "^10.2.0" }, "dependencies": { - "@bytecodealliance/jco": "^1.5.0", + "@bytecodealliance/jco": "^1.7.0", "@bytecodealliance/weval": "^0.3.2", "@bytecodealliance/wizer": "^7.0.5", "es-module-lexer": "^1.5.4" diff --git a/test/cases/floats/world.wit b/test/cases/floats/world.wit index 507d91d..f66e1ba 100644 --- a/test/cases/floats/world.wit +++ b/test/cases/floats/world.wit @@ -1,12 +1,12 @@ package local:floats; interface floats { - float32-param: func(x: float32); - float64-param: func(x: float64); - float32-result: func() -> float32; - float64-result: func() -> float64; - float64-result2: func() -> float64; - float32-result2: func() -> float32; + float32-param: func(x: f32); + float64-param: func(x: f64); + float32-result: func() -> f32; + float64-result: func() -> f64; + float64-result2: func() -> f64; + float32-result2: func() -> f32; } world the-world { diff --git a/test/cases/http-request/source.js b/test/cases/http-request/source.js index 7d93ced..47dc2b4 100644 --- a/test/cases/http-request/source.js +++ b/test/cases/http-request/source.js @@ -1,5 +1,5 @@ -import { handle } from 'wasi:http/outgoing-handler@0.2.1'; -import { Fields, OutgoingRequest } from 'wasi:http/types@0.2.1'; +import { handle } from 'wasi:http/outgoing-handler@0.2.2'; +import { Fields, OutgoingRequest } from 'wasi:http/types@0.2.2'; const encoder = new TextEncoder(); const decoder = new TextDecoder(); diff --git a/test/cases/lists/world.wit b/test/cases/lists/world.wit index 23bca85..f3a9dc0 100644 --- a/test/cases/lists/world.wit +++ b/test/cases/lists/world.wit @@ -9,8 +9,8 @@ interface lists { list-s16-param: func(x: list); list-s32-param: func(x: list); list-s64-param: func(x: list); - list-float32-param: func(x: list); - list-float64-param: func(x: list); + list-float32-param: func(x: list); + list-float64-param: func(x: list); list-u8-ret: func() -> list; list-u16-ret: func() -> list; @@ -20,8 +20,8 @@ interface lists { list-s16-ret: func() -> list; list-s32-ret: func() -> list; list-s64-ret: func() -> list; - list-float32-ret: func() -> list; - list-float64-ret: func() -> list; + list-float32-ret: func() -> list; + list-float64-ret: func() -> list; tuple-list: func(x: list>) -> list>; string-list-arg: func(a: list); @@ -72,8 +72,8 @@ interface lists { s32, u64, s64, - float32, - float64, + f32, + f64, char, >>; load-store-everything: func(a: load-store-all-sizes) -> load-store-all-sizes; diff --git a/test/cases/resource-floats/world.wit b/test/cases/resource-floats/world.wit index 217b1ac..a3b073a 100644 --- a/test/cases/resource-floats/world.wit +++ b/test/cases/resource-floats/world.wit @@ -2,8 +2,8 @@ package test:test; interface resource-floats { resource float { - constructor(v: float64); - get: func() -> float64; + constructor(v: f64); + get: func() -> f64; } } @@ -12,17 +12,17 @@ world test { export resource-floats-exports: interface { resource float { - constructor(v: float64); - get: func() -> float64; - add: static func(a: float, b: float64) -> float; + constructor(v: f64); + get: func() -> f64; + add: static func(a: float, b: f64) -> float; } } import resource-floats-imports: interface { resource float { - constructor(v: float64); - get: func() -> float64; - add: static func(a: float, b: float64) -> float; + constructor(v: f64); + get: func() -> f64; + add: static func(a: float, b: f64) -> float; } } diff --git a/test/cases/variants/world.wit b/test/cases/variants/world.wit index c11ba45..4de475c 100644 --- a/test/cases/variants/world.wit +++ b/test/cases/variants/world.wit @@ -33,7 +33,7 @@ interface variants { b: option>, c: option, d: option, - e: option, + e: option, f: option, g: option>, ); @@ -42,23 +42,23 @@ interface variants { option>, option, option, - option, + option, option, option>, >; variant casts1 { a(s32), - b(float32), + b(f32), } variant casts2 { - a(float64), - b(float32), + a(f64), + b(f32), } variant casts3 { - a(float64), + a(f64), b(u64), } @@ -68,12 +68,12 @@ interface variants { } variant casts5 { - a(float32), + a(f32), b(s64), } variant casts6 { - a(tuple), + a(tuple), b(tuple), } diff --git a/test/test.js b/test/test.js index a9257c7..eb888fc 100644 --- a/test/test.js +++ b/test/test.js @@ -231,8 +231,8 @@ suite('WASI', () => { const { component } = await componentize( ` - import { now } from 'wasi:clocks/wall-clock@0.2.1'; - import { getRandomBytes } from 'wasi:random/random@0.2.1'; + import { now } from 'wasi:clocks/wall-clock@0.2.2'; + import { getRandomBytes } from 'wasi:random/random@0.2.2'; let result; export const run = { diff --git a/test/wit/deps/cli/command.wit b/test/wit/deps/cli/command.wit index dc064a3..cc7a352 100644 --- a/test/wit/deps/cli/command.wit +++ b/test/wit/deps/cli/command.wit @@ -1,4 +1,4 @@ -package wasi:cli@0.2.1; +package wasi:cli@0.2.2; @since(version = 0.2.0) world command { diff --git a/test/wit/deps/cli/imports.wit b/test/wit/deps/cli/imports.wit index b8339d3..ebd7ba1 100644 --- a/test/wit/deps/cli/imports.wit +++ b/test/wit/deps/cli/imports.wit @@ -1,17 +1,17 @@ -package wasi:cli@0.2.1; +package wasi:cli@0.2.2; @since(version = 0.2.0) world imports { @since(version = 0.2.0) - include wasi:clocks/imports@0.2.1; + include wasi:clocks/imports@0.2.2; @since(version = 0.2.0) - include wasi:filesystem/imports@0.2.1; + include wasi:filesystem/imports@0.2.2; @since(version = 0.2.0) - include wasi:sockets/imports@0.2.1; + include wasi:sockets/imports@0.2.2; @since(version = 0.2.0) - include wasi:random/imports@0.2.1; + include wasi:random/imports@0.2.2; @since(version = 0.2.0) - include wasi:io/imports@0.2.1; + include wasi:io/imports@0.2.2; @since(version = 0.2.0) import environment; diff --git a/test/wit/deps/cli/stdio.wit b/test/wit/deps/cli/stdio.wit index d1d26eb..860313e 100644 --- a/test/wit/deps/cli/stdio.wit +++ b/test/wit/deps/cli/stdio.wit @@ -1,7 +1,7 @@ @since(version = 0.2.0) interface stdin { @since(version = 0.2.0) - use wasi:io/streams@0.2.1.{input-stream}; + use wasi:io/streams@0.2.2.{input-stream}; @since(version = 0.2.0) get-stdin: func() -> input-stream; @@ -10,7 +10,7 @@ interface stdin { @since(version = 0.2.0) interface stdout { @since(version = 0.2.0) - use wasi:io/streams@0.2.1.{output-stream}; + use wasi:io/streams@0.2.2.{output-stream}; @since(version = 0.2.0) get-stdout: func() -> output-stream; @@ -19,7 +19,7 @@ interface stdout { @since(version = 0.2.0) interface stderr { @since(version = 0.2.0) - use wasi:io/streams@0.2.1.{output-stream}; + use wasi:io/streams@0.2.2.{output-stream}; @since(version = 0.2.0) get-stderr: func() -> output-stream; diff --git a/test/wit/deps/clocks/monotonic-clock.wit b/test/wit/deps/clocks/monotonic-clock.wit index 3c24840..233cace 100644 --- a/test/wit/deps/clocks/monotonic-clock.wit +++ b/test/wit/deps/clocks/monotonic-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.1; +package wasi:clocks@0.2.2; /// WASI Monotonic Clock is a clock API intended to let users measure elapsed /// time. /// @@ -10,7 +10,7 @@ package wasi:clocks@0.2.1; @since(version = 0.2.0) interface monotonic-clock { @since(version = 0.2.0) - use wasi:io/poll@0.2.1.{pollable}; + use wasi:io/poll@0.2.2.{pollable}; /// An instant in time, in nanoseconds. An instant is relative to an /// unspecified initial value, and can only be compared to instances from diff --git a/test/wit/deps/clocks/timezone.wit b/test/wit/deps/clocks/timezone.wit index 212da66..349fb57 100644 --- a/test/wit/deps/clocks/timezone.wit +++ b/test/wit/deps/clocks/timezone.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.1; +package wasi:clocks@0.2.2; @unstable(feature = clocks-timezone) interface timezone { diff --git a/test/wit/deps/clocks/wall-clock.wit b/test/wit/deps/clocks/wall-clock.wit index 6be069a..ec05a1f 100644 --- a/test/wit/deps/clocks/wall-clock.wit +++ b/test/wit/deps/clocks/wall-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.1; +package wasi:clocks@0.2.2; /// WASI Wall Clock is a clock API intended to let users query the current /// time. The name "wall" makes an analogy to a "clock on the wall", which /// is not necessarily monotonic as it may be reset. diff --git a/test/wit/deps/clocks/world.wit b/test/wit/deps/clocks/world.wit index 9251ac6..e36802c 100644 --- a/test/wit/deps/clocks/world.wit +++ b/test/wit/deps/clocks/world.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.1; +package wasi:clocks@0.2.2; @since(version = 0.2.0) world imports { diff --git a/test/wit/deps/filesystem/preopens.wit b/test/wit/deps/filesystem/preopens.wit index ca2f726..410bec1 100644 --- a/test/wit/deps/filesystem/preopens.wit +++ b/test/wit/deps/filesystem/preopens.wit @@ -1,4 +1,4 @@ -package wasi:filesystem@0.2.1; +package wasi:filesystem@0.2.2; @since(version = 0.2.0) interface preopens { diff --git a/test/wit/deps/filesystem/types.wit b/test/wit/deps/filesystem/types.wit index db3d968..49e0a30 100644 --- a/test/wit/deps/filesystem/types.wit +++ b/test/wit/deps/filesystem/types.wit @@ -1,4 +1,4 @@ -package wasi:filesystem@0.2.1; +package wasi:filesystem@0.2.2; /// 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. @@ -26,9 +26,9 @@ package wasi:filesystem@0.2.1; @since(version = 0.2.0) interface types { @since(version = 0.2.0) - use wasi:io/streams@0.2.1.{input-stream, output-stream, error}; + use wasi:io/streams@0.2.2.{input-stream, output-stream, error}; @since(version = 0.2.0) - use wasi:clocks/wall-clock@0.2.1.{datetime}; + use wasi:clocks/wall-clock@0.2.2.{datetime}; /// File size or length of a region within a file. @since(version = 0.2.0) @@ -523,12 +523,6 @@ interface types { /// Open a file or directory. /// - /// The returned descriptor is not guaranteed to be the lowest-numbered - /// descriptor not currently open/ it is randomized to prevent applications - /// from depending on making assumptions about indexes, since this is - /// error-prone in multi-threaded contexts. The returned descriptor is - /// guaranteed to be less than 2**31. - /// /// If `flags` contains `descriptor-flags::mutate-directory`, and the base /// descriptor doesn't have `descriptor-flags::mutate-directory` set, /// `open-at` fails with `error-code::read-only`. diff --git a/test/wit/deps/filesystem/world.wit b/test/wit/deps/filesystem/world.wit index af0146c..8064bd6 100644 --- a/test/wit/deps/filesystem/world.wit +++ b/test/wit/deps/filesystem/world.wit @@ -1,4 +1,4 @@ -package wasi:filesystem@0.2.1; +package wasi:filesystem@0.2.2; @since(version = 0.2.0) world imports { diff --git a/test/wit/deps/http/proxy.wit b/test/wit/deps/http/proxy.wit index 415d2ee..fadb89a 100644 --- a/test/wit/deps/http/proxy.wit +++ b/test/wit/deps/http/proxy.wit @@ -1,4 +1,4 @@ -package wasi:http@0.2.1; +package wasi:http@0.2.2; /// The `wasi:http/imports` world imports all the APIs for HTTP proxies. /// It is intended to be `include`d in other worlds. @@ -6,25 +6,25 @@ package wasi:http@0.2.1; world imports { /// HTTP proxies have access to time and randomness. @since(version = 0.2.0) - import wasi:clocks/monotonic-clock@0.2.1; + import wasi:clocks/monotonic-clock@0.2.2; @since(version = 0.2.0) - import wasi:clocks/wall-clock@0.2.1; + import wasi:clocks/wall-clock@0.2.2; @since(version = 0.2.0) - import wasi:random/random@0.2.1; + import wasi:random/random@0.2.2; /// Proxies have standard output and error streams which are expected to /// terminate in a developer-facing console provided by the host. @since(version = 0.2.0) - import wasi:cli/stdout@0.2.1; + import wasi:cli/stdout@0.2.2; @since(version = 0.2.0) - import wasi:cli/stderr@0.2.1; + import wasi:cli/stderr@0.2.2; /// TODO: this is a temporary workaround until component tooling is able to /// gracefully handle the absence of stdin. Hosts must return an eof stream /// for this import, which is what wasi-libc + tooling will do automatically /// when this import is properly removed. @since(version = 0.2.0) - import wasi:cli/stdin@0.2.1; + import wasi:cli/stdin@0.2.2; /// This is the default handler to use when user code simply wants to make an /// HTTP request (e.g., via `fetch()`). diff --git a/test/wit/deps/http/types.wit b/test/wit/deps/http/types.wit index 3c45cd0..40ee770 100644 --- a/test/wit/deps/http/types.wit +++ b/test/wit/deps/http/types.wit @@ -4,13 +4,13 @@ @since(version = 0.2.0) interface types { @since(version = 0.2.0) - use wasi:clocks/monotonic-clock@0.2.1.{duration}; + use wasi:clocks/monotonic-clock@0.2.2.{duration}; @since(version = 0.2.0) - use wasi:io/streams@0.2.1.{input-stream, output-stream}; + use wasi:io/streams@0.2.2.{input-stream, output-stream}; @since(version = 0.2.0) - use wasi:io/error@0.2.1.{error as io-error}; + use wasi:io/error@0.2.2.{error as io-error}; @since(version = 0.2.0) - use wasi:io/poll@0.2.1.{pollable}; + use wasi:io/poll@0.2.2.{pollable}; /// This type corresponds to HTTP standard Methods. @since(version = 0.2.0) @@ -124,12 +124,12 @@ interface types { /// setting or appending to a `fields` resource. @since(version = 0.2.0) variant header-error { - /// This error indicates that a `field-key` or `field-value` was + /// This error indicates that a `field-name` or `field-value` was /// syntactically invalid when used with an operation that sets headers in a /// `fields`. invalid-syntax, - /// This error indicates that a forbidden `field-key` was used when trying + /// This error indicates that a forbidden `field-name` was used when trying /// to set a header in a `fields`. forbidden, @@ -138,8 +138,23 @@ interface types { immutable, } + /// Field names are always strings. + /// + /// Field names should always be treated as case insensitive by the `fields` + /// resource for the purposes of equality checking. + @since(version = 0.2.1) + type field-name = field-key; + /// Field keys are always strings. + /// + /// Field keys should always be treated as case insensitive by the `fields` + /// resource for the purposes of equality checking. + /// + /// # Deprecation + /// + /// This type has been deprecated in favor of the `field-name` type. @since(version = 0.2.0) + @deprecated(version = 0.2.2) type field-key = string; /// Field values should always be ASCII strings. However, in @@ -171,70 +186,73 @@ interface types { /// /// The resulting `fields` is mutable. /// - /// The list represents each key-value pair in the Fields. Keys + /// The list represents each name-value pair in the Fields. Names /// which have multiple values are represented by multiple entries in this - /// list with the same key. + /// list with the same name. /// - /// The tuple is a pair of the field key, represented as a string, and + /// The tuple is a pair of the field name, represented as a string, and /// Value, represented as a list of bytes. /// - /// An error result will be returned if any `field-key` or `field-value` is + /// An error result will be returned if any `field-name` or `field-value` is /// syntactically invalid, or if a field is forbidden. @since(version = 0.2.0) from-list: static func( - entries: list> + entries: list> ) -> result; - /// Get all of the values corresponding to a key. If the key is not present + /// Get all of the values corresponding to a name. If the name is not present /// in this `fields` or is syntactically invalid, an empty list is returned. - /// However, if the key is present but empty, this is represented by a list + /// However, if the name is present but empty, this is represented by a list /// with one or more empty field-values present. @since(version = 0.2.0) - get: func(name: field-key) -> list; + get: func(name: field-name) -> list; - /// Returns `true` when the key is present in this `fields`. If the key is + /// Returns `true` when the name is present in this `fields`. If the name is /// syntactically invalid, `false` is returned. @since(version = 0.2.0) - has: func(name: field-key) -> bool; + has: func(name: field-name) -> bool; - /// Set all of the values for a key. Clears any existing values for that - /// key, if they have been set. + /// Set all of the values for a name. Clears any existing values for that + /// name, if they have been set. /// /// Fails with `header-error.immutable` if the `fields` are immutable. /// - /// Fails with `header-error.invalid-syntax` if the `field-key` or any of + /// Fails with `header-error.invalid-syntax` if the `field-name` or any of /// the `field-value`s are syntactically invalid. @since(version = 0.2.0) - set: func(name: field-key, value: list) -> result<_, header-error>; + set: func(name: field-name, value: list) -> result<_, header-error>; - /// Delete all values for a key. Does nothing if no values for the key + /// Delete all values for a name. Does nothing if no values for the name /// exist. /// /// Fails with `header-error.immutable` if the `fields` are immutable. /// - /// Fails with `header-error.invalid-syntax` if the `field-key` is + /// Fails with `header-error.invalid-syntax` if the `field-name` is /// syntactically invalid. @since(version = 0.2.0) - delete: func(name: field-key) -> result<_, header-error>; + delete: func(name: field-name) -> result<_, header-error>; - /// Append a value for a key. Does not change or delete any existing - /// values for that key. + /// Append a value for a name. Does not change or delete any existing + /// values for that name. /// /// Fails with `header-error.immutable` if the `fields` are immutable. /// - /// Fails with `header-error.invalid-syntax` if the `field-key` or + /// Fails with `header-error.invalid-syntax` if the `field-name` or /// `field-value` are syntactically invalid. @since(version = 0.2.0) - append: func(name: field-key, value: field-value) -> result<_, header-error>; + append: func(name: field-name, value: field-value) -> result<_, header-error>; - /// Retrieve the full set of keys and values in the Fields. Like the - /// constructor, the list represents each key-value pair. + /// Retrieve the full set of names and values in the Fields. Like the + /// constructor, the list represents each name-value pair. /// - /// The outer list represents each key-value pair in the Fields. Keys + /// The outer list represents each name-value pair in the Fields. Names /// which have multiple values are represented by multiple entries in this - /// list with the same key. + /// list with the same name. + /// + /// The names and values are always returned in the original casing and in + /// the order in which they will be serialized for transport. @since(version = 0.2.0) - entries: func() -> list>; + entries: func() -> list>; /// Make a deep copy of the Fields. Equivalent in behavior to calling the /// `fields` constructor on the return value of `entries`. The resulting diff --git a/test/wit/deps/io/error.wit b/test/wit/deps/io/error.wit index 4ea29c4..717135f 100644 --- a/test/wit/deps/io/error.wit +++ b/test/wit/deps/io/error.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.2; @since(version = 0.2.0) interface error { diff --git a/test/wit/deps/io/poll.wit b/test/wit/deps/io/poll.wit index f64638f..49c1c5e 100644 --- a/test/wit/deps/io/poll.wit +++ b/test/wit/deps/io/poll.wit @@ -1,14 +1,17 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.2; /// A poll API intended to let users wait for I/O events on multiple handles /// at once. +@since(version = 0.2.0) interface poll { /// `pollable` represents a single I/O event which may be ready, or not. + @since(version = 0.2.0) resource pollable { /// Return the readiness of a pollable. This function never blocks. /// /// Returns `true` when the pollable is ready, and `false` otherwise. + @since(version = 0.2.0) ready: func() -> bool; /// `block` returns immediately if the pollable is ready, and otherwise @@ -16,6 +19,7 @@ interface poll { /// /// This function is equivalent to calling `poll.poll` on a list /// containing only this pollable. + @since(version = 0.2.0) block: func(); } @@ -38,5 +42,6 @@ interface poll { /// do any I/O so it doesn't fail. If any of the I/O sources identified by /// the pollables has an error, it is indicated by marking the source as /// being ready for I/O. + @since(version = 0.2.0) poll: func(in: list>) -> list; } diff --git a/test/wit/deps/io/streams.wit b/test/wit/deps/io/streams.wit index b697e24..330f709 100644 --- a/test/wit/deps/io/streams.wit +++ b/test/wit/deps/io/streams.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.2; /// WASI I/O is an I/O abstraction API which is currently focused on providing /// stream types. @@ -18,6 +18,9 @@ interface streams { /// The last operation (a write or flush) failed before completion. /// /// More information is available in the `error` payload. + /// + /// After this, the stream will be closed. All future operations return + /// `stream-error::closed`. last-operation-failed(error), /// The stream is closed: no more input will be accepted by the /// stream. A closed output-stream will return this error on all @@ -205,6 +208,7 @@ interface streams { /// The created `pollable` is a child resource of the `output-stream`. /// Implementations may trap if the `output-stream` is dropped before /// all derived `pollable`s created with this function are dropped. + @since(version = 0.2.0) subscribe: func() -> pollable; /// Write zeroes to a stream. diff --git a/test/wit/deps/io/world.wit b/test/wit/deps/io/world.wit index 6405a4e..f7001cc 100644 --- a/test/wit/deps/io/world.wit +++ b/test/wit/deps/io/world.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.2; @since(version = 0.2.0) world imports { diff --git a/test/wit/deps/random/insecure-seed.wit b/test/wit/deps/random/insecure-seed.wit index 7e708dc..cdea716 100644 --- a/test/wit/deps/random/insecure-seed.wit +++ b/test/wit/deps/random/insecure-seed.wit @@ -1,4 +1,4 @@ -package wasi:random@0.2.1; +package wasi:random@0.2.2; /// The insecure-seed interface for seeding hash-map DoS resistance. /// /// It is intended to be portable at least between Unix-family platforms and diff --git a/test/wit/deps/random/insecure.wit b/test/wit/deps/random/insecure.wit index 3cdb53d..b71e858 100644 --- a/test/wit/deps/random/insecure.wit +++ b/test/wit/deps/random/insecure.wit @@ -1,4 +1,4 @@ -package wasi:random@0.2.1; +package wasi:random@0.2.2; /// The insecure interface for insecure pseudo-random numbers. /// /// It is intended to be portable at least between Unix-family platforms and diff --git a/test/wit/deps/random/random.wit b/test/wit/deps/random/random.wit index 2b5035d..0c57e8c 100644 --- a/test/wit/deps/random/random.wit +++ b/test/wit/deps/random/random.wit @@ -1,4 +1,4 @@ -package wasi:random@0.2.1; +package wasi:random@0.2.2; /// WASI Random is a random data API. /// /// It is intended to be portable at least between Unix-family platforms and diff --git a/test/wit/deps/random/world.wit b/test/wit/deps/random/world.wit index c615e96..16d68ac 100644 --- a/test/wit/deps/random/world.wit +++ b/test/wit/deps/random/world.wit @@ -1,4 +1,4 @@ -package wasi:random@0.2.1; +package wasi:random@0.2.2; @since(version = 0.2.0) world imports { diff --git a/test/wit/deps/sockets/ip-name-lookup.wit b/test/wit/deps/sockets/ip-name-lookup.wit index dc56f30..d3ab88a 100644 --- a/test/wit/deps/sockets/ip-name-lookup.wit +++ b/test/wit/deps/sockets/ip-name-lookup.wit @@ -1,7 +1,7 @@ @since(version = 0.2.0) interface ip-name-lookup { @since(version = 0.2.0) - use wasi:io/poll@0.2.1.{pollable}; + use wasi:io/poll@0.2.2.{pollable}; @since(version = 0.2.0) use network.{network, error-code, ip-address}; @@ -48,7 +48,7 @@ interface ip-name-lookup { /// Create a `pollable` which will resolve once the stream is ready for I/O. /// - /// Note: this function is here for WASI Preview2 only. + /// Note: this function is here for WASI 0.2 only. /// It's planned to be removed when `future` is natively supported in Preview3. @since(version = 0.2.0) subscribe: func() -> pollable; diff --git a/test/wit/deps/sockets/network.wit b/test/wit/deps/sockets/network.wit index 8c13b34..7f2d86a 100644 --- a/test/wit/deps/sockets/network.wit +++ b/test/wit/deps/sockets/network.wit @@ -1,5 +1,8 @@ @since(version = 0.2.0) interface network { + @unstable(feature = network-error-code) + use wasi:io/error@0.2.2.{error}; + /// An opaque resource that represents access to (a subset of) the network. /// This enables context-based security for networking. /// There is no need for this to map 1:1 to a physical network interface. @@ -105,6 +108,19 @@ interface network { permanent-resolver-failure, } + /// Attempts to extract a network-related `error-code` from the stream + /// `error` provided. + /// + /// Stream operations which return `stream-error::last-operation-failed` + /// have a payload with more information about the operation that failed. + /// This payload can be passed through to this function to see if there's + /// network-related information about the error to return. + /// + /// Note that this function is fallible because not all stream-related + /// errors are network-related errors. + @unstable(feature = network-error-code) + network-error-code: func(err: borrow) -> option; + @since(version = 0.2.0) enum ip-address-family { /// Similar to `AF_INET` in POSIX. diff --git a/test/wit/deps/sockets/tcp.wit b/test/wit/deps/sockets/tcp.wit index bae5a29..728822d 100644 --- a/test/wit/deps/sockets/tcp.wit +++ b/test/wit/deps/sockets/tcp.wit @@ -1,11 +1,11 @@ @since(version = 0.2.0) interface tcp { @since(version = 0.2.0) - use wasi:io/streams@0.2.1.{input-stream, output-stream}; + use wasi:io/streams@0.2.2.{input-stream, output-stream}; @since(version = 0.2.0) - use wasi:io/poll@0.2.1.{pollable}; + use wasi:io/poll@0.2.2.{pollable}; @since(version = 0.2.0) - use wasi:clocks/monotonic-clock@0.2.1.{duration}; + use wasi:clocks/monotonic-clock@0.2.2.{duration}; @since(version = 0.2.0) use network.{network, error-code, ip-socket-address, ip-address-family}; @@ -353,7 +353,7 @@ interface tcp { /// See /// for more information. /// - /// Note: this function is here for WASI Preview2 only. + /// Note: this function is here for WASI 0.2 only. /// It's planned to be removed when `future` is natively supported in Preview3. @since(version = 0.2.0) subscribe: func() -> pollable; diff --git a/test/wit/deps/sockets/udp.wit b/test/wit/deps/sockets/udp.wit index b289e49..d8acb2d 100644 --- a/test/wit/deps/sockets/udp.wit +++ b/test/wit/deps/sockets/udp.wit @@ -1,7 +1,7 @@ @since(version = 0.2.0) interface udp { @since(version = 0.2.0) - use wasi:io/poll@0.2.1.{pollable}; + use wasi:io/poll@0.2.2.{pollable}; @since(version = 0.2.0) use network.{network, error-code, ip-socket-address, ip-address-family}; @@ -184,7 +184,7 @@ interface udp { /// Create a `pollable` which will resolve once the socket is ready for I/O. /// - /// Note: this function is here for WASI Preview2 only. + /// Note: this function is here for WASI 0.2 only. /// It's planned to be removed when `future` is natively supported in Preview3. @since(version = 0.2.0) subscribe: func() -> pollable; @@ -220,7 +220,7 @@ interface udp { /// Create a `pollable` which will resolve once the stream is ready to receive again. /// - /// Note: this function is here for WASI Preview2 only. + /// Note: this function is here for WASI 0.2 only. /// It's planned to be removed when `future` is natively supported in Preview3. @since(version = 0.2.0) subscribe: func() -> pollable; @@ -280,7 +280,7 @@ interface udp { /// Create a `pollable` which will resolve once the stream is ready to send again. /// - /// Note: this function is here for WASI Preview2 only. + /// Note: this function is here for WASI 0.2 only. /// It's planned to be removed when `future` is natively supported in Preview3. @since(version = 0.2.0) subscribe: func() -> pollable; diff --git a/test/wit/deps/sockets/world.wit b/test/wit/deps/sockets/world.wit index a1d4267..6e349c7 100644 --- a/test/wit/deps/sockets/world.wit +++ b/test/wit/deps/sockets/world.wit @@ -1,4 +1,4 @@ -package wasi:sockets@0.2.1; +package wasi:sockets@0.2.2; @since(version = 0.2.0) world imports { diff --git a/test/wit/test1.wit b/test/wit/test1.wit index 34ef896..461d115 100644 --- a/test/wit/test1.wit +++ b/test/wit/test1.wit @@ -1,66 +1,66 @@ package local:test1; world test1 { - import wasi:clocks/wall-clock@0.2.1; - import wasi:clocks/monotonic-clock@0.2.1; - import wasi:filesystem/types@0.2.1; - import wasi:filesystem/preopens@0.2.1; - import wasi:sockets/instance-network@0.2.1; - import wasi:sockets/ip-name-lookup@0.2.1; - import wasi:sockets/network@0.2.1; - import wasi:sockets/tcp-create-socket@0.2.1; - import wasi:sockets/tcp@0.2.1; - import wasi:sockets/udp-create-socket@0.2.1; - import wasi:sockets/udp@0.2.1; - import wasi:random/random@0.2.1; - import wasi:random/insecure@0.2.1; - import wasi:random/insecure-seed@0.2.1; - import wasi:io/poll@0.2.1; - import wasi:io/streams@0.2.1; - import wasi:cli/environment@0.2.1; - import wasi:cli/exit@0.2.1; - import wasi:cli/stdin@0.2.1; - import wasi:cli/stdout@0.2.1; - import wasi:cli/stderr@0.2.1; - import wasi:cli/terminal-input@0.2.1; - import wasi:cli/terminal-output@0.2.1; - import wasi:cli/terminal-stdin@0.2.1; - import wasi:cli/terminal-stdout@0.2.1; - import wasi:cli/terminal-stderr@0.2.1; + import wasi:clocks/wall-clock@0.2.2; + import wasi:clocks/monotonic-clock@0.2.2; + import wasi:filesystem/types@0.2.2; + import wasi:filesystem/preopens@0.2.2; + import wasi:sockets/instance-network@0.2.2; + import wasi:sockets/ip-name-lookup@0.2.2; + import wasi:sockets/network@0.2.2; + import wasi:sockets/tcp-create-socket@0.2.2; + import wasi:sockets/tcp@0.2.2; + import wasi:sockets/udp-create-socket@0.2.2; + import wasi:sockets/udp@0.2.2; + import wasi:random/random@0.2.2; + import wasi:random/insecure@0.2.2; + import wasi:random/insecure-seed@0.2.2; + import wasi:io/poll@0.2.2; + import wasi:io/streams@0.2.2; + import wasi:cli/environment@0.2.2; + import wasi:cli/exit@0.2.2; + import wasi:cli/stdin@0.2.2; + import wasi:cli/stdout@0.2.2; + import wasi:cli/stderr@0.2.2; + import wasi:cli/terminal-input@0.2.2; + import wasi:cli/terminal-output@0.2.2; + import wasi:cli/terminal-stdin@0.2.2; + import wasi:cli/terminal-stdout@0.2.2; + import wasi:cli/terminal-stderr@0.2.2; - export wasi:cli/run@0.2.1; + export wasi:cli/run@0.2.2; export get-result: func() -> string; } world test2 { - import wasi:clocks/wall-clock@0.2.1; - import wasi:clocks/monotonic-clock@0.2.1; - import wasi:filesystem/types@0.2.1; - import wasi:filesystem/preopens@0.2.1; - import wasi:sockets/instance-network@0.2.1; - import wasi:sockets/ip-name-lookup@0.2.1; - import wasi:sockets/network@0.2.1; - import wasi:sockets/tcp-create-socket@0.2.1; - import wasi:sockets/tcp@0.2.1; - import wasi:sockets/udp-create-socket@0.2.1; - import wasi:sockets/udp@0.2.1; - import wasi:random/random@0.2.1; - import wasi:random/insecure@0.2.1; - import wasi:random/insecure-seed@0.2.1; - import wasi:io/poll@0.2.1; - import wasi:io/streams@0.2.1; - import wasi:cli/environment@0.2.1; - import wasi:cli/exit@0.2.1; - import wasi:cli/stdin@0.2.1; - import wasi:cli/stdout@0.2.1; - import wasi:cli/stderr@0.2.1; - import wasi:cli/terminal-input@0.2.1; - import wasi:cli/terminal-output@0.2.1; - import wasi:cli/terminal-stdin@0.2.1; - import wasi:cli/terminal-stdout@0.2.1; - import wasi:cli/terminal-stderr@0.2.1; - import wasi:http/outgoing-handler@0.2.1; + import wasi:clocks/wall-clock@0.2.2; + import wasi:clocks/monotonic-clock@0.2.2; + import wasi:filesystem/types@0.2.2; + import wasi:filesystem/preopens@0.2.2; + import wasi:sockets/instance-network@0.2.2; + import wasi:sockets/ip-name-lookup@0.2.2; + import wasi:sockets/network@0.2.2; + import wasi:sockets/tcp-create-socket@0.2.2; + import wasi:sockets/tcp@0.2.2; + import wasi:sockets/udp-create-socket@0.2.2; + import wasi:sockets/udp@0.2.2; + import wasi:random/random@0.2.2; + import wasi:random/insecure@0.2.2; + import wasi:random/insecure-seed@0.2.2; + import wasi:io/poll@0.2.2; + import wasi:io/streams@0.2.2; + import wasi:cli/environment@0.2.2; + import wasi:cli/exit@0.2.2; + import wasi:cli/stdin@0.2.2; + import wasi:cli/stdout@0.2.2; + import wasi:cli/stderr@0.2.2; + import wasi:cli/terminal-input@0.2.2; + import wasi:cli/terminal-output@0.2.2; + import wasi:cli/terminal-stdin@0.2.2; + import wasi:cli/terminal-stdout@0.2.2; + import wasi:cli/terminal-stderr@0.2.2; + import wasi:http/outgoing-handler@0.2.2; export get-result: func() -> string; } diff --git a/update-spidermonkey.sh b/update-spidermonkey.sh deleted file mode 100755 index 7eb21ae..0000000 --- a/update-spidermonkey.sh +++ /dev/null @@ -1,6 +0,0 @@ -cd deps/js-compute-runtime/runtime/spidermonkey -./download-engine.sh release -cd ../js-compute-runtime -make -j16 -make shared-builtins -j16 -cd ../../../