diff --git a/Cargo.lock b/Cargo.lock index a7c9fd8227..1f6391a288 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,29 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if 1.0.0", + "cipher", + "cpufeatures", + "opaque-debug", +] + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "0.7.19" @@ -50,6 +73,15 @@ dependencies = [ "derive_arbitrary", ] +[[package]] +name = "atomic-polyfill" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ff7eb3f316534d83a8a2c3d1674ace8a5a71198eba31e2e2b597833f699b28" +dependencies = [ + "critical-section", +] + [[package]] name = "atty" version = "0.2.14" @@ -75,19 +107,55 @@ checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" dependencies = [ "addr2line", "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", - "miniz_oxide", - "object", + "miniz_oxide 0.5.4", + "object 0.29.0", "rustc-demangle", ] +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64ct" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "block-buffer" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +dependencies = [ + "generic-array", +] + [[package]] name = "boa_ast" version = "0.16.0" @@ -125,6 +193,7 @@ dependencies = [ "bitflags", "boa_ast", "boa_gc", + "boa_icu_provider", "boa_interner", "boa_macros", "boa_parser", @@ -134,12 +203,15 @@ dependencies = [ "dyn-clone", "fast-float", "float-cmp", + "icu_calendar", + "icu_collator", "icu_datetime", - "icu_locale_canonicalizer", + "icu_list", "icu_locid", + "icu_locid_transform", "icu_plurals", "icu_provider", - "icu_testdata", + "icu_provider_adapters", "indexmap", "jemallocator", "num-bigint", @@ -158,6 +230,7 @@ dependencies = [ "tap", "thiserror", "unicode-normalization", + "writeable", ] [[package]] @@ -179,6 +252,17 @@ dependencies = [ "boa_profiler", ] +[[package]] +name = "boa_icu_provider" +version = "0.16.0" +dependencies = [ + "icu_datagen", + "icu_provider", + "icu_provider_blob", + "log", + "simple_logger", +] + [[package]] name = "boa_interner" version = "0.16.0" @@ -234,11 +318,14 @@ dependencies = [ "bitflags", "boa_engine", "boa_gc", + "boa_icu_provider", "boa_parser", "clap 4.0.32", "color-eyre", "colored", "fxhash", + "icu_provider_adapters", + "icu_provider_blob", "once_cell", "rayon", "regex", @@ -270,12 +357,83 @@ version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +[[package]] +name = "bytecheck" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" +dependencies = [ + "bytecheck_derive", + "ptr_meta", +] + +[[package]] +name = "bytecheck_derive" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "byteorder" version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +[[package]] +name = "bytes" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" + +[[package]] +name = "bzip2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "cached-path" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f1c56d30236522ab3393a08746b138d4e16372001f42d29c88d513aeb8ab7ef" +dependencies = [ + "flate2", + "fs2", + "glob", + "indicatif", + "log", + "rand", + "reqwest", + "serde", + "serde_json", + "sha2", + "tar", + "tempfile", + "thiserror", + "zip 0.5.13", + "zip-extensions", +] + [[package]] name = "cast" version = "0.3.0" @@ -287,6 +445,15 @@ name = "cc" version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "581f5dba903aac52ea3feb5ec4810848460ee833876f1f9b0fdeab1f19091574" +dependencies = [ + "jobserver", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cfg-if" @@ -304,7 +471,7 @@ dependencies = [ "js-sys", "num-integer", "num-traits", - "time", + "time 0.1.44", "wasm-bindgen", "winapi", ] @@ -336,6 +503,15 @@ dependencies = [ "half", ] +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + [[package]] name = "clap" version = "3.2.23" @@ -405,6 +581,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "cobs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" + [[package]] name = "codespan-reporting" version = "0.11.1" @@ -453,12 +635,78 @@ dependencies = [ "winapi", ] +[[package]] +name = "console" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "terminal_size", + "winapi", +] + +[[package]] +name = "const_fn" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +[[package]] +name = "corosensei" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" +dependencies = [ + "autocfg", + "cfg-if 1.0.0", + "libc", + "scopeguard", + "windows-sys 0.33.0", +] + +[[package]] +name = "cpufeatures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if 1.0.0", +] + [[package]] name = "criterion" version = "0.4.0" @@ -495,13 +743,25 @@ dependencies = [ "itertools", ] +[[package]] +name = "critical-section" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" + +[[package]] +name = "crlify" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bd03467c8d43067f6aa5a46bc69bf170debf585f790e9fbe7dfcc03f5b70b29" + [[package]] name = "crossbeam-channel" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", ] @@ -511,7 +771,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-epoch", "crossbeam-utils", ] @@ -523,7 +783,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348" dependencies = [ "autocfg", - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", "memoffset", "scopeguard", @@ -535,7 +795,17 @@ version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", ] [[package]] @@ -582,6 +852,73 @@ dependencies = [ "syn", ] +[[package]] +name = "darling" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "databake" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c87777d6d7bde863ba217aa87521dc857239de1f36d66aac46fd173fb0495858" +dependencies = [ + "databake-derive", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "databake-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "905c7a060fc0c84c0452d97473b1177dd7a5cbc7670cfbae4a7fe22e42f6432e" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "deduplicating_array" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135a278b07263e55438c15a3021b4947288f981ae387666f5015add8fbc76f5b" +dependencies = [ + "serde", +] + [[package]] name = "derive_arbitrary" version = "1.2.0" @@ -593,13 +930,40 @@ dependencies = [ "syn", ] +[[package]] +name = "dhat" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f2aaf837aaf456f6706cb46386ba8dffd4013a757e36f4ea05c20dd46b209a3" +dependencies = [ + "backtrace", + "lazy_static", + "mintex", + "parking_lot 0.12.1", + "rustc-hash", + "serde", + "serde_json", + "thousands", +] + +[[package]] +name = "digest" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + [[package]] name = "dirs-next" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "dirs-sys-next", ] @@ -614,6 +978,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "discard" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" + [[package]] name = "displaydoc" version = "0.2.3" @@ -631,6 +1001,32 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60" +[[package]] +name = "dynasm" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" +dependencies = [ + "bitflags", + "byteorder", + "lazy_static", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dynasmrt" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" +dependencies = [ + "byteorder", + "dynasm", + "memmap2 0.5.8", +] + [[package]] name = "either" version = "1.8.0" @@ -638,13 +1034,87 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] -name = "endian-type" -version = "0.1.2" +name = "elsa" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" +checksum = "2b4b5d23ed6b6948d68240aafa4ac98e568c9a020efd9d4201a6288bc3006e09" +dependencies = [ + "stable_deref_trait", +] [[package]] -name = "errno" +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "enum-iterator" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eeac5c5edb79e4e39fe8439ef35207780a11f69c52cbe424ce3dfad4cb78de6" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c134c37760b27a871ba422106eedbb8247da973a09e82558bf26d619c882b159" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "enumset" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" +dependencies = [ + "enumset_derive", +] + +[[package]] +name = "enumset_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "erased-serde" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54558e0ba96fbe24280072642eceb9d7d442e32c7ec0ea9e7ecd7b4ea2cf4e11" +dependencies = [ + "serde", +] + +[[package]] +name = "errno" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" @@ -684,28 +1154,55 @@ dependencies = [ "once_cell", ] +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + [[package]] name = "fast-float" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95765f67b4b18863968b4a1bd5bb576f732b29a4a28c7cd84c09fa3e2875f33c" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "fd-lock" version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c93a581058d957dc4176875aad04f82f81613e6611d64aa1a9c755bdfb16711" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "rustix 0.35.13", - "windows-sys", + "windows-sys 0.42.0", +] + +[[package]] +name = "filetime" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall", + "windows-sys 0.42.0", ] [[package]] name = "fixed_decimal" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa523feb405bd9fd25daafb500a48112156a8c15860d18451190e8701500e863" +checksum = "ceab5dbd7a3a08385160503f6b6636420dbd72d29babdf8c894d4534304191c3" dependencies = [ "displaydoc", "smallvec", @@ -713,6 +1210,16 @@ dependencies = [ "writeable", ] +[[package]] +name = "flate2" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +dependencies = [ + "crc32fast", + "miniz_oxide 0.6.2", +] + [[package]] name = "float-cmp" version = "0.9.0" @@ -722,12 +1229,100 @@ dependencies = [ "num-traits", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "fs_extra" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" +[[package]] +name = "futures-channel" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" + +[[package]] +name = "futures-io" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" + +[[package]] +name = "futures-sink" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" + +[[package]] +name = "futures-task" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" + +[[package]] +name = "futures-util" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +dependencies = [ + "futures-core", + "futures-io", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + [[package]] name = "fxhash" version = "0.2.1" @@ -737,13 +1332,32 @@ dependencies = [ "byteorder", ] +[[package]] +name = "generational-arena" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d3b771574f62d0548cee0ad9057857e9fc25d7a3335f140c84f6acd0bf601" +dependencies = [ + "cfg-if 0.1.10", +] + +[[package]] +name = "generic-array" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "getrandom" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -755,6 +1369,36 @@ name = "gimli" version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +dependencies = [ + "fallible-iterator", + "indexmap", + "stable_deref_trait", +] + +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + +[[package]] +name = "h2" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] [[package]] name = "half" @@ -762,11 +1406,46 @@ version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] + [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + +[[package]] +name = "heapless" +version = "0.7.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db04bc24a18b9ea980628ecf00e6c0264f3c1426dac36c00cb49b6fbad8b0743" +dependencies = [ + "atomic-polyfill", + "hash32", + "rustc_version 0.4.0", + "serde", + "spin", + "stable_deref_trait", +] [[package]] name = "heck" @@ -792,6 +1471,86 @@ dependencies = [ "libc", ] +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "hyper" +version = "0.14.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + [[package]] name = "iana-time-zone" version = "0.1.53" @@ -818,117 +1577,327 @@ dependencies = [ [[package]] name = "icu_calendar" -version = "0.6.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0d5e4d859bd991761ead59f6c8745d3cf3443c1c6c9bf6c5131b3ac8cf3c09" +checksum = "81b686a9fbeca17bfa11b5b9864d840d8f2dc5abd80bef562486a6005f62c248" dependencies = [ + "databake", "displaydoc", "icu_locid", "icu_provider", "serde", "tinystr", - "zerovec 0.7.0", + "writeable", + "zerovec", ] [[package]] -name = "icu_datetime" -version = "0.6.0" +name = "icu_codepointtrie_builder" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683f1ef5f2d28919f374030942274e0576e4f09c2d2735092899eb8dc1842c9d" +checksum = "a19787b0c0fda6a323988a5be7e3906252438310605361f61f0aea11cd354236" dependencies = [ - "displaydoc", - "either", - "icu_calendar", - "icu_locid", - "icu_plurals", - "icu_provider", - "litemap", - "serde", - "smallvec", - "tinystr", - "writeable", - "zerovec 0.7.0", + "icu_collections", + "lazy_static", + "toml", + "wasmer", + "wasmer-wasi", ] [[package]] -name = "icu_locale_canonicalizer" -version = "0.6.0" +name = "icu_collator" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "973942d4e8c01fac1839feb537f4933514236585f418125963ff78d4004eebfd" +checksum = "b137457c2ef14e19965546cf4c0cd9e20dfaac3dfe11f436ed195a989546c9ca" dependencies = [ + "databake", + "displaydoc", + "icu_collections", "icu_locid", + "icu_normalizer", + "icu_properties", "icu_provider", - "litemap", "serde", - "tinystr", - "zerovec 0.7.0", + "smallvec", + "utf16_iter", + "utf8_iter", + "zerofrom", + "zerovec", ] [[package]] -name = "icu_locid" -version = "0.6.0" +name = "icu_collections" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a47bdfb63c6b49f5c43fb7ba358edcd1422fdf2e8df6fe26ece0df4925333cd" +checksum = "3c5be938a104d76f3bb9be012b6cd1451f7ed61c1eb9605c80f0f59c23f204dd" dependencies = [ + "databake", "displaydoc", - "litemap", "serde", - "tinystr", - "writeable", - "zerovec 0.7.0", + "yoke", + "zerofrom", + "zerovec", ] [[package]] -name = "icu_plurals" -version = "0.6.0" +name = "icu_datagen" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a725b9ebe4910eb1bcc65a3a4c3262c6cc2ebd327a63df9f6d18ee53acee5f" +checksum = "a5a1044c100861e425ad08ca500ff6d817ffb6c72f1fd7e19ea9a9f45f47fa95" dependencies = [ + "cached-path", + "crlify", + "databake", "displaydoc", - "fixed_decimal", + "elsa", + "icu_calendar", + "icu_codepointtrie_builder", + "icu_collator", + "icu_collections", + "icu_datetime", + "icu_decimal", + "icu_list", "icu_locid", + "icu_locid_transform", + "icu_normalizer", + "icu_plurals", + "icu_properties", + "icu_provider", + "icu_provider_adapters", + "icu_provider_blob", + "icu_provider_fs", + "icu_timezone", + "itertools", + "lazy_static", + "log", + "proc-macro2", + "quote", + "rayon", + "reqwest", + "serde", + "serde-aux", + "serde_json", + "syn", + "tinystr", + "toml", + "writeable", + "zerovec", + "zip 0.6.3", +] + +[[package]] +name = "icu_datetime" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9109c2277e98df5ebea10fa63cdd1aafbf78d726ecddbd205b8cff212345b98" +dependencies = [ + "databake", + "displaydoc", + "either", + "fixed_decimal", + "icu_calendar", + "icu_decimal", + "icu_locid", + "icu_plurals", + "icu_provider", + "icu_timezone", + "litemap", + "serde", + "smallvec", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_decimal" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d36aab31559864247be8b5c11a0a00a649c15922bfe158442b9083e78d8c1fc3" +dependencies = [ + "databake", + "displaydoc", + "fixed_decimal", + "icu_locid", + "icu_provider", + "serde", + "writeable", +] + +[[package]] +name = "icu_list" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c40218275f081c4493f190357c5395647b06734c2dc3dcb41cc099a0f60168b1" +dependencies = [ + "databake", + "deduplicating_array", + "displaydoc", + "icu_locid", + "icu_provider", + "regex-automata", + "serde", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b3de5d99a0e275fe6193b9586dbf37364daebc0d39c89b5cf8376a53b789e8" +dependencies = [ + "databake", + "displaydoc", + "litemap", + "serde", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "934712cef692e652dbc9a02024c2fc7d82ac7c6406d84f482c8b6f52cc897273" +dependencies = [ + "databake", + "displaydoc", + "icu_locid", + "icu_provider", + "serde", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f13202f9022ca7cf1b08631bc026526a1b232ceb70695ed5a7ffbb90a90c67e" +dependencies = [ + "databake", + "displaydoc", + "icu_collections", + "icu_properties", + "icu_provider", + "serde", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_plurals" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e81bb05ec62d5103926407da9a366c2af53e3d3f3bd0b94cd7074510a74d7444" +dependencies = [ + "databake", + "displaydoc", + "fixed_decimal", + "icu_locid", + "icu_provider", + "serde", + "zerovec", +] + +[[package]] +name = "icu_properties" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b46dce0df6daeda3aec068f6f31eeaa6402525a505df9b816d8fd5bd9c876448" +dependencies = [ + "databake", + "displaydoc", + "icu_collections", "icu_provider", "serde", - "zerovec 0.7.0", + "zerovec", ] [[package]] name = "icu_provider" -version = "0.6.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fbd7ffd479fdbbc366334a82821dc50d9f80b758389393374e9b36ff159f1a" +checksum = "2f911086e3c521a8a824d4f8bfd87769645ced2f07ff913b521c0d793be07100" dependencies = [ + "bincode", + "databake", + "dhat", "displaydoc", + "erased-serde", "icu_locid", "icu_provider_macros", - "litemap", + "log", "postcard", "serde", + "serde_json", + "stable_deref_trait", "writeable", "yoke", "zerofrom", - "zerovec 0.7.0", + "zerovec", +] + +[[package]] +name = "icu_provider_adapters" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "980c71d8a91b246ebbb97847178a4b816eea39d1d550c70ee566384555bb6545" +dependencies = [ + "databake", + "icu_locid", + "icu_provider", + "serde", + "tinystr", + "yoke", + "zerovec", ] [[package]] name = "icu_provider_blob" -version = "0.6.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "474b884a565f7ec52a26754a8b57646c128195e7af629caa52317ef6674e3e0d" +checksum = "a49513861983f44cd05b4a68d6746d6eac1ab02825ae185d351be5e943649cff" dependencies = [ "icu_provider", + "log", "postcard", "serde", "writeable", "yoke", - "zerovec 0.7.0", + "zerovec", +] + +[[package]] +name = "icu_provider_fs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2daa86c25654059c2d71ee0919dae6ec2952abc901c8f54a600c46c6df02fc" +dependencies = [ + "bincode", + "crlify", + "displaydoc", + "icu_provider", + "log", + "postcard", + "serde", + "serde-json-core", + "serde_json", + "sha2", + "writeable", ] [[package]] name = "icu_provider_macros" -version = "0.6.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e3ab0b492dcc1416f2f16142596467382ed70bdbfaee51c83e086b1ce0e75c" +checksum = "38cf6f5b65cf81f0b4298da647101acbfe6ae0e25263f92bd7a22597e9d6d606" dependencies = [ "proc-macro2", "quote", @@ -936,13 +1905,35 @@ dependencies = [ ] [[package]] -name = "icu_testdata" -version = "0.6.0" +name = "icu_timezone" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5580eeaa6ea70b94f286120ffcfb70f75ac8d759d95ccf6223a3c479ff99285" +checksum = "081c60a92f80496fe2aa49a54ab86394ec2f91993cff985f8451e4912a347ea0" dependencies = [ + "databake", + "displaydoc", + "icu_calendar", + "icu_locid", "icu_provider", - "icu_provider_blob", + "serde", + "tinystr", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", ] [[package]] @@ -958,7 +1949,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indicatif" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" +dependencies = [ + "console", + "lazy_static", + "number_prefix", + "regex", ] [[package]] @@ -967,7 +1971,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -983,9 +1987,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7d367024b3f3414d8e01f437f704f41a9f64ab36f9067fa73e526ad4c763c87" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.42.0", ] +[[package]] +name = "ipnet" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" + [[package]] name = "is-terminal" version = "0.4.1" @@ -995,7 +2005,7 @@ dependencies = [ "hermit-abi 0.2.6", "io-lifetimes 1.0.1", "rustix 0.36.4", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -1034,6 +2044,15 @@ dependencies = [ "libc", ] +[[package]] +name = "jobserver" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.60" @@ -1049,12 +2068,28 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + [[package]] name = "libc" version = "0.2.137" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if 1.0.0", + "winapi", +] + [[package]] name = "link-cplusplus" version = "1.0.7" @@ -1078,12 +2113,11 @@ checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f" [[package]] name = "litemap" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78d268a51abaaee3b8686e56396eb725b0da510bddd266a52e784aa1029dae73" +checksum = "f34a3f4798fac63fb48cf277eefa38f94d3443baff555bb98e4f56bc9092368e" dependencies = [ "serde", - "yoke", ] [[package]] @@ -1102,7 +2136,37 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", +] + +[[package]] +name = "loupe" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6a72dfa44fe15b5e76b94307eeb2ff995a8c5b283b55008940c02e0c5b634d" +dependencies = [ + "indexmap", + "loupe-derive", + "rustversion", +] + +[[package]] +name = "loupe-derive" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fbfc88337168279f2e9ae06e157cfed4efd3316e14dc96ed074d4f2e6c5952" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", ] [[package]] @@ -1112,8 +2176,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cbdc226fa10994e8f66a4d2f6f000148bc563a1c671b6dcd2135737018033d8a" dependencies = [ "log", - "memmap2", - "parking_lot", + "memmap2 0.2.3", + "parking_lot 0.11.2", "perf-event-open-sys", "rustc-hash", "smallvec", @@ -1134,6 +2198,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.6.5" @@ -1143,6 +2216,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + [[package]] name = "miniz_oxide" version = "0.5.4" @@ -1153,43 +2232,98 @@ dependencies = [ ] [[package]] -name = "nibble_vec" -version = "0.1.0" +name = "miniz_oxide" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ - "smallvec", + "adler", ] [[package]] -name = "nix" -version = "0.24.2" +name = "mintex" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" +checksum = "fd7c5ba1c3b5a23418d7bbf98c71c3d4946a0125002129231da8d6b723d559cb" dependencies = [ - "bitflags", - "cfg-if", - "libc", + "once_cell", + "sys-info", ] [[package]] -name = "num-bigint" -version = "0.4.3" +name = "mio" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ - "arbitrary", - "autocfg", - "num-integer", - "num-traits", - "serde", + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.42.0", ] [[package]] -name = "num-integer" -version = "0.1.45" +name = "more-asserts" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + +[[package]] +name = "nix" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" +dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "libc", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "arbitrary", + "autocfg", + "num-integer", + "num-traits", + "serde", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", "num-traits", @@ -1214,6 +2348,33 @@ dependencies = [ "libc", ] +[[package]] +name = "num_threads" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +dependencies = [ + "libc", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "object" +version = "0.28.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" +dependencies = [ + "crc32fast", + "hashbrown 0.11.2", + "indexmap", + "memchr", +] + [[package]] name = "object" version = "0.29.0" @@ -1235,6 +2396,57 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl" +version = "0.10.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29d971fd5722fec23977260f6e81aa67d2f22cadbdc2aa049f1022d9a3be1566" +dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5454462c0eced1e97f2ec09036abc8da362e66802f66fd20f86854d9d8cbcbc4" +dependencies = [ + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "os_str_bytes" version = "6.3.1" @@ -1255,7 +2467,17 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core", + "parking_lot_core 0.8.5", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.5", ] [[package]] @@ -1264,7 +2486,7 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "instant", "libc", "redox_syscall", @@ -1272,6 +2494,48 @@ dependencies = [ "winapi", ] +[[package]] +name = "parking_lot_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall", + "smallvec", + "windows-sys 0.42.0", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + [[package]] name = "perf-event-open-sys" version = "1.0.1" @@ -1329,6 +2593,18 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" + [[package]] name = "plotters" version = "0.3.4" @@ -1359,20 +2635,15 @@ dependencies = [ [[package]] name = "postcard" -version = "0.7.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25c0b0ae06fcffe600ad392aabfa535696c8973f2253d9ac83171924c58a858" +checksum = "1c2b180dc0bade59f03fd005cb967d3f1e5f69b13922dad0cd6e047cb8af2363" dependencies = [ - "postcard-cobs", + "cobs", + "heapless", "serde", ] -[[package]] -name = "postcard-cobs" -version = "0.1.5-pre" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c68cb38ed13fd7bc9dd5db8f165b7c8d9c1a315104083a2b10f11354c2af97f" - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1403,6 +2674,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-hack" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" + [[package]] name = "proc-macro2" version = "1.0.49" @@ -1412,6 +2689,26 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "ptr_meta" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +dependencies = [ + "ptr_meta_derive", +] + +[[package]] +name = "ptr_meta_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "quote" version = "1.0.23" @@ -1514,12 +2811,34 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-automata" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9368763f5a9b804326f3af749e16f9abf378d227bcdee7634b13d8f17793782" +dependencies = [ + "memchr", + "regex-syntax", +] + [[package]] name = "regex-syntax" version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +[[package]] +name = "region" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" +dependencies = [ + "bitflags", + "libc", + "mach", + "winapi", +] + [[package]] name = "regress" version = "0.4.1" @@ -1529,6 +2848,86 @@ dependencies = [ "memchr", ] +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi", +] + +[[package]] +name = "rend" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" +dependencies = [ + "bytecheck", +] + +[[package]] +name = "reqwest" +version = "0.11.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "rkyv" +version = "0.7.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" +dependencies = [ + "bytecheck", + "hashbrown 0.12.3", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", +] + +[[package]] +name = "rkyv_derive" +version = "0.7.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "rustc-demangle" version = "0.1.21" @@ -1541,6 +2940,24 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver 1.0.14", +] + [[package]] name = "rustix" version = "0.35.13" @@ -1552,7 +2969,7 @@ dependencies = [ "io-lifetimes 0.7.5", "libc", "linux-raw-sys 0.0.46", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -1566,9 +2983,15 @@ dependencies = [ "io-lifetimes 1.0.1", "libc", "linux-raw-sys 0.1.3", - "windows-sys", + "windows-sys 0.42.0", ] +[[package]] +name = "rustversion" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" + [[package]] name = "rustyline" version = "10.0.0" @@ -1576,7 +2999,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1cd5ae51d3f7bf65d7969d579d502168ef578f289452bd8ccc91de28fda20e" dependencies = [ "bitflags", - "cfg-if", + "cfg-if 1.0.0", "clipboard-win", "dirs-next", "fd-lock", @@ -1624,6 +3047,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "schannel" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +dependencies = [ + "lazy_static", + "windows-sys 0.36.1", +] + [[package]] name = "scopeguard" version = "1.1.0" @@ -1637,34 +3070,126 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" [[package]] -name = "serde" -version = "1.0.151" +name = "seahash" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fed41fc1a24994d044e6db6935e69511a1153b52c15eb42493b26fa87feba0" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" + +[[package]] +name = "security-framework" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ - "serde_derive", + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", ] [[package]] -name = "serde_derive" -version = "1.0.151" +name = "security-framework-sys" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "255abe9a125a985c05190d687b320c12f9b1f0b99445e608c21ba0782c719ad8" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ - "proc-macro2", - "quote", - "syn", + "core-foundation-sys", + "libc", ] [[package]] -name = "serde_json" -version = "1.0.91" +name = "semver" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "itoa", - "ryu", - "serde", + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + +[[package]] +name = "serde" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fed41fc1a24994d044e6db6935e69511a1153b52c15eb42493b26fa87feba0" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-aux" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "907c320ef8f45ce134b28ca9567ec58ec0d51dcae4e1ffe7ee0cc15517243810" +dependencies = [ + "chrono", + "serde", + "serde_json", +] + +[[package]] +name = "serde-json-core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8014aeea272bca0f0779778d43253f2f3375b414185b30e6ecc4d3e4a9994781" +dependencies = [ + "ryu", + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "255abe9a125a985c05190d687b320c12f9b1f0b99445e608c21ba0782c719ad8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", ] [[package]] @@ -1680,6 +3205,43 @@ dependencies = [ "unsafe-libyaml", ] +[[package]] +name = "sha1" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" +dependencies = [ + "sha1_smol", +] + +[[package]] +name = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" + +[[package]] +name = "sha2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest", +] + [[package]] name = "sharded-slab" version = "0.1.4" @@ -1689,12 +3251,34 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "simple_logger" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e190a521c2044948158666916d9e872cbb9984f755e9bb3b5b75a836205affcd" +dependencies = [ + "atty", + "colored", + "log", + "time 0.3.17", + "windows-sys 0.42.0", +] + [[package]] name = "siphasher" version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + [[package]] name = "smallvec" version = "1.10.0" @@ -1704,6 +3288,25 @@ dependencies = [ "serde", ] +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "spin" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" +dependencies = [ + "lock_api", +] + [[package]] name = "sptr" version = "0.3.2" @@ -1716,12 +3319,70 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "standback" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" +dependencies = [ + "version_check", +] + [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "stdweb" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" +dependencies = [ + "discard", + "rustc_version 0.2.3", + "stdweb-derive", + "stdweb-internal-macros", + "stdweb-internal-runtime", + "wasm-bindgen", +] + +[[package]] +name = "stdweb-derive" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "serde_derive", + "syn", +] + +[[package]] +name = "stdweb-internal-macros" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" +dependencies = [ + "base-x", + "proc-macro2", + "quote", + "serde", + "serde_derive", + "serde_json", + "sha1 0.6.1", + "syn", +] + +[[package]] +name = "stdweb-internal-runtime" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" + [[package]] name = "str-buf" version = "1.0.6" @@ -1734,6 +3395,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + [[package]] name = "syn" version = "1.0.107" @@ -1757,6 +3424,16 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "sys-info" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b3a0d0aba8bf96a0e1ddfdc352fc53b3df7f39318c71854910c3c4b024ae52c" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "sys-locale" version = "0.2.3" @@ -1776,6 +3453,37 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +[[package]] +name = "tar" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "target-lexicon" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" + +[[package]] +name = "tempfile" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +dependencies = [ + "cfg-if 1.0.0", + "fastrand", + "libc", + "redox_syscall", + "remove_dir_all", + "winapi", +] + [[package]] name = "termcolor" version = "1.1.3" @@ -1785,6 +3493,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "textwrap" version = "0.16.0" @@ -1811,6 +3529,12 @@ dependencies = [ "syn", ] +[[package]] +name = "thousands" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" + [[package]] name = "thread_local" version = "1.1.4" @@ -1831,16 +3555,83 @@ dependencies = [ "winapi", ] +[[package]] +name = "time" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" +dependencies = [ + "const_fn", + "libc", + "standback", + "stdweb", + "time-macros 0.1.1", + "version_check", + "winapi", +] + +[[package]] +name = "time" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +dependencies = [ + "itoa", + "libc", + "num_threads", + "serde", + "time-core", + "time-macros 0.2.6", +] + +[[package]] +name = "time-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" + +[[package]] +name = "time-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" +dependencies = [ + "proc-macro-hack", + "time-macros-impl", +] + +[[package]] +name = "time-macros" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +dependencies = [ + "time-core", +] + +[[package]] +name = "time-macros-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" +dependencies = [ + "proc-macro-hack", + "proc-macro2", + "quote", + "standback", + "syn", +] + [[package]] name = "tinystr" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dfb77d2490072fb5616d67686f55481b3d97701e383e208a7225843eba1aae6" +checksum = "f8aeafdfd935e4a7fe16a91ab711fa52d54df84f9c8f7ca5837a9d1d902ef4c2" dependencies = [ + "databake", "displaydoc", "serde", - "zerovec 0.7.0", - "zerovec 0.8.1", + "zerovec", ] [[package]] @@ -1868,6 +3659,47 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +[[package]] +name = "tokio" +version = "1.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46" +dependencies = [ + "autocfg", + "bytes", + "libc", + "memchr", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "windows-sys 0.42.0", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + [[package]] name = "toml" version = "0.5.10" @@ -1877,17 +3709,36 @@ dependencies = [ "serde", ] +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + [[package]] name = "tracing" version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", + "log", "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "tracing-core" version = "0.1.30" @@ -1919,6 +3770,24 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "try-lock" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "unicode-bidi" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" + [[package]] name = "unicode-general-category" version = "0.6.0" @@ -1947,117 +3816,444 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" [[package]] -name = "unicode-width" -version = "0.1.10" +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "unsafe-libyaml" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1e5fa573d8ac5f1a856f8d7be41d390ee973daf97c806b2c1a465e4e1406e68" + +[[package]] +name = "url" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf16_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52df8b7fb78e7910d776fccf2e42ceaf3604d55e8e7eb2dbd183cb1441d8a692" + +[[package]] +name = "utf8_iter" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a8922555b9500e3d865caed19330172cd67cbf82203f1a3311d8c305cc9f33" + +[[package]] +name = "utf8parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + +[[package]] +name = "wasmer" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" +dependencies = [ + "cfg-if 1.0.0", + "indexmap", + "js-sys", + "loupe", + "more-asserts", + "target-lexicon", + "thiserror", + "wasm-bindgen", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-compiler-singlepass", + "wasmer-derive", + "wasmer-engine", + "wasmer-engine-dylib", + "wasmer-engine-universal", + "wasmer-types", + "wasmer-vm", + "winapi", +] + +[[package]] +name = "wasmer-artifact" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" +dependencies = [ + "enumset", + "loupe", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] [[package]] -name = "unicode-xid" -version = "0.2.4" +name = "wasmer-compiler" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" +dependencies = [ + "enumset", + "loupe", + "rkyv", + "serde", + "serde_bytes", + "smallvec", + "target-lexicon", + "thiserror", + "wasmer-types", + "wasmparser", +] [[package]] -name = "unsafe-libyaml" -version = "0.2.4" +name = "wasmer-compiler-singlepass" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e5fa573d8ac5f1a856f8d7be41d390ee973daf97c806b2c1a465e4e1406e68" +checksum = "29ca2a35204d8befa85062bc7aac259a8db8070b801b8a783770ba58231d729e" +dependencies = [ + "byteorder", + "dynasm", + "dynasmrt", + "gimli", + "lazy_static", + "loupe", + "more-asserts", + "rayon", + "smallvec", + "wasmer-compiler", + "wasmer-types", +] [[package]] -name = "utf8parse" -version = "0.2.0" +name = "wasmer-derive" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372" +checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "valuable" -version = "0.1.0" +name = "wasmer-engine" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" +dependencies = [ + "backtrace", + "enumset", + "lazy_static", + "loupe", + "memmap2 0.5.8", + "more-asserts", + "rustc-demangle", + "serde", + "serde_bytes", + "target-lexicon", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", + "wasmer-vm", +] [[package]] -name = "version_check" -version = "0.9.4" +name = "wasmer-engine-dylib" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" +dependencies = [ + "cfg-if 1.0.0", + "enum-iterator", + "enumset", + "leb128", + "libloading", + "loupe", + "object 0.28.4", + "rkyv", + "serde", + "tempfile", + "tracing", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-engine", + "wasmer-object", + "wasmer-types", + "wasmer-vm", + "which", +] + +[[package]] +name = "wasmer-engine-universal" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" +dependencies = [ + "cfg-if 1.0.0", + "enumset", + "leb128", + "loupe", + "region", + "rkyv", + "wasmer-compiler", + "wasmer-engine", + "wasmer-engine-universal-artifact", + "wasmer-types", + "wasmer-vm", + "winapi", +] [[package]] -name = "walkdir" -version = "2.3.2" +name = "wasmer-engine-universal-artifact" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" dependencies = [ - "same-file", - "winapi", - "winapi-util", + "enum-iterator", + "enumset", + "loupe", + "rkyv", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", ] [[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +name = "wasmer-object" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" +dependencies = [ + "object 0.28.4", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] [[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +name = "wasmer-types" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" +dependencies = [ + "backtrace", + "enum-iterator", + "indexmap", + "loupe", + "more-asserts", + "rkyv", + "serde", + "thiserror", +] [[package]] -name = "wasm-bindgen" -version = "0.2.83" +name = "wasmer-vfs" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "9302eae3edc53cb540c2d681e7f16d8274918c1ce207591f04fed351649e97c0" dependencies = [ - "cfg-if", - "wasm-bindgen-macro", + "slab", + "thiserror", + "tracing", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.83" +name = "wasmer-vm" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", + "backtrace", + "cc", + "cfg-if 1.0.0", + "corosensei", + "enum-iterator", + "indexmap", + "lazy_static", + "libc", + "loupe", + "mach", + "memoffset", + "more-asserts", + "region", + "rkyv", + "scopeguard", + "serde", + "thiserror", + "wasmer-artifact", + "wasmer-types", + "winapi", ] [[package]] -name = "wasm-bindgen-macro" -version = "0.2.83" +name = "wasmer-wasi" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "fadbe31e3c1b6f3e398ad172b169152ae1a743ae6efd5f9ffb34019983319d99" dependencies = [ - "quote", - "wasm-bindgen-macro-support", + "cfg-if 1.0.0", + "generational-arena", + "getrandom", + "libc", + "thiserror", + "tracing", + "wasm-bindgen", + "wasmer", + "wasmer-vfs", + "wasmer-wasi-types", + "winapi", ] [[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.83" +name = "wasmer-wasi-types" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "22dc83aadbdf97388de3211cb6f105374f245a3cf2a5c65a16776e7a087a8468" dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", + "byteorder", + "time 0.2.27", + "wasmer-types", ] [[package]] -name = "wasm-bindgen-shared" -version = "0.2.83" +name = "wasmparser" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "web-sys" @@ -2069,6 +4265,17 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "which" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" +dependencies = [ + "either", + "libc", + "once_cell", +] + [[package]] name = "winapi" version = "0.3.9" @@ -2100,6 +4307,32 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" +dependencies = [ + "windows_aarch64_msvc 0.33.0", + "windows_i686_gnu 0.33.0", + "windows_i686_msvc 0.33.0", + "windows_x86_64_gnu 0.33.0", + "windows_x86_64_msvc 0.33.0", +] + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", +] + [[package]] name = "windows-sys" version = "0.42.0" @@ -2107,12 +4340,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_x86_64_msvc 0.42.0", ] [[package]] @@ -2121,24 +4354,72 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +[[package]] +name = "windows_aarch64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + [[package]] name = "windows_aarch64_msvc" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +[[package]] +name = "windows_i686_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + [[package]] name = "windows_i686_gnu" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +[[package]] +name = "windows_i686_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + [[package]] name = "windows_i686_msvc" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +[[package]] +name = "windows_x86_64_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + [[package]] name = "windows_x86_64_gnu" version = "0.42.0" @@ -2151,23 +4432,59 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +[[package]] +name = "windows_x86_64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + [[package]] name = "windows_x86_64_msvc" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + [[package]] name = "writeable" -version = "0.4.1" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8e6ab4f5da1b24daf2c590cfac801bacb27b15b4f050e84eb60149ea726f06b" + +[[package]] +name = "xattr" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8ab608ef0f68f7b5e1f17a38342cbc2725bf212f6ba9f103b0e05f675c41d83" +checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +dependencies = [ + "libc", +] [[package]] name = "yoke" -version = "0.5.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a829d54286b35cf07cbf9d8de817387ba4de20286e59214e67eaad5124b620a1" +checksum = "1fe1d55ca72c32d573bfbd5cb2f0ca65a497854c44762957a6d3da96041a5184" dependencies = [ "serde", "stable_deref_trait", @@ -2177,9 +4494,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "768f11e61cfb57f5de25941c877571dde114de48cac204594cc72beb71073d9f" +checksum = "58c2c5bb7c929b85c1b9ec69091b0d835f0878b4fd9eb67973b25936e06c4374" dependencies = [ "proc-macro2", "quote", @@ -2210,33 +4527,97 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c1b475ff48237bf7281cfa1721a52f0ad7f95ede1a46385e555870a354afc45" +checksum = "b9d919a74c17749ccb17beaf6405562e413cd94e98ba52ca1e64bbe7eefbd8b8" dependencies = [ + "databake", "serde", "yoke", "zerofrom", "zerovec-derive", ] -[[package]] -name = "zerovec" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3412f49402c32fffcc98fa861dc496eaa777442c5a5fc1e8d33d0fbb53cb0d2" -dependencies = [ - "zerofrom", -] - [[package]] name = "zerovec-derive" -version = "0.6.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd14fd397ea1b593c9c97a35d4da3dfb3a0ac7a1cad0e7f9e1b4bc313d1787e9" +checksum = "490e5f878c2856225e884c35927e7ea6db3c24cdb7229b72542c7526ad7ed49e" dependencies = [ "proc-macro2", "quote", "syn", "synstructure", ] + +[[package]] +name = "zip" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93ab48844d61251bb3835145c521d88aa4031d7139e8485990f60ca911fa0815" +dependencies = [ + "byteorder", + "bzip2", + "crc32fast", + "flate2", + "thiserror", + "time 0.1.44", +] + +[[package]] +name = "zip" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537ce7411d25e54e8ae21a7ce0b15840e7bfcff15b51d697ec3266cc76bdf080" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2", + "sha1 0.10.5", + "time 0.3.17", + "zstd", +] + +[[package]] +name = "zip-extensions" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64c3c977bc3434ce2d4bcea8ad3c644672de0f2c402b72b9171ca80a8885d14" +dependencies = [ + "zip 0.5.13", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.4+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fa202f2ef00074143e219d15b62ffc317d17cc33909feac471c044087cad7b0" +dependencies = [ + "cc", + "libc", +] diff --git a/Cargo.toml b/Cargo.toml index 48aed516ce..8813a8237c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ members = [ "boa_wasm", "boa_examples", "boa_macros", + "boa_icu_provider", ] [workspace.package] @@ -32,6 +33,7 @@ boa_unicode = { version = "0.16.0", path = "boa_unicode" } boa_macros = { version = "0.16.0", path = "boa_macros" } boa_ast = { version = "0.16.0", path = "boa_ast" } boa_parser = { version = "0.16.0", path = "boa_parser" } +boa_icu_provider = { version = "0.16.0", path = "boa_icu_provider" } [workspace.metadata.workspaces] allow_branch = "main" diff --git a/boa_ast/src/lib.rs b/boa_ast/src/lib.rs index 56773314af..49ad17f701 100644 --- a/boa_ast/src/lib.rs +++ b/boa_ast/src/lib.rs @@ -1,7 +1,7 @@ -//! Boa's **boa_ast** crate implements an ECMAScript abstract syntax tree. +//! Boa's **`boa_ast`** crate implements an ECMAScript abstract syntax tree. //! //! # Crate Overview -//! **boa_ast** contains representations of [**Parse Nodes**][grammar] as defined by the ECMAScript +//! **`boa_ast`** contains representations of [**Parse Nodes**][grammar] as defined by the ECMAScript //! spec. Some `Parse Node`s are not represented by Boa's AST, because a lot of grammar productions //! are only used to throw [**Early Errors**][early], and don't influence the evaluation of the AST //! itself. @@ -17,13 +17,14 @@ //! Try out the most recent release with Boa's live demo [playground][boa-playground]. //! //! # Boa Crates -//! - **boa_ast** - Boa's ECMAScript Abstract Syntax Tree. -//! - **boa_engine** - Boa's implementation of ECMAScript builtin objects and execution. -//! - **boa_gc** - Boa's garbage collector -//! - **boa_interner** - Boa's string interner -//! - **boa_parser** - Boa's lexer and parser -//! - **boa_profiler** - Boa's code profiler -//! - **boa_unicode** - Boa's Unicode identifier +//! - **`boa_ast`** - Boa's ECMAScript Abstract Syntax Tree. +//! - **`boa_engine`** - Boa's implementation of ECMAScript builtin objects and execution. +//! - **`boa_gc`** - Boa's garbage collector. +//! - **`boa_interner`** - Boa's string interner. +//! - **`boa_parser`** - Boa's lexer and parser. +//! - **`boa_profiler`** - Boa's code profiler. +//! - **`boa_unicode`** - Boa's Unicode identifier. +//! - **`boa_icu_provider`** - Boa's ICU4X data provider. //! //! [grammar]: https://tc39.es/ecma262/#sec-syntactic-grammar //! [early]: https://tc39.es/ecma262/#sec-static-semantic-rules diff --git a/boa_cli/Cargo.toml b/boa_cli/Cargo.toml index a83056bfc1..001f2e4600 100644 --- a/boa_cli/Cargo.toml +++ b/boa_cli/Cargo.toml @@ -12,7 +12,7 @@ repository.workspace = true rust-version.workspace = true [dependencies] -boa_engine = { workspace = true, features = ["deser", "console", "flowgraph"] } +boa_engine = { workspace = true, features = ["deser", "console", "flowgraph", "intl"] } boa_ast = { workspace = true, features = ["serde"]} boa_parser.workspace = true rustyline = "10.0.0" diff --git a/boa_engine/Cargo.toml b/boa_engine/Cargo.toml index 8537d6c7f6..d0bfa3a5d5 100644 --- a/boa_engine/Cargo.toml +++ b/boa_engine/Cargo.toml @@ -15,13 +15,18 @@ rust-version.workspace = true profiler = ["boa_profiler/profiler"] deser = ["boa_interner/serde", "boa_ast/serde"] intl = [ - "dep:icu_locale_canonicalizer", + "dep:boa_icu_provider", + "dep:icu_locid_transform", "dep:icu_locid", "dep:icu_datetime", "dep:icu_plurals", "dep:icu_provider", - "dep:icu_testdata", - "dep:sys-locale" + "dep:icu_provider_adapters", + "dep:icu_calendar", + "dep:icu_collator", + "dep:icu_list", + "dep:writeable", + "dep:sys-locale", ] fuzz = ["boa_ast/fuzz", "boa_interner/fuzz"] @@ -59,12 +64,19 @@ tap = "1.0.1" sptr = "0.3.2" static_assertions = "1.1.0" thiserror = "1.0.38" -icu_locale_canonicalizer = { version = "0.6.0", features = ["serde"], optional = true } -icu_locid = { version = "0.6.0", features = ["serde"], optional = true } -icu_datetime = { version = "0.6.0", features = ["serde"], optional = true } -icu_plurals = { version = "0.6.0", features = ["serde"], optional = true } -icu_provider = { version = "0.6.0", optional = true } -icu_testdata = { version = "0.6.0", optional = true } + +# intl deps +boa_icu_provider = { workspace = true, optional = true } +icu_locid_transform = { version = "1.0.0", features = ["serde"], optional = true } +icu_locid = { version = "1.0.0", features = ["serde"], optional = true } +icu_datetime = { version = "1.0.0", features = ["serde", "experimental"], optional = true } +icu_calendar = { version = "1.0.0", optional = true } +icu_collator = { version = "1.0.1", features = ["serde"], optional = true } +icu_plurals = { version = "1.0.0", features = ["serde"], optional = true } +icu_provider = { version = "1.0.1", optional = true } +icu_provider_adapters = { version = "1.0.0", features = ["serde"], optional = true } +icu_list = { version = "1.0.0", features = ["serde"], optional = true } +writeable = { version = "0.5.0", optional = true } sys-locale = { version = "0.2.3", optional = true } [dev-dependencies] diff --git a/boa_engine/src/builtins/array/mod.rs b/boa_engine/src/builtins/array/mod.rs index f311e5cd64..b0c6f4fc58 100644 --- a/boa_engine/src/builtins/array/mod.rs +++ b/boa_engine/src/builtins/array/mod.rs @@ -13,6 +13,7 @@ pub mod array_iterator; #[cfg(test)] mod tests; +use boa_macros::utf16; use boa_profiler::Profiler; use tap::{Conv, Pipe}; @@ -117,6 +118,7 @@ impl BuiltIn for Array { .method(Self::some, "some", 1) .method(Self::sort, "sort", 1) .method(Self::splice, "splice", 2) + .method(Self::to_locale_string, "toLocaleString", 0) .method(Self::reduce, "reduce", 1) .method(Self::reduce_right, "reduceRight", 1) .method(Self::keys, "keys", 0) @@ -2027,6 +2029,72 @@ impl Array { Ok(a.into()) } + /// [`Array.prototype.toLocaleString ( [ locales [ , options ] ] )`][spec]. + /// + /// Returns a string representing the elements of the array. The elements are converted to + /// strings using their `toLocaleString` methods and these strings are separated by a + /// locale-specific string (such as a comma ","). + /// + /// More information: + /// - [MDN documentation][mdn] + /// + /// [spec]: https://tc39.es/ecma402/#sup-array.prototype.tolocalestring + /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toLocaleString + pub(crate) fn to_locale_string( + this: &JsValue, + args: &[JsValue], + context: &mut Context, + ) -> JsResult { + // 1. Let array be ? ToObject(this value). + let array = this.to_object(context)?; + // 2. Let len be ? ToLength(? Get(array, "length")). + let len = array.length_of_array_like(context)?; + + // 3. Let separator be the implementation-defined list-separator String value appropriate for the host environment's current locale (such as ", "). + let separator = { + #[cfg(feature = "intl")] + { + // TODO: this should eventually return a locale-sensitive separator. + utf16!(", ") + } + + #[cfg(not(feature = "intl"))] + { + utf16!(", ") + } + }; + + // 4. Let R be the empty String. + let mut r = Vec::new(); + + // 5. Let k be 0. + // 6. Repeat, while k < len, + for k in 0..len { + // a. If k > 0, then + if k > 0 { + // i. Set R to the string-concatenation of R and separator. + r.extend_from_slice(separator); + } + + // b. Let nextElement be ? Get(array, ! ToString(k)). + let next = array.get(k, context)?; + + // c. If nextElement is not undefined or null, then + if !next.is_null_or_undefined() { + // i. Let S be ? ToString(? Invoke(nextElement, "toLocaleString", « locales, options »)). + let s = next + .invoke("toLocaleString", args, context)? + .to_string(context)?; + + // ii. Set R to the string-concatenation of R and S. + r.extend_from_slice(&s); + } + // d. Increase k by 1. + } + // 7. Return R. + Ok(js_string!(r).into()) + } + /// `Array.prototype.splice ( start, [deleteCount[, ...items]] )` /// /// Splices an array by following diff --git a/boa_engine/src/builtins/console/mod.rs b/boa_engine/src/builtins/console/mod.rs index 3847f1cf22..1f6f894814 100644 --- a/boa_engine/src/builtins/console/mod.rs +++ b/boa_engine/src/builtins/console/mod.rs @@ -52,19 +52,16 @@ fn logger(msg: LogMessage, console_state: &Console) { /// This represents the `console` formatter. pub fn formatter(data: &[JsValue], context: &mut Context) -> JsResult { - let target = data - .get(0) - .cloned() - .unwrap_or_default() - .to_string(context)?; - - match data.len() { - 0 => Ok(String::new()), - 1 => Ok(target.to_std_string_escaped()), - _ => { + match data { + [] => Ok(String::new()), + [val] => Ok(val.to_string(context)?.to_std_string_escaped()), + data => { let mut formatted = String::new(); let mut arg_index = 1; - let target = target.to_std_string_escaped(); + let target = data + .get_or_undefined(0) + .to_string(context)? + .to_std_string_escaped(); let mut chars = target.chars(); while let Some(c) = chars.next() { if c == '%' { @@ -94,9 +91,7 @@ pub fn formatter(data: &[JsValue], context: &mut Context) -> JsResult { /* string */ 's' => { let arg = data - .get(arg_index) - .cloned() - .unwrap_or_default() + .get_or_undefined(arg_index) .to_string(context)? .to_std_string_escaped(); formatted.push_str(&arg); diff --git a/boa_engine/src/builtins/intl/collator/mod.rs b/boa_engine/src/builtins/intl/collator/mod.rs new file mode 100644 index 0000000000..fe60adbe55 --- /dev/null +++ b/boa_engine/src/builtins/intl/collator/mod.rs @@ -0,0 +1,548 @@ +use boa_gc::{custom_trace, Finalize, Trace}; +use boa_profiler::Profiler; +use icu_collator::{ + provider::CollationMetadataV1Marker, AlternateHandling, CaseFirst, MaxVariable, Numeric, +}; + +use icu_locid::{ + extensions::unicode::Value, extensions_unicode_key as key, extensions_unicode_value as value, + Locale, +}; +use icu_provider::{DataLocale, DataProvider}; +use tap::{Conv, Pipe}; + +use crate::{ + builtins::{BuiltIn, JsArgs}, + context::{intrinsics::StandardConstructors, BoaProvider}, + object::{ + internal_methods::get_prototype_from_constructor, ConstructorBuilder, FunctionBuilder, + JsFunction, JsObject, ObjectData, + }, + property::Attribute, + symbol::WellKnownSymbols, + Context, JsNativeError, JsResult, JsValue, +}; + +use super::{ + locale::{canonicalize_locale_list, resolve_locale, supported_locales, validate_extension}, + options::{coerce_options_to_object, get_option, IntlOptions, LocaleMatcher}, + Service, +}; + +mod options; +pub(crate) use options::*; + +pub struct Collator { + locale: Locale, + collation: Value, + numeric: bool, + case_first: Option, + usage: Usage, + sensitivity: Sensitivity, + ignore_punctuation: bool, + collator: icu_collator::Collator, + bound_compare: Option, +} + +impl Finalize for Collator {} + +// SAFETY: only `bound_compare` is a traceable object. +unsafe impl Trace for Collator { + custom_trace!(this, mark(&this.bound_compare)); +} + +impl Collator { + /// Gets the inner [`icu_collator::Collator`] comparator. + pub(crate) const fn collator(&self) -> &icu_collator::Collator { + &self.collator + } +} + +impl std::fmt::Debug for Collator { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Collator") + .field("locale", &self.locale) + .field("collation", &self.collation) + .field("numeric", &self.numeric) + .field("case_first", &self.case_first) + .field("usage", &self.usage) + .field("sensitivity", &self.sensitivity) + .field("ignore_punctuation", &self.ignore_punctuation) + .field("collator", &"ICUCollator") + .field("bound_compare", &self.bound_compare) + .finish() + } +} + +#[derive(Debug, Clone)] +pub(in crate::builtins::intl) struct CollatorLocaleOptions { + collation: Option, + numeric: Option, + case_first: Option, +} + +impl

Service

for Collator +where + P: DataProvider, +{ + type LangMarker = CollationMetadataV1Marker; + + type LocaleOptions = CollatorLocaleOptions; + + fn resolve(locale: &mut Locale, options: &mut Self::LocaleOptions, provider: &P) { + let collation = options + .collation + .take() + .filter(|co| validate_extension(locale.id.clone(), key!("co"), co, provider)) + .or_else(|| { + locale + .extensions + .unicode + .keywords + .get(&key!("co")) + .cloned() + .filter(|co| validate_extension(locale.id.clone(), key!("co"), co, provider)) + }) + .filter(|co| co != &value!("search")); + + let numeric = + options.numeric.or_else( + || match locale.extensions.unicode.keywords.get(&key!("kn")) { + Some(a) if a == &value!("true") => Some(true), + Some(_) => Some(false), + _ => None, + }, + ); + + let case_first = options.case_first.or_else(|| { + match locale.extensions.unicode.keywords.get(&key!("kf")) { + Some(a) if a == &value!("upper") => Some(CaseFirst::UpperFirst), + Some(a) if a == &value!("lower") => Some(CaseFirst::LowerFirst), + Some(_) => Some(CaseFirst::Off), + _ => None, + } + }); + + locale.extensions.unicode.clear(); + + if let Some(co) = collation.clone() { + locale.extensions.unicode.keywords.set(key!("co"), co); + } + + if let Some(kn) = numeric.map(|kn| if kn { value!("true") } else { value!("false") }) { + locale.extensions.unicode.keywords.set(key!("kn"), kn); + } + + if let Some(kf) = case_first.map(|kf| match kf { + CaseFirst::Off => value!("false"), + CaseFirst::LowerFirst => value!("lower"), + CaseFirst::UpperFirst => value!("upper"), + _ => unreachable!(), + }) { + locale.extensions.unicode.keywords.set(key!("kf"), kf); + } + + options.collation = collation; + options.numeric = numeric; + options.case_first = case_first; + } +} + +impl BuiltIn for Collator { + const NAME: &'static str = "Collator"; + + fn init(context: &mut Context) -> Option { + let _timer = Profiler::global().start_event(Self::NAME, "init"); + + let compare = FunctionBuilder::native(context, Self::compare) + .name("get compare") + .constructor(false) + .build(); + + ConstructorBuilder::with_standard_constructor( + context, + Self::constructor, + context.intrinsics().constructors().collator().clone(), + ) + .name(Self::NAME) + .length(Self::LENGTH) + .static_method(Self::supported_locales_of, "supportedLocalesOf", 1) + .property( + WellKnownSymbols::to_string_tag(), + "Intl.Collator", + Attribute::CONFIGURABLE, + ) + .accessor("compare", Some(compare), None, Attribute::CONFIGURABLE) + .method(Self::resolved_options, "resolvedOptions", 0) + .build() + .conv::() + .pipe(Some) + } +} + +impl Collator { + pub(crate) const LENGTH: usize = 0; + + /// Constructor [`Intl.Collator ( [ locales [ , options ] ] )`][spec]. + /// + /// Constructor for `Collator` objects. + /// + /// More information: + /// - [MDN documentation][mdn] + /// + /// [spec]: https://tc39.es/ecma402/#sec-intl.collator + /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator + pub(crate) fn constructor( + new_target: &JsValue, + args: &[JsValue], + context: &mut Context, + ) -> JsResult { + // 1. If NewTarget is undefined, let newTarget be the active function object, else let newTarget be NewTarget. + // 2. Let internalSlotsList be « [[InitializedCollator]], [[Locale]], [[Usage]], [[Sensitivity]], [[IgnorePunctuation]], [[Collation]], [[BoundCompare]] ». + // 3. If %Collator%.[[RelevantExtensionKeys]] contains "kn", then + // a. Append [[Numeric]] as the last element of internalSlotsList. + // 4. If %Collator%.[[RelevantExtensionKeys]] contains "kf", then + // a. Append [[CaseFirst]] as the last element of internalSlotsList. + // 5. Let collator be ? OrdinaryCreateFromConstructor(newTarget, "%Collator.prototype%", internalSlotsList). + // 6. Return ? InitializeCollator(collator, locales, options). + + let locales = args.get_or_undefined(0); + let options = args.get_or_undefined(1); + + // Abstract operation `InitializeCollator ( collator, locales, options )` + // https://tc39.es/ecma402/#sec-initializecollator + + // 1. Let requestedLocales be ? CanonicalizeLocaleList(locales). + let requested_locales = canonicalize_locale_list(locales, context)?; + + // 2. Set options to ? CoerceOptionsToObject(options). + let options = coerce_options_to_object(options, context)?; + + // 3. Let usage be ? GetOption(options, "usage", string, « "sort", "search" », "sort"). + // 4. Set collator.[[Usage]] to usage. + // 5. If usage is "sort", then + // a. Let localeData be %Collator%.[[SortLocaleData]]. + // 6. Else, + // a. Let localeData be %Collator%.[[SearchLocaleData]]. + let usage = get_option::(&options, "usage", false, context)?.unwrap_or_default(); + + // 7. Let opt be a new Record. + // 8. Let matcher be ? GetOption(options, "localeMatcher", string, « "lookup", "best fit" », "best fit"). + // 9. Set opt.[[localeMatcher]] to matcher. + let matcher = get_option::(&options, "localeMatcher", false, context)? + .unwrap_or_default(); + + // 10. Let collation be ? GetOption(options, "collation", string, empty, undefined). + // 11. If collation is not undefined, then + // a. If collation does not match the Unicode Locale Identifier type nonterminal, throw a RangeError exception. + // 12. Set opt.[[co]] to collation. + let collation = get_option::(&options, "collation", false, context)?; + + // 13. Let numeric be ? GetOption(options, "numeric", boolean, empty, undefined). + // 14. If numeric is not undefined, then + // a. Let numeric be ! ToString(numeric). + // 15. Set opt.[[kn]] to numeric. + let numeric = get_option::(&options, "numeric", false, context)?; + + // 16. Let caseFirst be ? GetOption(options, "caseFirst", string, « "upper", "lower", "false" », undefined). + // 17. Set opt.[[kf]] to caseFirst. + let case_first = get_option::(&options, "caseFirst", false, context)?; + + let mut intl_options = IntlOptions { + matcher, + service_options: CollatorLocaleOptions { + collation, + numeric, + case_first, + }, + }; + + // 18. Let relevantExtensionKeys be %Collator%.[[RelevantExtensionKeys]]. + // 19. Let r be ResolveLocale(%Collator%.[[AvailableLocales]], requestedLocales, opt, relevantExtensionKeys, localeData). + let mut locale = + resolve_locale::(&requested_locales, &mut intl_options, context.icu()); + + let collator_locale = { + // `collator_locale` needs to be different from the resolved locale because ECMA402 doesn't + // define `search` as a resolvable extension of a locale, so we need to add that extension + // only to the locale passed to the collator. + let mut col_loc = DataLocale::from(&locale); + if usage == Usage::Search { + intl_options.service_options.collation = None; + locale.extensions.unicode.keywords.remove(key!("co")); + col_loc.set_unicode_ext(key!("co"), value!("search")); + } + col_loc + }; + + // 20. Set collator.[[Locale]] to r.[[locale]]. + + // 21. Let collation be r.[[co]]. + // 22. If collation is null, let collation be "default". + // 23. Set collator.[[Collation]] to collation. + let collation = intl_options + .service_options + .collation + .unwrap_or(value!("default")); + + // 24. If relevantExtensionKeys contains "kn", then + // a. Set collator.[[Numeric]] to SameValue(r.[[kn]], "true"). + let numeric = intl_options.service_options.numeric.unwrap_or_default(); + + // 25. If relevantExtensionKeys contains "kf", then + // a. Set collator.[[CaseFirst]] to r.[[kf]]. + let case_first = intl_options.service_options.case_first; + + // 26. Let sensitivity be ? GetOption(options, "sensitivity", string, « "base", "accent", "case", "variant" », undefined). + // 28. Set collator.[[Sensitivity]] to sensitivity. + let sensitivity = get_option::(&options, "sensitivity", false, context)? + // 27. If sensitivity is undefined, then + // a. If usage is "sort", then + // i. Let sensitivity be "variant". + // b. Else, + // i. Let dataLocale be r.[[dataLocale]]. + // ii. Let dataLocaleData be localeData.[[]]. + // iii. Let sensitivity be dataLocaleData.[[sensitivity]]. + .or_else(|| (usage == Usage::Sort).then_some(Sensitivity::Variant)); + + // 29. Let ignorePunctuation be ? GetOption(options, "ignorePunctuation", boolean, empty, false). + // 30. Set collator.[[IgnorePunctuation]] to ignorePunctuation. + let ignore_punctuation = + get_option::(&options, "ignorePunctuation", false, context)?.unwrap_or_default(); + + let (strength, case_level) = sensitivity.map(Sensitivity::to_collator_options).unzip(); + + let (alternate_handling, max_variable) = ignore_punctuation + .then_some((AlternateHandling::Shifted, MaxVariable::Punctuation)) + .unzip(); + + let collator = context + .icu() + .provider() + .try_new_collator(&collator_locale, { + let mut options = icu_collator::CollatorOptions::new(); + options.strength = strength; + options.case_level = case_level; + options.case_first = case_first; + options.numeric = Some(if numeric { Numeric::On } else { Numeric::Off }); + options.alternate_handling = alternate_handling; + options.max_variable = max_variable; + options + }) + .map_err(|e| JsNativeError::typ().with_message(e.to_string()))?; + + let prototype = + get_prototype_from_constructor(new_target, StandardConstructors::collator, context)?; + let collator = JsObject::from_proto_and_data( + prototype, + ObjectData::collator(Collator { + locale, + collation, + numeric, + case_first, + usage, + sensitivity: sensitivity.unwrap_or(Sensitivity::Variant), + ignore_punctuation, + collator, + bound_compare: None, + }), + ); + + // 31. Return collator. + Ok(collator.into()) + } + + /// [`Intl.Collator.supportedLocalesOf ( locales [ , options ] )`][spec]. + /// + /// Returns an array containing those of the provided locales that are supported in collation + /// without having to fall back to the runtime's default locale. + /// + /// More information: + /// - [MDN documentation][mdn] + /// + /// [spec]: https://tc39.es/ecma402/#sec-intl.collator.supportedlocalesof + /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/supportedLocalesOf + fn supported_locales_of( + _: &JsValue, + args: &[JsValue], + context: &mut Context, + ) -> JsResult { + let locales = args.get_or_undefined(0); + let options = args.get_or_undefined(1); + + // 1. Let availableLocales be %Collator%.[[AvailableLocales]]. + // 2. Let requestedLocales be ? CanonicalizeLocaleList(locales). + let requested_locales = canonicalize_locale_list(locales, context)?; + + // 3. Return ? SupportedLocales(availableLocales, requestedLocales, options). + supported_locales::<>::LangMarker>( + &requested_locales, + options, + context, + ) + .map(JsValue::from) + } + + /// [`get Intl.Collator.prototype.compare`][spec]. + /// + /// Compares two strings according to the sort order of this Intl.Collator object. + /// + /// More information: + /// - [MDN documentation][mdn] + /// + /// [spec]: https://tc39.es/ecma402/#sec-intl.collator.prototype.compare + /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare + fn compare(this: &JsValue, _: &[JsValue], context: &mut Context) -> JsResult { + // 1. Let collator be the this value. + // 2. Perform ? RequireInternalSlot(collator, [[InitializedCollator]]). + let this = this.as_object().ok_or_else(|| { + JsNativeError::typ() + .with_message("`resolvedOptions` can only be called on a `Collator` object") + })?; + let collator_obj = this.clone(); + let mut collator = this.borrow_mut(); + let collator = collator.as_collator_mut().ok_or_else(|| { + JsNativeError::typ() + .with_message("`resolvedOptions` can only be called on a `Collator` object") + })?; + + // 3. If collator.[[BoundCompare]] is undefined, then + // a. Let F be a new built-in function object as defined in 10.3.3.1. + // b. Set F.[[Collator]] to collator. + // c. Set collator.[[BoundCompare]] to F. + let bound_compare = if let Some(f) = collator.bound_compare.clone() { + f + } else { + let bound_compare = FunctionBuilder::closure_with_captures( + context, + // 10.3.3.1. Collator Compare Functions + // https://tc39.es/ecma402/#sec-collator-compare-functions + |_, args, collator, context| { + // 1. Let collator be F.[[Collator]]. + // 2. Assert: Type(collator) is Object and collator has an [[InitializedCollator]] internal slot. + let collator = collator.borrow(); + let collator = collator + .as_collator() + .expect("checked above that the object was a collator object"); + + // 3. If x is not provided, let x be undefined. + // 5. Let X be ? ToString(x). + let x = args.get_or_undefined(0).to_string(context)?; + + // 4. If y is not provided, let y be undefined. + // 6. Let Y be ? ToString(y). + let y = args.get_or_undefined(1).to_string(context)?; + + // 7. Return CompareStrings(collator, X, Y). + let result = collator.collator.compare_utf16(&x, &y) as i32; + + Ok(result.into()) + }, + collator_obj, + ) + .length(2) + .build(); + + collator.bound_compare = Some(bound_compare.clone()); + bound_compare + }; + + // 4. Return collator.[[BoundCompare]]. + Ok(bound_compare.into()) + } + + /// [`Intl.Collator.prototype.resolvedOptions ( )`][spec]. + /// + /// Returns a new object with properties reflecting the locale and collation options computed + /// during initialization of this `Intl.Collator` object. + /// + /// More information: + /// - [MDN documentation][mdn] + /// + /// [spec]: https://tc39.es/ecma402/#sec-intl.collator.prototype.resolvedoptions + /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/resolvedOptions + fn resolved_options(this: &JsValue, _: &[JsValue], context: &mut Context) -> JsResult { + // 1. Let collator be the this value. + // 2. Perform ? RequireInternalSlot(collator, [[InitializedCollator]]). + let collator = this.as_object().map(JsObject::borrow).ok_or_else(|| { + JsNativeError::typ() + .with_message("`resolvedOptions` can only be called on a `Collator` object") + })?; + let collator = collator.as_collator().ok_or_else(|| { + JsNativeError::typ() + .with_message("`resolvedOptions` can only be called on a `Collator` object") + })?; + + // 3. Let options be OrdinaryObjectCreate(%Object.prototype%). + let options = JsObject::from_proto_and_data( + context.intrinsics().constructors().object().prototype(), + ObjectData::ordinary(), + ); + + // 4. For each row of Table 4, except the header row, in table order, do + // a. Let p be the Property value of the current row. + // b. Let v be the value of collator's internal slot whose name is the Internal Slot value of the current row. + // c. If the current row has an Extension Key value, then + // i. Let extensionKey be the Extension Key value of the current row. + // ii. If %Collator%.[[RelevantExtensionKeys]] does not contain extensionKey, then + // 1. Let v be undefined. + // d. If v is not undefined, then + // i. Perform ! CreateDataPropertyOrThrow(options, p, v). + // 5. Return options. + options + .create_data_property_or_throw("locale", collator.locale.to_string(), context) + .expect("operation must not fail per the spec"); + options + .create_data_property_or_throw( + "usage", + match collator.usage { + Usage::Search => "search", + Usage::Sort => "sort", + }, + context, + ) + .expect("operation must not fail per the spec"); + options + .create_data_property_or_throw( + "sensitivity", + match collator.sensitivity { + Sensitivity::Base => "base", + Sensitivity::Accent => "accent", + Sensitivity::Case => "case", + Sensitivity::Variant => "variant", + }, + context, + ) + .expect("operation must not fail per the spec"); + options + .create_data_property_or_throw( + "ignorePunctuation", + collator.ignore_punctuation, + context, + ) + .expect("operation must not fail per the spec"); + options + .create_data_property_or_throw("collation", collator.collation.to_string(), context) + .expect("operation must not fail per the spec"); + options + .create_data_property_or_throw("numeric", collator.numeric, context) + .expect("operation must not fail per the spec"); + if let Some(kf) = collator.case_first { + options + .create_data_property_or_throw( + "caseFirst", + match kf { + CaseFirst::Off => "false", + CaseFirst::LowerFirst => "lower", + CaseFirst::UpperFirst => "upper", + _ => unreachable!(), + }, + context, + ) + .expect("operation must not fail per the spec"); + } + + // 5. Return options. + Ok(options.into()) + } +} diff --git a/boa_engine/src/builtins/intl/collator/options.rs b/boa_engine/src/builtins/intl/collator/options.rs new file mode 100644 index 0000000000..928c038b0a --- /dev/null +++ b/boa_engine/src/builtins/intl/collator/options.rs @@ -0,0 +1,80 @@ +use std::str::FromStr; + +use icu_collator::{CaseLevel, Strength}; + +use crate::builtins::intl::options::OptionTypeParsable; + +#[derive(Debug, Clone, Copy)] +pub(crate) enum Sensitivity { + Base, + Accent, + Case, + Variant, +} + +impl Sensitivity { + /// Converts the sensitivity option to the equivalent ICU4X collator options. + pub(crate) const fn to_collator_options(self) -> (Strength, CaseLevel) { + match self { + Sensitivity::Base => (Strength::Primary, CaseLevel::Off), + Sensitivity::Accent => (Strength::Secondary, CaseLevel::Off), + Sensitivity::Case => (Strength::Primary, CaseLevel::On), + Sensitivity::Variant => (Strength::Tertiary, CaseLevel::On), + } + } +} + +#[derive(Debug)] +pub(crate) struct ParseSensitivityError; + +impl std::fmt::Display for ParseSensitivityError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str("provided string was not `base`, `accent`, `case` or `variant`") + } +} + +impl FromStr for Sensitivity { + type Err = ParseSensitivityError; + + fn from_str(s: &str) -> Result { + match s { + "base" => Ok(Self::Base), + "accent" => Ok(Self::Accent), + "case" => Ok(Self::Case), + "variant" => Ok(Self::Variant), + _ => Err(ParseSensitivityError), + } + } +} + +impl OptionTypeParsable for Sensitivity {} + +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] +pub(crate) enum Usage { + #[default] + Sort, + Search, +} + +#[derive(Debug)] +pub(crate) struct ParseUsageError; + +impl std::fmt::Display for ParseUsageError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str("provided string was not `sort` or `search`") + } +} + +impl FromStr for Usage { + type Err = ParseUsageError; + + fn from_str(s: &str) -> Result { + match s { + "sort" => Ok(Self::Sort), + "search" => Ok(Self::Search), + _ => Err(ParseUsageError), + } + } +} + +impl OptionTypeParsable for Usage {} diff --git a/boa_engine/src/builtins/intl/date_time_format.rs b/boa_engine/src/builtins/intl/date_time_format.rs index 103220794f..45628510e2 100644 --- a/boa_engine/src/builtins/intl/date_time_format.rs +++ b/boa_engine/src/builtins/intl/date_time_format.rs @@ -20,6 +20,23 @@ use crate::{ use boa_gc::{Finalize, Trace}; use boa_profiler::Profiler; +use icu_datetime::options::preferences::HourCycle; + +use super::options::OptionType; + +impl OptionType for HourCycle { + fn from_value(value: JsValue, context: &mut Context) -> JsResult { + match value.to_string(context)?.to_std_string_escaped().as_str() { + "h11" => Ok(HourCycle::H11), + "h12" => Ok(HourCycle::H12), + "h23" => Ok(HourCycle::H23), + "h24" => Ok(HourCycle::H24), + _ => Err(JsNativeError::range() + .with_message("provided string was not `h11`, `h12`, `h23` or `h24`") + .into()), + } + } +} /// JavaScript `Intl.DateTimeFormat` object. #[derive(Debug, Clone, Trace, Finalize)] diff --git a/boa_engine/src/builtins/intl/list_format/mod.rs b/boa_engine/src/builtins/intl/list_format/mod.rs new file mode 100644 index 0000000000..d84527218e --- /dev/null +++ b/boa_engine/src/builtins/intl/list_format/mod.rs @@ -0,0 +1,495 @@ +use std::fmt::Write; + +use boa_profiler::Profiler; +use icu_list::{provider::AndListV1Marker, ListFormatter, ListLength}; +use icu_locid::Locale; +use icu_provider::DataLocale; +use tap::{Conv, Pipe}; + +use crate::{ + builtins::{Array, BuiltIn, JsArgs}, + context::{intrinsics::StandardConstructors, BoaProvider}, + object::{ + internal_methods::get_prototype_from_constructor, ConstructorBuilder, JsObject, ObjectData, + }, + property::Attribute, + symbol::WellKnownSymbols, + Context, JsNativeError, JsResult, JsString, JsValue, +}; + +use super::{ + locale::{canonicalize_locale_list, resolve_locale, supported_locales}, + options::{get_option, get_options_object, IntlOptions, LocaleMatcher}, + Service, +}; + +mod options; +pub(crate) use options::*; +pub struct ListFormat { + locale: Locale, + typ: ListFormatType, + style: ListLength, + formatter: ListFormatter, +} + +impl std::fmt::Debug for ListFormat { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("ListFormat") + .field("locale", &self.locale) + .field("typ", &self.typ) + .field("style", &self.style) + .field("formatter", &"ListFormatter") + .finish() + } +} + +impl

Service

for ListFormat { + type LangMarker = AndListV1Marker; + + type LocaleOptions = (); +} + +impl BuiltIn for ListFormat { + const NAME: &'static str = "ListFormat"; + + fn init(context: &mut Context) -> Option { + let _timer = Profiler::global().start_event(Self::NAME, "init"); + + ConstructorBuilder::with_standard_constructor( + context, + Self::constructor, + context.intrinsics().constructors().list_format().clone(), + ) + .name(Self::NAME) + .length(Self::LENGTH) + .static_method(Self::supported_locales_of, "supportedLocalesOf", 1) + .property( + WellKnownSymbols::to_string_tag(), + "Intl.ListFormat", + Attribute::CONFIGURABLE, + ) + .method(Self::format, "format", 1) + .method(Self::format_to_parts, "formatToParts", 1) + .method(Self::resolved_options, "resolvedOptions", 0) + .build() + .conv::() + .pipe(Some) + } +} + +impl ListFormat { + pub(crate) const LENGTH: usize = 0; + + /// Constructor [`Intl.ListFormat ( [ locales [ , options ] ] )`][spec]. + /// + /// Constructor for `ListFormat` objects. + /// + /// More information: + /// - [MDN documentation][mdn] + /// + /// [spec]: https://tc39.es/ecma402/#sec-Intl.ListFormat + /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat + pub(crate) fn constructor( + new_target: &JsValue, + args: &[JsValue], + context: &mut Context, + ) -> JsResult { + // 1. If NewTarget is undefined, throw a TypeError exception. + if new_target.is_undefined() { + return Err(JsNativeError::typ() + .with_message("cannot call `Intl.ListFormat` constructor without `new`") + .into()); + } + + let locales = args.get_or_undefined(0); + let options = args.get_or_undefined(1); + + // 3. Let requestedLocales be ? CanonicalizeLocaleList(locales). + let requested_locales = canonicalize_locale_list(locales, context)?; + + // 4. Set options to ? GetOptionsObject(options). + let options = get_options_object(options)?; + + // 5. Let opt be a new Record. + // 6. Let matcher be ? GetOption(options, "localeMatcher", string, « "lookup", "best fit" », "best fit"). + let matcher = get_option::(&options, "localeMatcher", false, context)? + .unwrap_or_default(); + + // 7. Set opt.[[localeMatcher]] to matcher. + // 8. Let localeData be %ListFormat%.[[LocaleData]]. + // 9. Let r be ResolveLocale(%ListFormat%.[[AvailableLocales]], requestedLocales, opt, %ListFormat%.[[RelevantExtensionKeys]], localeData). + // 10. Set listFormat.[[Locale]] to r.[[locale]]. + let locale = resolve_locale::( + &requested_locales, + &mut IntlOptions { + matcher, + ..Default::default() + }, + context.icu(), + ); + + // 11. Let type be ? GetOption(options, "type", string, « "conjunction", "disjunction", "unit" », "conjunction"). + // 12. Set listFormat.[[Type]] to type. + let typ = + get_option::(&options, "type", false, context)?.unwrap_or_default(); + + // 13. Let style be ? GetOption(options, "style", string, « "long", "short", "narrow" », "long"). + // 14. Set listFormat.[[Style]] to style. + let style = get_option::(&options, "style", false, context)? + .unwrap_or(ListLength::Wide); + + // 15. Let dataLocale be r.[[dataLocale]]. + // 16. Let dataLocaleData be localeData.[[]]. + // 17. Let dataLocaleTypes be dataLocaleData.[[]]. + // 18. Set listFormat.[[Templates]] to dataLocaleTypes.[[