From 7f710f42f5f0d68bb7fbcf7bb0a25c3433d572a6 Mon Sep 17 00:00:00 2001 From: razican Date: Wed, 5 Feb 2020 15:16:06 +0100 Subject: [PATCH 1/5] Moved to a workspace architecture This fixes #239, and superseeds #241. --- Cargo.lock | 715 ++++++++++-------- Cargo.toml | 90 +-- boa/Cargo.toml | 48 ++ {benches => boa/benches}/exec.rs | 0 {benches => boa/benches}/fib.rs | 0 {benches => boa/benches}/parser.rs | 0 {benches => boa/benches}/string.rs | 0 {src/lib => boa/src}/builtins/array.rs | 0 {src/lib => boa/src}/builtins/boolean.rs | 0 {src/lib => boa/src}/builtins/console.rs | 0 {src/lib => boa/src}/builtins/error.rs | 0 {src/lib => boa/src}/builtins/function.rs | 0 {src/lib => boa/src}/builtins/json.rs | 0 {src/lib => boa/src}/builtins/math.rs | 0 {src/lib => boa/src}/builtins/mod.rs | 0 {src/lib => boa/src}/builtins/number.rs | 0 {src/lib => boa/src}/builtins/object.rs | 0 .../src}/builtins/object/internal_state.rs | 0 {src/lib => boa/src}/builtins/property.rs | 0 {src/lib => boa/src}/builtins/regexp.rs | 0 {src/lib => boa/src}/builtins/string.rs | 0 {src/lib => boa/src}/builtins/symbol.rs | 0 {src/lib => boa/src}/builtins/value.rs | 0 .../declarative_environment_record.rs | 0 .../environment/environment_record_trait.rs | 0 .../function_environment_record.rs | 0 .../environment/global_environment_record.rs | 0 .../src}/environment/lexical_environment.rs | 0 {src/lib => boa/src}/environment/mod.rs | 0 .../environment/object_environment_record.rs | 0 {src/lib => boa/src}/exec.rs | 0 {src/lib => boa/src}/lib.rs | 0 {src/lib => boa/src}/realm.rs | 0 {src/lib => boa/src}/syntax/ast/constant.rs | 0 {src/lib => boa/src}/syntax/ast/expr.rs | 0 {src/lib => boa/src}/syntax/ast/keyword.rs | 0 {src/lib => boa/src}/syntax/ast/mod.rs | 0 {src/lib => boa/src}/syntax/ast/op.rs | 0 {src/lib => boa/src}/syntax/ast/pos.rs | 0 {src/lib => boa/src}/syntax/ast/punc.rs | 0 {src/lib => boa/src}/syntax/ast/token.rs | 0 {src/lib => boa/src}/syntax/lexer.rs | 0 {src/lib => boa/src}/syntax/mod.rs | 0 {src/lib => boa/src}/syntax/parser.rs | 0 {src/lib => boa/src}/wasm.rs | 0 boa_cli/Cargo.toml | 14 + src/bin/bin.rs => boa_cli/src/main.rs | 0 boa_shell/Cargo.toml | 15 + src/bin/shell.rs => boa_shell/src/main.rs | 0 49 files changed, 510 insertions(+), 372 deletions(-) create mode 100644 boa/Cargo.toml rename {benches => boa/benches}/exec.rs (100%) rename {benches => boa/benches}/fib.rs (100%) rename {benches => boa/benches}/parser.rs (100%) rename {benches => boa/benches}/string.rs (100%) rename {src/lib => boa/src}/builtins/array.rs (100%) rename {src/lib => boa/src}/builtins/boolean.rs (100%) rename {src/lib => boa/src}/builtins/console.rs (100%) rename {src/lib => boa/src}/builtins/error.rs (100%) rename {src/lib => boa/src}/builtins/function.rs (100%) rename {src/lib => boa/src}/builtins/json.rs (100%) rename {src/lib => boa/src}/builtins/math.rs (100%) rename {src/lib => boa/src}/builtins/mod.rs (100%) rename {src/lib => boa/src}/builtins/number.rs (100%) rename {src/lib => boa/src}/builtins/object.rs (100%) rename {src/lib => boa/src}/builtins/object/internal_state.rs (100%) rename {src/lib => boa/src}/builtins/property.rs (100%) rename {src/lib => boa/src}/builtins/regexp.rs (100%) rename {src/lib => boa/src}/builtins/string.rs (100%) rename {src/lib => boa/src}/builtins/symbol.rs (100%) rename {src/lib => boa/src}/builtins/value.rs (100%) rename {src/lib => boa/src}/environment/declarative_environment_record.rs (100%) rename {src/lib => boa/src}/environment/environment_record_trait.rs (100%) rename {src/lib => boa/src}/environment/function_environment_record.rs (100%) rename {src/lib => boa/src}/environment/global_environment_record.rs (100%) rename {src/lib => boa/src}/environment/lexical_environment.rs (100%) rename {src/lib => boa/src}/environment/mod.rs (100%) rename {src/lib => boa/src}/environment/object_environment_record.rs (100%) rename {src/lib => boa/src}/exec.rs (100%) rename {src/lib => boa/src}/lib.rs (100%) rename {src/lib => boa/src}/realm.rs (100%) rename {src/lib => boa/src}/syntax/ast/constant.rs (100%) rename {src/lib => boa/src}/syntax/ast/expr.rs (100%) rename {src/lib => boa/src}/syntax/ast/keyword.rs (100%) rename {src/lib => boa/src}/syntax/ast/mod.rs (100%) rename {src/lib => boa/src}/syntax/ast/op.rs (100%) rename {src/lib => boa/src}/syntax/ast/pos.rs (100%) rename {src/lib => boa/src}/syntax/ast/punc.rs (100%) rename {src/lib => boa/src}/syntax/ast/token.rs (100%) rename {src/lib => boa/src}/syntax/lexer.rs (100%) rename {src/lib => boa/src}/syntax/mod.rs (100%) rename {src/lib => boa/src}/syntax/parser.rs (100%) rename {src/lib => boa/src}/wasm.rs (100%) create mode 100644 boa_cli/Cargo.toml rename src/bin/bin.rs => boa_cli/src/main.rs (100%) create mode 100644 boa_shell/Cargo.toml rename src/bin/shell.rs => boa_shell/src/main.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 3a025d89d4c..ddc3516a7ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,837 +4,930 @@ name = "Boa" version = "0.5.1" dependencies = [ - "criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gc 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "gc_derive 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion", + "gc", + "gc_derive", + "rand", + "regex", + "serde_json", + "wasm-bindgen", ] [[package]] name = "aho-corasick" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743ad5a418686aad3b87fd14c43badd828cf26e214a00f92a384291cf22e1811" dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", ] [[package]] name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", ] +[[package]] +name = "anyhow" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" + [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", + "winapi", ] [[package]] name = "autocfg" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" + +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" [[package]] name = "bitflags" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "boa_cli" +version = "0.1.0" +dependencies = [ + "Boa", +] + +[[package]] +name = "boa_shell" +version = "0.1.0" +dependencies = [ + "Boa", + "structopt", +] [[package]] name = "bstr" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502ae1441a0a5adb8fbd38a5955a6416b9493e92b465de5e4a9bde6a539c2c48" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "memchr", + "regex-automata", + "serde", ] [[package]] name = "bumpalo" -version = "3.1.1" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fb8038c1ddc0a5f73787b130f4cc75151e96ed33e417fde765eb5a81e3532f4" [[package]] name = "byteorder" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" [[package]] name = "c2-chacha" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" dependencies = [ - "ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "ppv-lite86", ] [[package]] name = "cast" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" dependencies = [ - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version", ] [[package]] name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "clap" version = "2.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term", + "atty", + "bitflags", + "strsim", + "textwrap", + "unicode-width", + "vec_map", ] [[package]] name = "criterion" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc755679c12bda8e5523a71e4d654b6bf2e14bd838dfc48cde6559a05caf7d1" dependencies = [ - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "criterion-plot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xoshiro 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", - "tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "atty", + "cast", + "clap", + "criterion-plot", + "csv", + "itertools", + "lazy_static", + "num-traits", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", ] [[package]] name = "criterion-plot" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01e15e0ea58e8234f96146b1f91fa9d0e4dd7a38da93ff7a75d42c0b9d3a545" dependencies = [ - "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cast", + "itertools", ] [[package]] name = "crossbeam-deque" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" dependencies = [ - "crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7", + "cfg-if", + "crossbeam-utils", + "lazy_static", + "memoffset", + "scopeguard", ] [[package]] name = "crossbeam-queue" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "crossbeam-utils", ] [[package]] name = "crossbeam-utils" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7", + "cfg-if", + "lazy_static", ] [[package]] name = "csv" -version = "1.1.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" dependencies = [ - "bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "bstr", + "csv-core", + "itoa", + "ryu", + "serde", ] [[package]] name = "csv-core" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c" dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", ] [[package]] name = "either" version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "gc" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75656800ec248b3d0c33b685e442a67e7308009ae59b1f8eb60c4f09ebebb512" [[package]] name = "gc_derive" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2501c15cbaf28a0c2214617aa85351982a933161d7937fe6cd71c855364e0ea6" dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.3.15", + "syn 0.11.11", + "synstructure", ] [[package]] name = "getrandom" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "wasi", ] [[package]] name = "heck" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" dependencies = [ - "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-segmentation", ] [[package]] name = "hermit-abi" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "itertools" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" dependencies = [ - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "either", ] [[package]] name = "itoa" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" + +[[package]] +name = "js-sys" +version = "0.3.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" +dependencies = [ + "wasm-bindgen", +] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" version = "0.2.66" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" [[package]] name = "log" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", ] [[package]] name = "memchr" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "memoffset" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" +dependencies = [ + "rustc_version", +] + +[[package]] +name = "nom" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" dependencies = [ - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", + "version_check", ] [[package]] name = "num-traits" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", ] [[package]] name = "num_cpus" -version = "1.11.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" dependencies = [ - "hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", +] + +[[package]] +name = "oorandom" +version = "11.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcec7c9c2a95cacc7cd0ecb89d8a8454eca13906f6deb55258ffff0adeb9405" + +[[package]] +name = "plotters" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e3bb8da247d27ae212529352020f3e5ee16e83c0c258061d27b08ab92675eeb" +dependencies = [ + "js-sys", + "num-traits", + "wasm-bindgen", + "web-sys", ] [[package]] name = "ppv-lite86" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" [[package]] name = "proc-macro-error" -version = "0.4.4" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875077759af22fa20b610ad4471d8155b321c89c3f2785526c9839b099be4e0a" dependencies = [ - "proc-macro-error-attr 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-error-attr", + "proc-macro2", + "quote 1.0.2", + "rustversion", + "syn 1.0.14", ] [[package]] name = "proc-macro-error-attr" -version = "0.4.3" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5717d9fa2664351a01ed73ba5ef6df09c01a521cb42cb65a061432a826f3c7a" dependencies = [ - "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn-mid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote 1.0.2", + "rustversion", + "syn 1.0.14", + "syn-mid", ] [[package]] name = "proc-macro2" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" dependencies = [ - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0", ] [[package]] name = "quote" version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" [[package]] name = "quote" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" dependencies = [ - "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", ] [[package]] name = "rand" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", + "libc", + "rand_chacha", + "rand_core", + "rand_hc", ] [[package]] name = "rand_chacha" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" dependencies = [ - "c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "c2-chacha", + "rand_core", ] [[package]] name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", ] [[package]] name = "rand_hc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_os" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_xoshiro" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core", ] [[package]] name = "rayon" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" dependencies = [ - "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque", + "either", + "rayon-core", ] [[package]] name = "rayon-core" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" dependencies = [ - "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque", + "crossbeam-queue", + "crossbeam-utils", + "lazy_static", + "num_cpus", ] [[package]] name = "regex" -version = "1.3.1" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" dependencies = [ - "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", ] [[package]] name = "regex-automata" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", ] [[package]] name = "regex-syntax" -version = "0.6.12" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "semver", ] [[package]] name = "rustversion" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6" dependencies = [ - "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote 1.0.2", + "syn 1.0.14", ] [[package]] name = "ryu" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" [[package]] name = "same-file" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util", ] [[package]] name = "scopeguard" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" [[package]] name = "semver" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver-parser", ] [[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.104" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" [[package]] name = "serde_derive" version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" dependencies = [ - "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote 1.0.2", + "syn 1.0.14", ] [[package]] name = "serde_json" -version = "1.0.44" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b01d7f0288608a01dca632cf1df859df6fd6ffa885300fc275ce2ba6221953" dependencies = [ - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa", + "ryu", + "serde", ] +[[package]] +name = "sourcefile" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" + [[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "structopt" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1bcbed7d48956fcbb5d80c6b95aedb553513de0a1b451ea92679d999c010e98" dependencies = [ - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt-derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap", + "lazy_static", + "structopt-derive", ] [[package]] name = "structopt-derive" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "095064aa1f5b94d14e635d0a5684cf140c43ae40a0fd990708d38f5d669e5f64" dependencies = [ - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-error 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "heck", + "proc-macro-error", + "proc-macro2", + "quote 1.0.2", + "syn 1.0.14", ] [[package]] name = "syn" version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.3.15", + "synom", + "unicode-xid 0.0.4", ] [[package]] name = "syn" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" dependencies = [ - "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote 1.0.2", + "unicode-xid 0.2.0", ] [[package]] name = "syn-mid" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" dependencies = [ - "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote 1.0.2", + "syn 1.0.14", ] [[package]] name = "synom" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" dependencies = [ - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.0.4", ] [[package]] name = "synstructure" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a761d12e6d8dcb4dcf952a7a89b475e3a9d69e4a69307e01a470977642914bd" dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.3.15", + "syn 0.11.11", ] [[package]] name = "textwrap" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width", ] [[package]] name = "thread_local" -version = "0.3.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", ] [[package]] name = "tinytemplate" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a3c6667d3e65eb1bc3aed6fd14011c6cbc3a0665218ab7f5daf040b9ec371a" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", + "serde_json", ] [[package]] name = "unicode-segmentation" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" [[package]] name = "unicode-width" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" [[package]] name = "unicode-xid" version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" [[package]] name = "unicode-xid" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" [[package]] name = "vec_map" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" + +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" [[package]] name = "walkdir" -version = "2.2.9" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" dependencies = [ - "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file", + "winapi", + "winapi-util", ] [[package]] name = "wasi" -version = "0.7.0" +version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasm-bindgen" -version = "0.2.57" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.57" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" dependencies = [ - "bumpalo 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "bumpalo", + "lazy_static", + "log", + "proc-macro2", + "quote 1.0.2", + "syn 1.0.14", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.57" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" dependencies = [ - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro-support 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2", + "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.57" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" dependencies = [ - "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote 1.0.2", + "syn 1.0.14", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.57" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" + +[[package]] +name = "wasm-bindgen-webidl" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" +dependencies = [ + "anyhow", + "heck", + "log", + "proc-macro2", + "quote 1.0.2", + "syn 1.0.14", + "wasm-bindgen-backend", + "weedle", +] + +[[package]] +name = "web-sys" +version = "0.3.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" +dependencies = [ + "anyhow", + "js-sys", + "sourcefile", + "wasm-bindgen", + "wasm-bindgen-webidl", +] + +[[package]] +name = "weedle" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" +dependencies = [ + "nom", +] [[package]] name = "winapi" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", ] [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" -"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" -"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8d6c2c5b58ab920a4f5aeaaca34b4488074e8cc7596af94e6f8c6ff247c60245" -"checksum bumpalo 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fe2567a8d8a3aedb4e39aa39e186d5673acfd56393c6ac83b2bc5bd82f4369c" -"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" -"checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" -"checksum cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" -"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" -"checksum criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "938703e165481c8d612ea3479ac8342e5615185db37765162e762ec3523e2fc6" -"checksum criterion-plot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eccdc6ce8bbe352ca89025bee672aa6d24f4eb8c53e3a8b5d1bc58011da072a2" -"checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" -"checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" -"checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" -"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" -"checksum csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37519ccdfd73a75821cac9319d4fce15a81b9fcf75f951df5b9988aa3a0af87d" -"checksum csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c" -"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" -"checksum gc 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75656800ec248b3d0c33b685e442a67e7308009ae59b1f8eb60c4f09ebebb512" -"checksum gc_derive 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2501c15cbaf28a0c2214617aa85351982a933161d7937fe6cd71c855364e0ea6" -"checksum getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407" -"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -"checksum hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" -"checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" -"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" -"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" -"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" -"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" -"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" -"checksum num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c81ffc11c212fa327657cb19dd85eb7419e163b5b076bede2bdb5c974c07e4" -"checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72" -"checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" -"checksum proc-macro-error 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "53c98547ceaea14eeb26fcadf51dc70d01a2479a7839170eae133721105e4428" -"checksum proc-macro-error-attr 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c2bf5d493cf5d3e296beccfd61794e445e830dfc8070a9c248ad3ee071392c6c" -"checksum proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0319972dcae462681daf4da1adeeaa066e3ebd29c69be96c6abb1259d2ee2bcc" -"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" -"checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412" -"checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" -"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -"checksum rand_os 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a788ae3edb696cfcba1c19bfd388cc4b8c21f8a408432b199c072825084da58a" -"checksum rand_xoshiro 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0e18c91676f670f6f0312764c759405f13afb98d5d73819840cf72a518487bff" -"checksum rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" -"checksum rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" -"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" -"checksum regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9" -"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" -"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum rustversion 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a0538bd897e17257b0128d2fd95c2ed6df939374073a36166051a79e2eb7986" -"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" -"checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" -"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" -"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" -"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" -"checksum serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)" = "48c575e0cc52bdd09b47f330f646cf59afc586e9c4e3ccd6fc1f625b8ea1dad7" -"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -"checksum structopt 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "884ae79d6aad1e738f4a70dff314203fd498490a63ebc4d03ea83323c40b7b72" -"checksum structopt-derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0a97f829a34a0a9d5b353a881025a23b8c9fd09d46be6045df6b22920dbd7a93" -"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1e4ff033220a41d1a57d8125eab57bf5263783dfdcc18688b1dacc6ce9651ef8" -"checksum syn-mid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd3937748a7eccff61ba5b90af1a20dbf610858923a9192ea0ecb0cb77db1d0" -"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" -"checksum synstructure 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a761d12e6d8dcb4dcf952a7a89b475e3a9d69e4a69307e01a470977642914bd" -"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" -"checksum tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "57a3c6667d3e65eb1bc3aed6fd14011c6cbc3a0665218ab7f5daf040b9ec371a" -"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" -"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" -"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" -"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" -"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" -"checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e" -"checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" -"checksum wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)" = "701bc20794a7f9e8dcd85984a848f951ef6c5083322b6dd17fe880c99390f7cd" -"checksum wasm-bindgen-backend 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)" = "426315280d373e1a828e1c322507d51aa82e03c2fb1d654720b9e2f2368d291d" -"checksum wasm-bindgen-macro 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)" = "d9a8a46373db32c892de910ccca302ecdaf8262abab746324a8a4dac352fc11f" -"checksum wasm-bindgen-macro-support 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)" = "45d1c6c2259c0f4ef3d61ea0976ea075b6f8185497c4a5457793740c2cda6430" -"checksum wasm-bindgen-shared 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)" = "dd8e108ae395aae8017b091c4766101f08c635a5074e6631e0085e8a839e5810" -"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/Cargo.toml b/Cargo.toml index 1946c3919ec..4f1a4e002c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,61 +1,29 @@ -[package] -name = "Boa" -version = "0.5.1" -authors = ["Jason Williams "] -description = "Boa is a Javascript lexer, parser and Just-in-Time compiler written in Rust. Currently, it has support for some of the language." -homepage = "https://github.com/jasonwilliams/boa" -repository = "https://github.com/jasonwilliams/boa" -keywords = ["javascript", "compiler", "lexer", "parser", "js"] -license = "Unlicense/MIT" -exclude = [".vscode/*", "Dockerfile", "Makefile", ".editorConfig"] -edition = "2018" -default-run = "boa" - -[features] -default = ["wasm-bindgen"] - -[dependencies] -gc = "^0.3.3" -gc_derive = "^0.3.2" -serde_json = "^1.0.40" -rand = "^0.7.0" -regex = "^1.3.0" -structopt = "0.3.2" - -# Optional Dependencies -wasm-bindgen = { version = "^0.2.50", optional = true } - -[dev-dependencies] -criterion = "^0.3.0" - -[lib] -crate-type = ["cdylib", "lib"] -name = "boa" -path = "src/lib/lib.rs" -bench = false - -[[bench]] -name = "string" -harness = false - -[[bench]] -name = "fib" -harness = false - -[[bench]] -name = "exec" -harness = false - -[[bench]] -name = "parser" -harness = false - -[[bin]] -name = "boa" -path = "src/bin/bin.rs" -bench = false - -[[bin]] -name = "boashell" -path = "src/bin/shell.rs" -bench = false +[workspace] +members = [ + "boa", + "boa_cli", + "boa_shell", +] + +# The release profile, used for `cargo build`. +[profile.dev] +incremental = true +opt-level = 0 +debug = true +rpath = false +lto = false +debug-assertions = true +overflow-checks = true +panic = 'unwind' + +# The release profile, used for `cargo build --release`. +[profile.release] +incremental = false +opt-level = 3 +debug = false +rpath = false +codegen-units = 1 +lto = true +debug-assertions = false +overflow-checks = false +panic = 'unwind' \ No newline at end of file diff --git a/boa/Cargo.toml b/boa/Cargo.toml new file mode 100644 index 00000000000..6b789ba6094 --- /dev/null +++ b/boa/Cargo.toml @@ -0,0 +1,48 @@ +[package] +name = "Boa" +version = "0.5.1" +authors = ["Jason Williams "] +description = "Boa is a Javascript lexer, parser and Just-in-Time compiler written in Rust. Currently, it has support for some of the language." +repository = "https://github.com/jasonwilliams/boa" +keywords = ["javascript", "compiler", "lexer", "parser", "js"] +categories = ["parser-implementations", "wasm"] +license = "Unlicense/MIT" +exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"] +edition = "2018" + +[features] +default = ["wasm-bindgen"] + +[dependencies] +gc = "0.3.3" +gc_derive = "0.3.2" +serde_json = "1.0.46" +rand = "0.7.3" +regex = "1.3.4" + +# Optional Dependencies +wasm-bindgen = { version = "0.2.58", optional = true } + +[dev-dependencies] +criterion = "0.3.1" + +[lib] +crate-type = ["cdylib", "lib"] +name = "boa" +bench = false + +[[bench]] +name = "string" +harness = false + +[[bench]] +name = "fib" +harness = false + +[[bench]] +name = "exec" +harness = false + +[[bench]] +name = "parser" +harness = false diff --git a/benches/exec.rs b/boa/benches/exec.rs similarity index 100% rename from benches/exec.rs rename to boa/benches/exec.rs diff --git a/benches/fib.rs b/boa/benches/fib.rs similarity index 100% rename from benches/fib.rs rename to boa/benches/fib.rs diff --git a/benches/parser.rs b/boa/benches/parser.rs similarity index 100% rename from benches/parser.rs rename to boa/benches/parser.rs diff --git a/benches/string.rs b/boa/benches/string.rs similarity index 100% rename from benches/string.rs rename to boa/benches/string.rs diff --git a/src/lib/builtins/array.rs b/boa/src/builtins/array.rs similarity index 100% rename from src/lib/builtins/array.rs rename to boa/src/builtins/array.rs diff --git a/src/lib/builtins/boolean.rs b/boa/src/builtins/boolean.rs similarity index 100% rename from src/lib/builtins/boolean.rs rename to boa/src/builtins/boolean.rs diff --git a/src/lib/builtins/console.rs b/boa/src/builtins/console.rs similarity index 100% rename from src/lib/builtins/console.rs rename to boa/src/builtins/console.rs diff --git a/src/lib/builtins/error.rs b/boa/src/builtins/error.rs similarity index 100% rename from src/lib/builtins/error.rs rename to boa/src/builtins/error.rs diff --git a/src/lib/builtins/function.rs b/boa/src/builtins/function.rs similarity index 100% rename from src/lib/builtins/function.rs rename to boa/src/builtins/function.rs diff --git a/src/lib/builtins/json.rs b/boa/src/builtins/json.rs similarity index 100% rename from src/lib/builtins/json.rs rename to boa/src/builtins/json.rs diff --git a/src/lib/builtins/math.rs b/boa/src/builtins/math.rs similarity index 100% rename from src/lib/builtins/math.rs rename to boa/src/builtins/math.rs diff --git a/src/lib/builtins/mod.rs b/boa/src/builtins/mod.rs similarity index 100% rename from src/lib/builtins/mod.rs rename to boa/src/builtins/mod.rs diff --git a/src/lib/builtins/number.rs b/boa/src/builtins/number.rs similarity index 100% rename from src/lib/builtins/number.rs rename to boa/src/builtins/number.rs diff --git a/src/lib/builtins/object.rs b/boa/src/builtins/object.rs similarity index 100% rename from src/lib/builtins/object.rs rename to boa/src/builtins/object.rs diff --git a/src/lib/builtins/object/internal_state.rs b/boa/src/builtins/object/internal_state.rs similarity index 100% rename from src/lib/builtins/object/internal_state.rs rename to boa/src/builtins/object/internal_state.rs diff --git a/src/lib/builtins/property.rs b/boa/src/builtins/property.rs similarity index 100% rename from src/lib/builtins/property.rs rename to boa/src/builtins/property.rs diff --git a/src/lib/builtins/regexp.rs b/boa/src/builtins/regexp.rs similarity index 100% rename from src/lib/builtins/regexp.rs rename to boa/src/builtins/regexp.rs diff --git a/src/lib/builtins/string.rs b/boa/src/builtins/string.rs similarity index 100% rename from src/lib/builtins/string.rs rename to boa/src/builtins/string.rs diff --git a/src/lib/builtins/symbol.rs b/boa/src/builtins/symbol.rs similarity index 100% rename from src/lib/builtins/symbol.rs rename to boa/src/builtins/symbol.rs diff --git a/src/lib/builtins/value.rs b/boa/src/builtins/value.rs similarity index 100% rename from src/lib/builtins/value.rs rename to boa/src/builtins/value.rs diff --git a/src/lib/environment/declarative_environment_record.rs b/boa/src/environment/declarative_environment_record.rs similarity index 100% rename from src/lib/environment/declarative_environment_record.rs rename to boa/src/environment/declarative_environment_record.rs diff --git a/src/lib/environment/environment_record_trait.rs b/boa/src/environment/environment_record_trait.rs similarity index 100% rename from src/lib/environment/environment_record_trait.rs rename to boa/src/environment/environment_record_trait.rs diff --git a/src/lib/environment/function_environment_record.rs b/boa/src/environment/function_environment_record.rs similarity index 100% rename from src/lib/environment/function_environment_record.rs rename to boa/src/environment/function_environment_record.rs diff --git a/src/lib/environment/global_environment_record.rs b/boa/src/environment/global_environment_record.rs similarity index 100% rename from src/lib/environment/global_environment_record.rs rename to boa/src/environment/global_environment_record.rs diff --git a/src/lib/environment/lexical_environment.rs b/boa/src/environment/lexical_environment.rs similarity index 100% rename from src/lib/environment/lexical_environment.rs rename to boa/src/environment/lexical_environment.rs diff --git a/src/lib/environment/mod.rs b/boa/src/environment/mod.rs similarity index 100% rename from src/lib/environment/mod.rs rename to boa/src/environment/mod.rs diff --git a/src/lib/environment/object_environment_record.rs b/boa/src/environment/object_environment_record.rs similarity index 100% rename from src/lib/environment/object_environment_record.rs rename to boa/src/environment/object_environment_record.rs diff --git a/src/lib/exec.rs b/boa/src/exec.rs similarity index 100% rename from src/lib/exec.rs rename to boa/src/exec.rs diff --git a/src/lib/lib.rs b/boa/src/lib.rs similarity index 100% rename from src/lib/lib.rs rename to boa/src/lib.rs diff --git a/src/lib/realm.rs b/boa/src/realm.rs similarity index 100% rename from src/lib/realm.rs rename to boa/src/realm.rs diff --git a/src/lib/syntax/ast/constant.rs b/boa/src/syntax/ast/constant.rs similarity index 100% rename from src/lib/syntax/ast/constant.rs rename to boa/src/syntax/ast/constant.rs diff --git a/src/lib/syntax/ast/expr.rs b/boa/src/syntax/ast/expr.rs similarity index 100% rename from src/lib/syntax/ast/expr.rs rename to boa/src/syntax/ast/expr.rs diff --git a/src/lib/syntax/ast/keyword.rs b/boa/src/syntax/ast/keyword.rs similarity index 100% rename from src/lib/syntax/ast/keyword.rs rename to boa/src/syntax/ast/keyword.rs diff --git a/src/lib/syntax/ast/mod.rs b/boa/src/syntax/ast/mod.rs similarity index 100% rename from src/lib/syntax/ast/mod.rs rename to boa/src/syntax/ast/mod.rs diff --git a/src/lib/syntax/ast/op.rs b/boa/src/syntax/ast/op.rs similarity index 100% rename from src/lib/syntax/ast/op.rs rename to boa/src/syntax/ast/op.rs diff --git a/src/lib/syntax/ast/pos.rs b/boa/src/syntax/ast/pos.rs similarity index 100% rename from src/lib/syntax/ast/pos.rs rename to boa/src/syntax/ast/pos.rs diff --git a/src/lib/syntax/ast/punc.rs b/boa/src/syntax/ast/punc.rs similarity index 100% rename from src/lib/syntax/ast/punc.rs rename to boa/src/syntax/ast/punc.rs diff --git a/src/lib/syntax/ast/token.rs b/boa/src/syntax/ast/token.rs similarity index 100% rename from src/lib/syntax/ast/token.rs rename to boa/src/syntax/ast/token.rs diff --git a/src/lib/syntax/lexer.rs b/boa/src/syntax/lexer.rs similarity index 100% rename from src/lib/syntax/lexer.rs rename to boa/src/syntax/lexer.rs diff --git a/src/lib/syntax/mod.rs b/boa/src/syntax/mod.rs similarity index 100% rename from src/lib/syntax/mod.rs rename to boa/src/syntax/mod.rs diff --git a/src/lib/syntax/parser.rs b/boa/src/syntax/parser.rs similarity index 100% rename from src/lib/syntax/parser.rs rename to boa/src/syntax/parser.rs diff --git a/src/lib/wasm.rs b/boa/src/wasm.rs similarity index 100% rename from src/lib/wasm.rs rename to boa/src/wasm.rs diff --git a/boa_cli/Cargo.toml b/boa_cli/Cargo.toml new file mode 100644 index 00000000000..11121e57617 --- /dev/null +++ b/boa_cli/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "boa_cli" +version = "0.1.0" +authors = ["razican "] +description = "Boa is a Javascript lexer, parser and Just-in-Time compiler written in Rust. Currently, it has support for some of the language." +repository = "https://github.com/jasonwilliams/boa" +keywords = ["javascript", "compiler", "lexer", "parser", "js", "cli"] +categories = ["command-line-utilities"] +license = "Unlicense/MIT" +exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"] +edition = "2018" + +[dependencies] +Boa = { path = "../boa" } diff --git a/src/bin/bin.rs b/boa_cli/src/main.rs similarity index 100% rename from src/bin/bin.rs rename to boa_cli/src/main.rs diff --git a/boa_shell/Cargo.toml b/boa_shell/Cargo.toml new file mode 100644 index 00000000000..211e90bad3f --- /dev/null +++ b/boa_shell/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "boa_shell" +version = "0.1.0" +authors = ["Jason Williams "] +description = "Boa is a Javascript lexer, parser and Just-in-Time compiler written in Rust. Currently, it has support for some of the language." +repository = "https://github.com/jasonwilliams/boa" +keywords = ["javascript", "compiler", "lexer", "parser", "js", "cli"] +categories = ["command-line-utilities"] +license = "Unlicense/MIT" +exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"] +edition = "2018" + +[dependencies] +Boa = { path = "../boa" } +structopt = "0.3.9" diff --git a/src/bin/shell.rs b/boa_shell/src/main.rs similarity index 100% rename from src/bin/shell.rs rename to boa_shell/src/main.rs From 4eafff32b3b707a4c9a2e9f501baa330bf06ceb2 Mon Sep 17 00:00:00 2001 From: razican Date: Fri, 7 Feb 2020 11:55:20 +0100 Subject: [PATCH 2/5] Fixed #140, the shell is now an option in the CLI --- Cargo.lock | 7 ------ Cargo.toml | 1 - boa_cli/Cargo.toml | 1 + boa_cli/src/main.rs | 51 +++++++++++++++++++++---------------------- boa_shell/Cargo.toml | 15 ------------- boa_shell/src/main.rs | 29 ------------------------ 6 files changed, 26 insertions(+), 78 deletions(-) delete mode 100644 boa_shell/Cargo.toml delete mode 100644 boa_shell/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index ddc3516a7ec..08887a516a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -69,13 +69,6 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "boa_cli" version = "0.1.0" -dependencies = [ - "Boa", -] - -[[package]] -name = "boa_shell" -version = "0.1.0" dependencies = [ "Boa", "structopt", diff --git a/Cargo.toml b/Cargo.toml index 4f1a4e002c8..a0293216bbb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,6 @@ members = [ "boa", "boa_cli", - "boa_shell", ] # The release profile, used for `cargo build`. diff --git a/boa_cli/Cargo.toml b/boa_cli/Cargo.toml index 11121e57617..c1b8da9462c 100644 --- a/boa_cli/Cargo.toml +++ b/boa_cli/Cargo.toml @@ -12,3 +12,4 @@ edition = "2018" [dependencies] Boa = { path = "../boa" } +structopt = "0.3.9" diff --git a/boa_cli/src/main.rs b/boa_cli/src/main.rs index 3dc3337c8fe..ffeee478746 100644 --- a/boa_cli/src/main.rs +++ b/boa_cli/src/main.rs @@ -2,39 +2,38 @@ #![warn(clippy::perf)] #![allow(clippy::cognitive_complexity)] -use boa::exec; -use std::{env, fs::read_to_string, process::exit}; +use boa::{exec, exec::Executor, forward_val, realm::Realm}; +use std::{fs::read_to_string, path::PathBuf}; +use structopt::StructOpt; -fn print_usage() { - println!( - "Usage: -boa [file.js] - Interpret and execute file.js - (if no file given, defaults to tests/js/test.js" - ); +/// CLI configuration for Boa. +#[derive(Debug, StructOpt)] +#[structopt(author, about)] +struct Opt { + /// The javascript file to be evaluated. + #[structopt(name = "FILE", parse(from_os_str), default_value = "tests/js/test.js")] + file: PathBuf, + /// Open a boa shell (WIP). + #[structopt(short, long)] + shell: bool, } pub fn main() -> Result<(), std::io::Error> { - let args: Vec = env::args().collect(); - let read_file; + let args = Opt::from_args(); - match args.len() { - // No arguments passed, default to "test.js" - 1 => { - read_file = "tests/js/test.js"; - } - // One argument passed, assumed this is the test file - 2 => { - read_file = &args[1]; - } - // Some other number of arguments passed: not supported - _ => { - print_usage(); - exit(1); + let buffer = read_to_string(args.file)?; + + if args.shell { + let realm = Realm::create(); + let mut engine = Executor::new(realm); + + match forward_val(&mut engine, &buffer) { + Ok(v) => print!("{}", v.to_string()), + Err(v) => eprint!("{}", v.to_string()), } + } else { + dbg!(exec(&buffer)); } - let buffer = read_to_string(read_file)?; - dbg!(exec(&buffer)); Ok(()) } diff --git a/boa_shell/Cargo.toml b/boa_shell/Cargo.toml deleted file mode 100644 index 211e90bad3f..00000000000 --- a/boa_shell/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "boa_shell" -version = "0.1.0" -authors = ["Jason Williams "] -description = "Boa is a Javascript lexer, parser and Just-in-Time compiler written in Rust. Currently, it has support for some of the language." -repository = "https://github.com/jasonwilliams/boa" -keywords = ["javascript", "compiler", "lexer", "parser", "js", "cli"] -categories = ["command-line-utilities"] -license = "Unlicense/MIT" -exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"] -edition = "2018" - -[dependencies] -Boa = { path = "../boa" } -structopt = "0.3.9" diff --git a/boa_shell/src/main.rs b/boa_shell/src/main.rs deleted file mode 100644 index 4fae186e980..00000000000 --- a/boa_shell/src/main.rs +++ /dev/null @@ -1,29 +0,0 @@ -#![deny(unused_qualifications, clippy::correctness, clippy::style)] -#![warn(clippy::perf)] -#![allow(clippy::cognitive_complexity)] - -use boa::realm::Realm; -use boa::{exec::Executor, forward_val}; -use std::{fs::read_to_string, path::PathBuf}; -use structopt::StructOpt; - -#[derive(StructOpt)] -struct Opt { - #[structopt(parse(from_os_str), help = "the javascript file to be evaluated")] - file: PathBuf, -} - -pub fn main() -> Result<(), std::io::Error> { - let args = Opt::from_args(); - - let buffer = read_to_string(args.file)?; - let realm = Realm::create(); - let mut engine = Executor::new(realm); - - match forward_val(&mut engine, &buffer) { - Ok(v) => print!("{}", v.to_string()), - Err(v) => eprint!("{}", v.to_string()), - } - - Ok(()) -} From 95419cf13c174ef18cbb70bb6fa6312658405f6c Mon Sep 17 00:00:00 2001 From: razican Date: Fri, 7 Feb 2020 12:47:58 +0100 Subject: [PATCH 3/5] Fixed wasm live tool, but a ./pkg/ folder is created on build --- index.js | 7 +++---- webpack.config.js | 17 ++++++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/index.js b/index.js index 23c92c34e3f..5914abb9c1c 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ // Note that a dynamic `import` statement here is required due to // webpack/webpack#6615, but in theory `import { greet } from './pkg/hello_world';` // will work here one day as well! -const rust = import("./pkg"); +const rust = import("./boa/pkg"); import * as monaco from "monaco-editor"; // const image = import("./assets/01_rust_loves_js.png"); @@ -14,8 +14,7 @@ greet('World') `; const editor = monaco.editor.create( - document.getElementsByClassName("textbox")[0], - { + document.getElementsByClassName("textbox")[0], { value: initialCode, language: "javascript", theme: "vs", @@ -42,4 +41,4 @@ function inputHandler(evt) { let p = document.querySelector("p.output"); let result = window.evaluate(text); p.textContent = `> ${result}`; -} +} \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 64292eed22d..ddba0b478af 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,8 @@ const path = require("path"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -const { CleanWebpackPlugin } = require("clean-webpack-plugin"); +const { + CleanWebpackPlugin +} = require("clean-webpack-plugin"); const CopyWebpackPlugin = require("copy-webpack-plugin"); const webpack = require("webpack"); const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin"); @@ -18,10 +20,12 @@ module.exports = { template: "index.html" }), new WasmPackPlugin({ - crateDirectory: path.resolve(__dirname, ".") + crateDirectory: path.resolve(__dirname, "./boa/") }), - new CopyWebpackPlugin([ - { from: "./assets/*", to: "." }, + new CopyWebpackPlugin([{ + from: "./assets/*", + to: "." + }, { from: "./node_modules/bootstrap/dist/css/bootstrap.min.css", to: "./assets" @@ -38,8 +42,7 @@ module.exports = { }) ], module: { - rules: [ - { + rules: [{ test: /\.css$/, use: ["style-loader", "css-loader"] }, @@ -50,4 +53,4 @@ module.exports = { ] }, mode: "development" -}; +}; \ No newline at end of file From d5d76d03455156883f5fcddf1b93bee1f1a0c5e6 Mon Sep 17 00:00:00 2001 From: razican Date: Fri, 7 Feb 2020 13:56:47 +0100 Subject: [PATCH 4/5] Fixed `./pkg/` directory creation. --- webpack.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index ddba0b478af..c005e9bbf81 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,7 +20,8 @@ module.exports = { template: "index.html" }), new WasmPackPlugin({ - crateDirectory: path.resolve(__dirname, "./boa/") + crateDirectory: path.resolve(__dirname, "./boa/"), + outDir: path.resolve(__dirname, "./boa/pkg/") }), new CopyWebpackPlugin([{ from: "./assets/*", From 8856a95a3134fc070a97c1933eb02e47dd6ec47e Mon Sep 17 00:00:00 2001 From: razican Date: Tue, 11 Feb 2020 09:45:50 +0100 Subject: [PATCH 5/5] Trying to pin the action commit --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 4165c94fdc9..5d30804d9fd 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -10,6 +10,6 @@ jobs: with: toolchain: stable override: true - - uses: jasonwilliams/criterion-compare-action@master + - uses: jasonwilliams/criterion-compare-action@b88549f env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}