diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9c6b35cabb0..db053b09600 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,7 +9,7 @@ on: env: wasmpackVersion: 0.8.1 nodeVersion: 14.16.1 - rustToolchain: nightly-2021-05-12 + rustToolchain: nightly-2021-10-29 jobs: check: @@ -50,6 +50,7 @@ jobs: uses: actions-rs/cargo@v1.0.1 with: command: check + args: --all-targets lint: name: Rust Lint diff --git a/Cargo.lock b/Cargo.lock index a2165bb0e2b..c27ab9c5da5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "Inflector" version = "0.11.4" @@ -58,6 +60,15 @@ dependencies = [ "num-traits", ] +[[package]] +name = "approx" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278" +dependencies = [ + "num-traits", +] + [[package]] name = "ast" version = "0.1.0" @@ -96,7 +107,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "miniz_oxide", - "object", + "object 0.21.1", "rustc-demangle", ] @@ -184,6 +195,17 @@ dependencies = [ "vec_map", ] +[[package]] +name = "colored" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +dependencies = [ + "atty", + "lazy_static", + "winapi", +] + [[package]] name = "combine" version = "4.5.2" @@ -194,6 +216,16 @@ dependencies = [ "memchr", ] +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen", +] + [[package]] name = "const_fn" version = "0.4.5" @@ -347,13 +379,32 @@ version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1056f553da426e9c025a662efa48b52e62e0a3a7648aa2d15aeaaf7f0d329357" +[[package]] +name = "enso-automata" +version = "0.2.0" +dependencies = [ + "enso-prelude 0.2.6", +] + [[package]] name = "enso-automata" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9b028792f442d36cdd2df02a29ef988c219a9ebce952015bb1c2bcb5942d261" dependencies = [ - "enso-prelude", + "enso-prelude 0.2.0", +] + +[[package]] +name = "enso-data" +version = "0.2.0" +dependencies = [ + "criterion", + "enso-prelude 0.2.6", + "itertools 0.9.0", + "rustversion", + "serde", + "typenum", ] [[package]] @@ -362,7 +413,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39dba144366e08671b102fd6feca76be1623e05816a3ba43ab05b2aaa45a625a" dependencies = [ - "enso-prelude", + "enso-prelude 0.2.0", "rustversion", "serde", "typenum", @@ -374,11 +425,11 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b9c223330c46c505fed7c47894a22930eeacaa71fd914787754ee55baf8dd9a" dependencies = [ - "enso-automata", - "enso-lazy-reader", - "enso-logger", - "enso-macro-utils", - "enso-prelude", + "enso-automata 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "enso-lazy-reader 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "enso-logger 0.3.0", + "enso-macro-utils 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "enso-prelude 0.2.0", "itertools 0.8.2", "nonempty", "proc-macro2 1.0.26", @@ -388,13 +439,48 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "enso-flexer" +version = "0.2.1" +dependencies = [ + "enso-automata 0.2.0", + "enso-lazy-reader 0.2.0", + "enso-logger 0.3.1", + "enso-macro-utils 0.2.0", + "enso-prelude 0.2.6", + "itertools 0.8.2", + "nonempty", + "proc-macro2 1.0.26", + "quote 1.0.8", + "syn 1.0.72", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-test", +] + +[[package]] +name = "enso-generics" +version = "0.2.0" +dependencies = [ + "nalgebra 0.21.1", + "serde", +] + +[[package]] +name = "enso-lazy-reader" +version = "0.2.0" +dependencies = [ + "enso-prelude 0.2.6", + "itertools 0.8.2", +] + [[package]] name = "enso-lazy-reader" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b8cd22a53732103872eef4f1acbec0920ced09efb336fb06740a898d9762523" dependencies = [ - "enso-prelude", + "enso-prelude 0.2.0", "itertools 0.8.2", ] @@ -404,13 +490,34 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed27bf8ac2768a9224fd66863de4384b42bf16e079e02dd507798ce71dd4d2d" dependencies = [ - "enso-prelude", - "enso-shapely", + "enso-prelude 0.2.0", + "enso-shapely 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys", "wasm-bindgen", "web-sys", ] +[[package]] +name = "enso-logger" +version = "0.3.1" +dependencies = [ + "enso-prelude 0.2.6", + "enso-shapely 0.2.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "enso-macro-utils" +version = "0.2.0" +dependencies = [ + "proc-macro2 1.0.26", + "quote 1.0.8", + "syn 1.0.72", + "wasm-bindgen-test", +] + [[package]] name = "enso-macro-utils" version = "0.2.0" @@ -422,6 +529,13 @@ dependencies = [ "syn 1.0.72", ] +[[package]] +name = "enso-optics" +version = "0.2.0" +dependencies = [ + "enso-prelude 0.2.6", +] + [[package]] name = "enso-prelude" version = "0.2.0" @@ -435,22 +549,66 @@ dependencies = [ "derivative", "derive_more", "enclose", - "enso-shapely", + "enso-shapely 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure", - "ifmt", + "ifmt 0.2.0", "itertools 0.8.2", "lazy_static", - "nalgebra", - "num", - "object", - "paste", + "nalgebra 0.21.1", + "num 0.2.1", + "object 0.21.1", + "paste 0.1.18", "shrinkwraprs", "smallvec", "wasm-bindgen", - "weak-table", + "weak-table 0.2.4", "web-sys", ] +[[package]] +name = "enso-prelude" +version = "0.2.6" +dependencies = [ + "anyhow", + "backtrace", + "boolinator", + "bumpalo", + "cfg-if 1.0.0", + "colored", + "derivative", + "derive_more", + "enclose", + "enso-shapely 0.2.0", + "failure", + "ifmt 0.3.3", + "itertools 0.10.0", + "lazy_static", + "nalgebra 0.26.2", + "num 0.4.0", + "object 0.24.0", + "paste 1.0.5", + "serde", + "shrinkwraprs", + "smallvec", + "wasm-bindgen", + "wasm-bindgen-test", + "weak-table 0.3.0", + "web-sys", +] + +[[package]] +name = "enso-shapely" +version = "0.2.0" +dependencies = [ + "derivative", + "enso-prelude 0.2.6", + "enso-shapely-macros 0.2.1", + "paste 0.1.18", + "rustversion", + "shrinkwraprs", + "wasm-bindgen-test", +] + [[package]] name = "enso-shapely" version = "0.2.0" @@ -458,12 +616,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "061a335e6068e8960a315f62813a7196c3cde2c650ebd0e744f26b479baf3cd8" dependencies = [ "derivative", - "enso-shapely-macros", - "paste", + "enso-shapely-macros 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "paste 0.1.18", "rustversion", "shrinkwraprs", ] +[[package]] +name = "enso-shapely-macros" +version = "0.2.1" +dependencies = [ + "Inflector", + "boolinator", + "enso-macro-utils 0.2.0", + "itertools 0.8.2", + "proc-macro2 1.0.26", + "quote 1.0.8", + "syn 1.0.72", + "wasm-bindgen-test", +] + [[package]] name = "enso-shapely-macros" version = "0.2.1" @@ -472,7 +644,7 @@ checksum = "3362771ca6e5a077479ae310c28e28abb56f4f62f2fe649719292227685dece0" dependencies = [ "Inflector", "boolinator", - "enso-macro-utils", + "enso-macro-utils 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.2", "proc-macro2 1.0.26", "quote 1.0.8", @@ -513,6 +685,27 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "flexer-test-definition" +version = "0.1.0" +dependencies = [ + "enso-flexer 0.2.1", +] + +[[package]] +name = "flexer-test-generation" +version = "0.1.0" +dependencies = [ + "enso-flexer 0.2.1", + "flexer-test-definition", +] + +[[package]] +name = "futures" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" + [[package]] name = "generic-array" version = "0.13.2" @@ -571,7 +764,17 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abec215007c2ef1ccfb17a6bae6a87736fedb573860d2606ddec08b427666164" dependencies = [ - "ifmt-impl", + "ifmt-impl 0.2.0", + "proc-macro-hack", +] + +[[package]] +name = "ifmt" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd0f8e1404f15475d8a2ca84c2942aa00ac17804ce555294a96f6b5cdf80750" +dependencies = [ + "ifmt-impl 0.3.3", "proc-macro-hack", ] @@ -589,6 +792,20 @@ dependencies = [ "syn 0.15.44", ] +[[package]] +name = "ifmt-impl" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e50385662f423431a619ab28ba2beeab3063b581a0d1a943765e23911c502904" +dependencies = [ + "lazy_static", + "proc-macro-hack", + "proc-macro2 1.0.26", + "quote 1.0.8", + "regex", + "syn 1.0.72", +] + [[package]] name = "itertools" version = "0.8.2" @@ -666,8 +883,8 @@ name = "lexer" version = "0.1.0" dependencies = [ "criterion", - "enso-flexer", - "enso-prelude", + "enso-flexer 0.2.0", + "enso-prelude 0.2.0", "lexer-definition", ] @@ -675,8 +892,8 @@ dependencies = [ name = "lexer-definition" version = "0.1.0" dependencies = [ - "enso-flexer", - "enso-prelude", + "enso-flexer 0.2.0", + "enso-prelude 0.2.0", "uuid", ] @@ -710,6 +927,15 @@ dependencies = [ "rawpointer", ] +[[package]] +name = "matrixmultiply" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a8a15b776d9dfaecd44b03c5828c2199cddff5247215858aac14624f8d6b741" +dependencies = [ + "rawpointer", +] + [[package]] name = "memchr" version = "2.3.4" @@ -741,15 +967,32 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6b6147c3d50b4f3cdabfe2ecc94a0191fd3d6ad58aefd9664cf396285883486" dependencies = [ - "approx", + "approx 0.3.2", "generic-array", - "matrixmultiply", - "num-complex", - "num-rational", + "matrixmultiply 0.2.4", + "num-complex 0.2.4", + "num-rational 0.2.4", "num-traits", "rand", "rand_distr", - "simba", + "serde", + "serde_derive", + "simba 0.1.5", + "typenum", +] + +[[package]] +name = "nalgebra" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "476d1d59fe02fe54c86356e91650cd892f392782a1cb9fc524ec84f7aa9e1d06" +dependencies = [ + "approx 0.4.0", + "matrixmultiply 0.3.1", + "num-complex 0.3.1", + "num-rational 0.3.2", + "num-traits", + "simba 0.4.0", "typenum", ] @@ -775,11 +1018,25 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" dependencies = [ - "num-bigint", - "num-complex", + "num-bigint 0.2.6", + "num-complex 0.2.4", "num-integer", "num-iter", - "num-rational", + "num-rational 0.2.4", + "num-traits", +] + +[[package]] +name = "num" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +dependencies = [ + "num-bigint 0.4.2", + "num-complex 0.4.0", + "num-integer", + "num-iter", + "num-rational 0.4.0", "num-traits", ] @@ -794,6 +1051,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-bigint" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74e768dff5fb39a41b3bcd30bb25cf989706c90d028d1ad71971987aa309d535" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-complex" version = "0.2.4" @@ -802,6 +1070,25 @@ checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" dependencies = [ "autocfg", "num-traits", + "serde", +] + +[[package]] +name = "num-complex" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" +dependencies = [ + "num-traits", ] [[package]] @@ -832,7 +1119,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ "autocfg", - "num-bigint", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +dependencies = [ + "autocfg", + "num-bigint 0.4.2", "num-integer", "num-traits", ] @@ -867,6 +1177,15 @@ dependencies = [ "wasmparser", ] +[[package]] +name = "object" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" +dependencies = [ + "flate2", +] + [[package]] name = "oorandom" version = "11.1.3" @@ -878,9 +1197,9 @@ name = "parser" version = "0.1.0" dependencies = [ "criterion", - "enso-data", - "enso-logger", - "enso-prelude", + "enso-data 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "enso-logger 0.3.0", + "enso-prelude 0.2.0", "itertools 0.10.0", "lexer", ] @@ -903,6 +1222,12 @@ dependencies = [ "proc-macro-hack", ] +[[package]] +name = "paste" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" + [[package]] name = "paste-impl" version = "0.1.18" @@ -1116,6 +1441,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scoped-tls" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" + [[package]] name = "scopeguard" version = "1.1.0" @@ -1139,9 +1470,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.120" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "166b2349061381baf54a58e4b13c89369feb0ef2eaa57198899e2312aac30aab" +checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" dependencies = [ "serde_derive", ] @@ -1158,9 +1489,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.120" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca2a8cb5805ce9e3b95435e3765b7b553cecc762d938d409434338386cb5775" +checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" dependencies = [ "proc-macro2 1.0.26", "quote 1.0.8", @@ -1197,10 +1528,22 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb931b1367faadea6b1ab1c306a860ec17aaa5fa39f367d0c744e69d971a1fb2" dependencies = [ - "approx", - "num-complex", + "approx 0.3.2", + "num-complex 0.2.4", "num-traits", - "paste", + "paste 0.1.18", +] + +[[package]] +name = "simba" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5132a955559188f3d13c9ba831e77c802ddc8782783f050ed0c52f5988b95f4c" +dependencies = [ + "approx 0.4.0", + "num-complex 0.3.1", + "num-traits", + "paste 1.0.5", ] [[package]] @@ -1397,6 +1740,19 @@ dependencies = [ "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83420b37346c311b9ed822af41ec2e82839bfe99867ec6c54e2da43b7538771c" +dependencies = [ + "cfg-if 0.1.10", + "futures", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" version = "0.2.58" @@ -1426,6 +1782,31 @@ version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" +[[package]] +name = "wasm-bindgen-test" +version = "0.2.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2d9693b63a742d481c7f80587e057920e568317b2806988c59cd71618bc26c1" +dependencies = [ + "console_error_panic_hook", + "futures", + "js-sys", + "scoped-tls", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-test-macro", +] + +[[package]] +name = "wasm-bindgen-test-macro" +version = "0.2.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0789dac148a8840bbcf9efe13905463b733fa96543bfbf263790535c11af7ba5" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", +] + [[package]] name = "wasm-bindgen-webidl" version = "0.2.58" @@ -1454,6 +1835,12 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78e37715e810547b2ae9b6980b25bef319cb779d6c42faa8010ba47e83178113" +[[package]] +name = "weak-table" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8f3bf74f2d43500dea6a8291b6ac943e3465ea9936b94bd017e61b7b21dd01" + [[package]] name = "web-sys" version = "0.3.35" diff --git a/Cargo.toml b/Cargo.toml index 19cfca32cbb..946f64ba63d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,24 +7,21 @@ members = [ "lib/rust/lexer/generation", "lib/rust/parser", "lib/rust/parser-jni", + "lib/rust/automata", + "lib/rust/data", + "lib/rust/flexer", + "lib/rust/flexer-testing/definition", + "lib/rust/flexer-testing/generation", + "lib/rust/generics", + "lib/rust/lazy-reader", + "lib/rust/logger", + "lib/rust/macro-utils", + "lib/rust/optics", + "lib/rust/prelude", + "lib/rust/shapely/impl", + "lib/rust/shapely/macros", ] -# These patch versions exist to allow local development of these libraries alongside Enso. It -# assumes you have `rust-lib` in the same directory as `enso`. See: -# https://github.com/enso-org/rust-lib/blob/main/docs/CONTRIBUTING.md#developing-in-conjunction-with-enso--ide -[patch.crates-io] -#enso-automata = { path = '../rust-lib/src/automata' } -#enso-data = { path = '../rust-lib/src/data' } -#enso-flexer = { path = '../rust-lib/src/flexer' } -#enso-generics = { path = '../rust-lib/src/generics' } -#enso-lazy-reader = { path = '../rust-lib/src/lazy-reader' } -#enso-logger = { path = '../rust-lib/src/logger' } -#enso-macro-utils = { path = '../rust-lib/src/macro-utils' } -#enso-optics = { path = '../rust-lib/src/optics' } -#enso-prelude = { path = '../rust-lib/src/prelude' } -#enso-shapely = { path = '../rust-lib/src/shapely/impl' } -#enso-shapely-macros = { path = '../rust-lib/src/shapely/macros' } - [profile.dev] opt-level = 0 lto = false