diff --git a/Cargo.lock b/Cargo.lock index 8d038b952..acc667602 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ dependencies = [ [[package]] name = "adler" -version = "0.2.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" @@ -110,17 +110,11 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - [[package]] name = "bincode" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d" +checksum = "d175dfa69e619905c4c3cdb7c3c203fa3bdd5d51184e3afdb2742c0280493772" dependencies = [ "byteorder", "serde", @@ -135,7 +129,7 @@ dependencies = [ "bitflags", "cexpr", "clang-sys", - "clap", + "clap 2.33.3", "env_logger", "lazy_static", "lazycell", @@ -155,17 +149,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -[[package]] -name = "blake2b_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" -dependencies = [ - "arrayref", - "arrayvec", - "constant_time_eq", -] - [[package]] name = "blake3" version = "0.3.7" @@ -204,15 +187,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.6.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099e596ef14349721d9016f6b80dd3419ea1bf289ab9b44df8e4dfd3a005d5d9" +checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" [[package]] name = "byteorder" -version = "1.4.2" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "bytesize" @@ -231,11 +214,11 @@ dependencies = [ [[package]] name = "cbindgen" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df6a11bba1d7cab86c166cecf4cf8acd7d02b7b65924d81b33d27197f22ee35" +checksum = "97449daf9b8c245bcad10bbc7c9f4a37c06172c18dd5f9fac340deefc309b957" dependencies = [ - "clap", + "clap 2.33.3", "heck", "indexmap", "log", @@ -250,9 +233,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.66" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" +checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" [[package]] name = "cexpr" @@ -277,13 +260,13 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clang-sys" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb92721cb37482245ed88428f72253ce422b3b4ee169c70a0642521bb5db4cc" +checksum = "f54d78e30b388d4815220c8dd03fea5656b6c6d32adb59e89061552a102f8da1" dependencies = [ "glob", "libc", - "libloading", + "libloading 0.7.0", ] [[package]] @@ -296,11 +279,43 @@ dependencies = [ "atty", "bitflags", "strsim 0.8.0", - "textwrap", + "textwrap 0.11.0", "unicode-width", "vec_map", ] +[[package]] +name = "clap" +version = "3.0.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd1061998a501ee7d4b6d449020df3266ca3124b941ec56cf2005c3779ca142" +dependencies = [ + "atty", + "bitflags", + "clap_derive", + "indexmap", + "lazy_static", + "os_str_bytes", + "strsim 0.10.0", + "termcolor", + "textwrap 0.12.1", + "unicode-width", + "vec_map", +] + +[[package]] +name = "clap_derive" +version = "3.0.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "370f715b81112975b1b69db93e0b56ea4cd4e5002ac43b2da8474106a54096a1" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "cmake" version = "0.1.45" @@ -334,13 +349,14 @@ dependencies = [ [[package]] name = "compiletest_rs" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f737835bfbbe29ed1ff82d5137520338d7ed5bf1a1d4b9c1c7c58bb45b8fa29" +checksum = "0086d6ad78cf409c3061618cd98e2789d5c9ce598fc9651611cf62eae0a599cb" dependencies = [ "diff", "filetime", "getopts", + "lazy_static", "libc", "log", "miow", @@ -353,12 +369,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "const_fn" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b9d6de7f49e22cf97ad17fc4036ece69300032f45f78f30b4a4482cdc3f4a6" - [[package]] name = "constant_time_eq" version = "0.1.5" @@ -450,7 +460,7 @@ checksum = "ab327ed7354547cc2ef43cbe20ef68b988e70b4b593cbd66a2a61733123a3d23" dependencies = [ "atty", "cast", - "clap", + "clap 2.33.3", "criterion-plot", "csv", "itertools 0.10.0", @@ -501,12 +511,11 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d" +checksum = "2584f639eb95fea8c798496315b297cf81b9b58b6d30ab066a75455333cf4b12" dependencies = [ "cfg-if 1.0.0", - "const_fn", "crossbeam-utils", "lazy_static", "memoffset", @@ -515,9 +524,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" +checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" dependencies = [ "autocfg", "cfg-if 1.0.0", @@ -568,9 +577,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.10.2" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +checksum = "a06d4a9551359071d1890820e3571252b91229e0712e7c36b08940e603c5a8fc" dependencies = [ "darling_core", "darling_macro", @@ -578,23 +587,23 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.2" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +checksum = "b443e5fb0ddd56e0c9bfa47dc060c5306ee500cb731f2b91432dd65589a77684" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.9.3", + "strsim 0.10.0", "syn", ] [[package]] name = "darling_macro" -version = "0.10.2" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +checksum = "c0220073ce504f12a70efc4e7cdaea9e9b1b324872e7ad96a208056d7a638b81" dependencies = [ "darling_core", "quote", @@ -623,20 +632,20 @@ dependencies = [ ] [[package]] -name = "dirs" -version = "2.0.2" +name = "dirs-next" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if 0.1.10", - "dirs-sys", + "cfg-if 1.0.0", + "dirs-sys-next", ] [[package]] -name = "dirs-sys" -version = "0.3.5" +name = "dirs-sys-next" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", @@ -704,18 +713,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf6167d1be7a76696cadccfbdb89e5cb519244a42bab7da5577994579217dcff" +checksum = "fbd795df6708a599abf1ee10eacc72efd052b7a5f70fdf0715e4d5151a6db9c3" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8a79bce471eb6165aa8ac86ebc8d788543b741eaa15e8b8486591696207d6c" +checksum = "e19c52f9ec503c8a68dc04daf71a04b07e690c32ab1a8b68e33897f255269d47" dependencies = [ "darling", "proc-macro2", @@ -769,7 +778,7 @@ checksum = "1d34cfa13a63ae058bfa601fe9e313bbdb3746427c1459185464ce0fcf62e1e8" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.5", + "redox_syscall", "winapi", ] @@ -829,17 +838,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.2" @@ -848,7 +846,7 @@ checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -925,9 +923,9 @@ dependencies = [ [[package]] name = "hex" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "humantime" @@ -1063,9 +1061,9 @@ checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] name = "js-sys" -version = "0.3.47" +version = "0.3.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cfb73131c35423a367daf8cbd24100af0d077668c8c2943f0e7dd775fef0f65" +checksum = "dc9f84f9b115ce7843d60706df1422a916680bfdfcbdb0447c5614ff9d7e4d78" dependencies = [ "wasm-bindgen", ] @@ -1090,9 +1088,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" +checksum = "265d751d31d6780a3f956bb5b8022feba2d94eeee5a84ba64f4212eedca42213" [[package]] name = "libffi" @@ -1126,10 +1124,20 @@ dependencies = [ ] [[package]] -name = "llvm-sys" -version = "110.0.0" +name = "libloading" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0062a0c6635fb5d57c6ebba072dcae50e41651030363cf06d220b0d016840f2" +checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +dependencies = [ + "cfg-if 1.0.0", + "winapi", +] + +[[package]] +name = "llvm-sys" +version = "110.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21ede189444b8c78907e5d36da5dabcf153170fcff9c1dba48afc4b33c7e19f0" dependencies = [ "cc", "lazy_static", @@ -1222,9 +1230,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ "adler", "autocfg", @@ -1316,9 +1324,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.5.2" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" [[package]] name = "oorandom" @@ -1328,17 +1336,25 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "orbclient" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee68c3c79e81d82127e0870f94479675774d34c7ad5b55eecb9c320ef9701187" +checksum = "0c976c5018e7f1db4359616d8b31ef8ae7d9649b11803c0b38fff67fd2999fc8" dependencies = [ "libc", "raw-window-handle", - "redox_syscall 0.2.5", + "redox_syscall", "sdl2", "sdl2-sys", + "wasm-bindgen", + "web-sys", ] +[[package]] +name = "os_str_bytes" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85" + [[package]] name = "parking_lot" version = "0.11.1" @@ -1359,7 +1375,7 @@ dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.2.5", + "redox_syscall", "smallvec", "winapi", ] @@ -1387,9 +1403,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" +checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" [[package]] name = "pkg-config" @@ -1536,7 +1552,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" dependencies = [ - "getrandom 0.2.2", + "getrandom", ] [[package]] @@ -1582,12 +1598,6 @@ dependencies = [ "num_cpus", ] -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.5" @@ -1599,13 +1609,12 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.3.5" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" +checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" dependencies = [ - "getrandom 0.1.16", - "redox_syscall 0.1.57", - "rust-argon2", + "getrandom", + "redox_syscall", ] [[package]] @@ -1674,18 +1683,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "rust-argon2" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" -dependencies = [ - "base64", - "blake2b_simd", - "constant_time_eq", - "crossbeam-utils", -] - [[package]] name = "rustc-demangle" version = "0.1.18" @@ -1728,6 +1725,12 @@ dependencies = [ "serde_json", ] +[[package]] +name = "rustversion" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd" + [[package]] name = "ryu" version = "1.0.5" @@ -1871,9 +1874,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.62" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486" +checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" dependencies = [ "itoa", "ryu", @@ -1917,33 +1920,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "strsim" -version = "0.9.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" - -[[package]] -name = "structopt" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5277acd7ee46e63e5168a80734c9f6ee81b1367a7d8772a2d765df2a3705d28c" -dependencies = [ - "clap", - "lazy_static", - "structopt-derive", -] - -[[package]] -name = "structopt-derive" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba9cdfda491b814720b6b06e0cac513d922fc407582032e8706e9f137976f90" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "subtle" @@ -1964,9 +1943,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.32" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0313546c01d59e29be4f09687bcb4fb6690cec931cc3607b6aec7a0e417f4cc6" +checksum = "c0bcfbd6a598361fda270d82469fff3d65089dc33e175c9a131f7b4cd395f228" dependencies = [ "filetime", "libc", @@ -1975,9 +1954,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee5a98e506fb7231a304c3a1bd7c132a55016cf65001e0282480665870dfcb9" +checksum = "422045212ea98508ae3d28025bc5aaa2bd4a9cdaecd442a08da2ee620ee9ea95" [[package]] name = "tempfile" @@ -1988,18 +1967,19 @@ dependencies = [ "cfg-if 1.0.0", "libc", "rand", - "redox_syscall 0.2.5", + "redox_syscall", "remove_dir_all", "winapi", ] [[package]] name = "term" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0863a3345e70f61d613eab32ee046ccd1bcc5f9105fe402c61fcd0c13eeb8b5" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" dependencies = [ - "dirs", + "dirs-next", + "rustversion", "winapi", ] @@ -2022,12 +2002,14 @@ dependencies = [ [[package]] name = "tester" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee72ec31009a42b53de9a6b7d8f462b493ab3b1e4767bda1fcdbb52127f13b6c" +checksum = "0639d10d8f4615f223a57275cf40f9bdb7cfbb806bcb7f7cc56e3beb55a576eb" dependencies = [ + "cfg-if 1.0.0", "getopts", "libc", + "num_cpus", "term", ] @@ -2041,19 +2023,28 @@ dependencies = [ ] [[package]] -name = "thiserror" -version = "1.0.23" +name = "textwrap" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146" +checksum = "203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" +checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" dependencies = [ "proc-macro2", "quote", @@ -2081,9 +2072,9 @@ dependencies = [ [[package]] name = "tinytemplate" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ada8616fad06a2d0c455adc530de4ef57605a8120cc65da9653e0e9623ca74" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" dependencies = [ "serde", "serde_json", @@ -2100,9 +2091,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.23" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d40a22fd029e33300d8d89a5cc8ffce18bb7c587662f54629e94c9de5487f3" +checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" dependencies = [ "cfg-if 1.0.0", "log", @@ -2113,9 +2104,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f080ea7e4107844ef4766459426fa2d5c1ada2e47edba05dc7fa99d9629f47" +checksum = "a8a9bd1db7706f2373a190b0d067146caa39350c486f3d455b0e33b431f94c07" dependencies = [ "proc-macro2", "quote", @@ -2246,12 +2237,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.10.2+wasi-snapshot-preview1" @@ -2260,9 +2245,9 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.70" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55c0f7123de74f0dab9b7d00fd614e7b19349cd1e2f5252bbe9b1754b59433be" +checksum = "7ee1280240b7c461d6a0071313e08f34a60b0365f14260362e5a2b17d1d31aa7" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -2270,9 +2255,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.70" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc45447f0d4573f3d65720f636bbcc3dd6ce920ed704670118650bcd47764c7" +checksum = "5b7d8b6942b8bb3a9b0e73fc79b98095a27de6fa247615e59d096754a3bc2aa8" dependencies = [ "bumpalo", "lazy_static", @@ -2285,9 +2270,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.70" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b8853882eef39593ad4174dd26fc9865a64e84026d223f63bb2c42affcbba2c" +checksum = "e5ac38da8ef716661f0f36c0d8320b89028efe10c7c0afde65baffb496ce0d3b" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2295,9 +2280,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.70" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4133b5e7f2a531fa413b3a1695e925038a05a71cf67e87dafa295cb645a01385" +checksum = "cc053ec74d454df287b9374ee8abb36ffd5acb95ba87da3ba5b7d3fe20eb401e" dependencies = [ "proc-macro2", "quote", @@ -2308,9 +2293,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.70" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4945e4943ae02d15c13962b38a5b1e81eadd4b71214eee75af64a4d6a4fd64" +checksum = "7d6f8ec44822dd71f5f221a5847fb34acd9060535c1211b70a05844c0f6383b1" [[package]] name = "wasmer" @@ -2385,11 +2370,11 @@ dependencies = [ "atty", "bytesize", "cfg-if 1.0.0", + "clap 3.0.0-beta.2", "colored 2.0.0", "distance", "fern", "log", - "structopt", "tempfile", "wasmer", "wasmer-cache", @@ -2453,7 +2438,7 @@ dependencies = [ "cc", "goblin", "inkwell", - "itertools 0.9.0", + "itertools 0.10.0", "lazy_static", "libc", "rayon", @@ -2503,7 +2488,7 @@ name = "wasmer-emscripten" version = "1.0.2" dependencies = [ "byteorder", - "getrandom 0.2.2", + "getrandom", "lazy_static", "libc", "log", @@ -2566,7 +2551,7 @@ dependencies = [ "bincode", "cfg-if 0.1.10", "leb128", - "libloading", + "libloading 0.6.7", "serde", "tempfile", "tracing", @@ -2585,7 +2570,7 @@ dependencies = [ "bincode", "cfg-if 0.1.10", "leb128", - "libloading", + "libloading 0.6.7", "serde", "tempfile", "tracing", @@ -2657,7 +2642,7 @@ dependencies = [ "bincode", "byteorder", "generational-arena", - "getrandom 0.2.2", + "getrandom", "libc", "serde", "thiserror", @@ -2743,20 +2728,20 @@ dependencies = [ [[package]] name = "wast" -version = "33.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d04fe175c7f78214971293e7d8875673804e736092206a3a4544dbc12811c1b" +checksum = "db5ae96da18bb5926341516fd409b5a8ce4e4714da7f0a1063d3b20ac9f9a1e1" dependencies = [ "leb128", ] [[package]] name = "wat" -version = "1.0.34" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ec9c6ee01ae07a26adadcdfed22c7a97e0b8cbee9c06e0e96076ece5aeb5cfe" +checksum = "0b0fa059022c5dabe129f02b429d67086400deb8277f89c975555dacc1dadbcc" dependencies = [ - "wast 33.0.0", + "wast 35.0.0", ] [[package]] @@ -2831,9 +2816,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.47" +version = "0.3.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c40dc691fc48003eba817c38da7113c15698142da971298003cac3ef175680b3" +checksum = "ec600b26223b2948cedfde2a0aa6756dcf1fef616f43d7b3097aaf53a6c4d92b" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/deny.toml b/deny.toml index 3b784a04a..afda14b8b 100644 --- a/deny.toml +++ b/deny.toml @@ -174,11 +174,7 @@ skip = [ { name = "semver", version = "=0.9.0" }, { name = "semver-parser", version = "=0.7.0" }, { name = "rustc_version", version = "=0.2.3" }, - { name = "gimli", version = "=0.22.0" }, - { name = "wasi", version = "=0.9.0" }, - { name = "redox_syscall", version = "=0.1.57" }, { name = "itertools", version = "0.9.0" }, - { name = "getrandom", version = "0.1.16" }, { name = "wast", version = "=24.0.0" }, ] # Similarly to `skip` allows you to skip certain crates during duplicate diff --git a/lib/c-api/Cargo.toml b/lib/c-api/Cargo.toml index d3dc1ef48..57cbe1370 100644 --- a/lib/c-api/Cargo.toml +++ b/lib/c-api/Cargo.toml @@ -93,4 +93,4 @@ cranelift-backend = ["cranelift"] llvm-backend = ["llvm"] [build-dependencies] -cbindgen = "0.15" +cbindgen = "0.18" diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index 4e0916adc..0d3567a96 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -43,7 +43,7 @@ wasmer-types = { version = "1.0.2", path = "../wasmer-types" } atty = "0.2" colored = "2.0" anyhow = "1.0" -structopt = { version = "0.3", features = ["suggestions"] } +clap = { version = "3.0.0-beta.2", features = ["suggestions", "derive", "cargo", "std", "color"], default-features = false } # For the function names autosuggestion distance = "0.4" # For the inspect subcommand diff --git a/lib/cli/src/cli.rs b/lib/cli/src/cli.rs index 26e21eafa..00ba69227 100644 --- a/lib/cli/src/cli.rs +++ b/lib/cli/src/cli.rs @@ -10,16 +10,16 @@ use crate::commands::{Cache, Config, Inspect, Run, SelfUpdate, Validate}; use crate::error::PrettyError; use anyhow::Result; -use structopt::{clap::ErrorKind, StructOpt}; +use clap::{Clap, ErrorKind}; -#[derive(Debug, StructOpt)] +#[derive(Clap)] #[cfg_attr( not(feature = "headless"), - structopt(name = "wasmer", about = "WebAssembly standalone runtime.", author) + clap(name = "wasmer", about = "WebAssembly standalone runtime.", author) )] #[cfg_attr( feature = "headless", - structopt( + clap( name = "wasmer-headless", about = "Headless WebAssembly standalone runtime.", author @@ -28,43 +28,43 @@ use structopt::{clap::ErrorKind, StructOpt}; /// The options for the wasmer Command Line Interface enum WasmerCLIOptions { /// Run a WebAssembly file. Formats accepted: wasm, wat - #[structopt(name = "run")] + #[clap(name = "run")] Run(Run), /// Wasmer cache - #[structopt(name = "cache")] + #[clap(name = "cache")] Cache(Cache), /// Validate a WebAssembly binary - #[structopt(name = "validate")] + #[clap(name = "validate")] Validate(Validate), /// Compile a WebAssembly binary #[cfg(feature = "compiler")] - #[structopt(name = "compile")] + #[clap(name = "compile")] Compile(Compile), /// Compile a WebAssembly binary into a native executable #[cfg(all(feature = "object-file", feature = "compiler"))] - #[structopt(name = "create-exe")] + #[clap(name = "create-exe")] CreateExe(CreateExe), /// Get various configuration information needed /// to compile programs which use Wasmer - #[structopt(name = "config")] + #[clap(name = "config")] Config(Config), /// Update wasmer to the latest version - #[structopt(name = "self-update")] + #[clap(name = "self-update")] SelfUpdate(SelfUpdate), /// Inspect a WebAssembly file - #[structopt(name = "inspect")] + #[clap(name = "inspect")] Inspect(Inspect), /// Run spec testsuite #[cfg(feature = "wast")] - #[structopt(name = "wast")] + #[clap(name = "wast")] Wast(Wast), } @@ -101,15 +101,15 @@ pub fn wasmer_main() { let command = args.get(1); let options = match command.unwrap_or(&"".to_string()).as_ref() { "cache" | "compile" | "config" | "create-exe" | "help" | "inspect" | "run" - | "self-update" | "validate" | "wast" => WasmerCLIOptions::from_args(), + | "self-update" | "validate" | "wast" => WasmerCLIOptions::parse(), _ => { - WasmerCLIOptions::from_iter_safe(args.iter()).unwrap_or_else(|e| { + WasmerCLIOptions::try_parse_from(args.iter()).unwrap_or_else(|e| { match e.kind { // This fixes a issue that: // 1. Shows the version twice when doing `wasmer -V` // 2. Shows the run help (instead of normal help) when doing `wasmer --help` - ErrorKind::VersionDisplayed | ErrorKind::HelpDisplayed => e.exit(), - _ => WasmerCLIOptions::Run(Run::from_args()), + ErrorKind::DisplayVersion | ErrorKind::DisplayHelp => e.exit(), + _ => WasmerCLIOptions::Run(Run::parse()), } }) } diff --git a/lib/cli/src/commands/cache.rs b/lib/cli/src/commands/cache.rs index f5aa21be8..b9bbcee49 100644 --- a/lib/cli/src/commands/cache.rs +++ b/lib/cli/src/commands/cache.rs @@ -1,17 +1,17 @@ use crate::common::get_cache_dir; use anyhow::{Context, Result}; +use clap::Clap; use std::fs; -use structopt::StructOpt; -#[derive(Debug, StructOpt)] +#[derive(Debug, Clap)] /// The options for the `wasmer cache` subcommand pub enum Cache { /// Clear the cache - #[structopt(name = "clean")] + #[clap(name = "clean")] Clean, /// Display the location of the cache - #[structopt(name = "dir")] + #[clap(name = "dir")] Dir, } diff --git a/lib/cli/src/commands/compile.rs b/lib/cli/src/commands/compile.rs index 44dcdabc5..56bc69b8c 100644 --- a/lib/cli/src/commands/compile.rs +++ b/lib/cli/src/commands/compile.rs @@ -1,33 +1,33 @@ use crate::store::{EngineType, StoreOptions}; use crate::warning; use anyhow::{Context, Result}; +use clap::Clap; use std::path::PathBuf; -use structopt::StructOpt; use wasmer::*; -#[derive(Debug, StructOpt)] +#[derive(Debug, Clap)] /// The options for the `wasmer compile` subcommand pub struct Compile { /// Input file - #[structopt(name = "FILE", parse(from_os_str))] + #[clap(name = "FILE", parse(from_os_str))] path: PathBuf, /// Output file - #[structopt(name = "OUTPUT PATH", short = "o", parse(from_os_str))] + #[clap(name = "OUTPUT PATH", short = 'o', parse(from_os_str))] output: PathBuf, /// Output path for generated header file - #[structopt(name = "HEADER PATH", long = "header", parse(from_os_str))] + #[clap(name = "HEADER PATH", long = "header", parse(from_os_str))] header_path: Option, /// Compilation Target triple - #[structopt(long = "target")] + #[clap(long = "target")] target_triple: Option, - #[structopt(flatten)] + #[clap(flatten)] store: StoreOptions, - #[structopt(short = "m", multiple = true)] + #[clap(short = 'm', multiple = true)] cpu_features: Vec, } diff --git a/lib/cli/src/commands/config.rs b/lib/cli/src/commands/config.rs index 0550f8e6f..7b224265c 100644 --- a/lib/cli/src/commands/config.rs +++ b/lib/cli/src/commands/config.rs @@ -1,39 +1,39 @@ use crate::VERSION; use anyhow::{Context, Result}; +use clap::Clap; use std::env; use std::path::PathBuf; -use structopt::StructOpt; -#[derive(Debug, StructOpt)] +#[derive(Debug, Clap)] /// The options for the `wasmer config` subcommand pub struct Config { /// Print the installation prefix. - #[structopt(long, conflicts_with = "pkg_config")] + #[clap(long, conflicts_with = "pkg_config")] prefix: bool, /// Directory containing Wasmer executables. - #[structopt(long, conflicts_with = "pkg_config")] + #[clap(long, conflicts_with = "pkg_config")] bindir: bool, /// Directory containing Wasmer headers. - #[structopt(long, conflicts_with = "pkg_config")] + #[clap(long, conflicts_with = "pkg_config")] includedir: bool, /// Directory containing Wasmer libraries. - #[structopt(long, conflicts_with = "pkg_config")] + #[clap(long, conflicts_with = "pkg_config")] libdir: bool, /// Libraries needed to link against Wasmer components. - #[structopt(long, conflicts_with = "pkg_config")] + #[clap(long, conflicts_with = "pkg_config")] libs: bool, /// C compiler flags for files that include Wasmer headers. - #[structopt(long, conflicts_with = "pkg_config")] + #[clap(long, conflicts_with = "pkg_config")] cflags: bool, /// It outputs the necessary details for compiling /// and linking a program to Wasmer, using the `pkg-config` format. - #[structopt(long)] + #[clap(long)] pkg_config: bool, } diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index a7b316d48..ab2abd164 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -2,39 +2,39 @@ use crate::store::{CompilerOptions, EngineType}; use anyhow::{Context, Result}; +use clap::Clap; use std::env; use std::fs; use std::path::{Path, PathBuf}; use std::process::Command; -use structopt::StructOpt; use wasmer::*; const WASMER_MAIN_C_SOURCE: &[u8] = include_bytes!("wasmer_create_exe_main.c"); -#[derive(Debug, StructOpt)] +#[derive(Debug, Clap)] /// The options for the `wasmer create-exe` subcommand pub struct CreateExe { /// Input file - #[structopt(name = "FILE", parse(from_os_str))] + #[clap(name = "FILE", parse(from_os_str))] path: PathBuf, /// Output file - #[structopt(name = "OUTPUT PATH", short = "o", parse(from_os_str))] + #[clap(name = "OUTPUT PATH", short = 'o', parse(from_os_str))] output: PathBuf, /// Compilation Target triple - #[structopt(long = "target")] + #[clap(long = "target")] target_triple: Option, - #[structopt(flatten)] + #[clap(flatten)] compiler: CompilerOptions, - #[structopt(short = "m", multiple = true)] + #[clap(short = 'm', multiple = true)] cpu_features: Vec, /// Additional libraries to link against. /// This is useful for fixing linker errors that may occur on some systems. - #[structopt(short = "l", multiple = true)] + #[clap(short = 'l', multiple = true)] libraries: Vec, } @@ -148,20 +148,14 @@ fn generate_header(header_file_src: &[u8]) -> anyhow::Result<()> { .open(&header_file_path)?; use std::io::Write; - header.write_all(header_file_src)?; + header.write(header_file_src)?; Ok(()) } fn get_wasmer_dir() -> anyhow::Result { Ok(PathBuf::from( - env::var("WASMER_DIR") - .or_else(|e| { - option_env!("WASMER_INSTALL_PREFIX") - .map(str::to_string) - .ok_or(e) - }) - .context("Trying to read env var `WASMER_DIR`")?, + env::var("WASMER_DIR").context("Trying to read env var `WASMER_DIR`")?, )) } @@ -285,13 +279,9 @@ impl LinkCode { command }; // Add libraries required per platform. - // We need userenv, sockets (Ws2_32), advapi32 for some system calls and bcrypt for random numbers. + // We need userenv, sockets (Ws2_32), and advapi32 to call a system call (for random numbers I think). #[cfg(windows)] - let command = command - .arg("-luserenv") - .arg("-lWs2_32") - .arg("-ladvapi32") - .arg("-lbcrypt"); + let command = command.arg("-luserenv").arg("-lWs2_32").arg("-ladvapi32"); // On unix we need dlopen-related symbols, libmath for a few things, and pthreads. #[cfg(not(windows))] let command = command.arg("-ldl").arg("-lm").arg("-pthread"); diff --git a/lib/cli/src/commands/inspect.rs b/lib/cli/src/commands/inspect.rs index 4858c749a..b105a0de7 100644 --- a/lib/cli/src/commands/inspect.rs +++ b/lib/cli/src/commands/inspect.rs @@ -1,18 +1,18 @@ use crate::store::StoreOptions; use anyhow::{Context, Result}; use bytesize::ByteSize; +use clap::Clap; use std::path::PathBuf; -use structopt::StructOpt; use wasmer::*; -#[derive(Debug, StructOpt)] +#[derive(Debug, Clap)] /// The options for the `wasmer validate` subcommand pub struct Inspect { /// File to validate as WebAssembly - #[structopt(name = "FILE", parse(from_os_str))] + #[clap(name = "FILE", parse(from_os_str))] path: PathBuf, - #[structopt(flatten)] + #[clap(flatten)] store: StoreOptions, } diff --git a/lib/cli/src/commands/run.rs b/lib/cli/src/commands/run.rs index 2e1bcacfe..255d3e250 100644 --- a/lib/cli/src/commands/run.rs +++ b/lib/cli/src/commands/run.rs @@ -11,7 +11,7 @@ use wasmer::*; #[cfg(feature = "cache")] use wasmer_cache::{Cache, FileSystemCache, Hash}; -use structopt::StructOpt; +use clap::Clap; #[cfg(feature = "wasi")] mod wasi; @@ -19,53 +19,53 @@ mod wasi; #[cfg(feature = "wasi")] use wasi::Wasi; -#[derive(Debug, StructOpt, Clone)] +#[derive(Debug, Clap, Clone)] /// The options for the `wasmer run` subcommand pub struct Run { /// Disable the cache - #[structopt(long = "disable-cache")] + #[clap(long = "disable-cache")] disable_cache: bool, /// File to run - #[structopt(name = "FILE", parse(from_os_str))] + #[clap(name = "FILE", parse(from_os_str))] path: PathBuf, /// Invoke a specified function - #[structopt(long = "invoke", short = "i")] + #[clap(long = "invoke", short = 'i')] invoke: Option, /// The command name is a string that will override the first argument passed /// to the wasm program. This is used in wapm to provide nicer output in /// help commands and error messages of the running wasm program - #[structopt(long = "command-name", hidden = true)] + #[clap(long = "command-name", hidden = true)] command_name: Option, /// A prehashed string, used to speed up start times by avoiding hashing the /// wasm module. If the specified hash is not found, Wasmer will hash the module /// as if no `cache-key` argument was passed. - #[structopt(long = "cache-key", hidden = true)] + #[clap(long = "cache-key", hidden = true)] cache_key: Option, - #[structopt(flatten)] + #[clap(flatten)] store: StoreOptions, // TODO: refactor WASI structure to allow shared options with Emscripten #[cfg(feature = "wasi")] - #[structopt(flatten)] + #[clap(flatten)] wasi: Wasi, /// Enable non-standard experimental IO devices #[cfg(feature = "io-devices")] - #[structopt(long = "enable-io-devices")] + #[clap(long = "enable-io-devices")] enable_experimental_io_devices: bool, /// Enable debug output #[cfg(feature = "debug")] - #[structopt(long = "debug", short = "d")] + #[clap(long = "debug", short = 'd')] debug: bool, /// Application arguments - #[structopt(name = "--", multiple = true)] + #[clap(name = "--", multiple = true)] args: Vec, } diff --git a/lib/cli/src/commands/run/wasi.rs b/lib/cli/src/commands/run/wasi.rs index 21b6f9166..5e7655e78 100644 --- a/lib/cli/src/commands/run/wasi.rs +++ b/lib/cli/src/commands/run/wasi.rs @@ -4,26 +4,26 @@ use std::path::PathBuf; use wasmer::{Instance, Module}; use wasmer_wasi::{get_wasi_version, WasiError, WasiState, WasiVersion}; -use structopt::StructOpt; +use clap::Clap; -#[derive(Debug, StructOpt, Clone)] +#[derive(Debug, Clap, Clone)] /// WASI Options pub struct Wasi { /// WASI pre-opened directory - #[structopt(long = "dir", name = "DIR", multiple = true, group = "wasi")] + #[clap(long = "dir", name = "DIR", multiple = true, group = "wasi")] pre_opened_directories: Vec, /// Map a host directory to a different location for the wasm module - #[structopt(long = "mapdir", name = "GUEST_DIR:HOST_DIR", multiple = true, parse(try_from_str = parse_mapdir))] + #[clap(long = "mapdir", name = "GUEST_DIR:HOST_DIR", multiple = true, parse(try_from_str = parse_mapdir))] mapped_dirs: Vec<(String, PathBuf)>, /// Pass custom environment variables - #[structopt(long = "env", name = "KEY=VALUE", multiple = true, parse(try_from_str = parse_envvar))] + #[clap(long = "env", name = "KEY=VALUE", multiple = true, parse(try_from_str = parse_envvar))] env_vars: Vec<(String, String)>, /// Enable experimental IO devices #[cfg(feature = "experimental-io-devices")] - #[structopt(long = "enable-experimental-io-devices")] + #[clap(long = "enable-experimental-io-devices")] enable_experimental_io_devices: bool, } diff --git a/lib/cli/src/commands/self_update.rs b/lib/cli/src/commands/self_update.rs index 2218107c3..f42e7c4c2 100644 --- a/lib/cli/src/commands/self_update.rs +++ b/lib/cli/src/commands/self_update.rs @@ -1,11 +1,11 @@ //! When wasmer self-update is executed, this is what gets executed use anyhow::{Context, Result}; +use clap::Clap; #[cfg(not(target_os = "windows"))] use std::process::{Command, Stdio}; -use structopt::StructOpt; /// The options for the `wasmer self-update` subcommand -#[derive(Debug, StructOpt)] +#[derive(Debug, Clap)] pub struct SelfUpdate {} impl SelfUpdate { diff --git a/lib/cli/src/commands/validate.rs b/lib/cli/src/commands/validate.rs index 56b978416..771c8fbf5 100644 --- a/lib/cli/src/commands/validate.rs +++ b/lib/cli/src/commands/validate.rs @@ -1,17 +1,17 @@ use crate::store::StoreOptions; use anyhow::{Context, Result}; +use clap::Clap; use std::path::PathBuf; -use structopt::StructOpt; use wasmer::*; -#[derive(Debug, StructOpt)] +#[derive(Debug, Clap)] /// The options for the `wasmer validate` subcommand pub struct Validate { /// File to validate as WebAssembly - #[structopt(name = "FILE", parse(from_os_str))] + #[clap(name = "FILE", parse(from_os_str))] path: PathBuf, - #[structopt(flatten)] + #[clap(flatten)] store: StoreOptions, } diff --git a/lib/cli/src/commands/wast.rs b/lib/cli/src/commands/wast.rs index 2837069f2..d92fd2b74 100644 --- a/lib/cli/src/commands/wast.rs +++ b/lib/cli/src/commands/wast.rs @@ -1,21 +1,21 @@ //! Runs a .wast WebAssembly test suites use crate::store::StoreOptions; use anyhow::{Context, Result}; +use clap::Clap; use std::path::PathBuf; -use structopt::StructOpt; use wasmer_wast::Wast as WastSpectest; -#[derive(Debug, StructOpt)] +#[derive(Debug, Clap)] /// The options for the `wasmer wast` subcommand pub struct Wast { /// Wast file to run - #[structopt(name = "FILE", parse(from_os_str))] + #[clap(name = "FILE", parse(from_os_str))] path: PathBuf, - #[structopt(flatten)] + #[clap(flatten)] store: StoreOptions, - #[structopt(short, long)] + #[clap(short, long)] /// A flag to indicate wast stop at the first error or continue. fail_fast: bool, } diff --git a/lib/cli/src/common.rs b/lib/cli/src/common.rs index 57e45e6aa..7987c580f 100644 --- a/lib/cli/src/common.rs +++ b/lib/cli/src/common.rs @@ -1,36 +1,36 @@ //! Common module with common used structures across different //! commands. use crate::VERSION; +use clap::Clap; use std::env; use std::path::PathBuf; -use structopt::StructOpt; -#[derive(Debug, StructOpt, Clone)] +#[derive(Debug, Clap, Clone)] /// The WebAssembly features that can be passed through the /// Command Line args. pub struct WasmFeatures { /// Enable support for the SIMD proposal. - #[structopt(long = "enable-simd")] + #[clap(long = "enable-simd")] pub simd: bool, /// Enable support for the threads proposal. - #[structopt(long = "enable-threads")] + #[clap(long = "enable-threads")] pub threads: bool, /// Enable support for the reference types proposal. - #[structopt(long = "enable-reference-types")] + #[clap(long = "enable-reference-types")] pub reference_types: bool, /// Enable support for the multi value proposal. - #[structopt(long = "enable-multi-value")] + #[clap(long = "enable-multi-value")] pub multi_value: bool, /// Enable support for the bulk memory proposal. - #[structopt(long = "enable-bulk-memory")] + #[clap(long = "enable-bulk-memory")] pub bulk_memory: bool, /// Enable support for all pre-standard proposals. - #[structopt(long = "enable-all")] + #[clap(long = "enable-all")] pub all: bool, } diff --git a/lib/cli/src/compilers/llvm.rs b/lib/cli/src/compilers/llvm.rs index c86a1e25d..99ff9bbd1 100644 --- a/lib/cli/src/compilers/llvm.rs +++ b/lib/cli/src/compilers/llvm.rs @@ -1,17 +1,17 @@ -#[derive(Debug, StructOpt, Clone)] +#[derive(Debug, Clap, Clone)] /// LLVM backend flags. pub struct LLVMCLIOptions { /// Emit LLVM IR before optimization pipeline. - #[structopt(long = "llvm-pre-opt-ir", parse(from_os_str))] + #[clap(long = "llvm-pre-opt-ir", parse(from_os_str))] pre_opt_ir: Option, /// Emit LLVM IR after optimization pipeline. - #[structopt(long = "llvm-post-opt-ir", parse(from_os_str))] + #[clap(long = "llvm-post-opt-ir", parse(from_os_str))] post_opt_ir: Option, /// Emit LLVM generated native code object file. - #[structopt(long = "llvm-object-file", parse(from_os_str))] + #[clap(long = "llvm-object-file", parse(from_os_str))] obj_file: Option, } diff --git a/lib/cli/src/store.rs b/lib/cli/src/store.rs index 4c66641b4..8c8824ce2 100644 --- a/lib/cli/src/store.rs +++ b/lib/cli/src/store.rs @@ -3,63 +3,63 @@ use crate::common::WasmFeatures; use anyhow::{Error, Result}; +use clap::Clap; use std::path::PathBuf; use std::str::FromStr; use std::string::ToString; #[allow(unused_imports)] use std::sync::Arc; -use structopt::StructOpt; use wasmer::*; #[cfg(feature = "compiler")] use wasmer_compiler::CompilerConfig; -#[derive(Debug, Clone, StructOpt)] +#[derive(Debug, Clone, Clap)] /// The compiler and engine options pub struct StoreOptions { - #[structopt(flatten)] + #[clap(flatten)] compiler: CompilerOptions, /// Use JIT Engine. - #[structopt(long, conflicts_with_all = &["native", "object_file"])] + #[clap(long, conflicts_with_all = &["native", "object_file"])] jit: bool, /// Use Native Engine. - #[structopt(long, conflicts_with_all = &["jit", "object_file"])] + #[clap(long, conflicts_with_all = &["jit", "object_file"])] native: bool, /// Use ObjectFile Engine. - #[structopt(long, conflicts_with_all = &["jit", "native"])] + #[clap(long, conflicts_with_all = &["jit", "native"])] object_file: bool, } -#[derive(Debug, Clone, StructOpt)] +#[derive(Debug, Clone, Clap)] /// The compiler options pub struct CompilerOptions { /// Use Singlepass compiler. - #[structopt(long, conflicts_with_all = &["cranelift", "llvm", "backend"])] + #[clap(long, conflicts_with_all = &["cranelift", "llvm", "backend"])] singlepass: bool, /// Use Cranelift compiler. - #[structopt(long, conflicts_with_all = &["singlepass", "llvm", "backend"])] + #[clap(long, conflicts_with_all = &["singlepass", "llvm", "backend"])] cranelift: bool, /// Use LLVM compiler. - #[structopt(long, conflicts_with_all = &["singlepass", "cranelift", "backend"])] + #[clap(long, conflicts_with_all = &["singlepass", "cranelift", "backend"])] llvm: bool, /// Enable compiler internal verification. - #[structopt(long)] + #[clap(long)] enable_verifier: bool, /// LLVM debug directory, where IR and object files will be written to. - #[structopt(long, parse(from_os_str))] + #[clap(long, parse(from_os_str))] llvm_debug_dir: Option, /// The deprecated backend flag - Please do not use - #[structopt(long = "backend", hidden = true, conflicts_with_all = &["singlepass", "cranelift", "llvm"])] + #[clap(long = "backend", hidden = true, conflicts_with_all = &["singlepass", "cranelift", "llvm"])] backend: Option, - #[structopt(flatten)] + #[clap(flatten)] features: WasmFeatures, } diff --git a/lib/compiler-llvm/Cargo.toml b/lib/compiler-llvm/Cargo.toml index 449dd61ee..ce5159448 100644 --- a/lib/compiler-llvm/Cargo.toml +++ b/lib/compiler-llvm/Cargo.toml @@ -20,7 +20,7 @@ smallvec = "1.6" goblin = "0.3" libc = { version = "^0.2", default-features = false } byteorder = "1" -itertools = "0.9" +itertools = "0.10" rayon = "1.5" [dependencies.inkwell] diff --git a/lib/derive/Cargo.toml b/lib/derive/Cargo.toml index 3731afec0..e9bf0092d 100644 --- a/lib/derive/Cargo.toml +++ b/lib/derive/Cargo.toml @@ -18,4 +18,4 @@ proc-macro-error = "1.0.0" [dev-dependencies] wasmer = { path = "../api", version = "1.0.2" } -compiletest_rs = "0.5" +compiletest_rs = "0.6" diff --git a/lib/derive/src/lib.rs b/lib/derive/src/lib.rs index 7d1f2d529..22fcca782 100644 --- a/lib/derive/src/lib.rs +++ b/lib/derive/src/lib.rs @@ -61,7 +61,7 @@ fn impl_wasmer_env(input: &DeriveInput) -> TokenStream { .. }*/) => , Enum(ref e) => impl_wasmer_env_for_enum(struct_name, &e.variants, &input.attrs), - _ => abort_call_site!("structopt only supports non-tuple structs and enums"), + _ => abort_call_site!("Clap only supports non-tuple structs and enums"), }*/ }