From 7f3596d8a396eb9ecaf262704e546ffa42178c2d Mon Sep 17 00:00:00 2001 From: Dean Srebnik <49134864+load1n9@users.noreply.github.com> Date: Mon, 11 Sep 2023 12:05:40 -0400 Subject: [PATCH 01/11] feat: init --- examples/add.whi | 6 +++++- examples/lunatic.whi | 8 ++++++++ test.wasm | Bin 0 -> 112 bytes 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 examples/lunatic.whi create mode 100644 test.wasm diff --git a/examples/add.whi b/examples/add.whi index b0c4652..c535e12 100644 --- a/examples/add.whi +++ b/examples/add.whi @@ -1,3 +1,7 @@ -export fn add(a: i32, b: i32): i32 { +fn _add(a: i32, b: i32): i32 { return a + b } + +export fn add(a: i32, b: i32): i32 { + _add(a, b) +} \ No newline at end of file diff --git a/examples/lunatic.whi b/examples/lunatic.whi new file mode 100644 index 0000000..cfcd015 --- /dev/null +++ b/examples/lunatic.whi @@ -0,0 +1,8 @@ +extern "lunatic::message" { + fn create_data(tag: i64, capacity: i64): none +} + + +export fn main(): none { + create_data(30, 56) +} \ No newline at end of file diff --git a/test.wasm b/test.wasm new file mode 100644 index 0000000000000000000000000000000000000000..e3b57b679abb6f60a09505d22b29e20a8a3e462b GIT binary patch literal 112 zcmWN{F$#k~5Czcx$3&ys2NYOw3KT+Kh-*QxB&xfVV|Gn`GFtqlO;8g}!yAUj(6tERd@lqX DL30%8 literal 0 HcmV?d00001 From b94595d0b98d22da19040651db852c21aebac7e0 Mon Sep 17 00:00:00 2001 From: Dean Srebnik <49134864+load1n9@users.noreply.github.com> Date: Mon, 11 Sep 2023 18:07:22 -0400 Subject: [PATCH 02/11] feat: lunatic bindings --- Cargo.lock | 109 ++++++++++++++++++++++++++++++-------- compiler/Cargo.toml | 2 +- examples/add.whi | 6 +-- examples/import.whi | 4 +- examples/lunatic.whi | 6 +-- parser/src/parsers/mod.rs | 1 + preprocessor/Cargo.toml | 4 +- test.wasm | Bin 112 -> 0 bytes 8 files changed, 100 insertions(+), 32 deletions(-) delete mode 100644 test.wasm diff --git a/Cargo.lock b/Cargo.lock index fe30014..1f540fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -30,9 +30,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" -version = "0.13.1" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bitflags" @@ -142,9 +142,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -304,9 +304,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -484,9 +484,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project-lite" @@ -544,9 +544,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.13" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ "base64", "bytes", @@ -796,9 +796,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" @@ -823,9 +823,9 @@ checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "url" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -928,9 +928,9 @@ checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasm-encoder" -version = "0.16.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d443c5a7daae71697d97ec12ad70b4fe8766d3a0f4db16158ac8b781365892f7" +checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" dependencies = [ "leb128", ] @@ -1048,21 +1048,51 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.0", "windows_aarch64_msvc 0.42.0", "windows_i686_gnu 0.42.0", "windows_i686_msvc 0.42.0", "windows_x86_64_gnu 0.42.0", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.0", "windows_x86_64_msvc 0.42.0", ] +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -1075,6 +1105,12 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_i686_gnu" version = "0.36.1" @@ -1087,6 +1123,12 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_msvc" version = "0.36.1" @@ -1099,6 +1141,12 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" @@ -1111,12 +1159,24 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -1129,11 +1189,18 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index a654bb0..f857e57 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" whistle_common = { path = "../common/" } whistle_parser = { path = "../parser/" } whistle_ast = { path = "../ast/" } -wasm-encoder = "0.16.0" +wasm-encoder = "0.32.0" byteorder = "1.4.3" diff --git a/examples/add.whi b/examples/add.whi index c535e12..5215004 100644 --- a/examples/add.whi +++ b/examples/add.whi @@ -1,7 +1,7 @@ -fn _add(a: i32, b: i32): i32 { +fn _add(a: u32, b: u32): u32 { return a + b } -export fn add(a: i32, b: i32): i32 { - _add(a, b) +export fn add(a: u32, b: u32): u32 { + return _add(a, b) } \ No newline at end of file diff --git a/examples/import.whi b/examples/import.whi index ec93617..ace4c99 100644 --- a/examples/import.whi +++ b/examples/import.whi @@ -1,5 +1,5 @@ -import { add } from "x" +import { add } from "./add.whi" export fn helloWorld(): i32 { - return add(1+2) + return add(1, 2) } diff --git a/examples/lunatic.whi b/examples/lunatic.whi index cfcd015..4389c72 100644 --- a/examples/lunatic.whi +++ b/examples/lunatic.whi @@ -1,8 +1,8 @@ -extern "lunatic::message" { - fn create_data(tag: i64, capacity: i64): none +extern "lunatic::process" { + fn sleep_ms(ms: i64): none } export fn main(): none { - create_data(30, 56) + sleep_ms(10000) } \ No newline at end of file diff --git a/parser/src/parsers/mod.rs b/parser/src/parsers/mod.rs index 381f1ba..fde81cb 100644 --- a/parser/src/parsers/mod.rs +++ b/parser/src/parsers/mod.rs @@ -11,6 +11,7 @@ use whistle_common::ParserHandler; pub use expr::*; pub use ident::*; pub use literal::*; +#[allow(ambiguous_glob_reexports)] pub use program::*; pub use stmt::*; pub use types::*; diff --git a/preprocessor/Cargo.toml b/preprocessor/Cargo.toml index 466084b..27a1931 100644 --- a/preprocessor/Cargo.toml +++ b/preprocessor/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" [dependencies] whistle_lexer = { path = "../lexer" } whistle_common ={ path = "../common"} -reqwest = { version = "0.11", features = ["blocking"] } -url = "2.3.1" \ No newline at end of file +reqwest = { version = "0.11.20", features = ["blocking"] } +url = "2.4.1" \ No newline at end of file diff --git a/test.wasm b/test.wasm deleted file mode 100644 index e3b57b679abb6f60a09505d22b29e20a8a3e462b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 112 zcmWN{F$#k~5Czcx$3&ys2NYOw3KT+Kh-*QxB&xfVV|Gn`GFtqlO;8g}!yAUj(6tERd@lqX DL30%8 From a5a9dd6d2a02650f66852d408d6930243f36b127 Mon Sep 17 00:00:00 2001 From: Dean Srebnik <49134864+load1n9@users.noreply.github.com> Date: Tue, 12 Sep 2023 15:24:42 -0400 Subject: [PATCH 03/11] feat: raw wasm tips --- compiler/src/checker/stmt.rs | 6 ++++++ compiler/src/compilers/mod.rs | 2 ++ compiler/src/compilers/program.rs | 5 +++-- compiler/src/compilers/stmt.rs | 12 ++++++++++++ compiler/src/compilers/tip.rs | 10 ++++++++++ compiler/src/compilers/types.rs | 13 +++++++++++++ examples/tip.whi | 3 +++ test.wasm | Bin 0 -> 71 bytes 8 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 compiler/src/compilers/tip.rs create mode 100644 examples/tip.whi create mode 100644 test.wasm diff --git a/compiler/src/checker/stmt.rs b/compiler/src/checker/stmt.rs index 36a12d1..e36a9ab 100644 --- a/compiler/src/checker/stmt.rs +++ b/compiler/src/checker/stmt.rs @@ -12,6 +12,7 @@ use whistle_ast::Stmt; use whistle_ast::Type; use whistle_common::CompilerHandler; use whistle_common::Span; +use whistle_common::Tip; pub fn check_stmt(checker: &mut Checker, stmt: &mut Stmt) -> Type { match stmt { @@ -32,6 +33,7 @@ pub fn check_stmt(checker: &mut Checker, stmt: &mut Stmt) -> Type { else_stmt, .. } => check_if(checker, cond, then_stmt, else_stmt), + Stmt::Tip { tip, span } => check_tip(checker, tip, span), Stmt::Assign { ident, rhs, span } => check_assign(checker, rhs, ident, span), Stmt::Expr { expr, .. } => check_expr_stmt(checker, expr), Stmt::Block { stmts, .. } => check_block(checker, stmts), @@ -76,6 +78,10 @@ pub fn check_if( Type::Primitive(Primitive::None) } +pub fn check_tip(_checker: &mut Checker, _tip: &mut Tip, _span: &mut Span) -> Type { + Type::Primitive(Primitive::None) +} + pub fn check_val_decl( checker: &mut Checker, ident: &mut IdentTyped, diff --git a/compiler/src/compilers/mod.rs b/compiler/src/compilers/mod.rs index dbd2299..09b5246 100644 --- a/compiler/src/compilers/mod.rs +++ b/compiler/src/compilers/mod.rs @@ -11,12 +11,14 @@ mod external; mod program; mod stmt; mod types; +mod tip; pub use expr::*; pub use external::*; pub use program::*; pub use stmt::*; pub use types::*; +pub use tip::*; pub fn compile_all(compiler: &mut Compiler, grammar: Grammar) -> Vec { compiler.module.memories.memory(compiler.memory.alloc()); diff --git a/compiler/src/compilers/program.rs b/compiler/src/compilers/program.rs index 7f1fbcc..883f258 100644 --- a/compiler/src/compilers/program.rs +++ b/compiler/src/compilers/program.rs @@ -44,9 +44,10 @@ pub fn compile_program(compiler: &mut Compiler, program: ProgramStmt) { imp_type: _imp_type, .. } => {} - _ => compiler + _ => { + compiler .handler - .throw(CompilerErrorKind::Unimplemented, program.span()), + .throw(CompilerErrorKind::Unimplemented, program.span())}, } } diff --git a/compiler/src/compilers/stmt.rs b/compiler/src/compilers/stmt.rs index a637ee0..e96f482 100644 --- a/compiler/src/compilers/stmt.rs +++ b/compiler/src/compilers/stmt.rs @@ -1,4 +1,5 @@ use crate::compile_expr; +use crate::compile_tip_wasm_bytes; use crate::ident_type_to_val_type; use crate::Compiler; use crate::Function; @@ -14,6 +15,7 @@ use wasm_encoder::Instruction; use whistle_ast::Expr; use whistle_ast::IdentTyped; use whistle_ast::Stmt; +use whistle_common::Tip; pub fn compile_stmt(compiler: &mut Compiler, function: &mut Function, stmt: Stmt) { match stmt { @@ -31,6 +33,7 @@ pub fn compile_stmt(compiler: &mut Compiler, function: &mut Function, stmt: Stmt else_stmt, .. } => compile_if(compiler, function, cond, then_stmt, else_stmt), + Stmt::Tip { tip, span } => compile_tip(compiler, function, tip, span), Stmt::Expr { expr, .. } => compile_expr_stmt(compiler, function, expr), Stmt::Block { stmts, .. } => compile_block(compiler, function, stmts), Stmt::Return { ret_type, .. } => compile_return(compiler, function, ret_type), @@ -150,3 +153,12 @@ pub fn compile_assign( pub fn compile_expr_stmt(compiler: &mut Compiler, function: &mut Function, expr: Expr) { compile_expr(compiler, function, expr); } + +pub fn compile_tip(compiler: &mut Compiler, function: &mut Function, tip: Tip, span: Span) { + match tip.ident.as_str() { + "wasm_bytes" => compile_tip_wasm_bytes(compiler, function, tip, span), + _ => compiler + .handler + .throw(CompilerErrorKind::Unimplemented, span) + } +} \ No newline at end of file diff --git a/compiler/src/compilers/tip.rs b/compiler/src/compilers/tip.rs new file mode 100644 index 0000000..5235533 --- /dev/null +++ b/compiler/src/compilers/tip.rs @@ -0,0 +1,10 @@ +use whistle_common::{Tip, Span}; + +use crate::{Compiler, Function}; + + +pub fn compile_tip_wasm_bytes(_compiler: &mut Compiler, function: &mut Function, tip: Tip, _span: Span) { + let raw_data = tip.value.split(",").map(|s| s.trim()).collect::>(); + let data = raw_data.iter().map(|s| s.parse::().unwrap()).collect::>(); + function.raw(data); +} \ No newline at end of file diff --git a/compiler/src/compilers/types.rs b/compiler/src/compilers/types.rs index 2de7703..7862b3e 100644 --- a/compiler/src/compilers/types.rs +++ b/compiler/src/compilers/types.rs @@ -235,6 +235,8 @@ pub fn operator_to_ident_type(op: &Operator, lhs: &Type) -> Result { pub ident: String, pub instructions: Vec>, + pub raw: Vec, + pub is_raw: bool, locals: Vec<(u32, ValType)>, } @@ -243,6 +245,8 @@ impl<'a> Function<'a> { Function { ident, instructions: Vec::new(), + raw: Vec::new(), + is_raw: false, locals: Vec::new(), } } @@ -253,6 +257,11 @@ impl<'a> Function<'a> { self } + pub fn raw(&mut self, raw: Vec) { + self.is_raw = true; + self.raw = raw; + } + pub fn local(&mut self, idx: u32, val_type: ValType) -> &mut Self { self.locals.push((idx, val_type)); // println!("{:?}", (idx, val_type)); @@ -264,6 +273,10 @@ impl From> for wasm_encoder::Function { fn from(function: Function) -> wasm_encoder::Function { let locals: Vec<_> = function.locals.iter().map(|(_, l)| *l).collect(); let mut res = wasm_encoder::Function::new_with_locals_types(locals); + if function.is_raw { + res.raw::>(function.raw); + return res; + } for instruction in function.instructions { res.instruction(&instruction); } diff --git a/examples/tip.whi b/examples/tip.whi new file mode 100644 index 0000000..1f46b38 --- /dev/null +++ b/examples/tip.whi @@ -0,0 +1,3 @@ +export fn test(x: i32) { + #(wasm_bytes) 0,15,11 +} \ No newline at end of file diff --git a/test.wasm b/test.wasm new file mode 100644 index 0000000000000000000000000000000000000000..8aac40c7afe4baff1be9faa8a1f4b524cd61cf51 GIT binary patch literal 71 zcmWN{F%Ezr5JkcFmj$B~#v^$XDJY4F&{%nODW)4rZvqr`>BB^rT*M%h#B!LA+6Sao R+x@)8Dz+qtJ?A-2GCvdl2VVdH literal 0 HcmV?d00001 From eeeb2c2b21b634bf91198bbd6a8585386a2ef551 Mon Sep 17 00:00:00 2001 From: Dean Srebnik <49134864+load1n9@users.noreply.github.com> Date: Tue, 12 Sep 2023 15:24:57 -0400 Subject: [PATCH 04/11] feat: raw wasm tips --- test.wasm | Bin 71 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test.wasm diff --git a/test.wasm b/test.wasm deleted file mode 100644 index 8aac40c7afe4baff1be9faa8a1f4b524cd61cf51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 71 zcmWN{F%Ezr5JkcFmj$B~#v^$XDJY4F&{%nODW)4rZvqr`>BB^rT*M%h#B!LA+6Sao R+x@)8Dz+qtJ?A-2GCvdl2VVdH From dd022f90d14801ec6cd96da41534466dc67bdb9d Mon Sep 17 00:00:00 2001 From: Dean Srebnik <49134864+load1n9@users.noreply.github.com> Date: Tue, 12 Sep 2023 19:41:39 -0400 Subject: [PATCH 05/11] feat: raw wasm tips --- Cargo.lock | 73 ++++++++++++++++++++++++++++++- ast/src/lib.rs | 5 +++ compiler/Cargo.toml | 3 ++ compiler/src/compilers/program.rs | 15 ++++--- compiler/src/compilers/tip.rs | 33 +++++++++++--- examples/add.whi | 6 +-- examples/tip.whi | 7 ++- 7 files changed, 120 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1f540fa..b2bc557 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,6 +11,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "anyhow" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + [[package]] name = "atty" version = "0.2.14" @@ -110,6 +116,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "fastrand" version = "1.8.0" @@ -209,7 +221,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.2", "slab", "tokio", "tokio-util", @@ -222,6 +234,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -319,7 +337,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", ] [[package]] @@ -618,6 +646,12 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" + [[package]] name = "serde" version = "1.0.149" @@ -935,6 +969,38 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasmparser" +version = "0.112.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e986b010f47fcce49cf8ea5d5f9e5d2737832f12b53ae8ae785bbe895d0877bf" +dependencies = [ + "indexmap 2.0.0", + "semver", +] + +[[package]] +name = "wasmprinter" +version = "0.2.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34ddf5892036cd4b780d505eff1194a0cbc10ed896097656fdcea3744b5e7c2f" +dependencies = [ + "anyhow", + "wasmparser", +] + +[[package]] +name = "wast" +version = "64.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" +dependencies = [ + "leb128", + "memchr", + "unicode-width", + "wasm-encoder", +] + [[package]] name = "web-sys" version = "0.3.60" @@ -975,6 +1041,9 @@ version = "0.1.0" dependencies = [ "byteorder", "wasm-encoder", + "wasmparser", + "wasmprinter", + "wast", "whistle_ast", "whistle_common", "whistle_parser", diff --git a/ast/src/lib.rs b/ast/src/lib.rs index 9d51fa4..70d0db0 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -342,6 +342,10 @@ pub enum ProgramStmt { stmt: Stmt, span: Span, }, + Tip { + tip: Tip, + span: Span, + }, } impl ProgramStmt { @@ -355,6 +359,7 @@ impl ProgramStmt { ProgramStmt::StructDecl { span, .. } => span.clone(), ProgramStmt::TypeDecl { span, .. } => span.clone(), ProgramStmt::Stmt { span, .. } => span.clone(), + ProgramStmt::Tip { span, .. } => span.clone(), } } } diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index f857e57..cbe4c6a 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -9,4 +9,7 @@ whistle_common = { path = "../common/" } whistle_parser = { path = "../parser/" } whistle_ast = { path = "../ast/" } wasm-encoder = "0.32.0" +wast = "64.0.0" +wasmprinter = "0.2.64" +wasmparser = "0.112.0" byteorder = "1.4.3" diff --git a/compiler/src/compilers/program.rs b/compiler/src/compilers/program.rs index 883f258..14ffc63 100644 --- a/compiler/src/compilers/program.rs +++ b/compiler/src/compilers/program.rs @@ -44,10 +44,9 @@ pub fn compile_program(compiler: &mut Compiler, program: ProgramStmt) { imp_type: _imp_type, .. } => {} - _ => { - compiler + _ => compiler .handler - .throw(CompilerErrorKind::Unimplemented, program.span())}, + .throw(CompilerErrorKind::Unimplemented, program.span()), } } @@ -61,7 +60,6 @@ pub fn compile_fn( stmts: Vec, ) { // TODO: Inline functions, would be done with a new field in the Compiler struct - let sym = compiler.get_sym(&ident).unwrap().clone(); compiler.scope.enter_curr_scope(); let mut types = Vec::new(); @@ -69,14 +67,17 @@ pub fn compile_fn( types.push(ident_type_to_val_type(param.type_ident.to_type())); } - let encoded_ret_type = if let IdentType::Primitive { .. } = ret_type { + let ret_type = ret_type.to_type(); + + let encoded_ret_type = if ret_type == Type::Primitive(whistle_common::Primitive::None) { vec![] } else { - vec![ident_type_to_val_type(ret_type.to_type())] + vec![ident_type_to_val_type(ret_type)] }; - compiler.module.types.function(types, encoded_ret_type); + let sym = compiler.get_sym(&ident).unwrap().clone(); compiler.module.fns.function(sym.0); + compiler.module.types.function(types, encoded_ret_type); if export { compiler.module.exports.export( if &ident == "main" { "_start" } else { &ident }, diff --git a/compiler/src/compilers/tip.rs b/compiler/src/compilers/tip.rs index 5235533..b2f09f3 100644 --- a/compiler/src/compilers/tip.rs +++ b/compiler/src/compilers/tip.rs @@ -1,10 +1,31 @@ -use whistle_common::{Tip, Span}; +use whistle_common::Tip; use crate::{Compiler, Function}; +pub fn compile_tip_wasm_bytes( + _compiler: &mut Compiler, + function: &mut Function, + tip: Tip, + _span: whistle_common::Span, +) { + let raw_data = tip + .value + .split(",") + .map(|s| s.trim()) + .collect::>(); + let data = raw_data + .iter() + .map(|s| s.parse::().unwrap()) + .collect::>(); + function.raw(data); +} -pub fn compile_tip_wasm_bytes(_compiler: &mut Compiler, function: &mut Function, tip: Tip, _span: Span) { - let raw_data = tip.value.split(",").map(|s| s.trim()).collect::>(); - let data = raw_data.iter().map(|s| s.parse::().unwrap()).collect::>(); - function.raw(data); -} \ No newline at end of file +pub fn compile_tip_wast(compiler: &mut Compiler, tip: Tip, _span: whistle_common::Span) { + let lexer = wast::lexer::Lexer::new(tip.value.as_str()); + let buf = wast::parser::ParseBuffer::new_with_lexer(lexer).unwrap(); + let ast = wast::parser::parse::(&buf) + .unwrap() + .encode() + .unwrap(); + compiler.module.code.raw(&ast); +} diff --git a/examples/add.whi b/examples/add.whi index 5215004..b0c4652 100644 --- a/examples/add.whi +++ b/examples/add.whi @@ -1,7 +1,3 @@ -fn _add(a: u32, b: u32): u32 { +export fn add(a: i32, b: i32): i32 { return a + b } - -export fn add(a: u32, b: u32): u32 { - return _add(a, b) -} \ No newline at end of file diff --git a/examples/tip.whi b/examples/tip.whi index 1f46b38..3231bda 100644 --- a/examples/tip.whi +++ b/examples/tip.whi @@ -1,3 +1,6 @@ -export fn test(x: i32) { - #(wasm_bytes) 0,15,11 +export fn test() { + #(wasm_bytes) { + 0,15,11 + } + } \ No newline at end of file From d2798b80b02e62d3552fed8dfe0555a455d6f0d6 Mon Sep 17 00:00:00 2001 From: Dean Srebnik <49134864+load1n9@users.noreply.github.com> Date: Thu, 14 Sep 2023 08:35:51 -0400 Subject: [PATCH 06/11] feat: raw wasm tips --- examples/tip.whi | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/tip.whi b/examples/tip.whi index 3231bda..143f676 100644 --- a/examples/tip.whi +++ b/examples/tip.whi @@ -1,6 +1,9 @@ export fn test() { #(wasm_bytes) { - 0,15,11 - } - -} \ No newline at end of file + 65, + 0, + 16, + 0, + 11 + } +} From 53af2e1a3af10ef75c4eca8d8449ead63278ade9 Mon Sep 17 00:00:00 2001 From: Dean Srebnik <49134864+load1n9@users.noreply.github.com> Date: Mon, 18 Sep 2023 16:39:29 -0400 Subject: [PATCH 07/11] chore: cleanup --- Cargo.lock | 73 +--------------------------------- compiler/Cargo.toml | 3 -- compiler/src/compilers/tip.rs | 9 ----- test.wasm | Bin 0 -> 72 bytes 4 files changed, 2 insertions(+), 83 deletions(-) create mode 100644 test.wasm diff --git a/Cargo.lock b/Cargo.lock index b2bc557..1f540fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,12 +11,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "anyhow" -version = "1.0.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" - [[package]] name = "atty" version = "0.2.14" @@ -116,12 +110,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - [[package]] name = "fastrand" version = "1.8.0" @@ -221,7 +209,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.2", + "indexmap", "slab", "tokio", "tokio-util", @@ -234,12 +222,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" - [[package]] name = "hermit-abi" version = "0.1.19" @@ -337,17 +319,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" -dependencies = [ - "equivalent", - "hashbrown 0.14.0", + "hashbrown", ] [[package]] @@ -646,12 +618,6 @@ dependencies = [ "libc", ] -[[package]] -name = "semver" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" - [[package]] name = "serde" version = "1.0.149" @@ -969,38 +935,6 @@ dependencies = [ "leb128", ] -[[package]] -name = "wasmparser" -version = "0.112.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e986b010f47fcce49cf8ea5d5f9e5d2737832f12b53ae8ae785bbe895d0877bf" -dependencies = [ - "indexmap 2.0.0", - "semver", -] - -[[package]] -name = "wasmprinter" -version = "0.2.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ddf5892036cd4b780d505eff1194a0cbc10ed896097656fdcea3744b5e7c2f" -dependencies = [ - "anyhow", - "wasmparser", -] - -[[package]] -name = "wast" -version = "64.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" -dependencies = [ - "leb128", - "memchr", - "unicode-width", - "wasm-encoder", -] - [[package]] name = "web-sys" version = "0.3.60" @@ -1041,9 +975,6 @@ version = "0.1.0" dependencies = [ "byteorder", "wasm-encoder", - "wasmparser", - "wasmprinter", - "wast", "whistle_ast", "whistle_common", "whistle_parser", diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index cbe4c6a..f857e57 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -9,7 +9,4 @@ whistle_common = { path = "../common/" } whistle_parser = { path = "../parser/" } whistle_ast = { path = "../ast/" } wasm-encoder = "0.32.0" -wast = "64.0.0" -wasmprinter = "0.2.64" -wasmparser = "0.112.0" byteorder = "1.4.3" diff --git a/compiler/src/compilers/tip.rs b/compiler/src/compilers/tip.rs index b2f09f3..2ee3b44 100644 --- a/compiler/src/compilers/tip.rs +++ b/compiler/src/compilers/tip.rs @@ -20,12 +20,3 @@ pub fn compile_tip_wasm_bytes( function.raw(data); } -pub fn compile_tip_wast(compiler: &mut Compiler, tip: Tip, _span: whistle_common::Span) { - let lexer = wast::lexer::Lexer::new(tip.value.as_str()); - let buf = wast::parser::ParseBuffer::new_with_lexer(lexer).unwrap(); - let ast = wast::parser::parse::(&buf) - .unwrap() - .encode() - .unwrap(); - compiler.module.code.raw(&ast); -} diff --git a/test.wasm b/test.wasm new file mode 100644 index 0000000000000000000000000000000000000000..9e00bf6cf670d29c182061acda0402310967ff94 GIT binary patch literal 72 zcmWN{ITC;%5JkcFVZ?<*kHk$dAe^#FNW8rSoi%rN0WwtxB2FfjD3ru{1skmoNZ$N; QzrZezO^L!u&hr#9KLv^hBme*a literal 0 HcmV?d00001 From a4b93435a5d3907b535e894a42300cf6f44c99db Mon Sep 17 00:00:00 2001 From: Dean Srebnik <49134864+load1n9@users.noreply.github.com> Date: Mon, 18 Sep 2023 16:50:46 -0400 Subject: [PATCH 08/11] chore: fmt --- compiler/src/compilers/mod.rs | 4 ++-- compiler/src/compilers/stmt.rs | 4 ++-- compiler/src/compilers/tip.rs | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/compiler/src/compilers/mod.rs b/compiler/src/compilers/mod.rs index 09b5246..d3122fb 100644 --- a/compiler/src/compilers/mod.rs +++ b/compiler/src/compilers/mod.rs @@ -10,15 +10,15 @@ mod expr; mod external; mod program; mod stmt; -mod types; mod tip; +mod types; pub use expr::*; pub use external::*; pub use program::*; pub use stmt::*; -pub use types::*; pub use tip::*; +pub use types::*; pub fn compile_all(compiler: &mut Compiler, grammar: Grammar) -> Vec { compiler.module.memories.memory(compiler.memory.alloc()); diff --git a/compiler/src/compilers/stmt.rs b/compiler/src/compilers/stmt.rs index e96f482..b8aa042 100644 --- a/compiler/src/compilers/stmt.rs +++ b/compiler/src/compilers/stmt.rs @@ -159,6 +159,6 @@ pub fn compile_tip(compiler: &mut Compiler, function: &mut Function, tip: Tip, s "wasm_bytes" => compile_tip_wasm_bytes(compiler, function, tip, span), _ => compiler .handler - .throw(CompilerErrorKind::Unimplemented, span) + .throw(CompilerErrorKind::Unimplemented, span), } -} \ No newline at end of file +} diff --git a/compiler/src/compilers/tip.rs b/compiler/src/compilers/tip.rs index 2ee3b44..3a7b058 100644 --- a/compiler/src/compilers/tip.rs +++ b/compiler/src/compilers/tip.rs @@ -19,4 +19,3 @@ pub fn compile_tip_wasm_bytes( .collect::>(); function.raw(data); } - From 3f33d6072d9bde91a8fd94aeefa960b667a3b167 Mon Sep 17 00:00:00 2001 From: Dean Srebnik <49134864+load1n9@users.noreply.github.com> Date: Mon, 18 Sep 2023 16:53:17 -0400 Subject: [PATCH 09/11] chore: bump version --- Cargo.lock | 14 +++++++------- ast/Cargo.toml | 2 +- cli/Cargo.toml | 2 +- common/Cargo.toml | 2 +- compiler/Cargo.toml | 2 +- lexer/Cargo.toml | 2 +- parser/Cargo.toml | 2 +- preprocessor/Cargo.toml | 2 +- test.wasm | Bin 72 -> 0 bytes 9 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 test.wasm diff --git a/Cargo.lock b/Cargo.lock index 1f540fa..917366e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -947,14 +947,14 @@ dependencies = [ [[package]] name = "whistle_ast" -version = "0.1.0" +version = "0.1.1" dependencies = [ "whistle_common", ] [[package]] name = "whistle_cli" -version = "0.1.0" +version = "0.1.1" dependencies = [ "clap", "whistle_ast", @@ -967,11 +967,11 @@ dependencies = [ [[package]] name = "whistle_common" -version = "0.1.0" +version = "0.1.1" [[package]] name = "whistle_compiler" -version = "0.1.0" +version = "0.1.1" dependencies = [ "byteorder", "wasm-encoder", @@ -982,14 +982,14 @@ dependencies = [ [[package]] name = "whistle_lexer" -version = "0.1.0" +version = "0.1.1" dependencies = [ "whistle_common", ] [[package]] name = "whistle_parser" -version = "0.1.0" +version = "0.1.1" dependencies = [ "whistle_ast", "whistle_common", @@ -999,7 +999,7 @@ dependencies = [ [[package]] name = "whistle_preprocessor" -version = "0.1.0" +version = "0.1.1" dependencies = [ "reqwest", "url", diff --git a/ast/Cargo.toml b/ast/Cargo.toml index 582a2f9..214bd88 100644 --- a/ast/Cargo.toml +++ b/ast/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "whistle_ast" -version = "0.1.0" +version = "0.1.1" authors = ["the Whistle authors"] edition = "2021" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index bc58b12..96261cd 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "whistle_cli" -version = "0.1.0" +version = "0.1.1" authors = ["the Whistle authors"] edition = "2021" diff --git a/common/Cargo.toml b/common/Cargo.toml index bbb8ed0..c67cb0c 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -1,5 +1,5 @@ [package] name = "whistle_common" -version = "0.1.0" +version = "0.1.1" authors = ["the Whistle authors"] edition = "2021" diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index f857e57..f99f615 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "whistle_compiler" -version = "0.1.0" +version = "0.1.1" authors = ["the Whistle authors"] edition = "2021" diff --git a/lexer/Cargo.toml b/lexer/Cargo.toml index 34654ef..16a8ba6 100644 --- a/lexer/Cargo.toml +++ b/lexer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "whistle_lexer" -version = "0.1.0" +version = "0.1.1" authors = ["the Whistle authors"] edition = "2021" diff --git a/parser/Cargo.toml b/parser/Cargo.toml index a4b6074..ab05649 100644 --- a/parser/Cargo.toml +++ b/parser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "whistle_parser" -version = "0.1.0" +version = "0.1.1" authors = ["the Whistle authors"] edition = "2021" diff --git a/preprocessor/Cargo.toml b/preprocessor/Cargo.toml index 27a1931..8866e49 100644 --- a/preprocessor/Cargo.toml +++ b/preprocessor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "whistle_preprocessor" -version = "0.1.0" +version = "0.1.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/test.wasm b/test.wasm deleted file mode 100644 index 9e00bf6cf670d29c182061acda0402310967ff94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 72 zcmWN{ITC;%5JkcFVZ?<*kHk$dAe^#FNW8rSoi%rN0WwtxB2FfjD3ru{1skmoNZ$N; QzrZezO^L!u&hr#9KLv^hBme*a From cfbdcfca709a3cde4af3452a44b690fead521023 Mon Sep 17 00:00:00 2001 From: Dean Srebnik <49134864+load1n9@users.noreply.github.com> Date: Mon, 18 Sep 2023 17:36:29 -0400 Subject: [PATCH 10/11] feat: new whistle cli --- Cargo.lock | 3094 +++++++++++++++++++++++++++++++++++------- LICENSE | 2 +- cli/Cargo.toml | 26 +- cli/src/lsp.rs | 3 + cli/src/lsp/lsp.rs | 163 +++ cli/src/main.rs | 260 ++-- cli/src/util.rs | 2 +- examples/lunatic.whi | 2 +- examples/wasi.whi | 2 +- 9 files changed, 2915 insertions(+), 639 deletions(-) create mode 100644 cli/src/lsp.rs create mode 100644 cli/src/lsp/lsp.rs diff --git a/Cargo.lock b/Cargo.lock index 917366e..7cffcde 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,23 +3,121 @@ version = 3 [[package]] -name = "ansi_term" -version = "0.12.1" +name = "addr2line" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ - "winapi", + "gimli", ] [[package]] -name = "atty" -version = "0.2.14" +name = "ahash" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "hermit-abi", - "libc", - "winapi", + "cfg-if", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2135563fb5c609d2b2b87c1e8ce7bc41b0b45430fa9661f457981503dd5bf0" +dependencies = [ + "memchr", +] + +[[package]] +name = "ambient-authority" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" + +[[package]] +name = "anstream" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +dependencies = [ + "anstyle", + "windows-sys 0.48.0", +] + +[[package]] +name = "anyhow" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "arbitrary" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" + +[[package]] +name = "async-trait" +version = "0.1.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.37", +] + +[[package]] +name = "auto_impl" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.105", ] [[package]] @@ -34,12 +132,36 @@ version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + [[package]] name = "bumpalo" version = "3.11.1" @@ -54,15 +176,81 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.3.0" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "cap-fs-ext" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b779b2d0a001c125b4584ad586268fb4b92d957bff8d26d7fe0dd78283faa814" +dependencies = [ + "cap-primitives", + "cap-std", + "io-lifetimes", + "windows-sys 0.48.0", +] + +[[package]] +name = "cap-primitives" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf30c373a3bee22c292b1b6a7a26736a38376840f1af3d2d806455edf8c3899" +dependencies = [ + "ambient-authority", + "fs-set-times", + "io-extras", + "io-lifetimes", + "ipnet", + "maybe-owned", + "rustix", + "windows-sys 0.48.0", + "winx", +] + +[[package]] +name = "cap-rand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "577de6cff7c2a47d6b13efe5dd28bf116bd7f8f7db164ea95b7cc2640711f522" +dependencies = [ + "ambient-authority", + "rand", +] + +[[package]] +name = "cap-std" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84bade423fa6403efeebeafe568fdb230e8c590a275fba2ba978dd112efcf6e9" +dependencies = [ + "cap-primitives", + "io-extras", + "io-lifetimes", + "rustix", +] + +[[package]] +name = "cap-time-ext" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "f8f52b3c8f4abfe3252fd0a071f3004aaa3b18936ec97bdbd8763ce03aff6247" +dependencies = [ + "cap-primitives", + "once_cell", + "rustix", + "winx", +] [[package]] name = "cc" version = "1.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" +dependencies = [ + "jobserver", +] [[package]] name = "cfg-if" @@ -72,19 +260,50 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "2.34.0" +version = "4.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" dependencies = [ - "ansi_term", - "atty", - "bitflags", + "anstream", + "anstyle", + "clap_lex", "strsim", - "textwrap", - "unicode-width", - "vec_map", ] +[[package]] +name = "clap_derive" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.37", +] + +[[package]] +name = "clap_lex" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "core-foundation" version = "0.9.3" @@ -102,837 +321,2555 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] -name = "encoding_rs" -version = "0.8.31" +name = "cpp_demangle" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" dependencies = [ "cfg-if", ] [[package]] -name = "fastrand" -version = "1.8.0" +name = "cpufeatures" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ - "instant", + "libc", ] [[package]] -name = "fnv" -version = "1.0.7" +name = "cranelift-bforest" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "5a91a1ccf6fb772808742db2f51e2179f25b1ec559cbe39ea080c72ff61caf8f" +dependencies = [ + "cranelift-entity", +] [[package]] -name = "foreign-types" -version = "0.3.2" +name = "cranelift-codegen" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +checksum = "169db1a457791bff4fd1fc585bb5cc515609647e0420a7d5c98d7700c59c2d00" dependencies = [ - "foreign-types-shared", + "bumpalo", + "cranelift-bforest", + "cranelift-codegen-meta", + "cranelift-codegen-shared", + "cranelift-control", + "cranelift-entity", + "cranelift-isle", + "gimli", + "hashbrown 0.13.2", + "log", + "regalloc2", + "smallvec", + "target-lexicon", ] [[package]] -name = "foreign-types-shared" -version = "0.1.1" +name = "cranelift-codegen-meta" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +checksum = "3486b93751ef19e6d6eef66d2c0e83ed3d2ba01da1919ed2747f2f7bd8ba3419" +dependencies = [ + "cranelift-codegen-shared", +] [[package]] -name = "form_urlencoded" -version = "1.2.0" +name = "cranelift-codegen-shared" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "86a1205ab18e7cd25dc4eca5246e56b506ced3feb8d95a8d776195e48d2cd4ef" + +[[package]] +name = "cranelift-control" +version = "0.99.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b108cae0f724ddfdec1871a0dc193a607e0c2d960f083cfefaae8ccf655eff2" dependencies = [ - "percent-encoding", + "arbitrary", ] [[package]] -name = "futures-channel" -version = "0.3.25" +name = "cranelift-entity" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "720444006240622798665bfc6aa8178e2eed556da342fda62f659c5267c3c659" dependencies = [ - "futures-core", + "serde", ] [[package]] -name = "futures-core" -version = "0.3.25" +name = "cranelift-frontend" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "b7a94c4c5508b7407e125af9d5320694b7423322e59a4ac0d07919ae254347ca" +dependencies = [ + "cranelift-codegen", + "log", + "smallvec", + "target-lexicon", +] [[package]] -name = "futures-io" -version = "0.3.25" +name = "cranelift-isle" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "ef1f888d0845dcd6be4d625b91d9d8308f3d95bed5c5d4072ce38e1917faa505" [[package]] -name = "futures-sink" -version = "0.3.25" +name = "cranelift-native" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "9ad5966da08f1e96a3ae63be49966a85c9b249fa465f8cf1b66469a82b1004a0" +dependencies = [ + "cranelift-codegen", + "libc", + "target-lexicon", +] [[package]] -name = "futures-task" -version = "0.3.25" +name = "cranelift-wasm" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "0d8635c88b424f1d232436f683a301143b36953cd98fc6f86f7bac862dfeb6f5" +dependencies = [ + "cranelift-codegen", + "cranelift-entity", + "cranelift-frontend", + "itertools", + "log", + "smallvec", + "wasmparser 0.110.0", + "wasmtime-types", +] [[package]] -name = "futures-util" -version = "0.3.25" +name = "crc32fast" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "futures-core", - "futures-io", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", + "cfg-if", ] [[package]] -name = "h2" -version = "0.3.15" +name = "crossbeam-channel" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", + "cfg-if", + "crossbeam-utils", ] [[package]] -name = "hashbrown" -version = "0.12.3" +name = "crossbeam-deque" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "crossbeam-epoch" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ - "libc", + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", + "scopeguard", ] [[package]] -name = "http" -version = "0.2.8" +name = "crossbeam-utils" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ - "bytes", - "fnv", - "itoa", + "cfg-if", ] [[package]] -name = "http-body" -version = "0.4.5" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "bytes", - "http", - "pin-project-lite", + "generic-array", + "typenum", ] [[package]] -name = "httparse" -version = "1.8.0" +name = "dashmap" +version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" +dependencies = [ + "cfg-if", + "hashbrown 0.12.3", + "lock_api", + "once_cell", + "parking_lot_core", +] [[package]] -name = "httpdate" -version = "1.0.2" +name = "debugid" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "uuid", +] [[package]] -name = "hyper" -version = "0.14.23" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", + "block-buffer", + "crypto-common", ] [[package]] -name = "hyper-tls" -version = "0.5.0" +name = "directories-next" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", + "cfg-if", + "dirs-sys-next", ] [[package]] -name = "idna" -version = "0.4.0" +name = "dirs" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "dirs-sys", ] [[package]] -name = "indexmap" -version = "1.9.2" +name = "dirs-sys" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ - "autocfg", - "hashbrown", + "libc", + "redox_users", + "winapi", ] [[package]] -name = "instant" -version = "0.1.12" +name = "dirs-sys-next" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "encoding_rs" +version = "0.8.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ "cfg-if", ] [[package]] -name = "ipnet" -version = "2.5.1" +name = "env_logger" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745" +checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", +] [[package]] -name = "itoa" -version = "1.0.4" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "js-sys" -version = "0.3.60" +name = "errno" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ - "wasm-bindgen", + "errno-dragonfly", + "libc", + "windows-sys 0.48.0", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "errno-dragonfly" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] [[package]] -name = "leb128" -version = "0.2.5" +name = "fallible-iterator" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] -name = "libc" -version = "0.2.138" +name = "fastrand" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] [[package]] -name = "log" -version = "0.4.17" +name = "fd-lock" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "0b0377f1edc77dbd1118507bc7a66e4ab64d2b90c66f90726dc801e73a8c68f9" dependencies = [ "cfg-if", + "rustix", + "windows-sys 0.48.0", ] [[package]] -name = "memchr" -version = "2.5.0" +name = "file-per-thread-logger" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8a3cc21c33af89af0930c8cae4ade5e6fdc17b5d2c97b3d2e2edb67a1cf683f3" +dependencies = [ + "env_logger", + "log", +] [[package]] -name = "mime" -version = "0.3.16" +name = "fnv" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "mio" -version = "0.8.5" +name = "foreign-types" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "libc", - "log", - "wasi", - "windows-sys 0.42.0", + "foreign-types-shared", ] [[package]] -name = "native-tls" -version = "0.2.11" +name = "foreign-types-shared" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", + "percent-encoding", ] [[package]] -name = "num_cpus" -version = "1.14.0" +name = "fs-set-times" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" +checksum = "dd738b84894214045e8414eaded76359b4a5773f0a0a56b16575110739cdcf39" dependencies = [ - "hermit-abi", - "libc", + "io-lifetimes", + "rustix", + "windows-sys 0.48.0", ] [[package]] -name = "once_cell" -version = "1.16.0" +name = "futures" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] [[package]] -name = "openssl" -version = "0.10.44" +name = "futures-channel" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d971fd5722fec23977260f6e81aa67d2f22cadbdc2aa049f1022d9a3be1566" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", + "futures-core", + "futures-sink", ] [[package]] -name = "openssl-macros" -version = "0.1.0" +name = "futures-core" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-executor" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ - "proc-macro2", - "quote", - "syn", + "futures-core", + "futures-task", + "futures-util", ] [[package]] -name = "openssl-probe" -version = "0.1.5" +name = "futures-io" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] -name = "openssl-sys" -version = "0.9.79" +name = "futures-macro" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5454462c0eced1e97f2ec09036abc8da362e66802f66fd20f86854d9d8cbcbc4" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ - "autocfg", - "cc", - "libc", - "pkg-config", - "vcpkg", + "proc-macro2", + "quote", + "syn 2.0.37", ] [[package]] -name = "percent-encoding" -version = "2.3.0" +name = "futures-sink" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] -name = "pin-project-lite" -version = "0.2.9" +name = "futures-task" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] -name = "pin-utils" -version = "0.1.0" +name = "futures-util" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] [[package]] -name = "pkg-config" -version = "0.3.26" +name = "fxhash" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] [[package]] -name = "proc-macro2" -version = "1.0.47" +name = "fxprof-processed-profile" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" dependencies = [ - "unicode-ident", + "bitflags 2.4.0", + "debugid", + "fxhash", + "serde", + "serde_json", ] [[package]] -name = "quote" -version = "1.0.21" +name = "generic-array" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "proc-macro2", + "typenum", + "version_check", ] [[package]] -name = "redox_syscall" -version = "0.2.16" +name = "getrandom" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ - "bitflags", + "cfg-if", + "libc", + "wasi", ] [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "gimli" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ - "winapi", + "fallible-iterator", + "indexmap 1.9.2", + "stable_deref_trait", ] [[package]] -name = "reqwest" -version = "0.11.20" +name = "h2" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" dependencies = [ - "base64", "bytes", - "encoding_rs", + "fnv", "futures-core", + "futures-sink", "futures-util", - "h2", "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", + "indexmap 1.9.2", + "slab", "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "http" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", + "serde", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-extras" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d3c230ee517ee76b1cc593b52939ff68deda3fae9e41eca426c6b4993df51c4" +dependencies = [ + "io-lifetimes", + "windows-sys 0.48.0", +] + +[[package]] +name = "io-lifetimes" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bffb4def18c48926ccac55c1223e02865ce1a821751a95920448662696e7472c" + +[[package]] +name = "ipnet" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745" + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi 0.3.2", + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" + +[[package]] +name = "ittapi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41e0d0b7b3b53d92a7e8b80ede3400112a6b8b4c98d1f5b8b16bb787c780582c" +dependencies = [ + "anyhow", + "ittapi-sys", + "log", +] + +[[package]] +name = "ittapi-sys" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f8763c96e54e6d6a0dccc2990d8b5e33e3313aaeae6185921a3f4c1614a77c" +dependencies = [ + "cc", +] + +[[package]] +name = "jobserver" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +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 = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + +[[package]] +name = "libc" +version = "0.2.148" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" + +[[package]] +name = "linux-raw-sys" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "lsp-types" +version = "0.94.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66bfd44a06ae10647fe3f8214762e9369fd4248df1350924b4ef9e770a85ea1" +dependencies = [ + "bitflags 1.3.2", + "serde", + "serde_json", + "serde_repr", + "url", +] + +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] + +[[package]] +name = "maybe-owned" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memfd" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" +dependencies = [ + "rustix", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "mio" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.42.0", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num_cpus" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" +dependencies = [ + "hermit-abi 0.1.19", + "libc", +] + +[[package]] +name = "object" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "crc32fast", + "hashbrown 0.13.2", + "indexmap 1.9.2", + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" + +[[package]] +name = "openssl" +version = "0.10.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29d971fd5722fec23977260f6e81aa67d2f22cadbdc2aa049f1022d9a3be1566" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.105", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5454462c0eced1e97f2ec09036abc8da362e66802f66fd20f86854d9d8cbcbc4" +dependencies = [ + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.3.5", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.37", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.105", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "psm" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +dependencies = [ + "cc", +] + +[[package]] +name = "pulldown-cmark" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" +dependencies = [ + "bitflags 1.3.2", + "memchr", + "unicase", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_users" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +dependencies = [ + "getrandom", + "redox_syscall 0.2.16", + "thiserror", +] + +[[package]] +name = "regalloc2" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b4dcbd3a2ae7fb94b5813fa0e957c6ab51bf5d0a8ee1b69e0c2d0f1e6eb8485" +dependencies = [ + "hashbrown 0.13.2", + "log", + "rustc-hash", + "slice-group-by", + "smallvec", +] + +[[package]] +name = "regex" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi", +] + +[[package]] +name = "reqwest" +version = "0.11.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", "winreg", ] [[package]] -name = "ryu" -version = "1.0.11" +name = "ropey" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53ce7a2c43a32e50d666e33c5a80251b31147bb4b49024bcab11fb6f20c671ed" +dependencies = [ + "smallvec", + "str_indices", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustix" +version = "0.38.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +dependencies = [ + "bitflags 2.4.0", + "errno", + "itoa", + "libc", + "linux-raw-sys", + "once_cell", + "windows-sys 0.48.0", +] + +[[package]] +name = "ryu" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" + +[[package]] +name = "schannel" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +dependencies = [ + "lazy_static", + "windows-sys 0.36.1", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" + +[[package]] +name = "serde" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "256b9932320c590e707b94576e3cc1f7c9024d0ee6612dfbcf1cb106cbe8e055" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4eae9b04cbffdfd550eb462ed33bc6a1b68c935127d008b27444d08380f94e4" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.105", +] + +[[package]] +name = "serde_json" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.37", +] + +[[package]] +name = "serde_spanned" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shellexpand" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4" +dependencies = [ + "dirs", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + +[[package]] +name = "slice-group-by" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" + +[[package]] +name = "smallvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" + +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "sptr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "str_indices" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f026164926842ec52deb1938fae44f83dfdb82d0a5b0270c5bd5935ab74d6dd" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "syn" +version = "1.0.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "system-interface" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27ce32341b2c0b70c144bbf35627fdc1ef18c76ced5e5e7b3ee8b5ba6b2ab6a0" +dependencies = [ + "bitflags 2.4.0", + "cap-fs-ext", + "cap-std", + "fd-lock", + "io-lifetimes", + "rustix", + "windows-sys 0.48.0", + "winx", +] + +[[package]] +name = "target-lexicon" +version = "0.12.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" + +[[package]] +name = "tempfile" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +dependencies = [ + "cfg-if", + "fastrand", + "libc", + "redox_syscall 0.2.16", + "remove_dir_all", + "winapi", +] + +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.37", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "tokio" +version = "1.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +dependencies = [ + "autocfg", + "bytes", + "libc", + "memchr", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.45.0", +] + +[[package]] +name = "tokio-macros" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.105", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +dependencies = [ + "bytes", + "futures-core", + "futures-io", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.0.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-lsp" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ba052b54a6627628d9b3c34c176e7eda8359b7da9acd497b9f20998d118508" +dependencies = [ + "async-trait", + "auto_impl", + "bytes", + "dashmap", + "futures", + "httparse", + "lsp-types", + "memchr", + "serde", + "serde_json", + "tokio", + "tokio-util", + "tower", + "tower-lsp-macros", + "tracing", +] + +[[package]] +name = "tower-lsp-macros" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84fd902d4e0b9a4b27f2f440108dc034e1758628a9b702f8ec61ad66355422fa" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.37", +] + +[[package]] +name = "tower-service" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] -name = "schannel" -version = "0.1.20" +name = "tracing" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.37", +] + +[[package]] +name = "tracing-core" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ "lazy_static", - "windows-sys 0.36.1", + "log", + "tracing-core", ] [[package]] -name = "security-framework" -version = "2.7.0" +name = "tracing-subscriber" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", + "nu-ansi-term", + "sharded-slab", + "smallvec", + "thread_local", + "tracing-core", + "tracing-log", ] [[package]] -name = "security-framework-sys" -version = "2.6.1" +name = "try-lock" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ - "core-foundation-sys", - "libc", + "version_check", ] [[package]] -name = "serde" -version = "1.0.149" +name = "unicode-bidi" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256b9932320c590e707b94576e3cc1f7c9024d0ee6612dfbcf1cb106cbe8e055" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] -name = "serde_json" -version = "1.0.89" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ - "itoa", - "ryu", - "serde", + "tinyvec", ] [[package]] -name = "serde_urlencoded" -version = "0.7.1" +name = "unicode-width" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "url" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", - "itoa", - "ryu", + "idna", + "percent-encoding", "serde", ] [[package]] -name = "slab" -version = "0.4.7" +name = "utf8parse" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "uuid" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ - "autocfg", + "getrandom", + "rand", + "uuid-macro-internal", ] [[package]] -name = "socket2" -version = "0.4.7" +name = "uuid-macro-internal" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "f7e1ba1f333bd65ce3c9f27de592fcbc256dafe3af2717f56d7c87761fbaccf4" dependencies = [ - "libc", - "winapi", + "proc-macro2", + "quote", + "syn 2.0.37", ] [[package]] -name = "strsim" -version = "0.8.0" +name = "valuable" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] -name = "syn" -version = "1.0.105" +name = "vcpkg" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasi-cap-std-sync" +version = "12.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b8bb7213a65e753e110c36f904d9491e23c763183bd8aa82f5ce721ca647177" +dependencies = [ + "anyhow", + "async-trait", + "cap-fs-ext", + "cap-rand", + "cap-std", + "cap-time-ext", + "fs-set-times", + "io-extras", + "io-lifetimes", + "is-terminal", + "once_cell", + "rustix", + "system-interface", + "tracing", + "wasi-common", + "windows-sys 0.48.0", +] + +[[package]] +name = "wasi-common" +version = "12.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a99e7c55c22a7c776a2169bcd72a310806004e3d298151036f0452a6c3ebe56d" +dependencies = [ + "anyhow", + "bitflags 2.4.0", + "cap-rand", + "cap-std", + "io-extras", + "log", + "rustix", + "thiserror", + "tracing", + "wasmtime", + "wiggle", + "windows-sys 0.48.0", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ + "bumpalo", + "log", + "once_cell", "proc-macro2", "quote", - "unicode-ident", + "syn 1.0.105", + "wasm-bindgen-shared", ] [[package]] -name = "tempfile" -version = "3.3.0" +name = "wasm-bindgen-futures" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ "cfg-if", - "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] -name = "textwrap" -version = "0.11.0" +name = "wasm-bindgen-macro" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ - "unicode-width", + "quote", + "wasm-bindgen-macro-support", ] [[package]] -name = "tinyvec" -version = "1.6.0" +name = "wasm-bindgen-macro-support" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ - "tinyvec_macros", + "proc-macro2", + "quote", + "syn 1.0.105", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] -name = "tinyvec_macros" -version = "0.1.0" +name = "wasm-bindgen-shared" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] -name = "tokio" -version = "1.23.0" +name = "wasm-encoder" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46" +checksum = "41763f20eafed1399fff1afb466496d3a959f58241436cfdc17e3f5ca954de16" dependencies = [ - "autocfg", - "bytes", - "libc", - "memchr", - "mio", - "num_cpus", - "pin-project-lite", - "socket2", - "windows-sys 0.42.0", + "leb128", ] [[package]] -name = "tokio-native-tls" -version = "0.3.0" +name = "wasm-encoder" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" dependencies = [ - "native-tls", - "tokio", + "leb128", +] + +[[package]] +name = "wasmparser" +version = "0.110.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dfcdb72d96f01e6c85b6bf20102e7423bdbaad5c337301bab2bbf253d26413c" +dependencies = [ + "indexmap 2.0.0", + "semver", +] + +[[package]] +name = "wasmparser" +version = "0.112.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e986b010f47fcce49cf8ea5d5f9e5d2737832f12b53ae8ae785bbe895d0877bf" +dependencies = [ + "indexmap 2.0.0", + "semver", ] [[package]] -name = "tokio-util" -version = "0.7.4" +name = "wasmprinter" +version = "0.2.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "34ddf5892036cd4b780d505eff1194a0cbc10ed896097656fdcea3744b5e7c2f" dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", + "anyhow", + "wasmparser 0.112.0", ] [[package]] -name = "tower-service" -version = "0.3.2" +name = "wasmtime" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "c4e87029cc5760db9a3774aff4708596fe90c20ed2baeef97212e98b812fd0fc" +dependencies = [ + "anyhow", + "async-trait", + "bincode", + "bumpalo", + "cfg-if", + "encoding_rs", + "fxprof-processed-profile", + "indexmap 2.0.0", + "libc", + "log", + "object", + "once_cell", + "paste", + "psm", + "rayon", + "serde", + "serde_json", + "target-lexicon", + "wasm-encoder 0.31.1", + "wasmparser 0.110.0", + "wasmtime-cache", + "wasmtime-component-macro", + "wasmtime-component-util", + "wasmtime-cranelift", + "wasmtime-environ", + "wasmtime-fiber", + "wasmtime-jit", + "wasmtime-runtime", + "wasmtime-winch", + "wat", + "windows-sys 0.48.0", +] [[package]] -name = "tracing" -version = "0.1.37" +name = "wasmtime-asm-macros" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "96d84f68d831200016e120f2ee79d81b50cf4c4123112914aefb168d036d445d" dependencies = [ "cfg-if", - "pin-project-lite", - "tracing-core", ] [[package]] -name = "tracing-core" -version = "0.1.30" +name = "wasmtime-cache" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "31561fbbaa86d3c042696940bc9601146bf4aaec39ae725c86b5f1358d8d7023" dependencies = [ - "once_cell", + "anyhow", + "base64", + "bincode", + "directories-next", + "file-per-thread-logger", + "log", + "rustix", + "serde", + "sha2", + "toml 0.5.11", + "windows-sys 0.48.0", + "zstd", ] [[package]] -name = "try-lock" -version = "0.2.3" +name = "wasmtime-component-macro" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "8e7e07b8da23838e870c4c092027208ac546398a2ac4f5afff33a1ea1d763ec0" +dependencies = [ + "anyhow", + "proc-macro2", + "quote", + "syn 2.0.37", + "wasmtime-component-util", + "wasmtime-wit-bindgen", + "wit-parser", +] [[package]] -name = "unicode-bidi" -version = "0.3.13" +name = "wasmtime-component-util" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "74f421bc59c753dcd24e39601928a0f2915adf15f40d8ba0066c4cf23f92c9a0" [[package]] -name = "unicode-ident" -version = "1.0.5" +name = "wasmtime-cranelift" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "8ae8ed7a4845f22be6b1ad80f33f43fa03445b03a02f2d40dca695129769cd1a" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-control", + "cranelift-entity", + "cranelift-frontend", + "cranelift-native", + "cranelift-wasm", + "gimli", + "log", + "object", + "target-lexicon", + "thiserror", + "wasmparser 0.110.0", + "wasmtime-cranelift-shared", + "wasmtime-environ", + "wasmtime-versioned-export-macros", +] [[package]] -name = "unicode-normalization" -version = "0.1.22" +name = "wasmtime-cranelift-shared" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "86b17099f9320a1c481634d88101258917d5065717cf22b04ed75b1a8ea062b4" dependencies = [ - "tinyvec", + "anyhow", + "cranelift-codegen", + "cranelift-control", + "cranelift-native", + "gimli", + "object", + "target-lexicon", + "wasmtime-environ", ] [[package]] -name = "unicode-width" -version = "0.1.10" +name = "wasmtime-environ" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e8b9227b1001229ff125e0f76bf1d5b9dc4895e6bcfd5cc35a56f84685964ec7" +dependencies = [ + "anyhow", + "cranelift-entity", + "gimli", + "indexmap 2.0.0", + "log", + "object", + "serde", + "target-lexicon", + "thiserror", + "wasm-encoder 0.31.1", + "wasmparser 0.110.0", + "wasmprinter", + "wasmtime-component-util", + "wasmtime-types", +] [[package]] -name = "url" -version = "2.4.1" +name = "wasmtime-fiber" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "fc8c8410c03a79073ea06806ccde3da4854c646bd646b3b2707b99b3746c3f70" dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", + "cc", + "cfg-if", + "rustix", + "wasmtime-asm-macros", + "wasmtime-versioned-export-macros", + "windows-sys 0.48.0", ] [[package]] -name = "vcpkg" -version = "0.2.15" +name = "wasmtime-jit" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +checksum = "cce606b392c321d7272928003543447119ef937a9c3ebfce5c4bb0bf6b0f5bac" +dependencies = [ + "addr2line", + "anyhow", + "bincode", + "cfg-if", + "cpp_demangle", + "gimli", + "ittapi", + "log", + "object", + "rustc-demangle", + "rustix", + "serde", + "target-lexicon", + "wasmtime-environ", + "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", + "wasmtime-runtime", + "windows-sys 0.48.0", +] [[package]] -name = "vec_map" -version = "0.8.2" +name = "wasmtime-jit-debug" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +checksum = "aef27ea6c34ef888030d15560037fe7ef27a5609fbbba8e1e3e41dc4245f5bb2" +dependencies = [ + "object", + "once_cell", + "rustix", + "wasmtime-versioned-export-macros", +] [[package]] -name = "want" -version = "0.3.0" +name = "wasmtime-jit-icache-coherence" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "b59f94b0409221873565419168e20b5aedf18c4bd64de5c38acf8f0634efeee3" dependencies = [ - "log", - "try-lock", + "cfg-if", + "libc", + "windows-sys 0.48.0", ] [[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +name = "wasmtime-runtime" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ceb587a88ae5bb6ca248455a391aff29ac63329a404b2cdea36d91267c797db4" +dependencies = [ + "anyhow", + "cc", + "cfg-if", + "encoding_rs", + "indexmap 2.0.0", + "libc", + "log", + "mach", + "memfd", + "memoffset", + "paste", + "rand", + "rustix", + "sptr", + "wasm-encoder 0.31.1", + "wasmtime-asm-macros", + "wasmtime-environ", + "wasmtime-fiber", + "wasmtime-jit-debug", + "wasmtime-versioned-export-macros", + "windows-sys 0.48.0", +] [[package]] -name = "wasm-bindgen" -version = "0.2.83" +name = "wasmtime-types" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "77943729d4b46141538e8d0b6168915dc5f88575ecdfea26753fd3ba8bab244a" dependencies = [ - "cfg-if", - "wasm-bindgen-macro", + "cranelift-entity", + "serde", + "thiserror", + "wasmparser 0.110.0", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.83" +name = "wasmtime-versioned-export-macros" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "ca7af9bb3ee875c4907835e607a275d10b04d15623d3aebe01afe8fbd3f85050" dependencies = [ - "bumpalo", - "log", - "once_cell", "proc-macro2", "quote", - "syn", - "wasm-bindgen-shared", + "syn 2.0.37", ] [[package]] -name = "wasm-bindgen-futures" -version = "0.4.33" +name = "wasmtime-wasi" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +checksum = "50e107275b5a0144e2965985d14fac61fa46f804755e71c44eeef7b37510db54" dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", + "anyhow", + "async-trait", + "bitflags 2.4.0", + "bytes", + "cap-fs-ext", + "cap-rand", + "cap-std", + "cap-time-ext", + "fs-set-times", + "futures", + "io-extras", + "libc", + "once_cell", + "rustix", + "system-interface", + "thiserror", + "tokio", + "tracing", + "wasi-cap-std-sync", + "wasi-common", + "wasmtime", + "wiggle", + "windows-sys 0.48.0", ] [[package]] -name = "wasm-bindgen-macro" -version = "0.2.83" +name = "wasmtime-winch" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "bcdfbdbb400f63e4dfc6dd32f42c77484da58c9622cdd9e9aac238c7347afdf1" dependencies = [ - "quote", - "wasm-bindgen-macro-support", + "anyhow", + "cranelift-codegen", + "gimli", + "object", + "target-lexicon", + "wasmparser 0.110.0", + "wasmtime-cranelift-shared", + "wasmtime-environ", + "winch-codegen", ] [[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.83" +name = "wasmtime-wit-bindgen" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "14770d0820f56ba86cdd9987aef97cc3bacbb0394633c37dbfbc61ef29603a71" dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", + "anyhow", + "heck", + "indexmap 2.0.0", + "wit-parser", ] [[package]] -name = "wasm-bindgen-shared" -version = "0.2.83" +name = "wast" +version = "35.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68" +dependencies = [ + "leb128", +] [[package]] -name = "wasm-encoder" -version = "0.32.0" +name = "wast" +version = "64.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" +checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" dependencies = [ "leb128", + "memchr", + "unicode-width", + "wasm-encoder 0.32.0", +] + +[[package]] +name = "wat" +version = "1.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53253d920ab413fca1c7dc2161d601c79b4fdf631d0ba51dd4343bf9b556c3f6" +dependencies = [ + "wast 64.0.0", ] [[package]] @@ -957,6 +2894,19 @@ name = "whistle_cli" version = "0.1.1" dependencies = [ "clap", + "futures", + "ropey", + "serde", + "serde_json", + "tokio", + "tokio-util", + "toml 0.7.8", + "tower-lsp", + "tracing-subscriber", + "uuid", + "wasmprinter", + "wasmtime", + "wasmtime-wasi", "whistle_ast", "whistle_common", "whistle_compiler", @@ -974,7 +2924,7 @@ name = "whistle_compiler" version = "0.1.1" dependencies = [ "byteorder", - "wasm-encoder", + "wasm-encoder 0.32.0", "whistle_ast", "whistle_common", "whistle_parser", @@ -1007,6 +2957,48 @@ dependencies = [ "whistle_lexer", ] +[[package]] +name = "wiggle" +version = "12.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b68b8c7e33b826fefcedd4fdaba18b45e802949039976dfed2ec4eed62e01dc" +dependencies = [ + "anyhow", + "async-trait", + "bitflags 2.4.0", + "thiserror", + "tracing", + "wasmtime", + "wiggle-macro", +] + +[[package]] +name = "wiggle-generate" +version = "12.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1993fafe27277a5f3d3e8799d027fb1d4cf715cb7706bc50f13dbc06197800e" +dependencies = [ + "anyhow", + "heck", + "proc-macro2", + "quote", + "shellexpand", + "syn 2.0.37", + "witx", +] + +[[package]] +name = "wiggle-macro" +version = "12.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71eb22a17666b04cd9273983ec00ccbd3085cae494ae08dba733e65465cf6e7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.37", + "wiggle-generate", +] + [[package]] name = "winapi" version = "0.3.9" @@ -1023,12 +3015,37 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "winch-codegen" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9722f5d601e3ea1cab8cc23f8e4c07c57d6657a1d72ef4c3a064100cca725a20" +dependencies = [ + "anyhow", + "cranelift-codegen", + "gimli", + "regalloc2", + "smallvec", + "target-lexicon", + "wasmparser 0.110.0", + "wasmtime-environ", +] + [[package]] name = "windows-sys" version = "0.36.1" @@ -1048,13 +3065,22 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm 0.42.0", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", - "windows_x86_64_gnullvm 0.42.0", - "windows_x86_64_msvc 0.42.0", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", ] [[package]] @@ -1063,7 +3089,22 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -1083,9 +3124,9 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" @@ -1101,9 +3142,9 @@ checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_aarch64_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" @@ -1119,9 +3160,9 @@ checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" @@ -1137,9 +3178,9 @@ checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" @@ -1155,9 +3196,9 @@ checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" @@ -1167,9 +3208,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" @@ -1185,9 +3226,9 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" @@ -1195,6 +3236,15 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "winnow" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" @@ -1204,3 +3254,71 @@ dependencies = [ "cfg-if", "windows-sys 0.48.0", ] + +[[package]] +name = "winx" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357bb8e2932df531f83b052264b050b81ba0df90ee5a59b2d1d3949f344f81e5" +dependencies = [ + "bitflags 2.4.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "wit-parser" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "541efa2046e544de53a9da1e2f6299e63079840360c9e106f1f8275a97771318" +dependencies = [ + "anyhow", + "id-arena", + "indexmap 2.0.0", + "log", + "pulldown-cmark", + "semver", + "unicode-xid", + "url", +] + +[[package]] +name = "witx" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e366f27a5cabcddb2706a78296a40b8fcc451e1a6aba2fc1d94b4a01bdaaef4b" +dependencies = [ + "anyhow", + "log", + "thiserror", + "wast 35.0.2", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.8+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +dependencies = [ + "cc", + "libc", + "pkg-config", +] diff --git a/LICENSE b/LICENSE index e6c6c57..99aa402 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020-2022 the Whistle authors +Copyright (c) 2020-2023 the Whistle authors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 96261cd..1ef2985 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -8,11 +8,25 @@ edition = "2021" name = "whistle" path = "src/main.rs" + [dependencies] -whistle_ast = { path = "../ast/" } -whistle_common = { path = "../common/" } -whistle_compiler = { path = "../compiler/" } -whistle_lexer = { path = "../lexer/" } -whistle_parser = { path = "../parser/" } +whistle_lexer = { path = "../lexer" } +whistle_parser = { path = "../parser" } +whistle_common = { path = "../common" } +whistle_ast = { path = "../ast" } +whistle_compiler = { path = "../compiler" } whistle_preprocessor = { path = "../preprocessor" } -clap = "2.33.3" +clap = { version = "4.0.29", features = ["derive"] } +wasmprinter = "0.2.45" +wasmtime = "12.0.2" +wasmtime-wasi = "12.0.2" +tokio = { version = "1.23.0", features = ["full"] } +tokio-util = { version = "0.7", features = ["compat"] } +tower-lsp = { version = "0.20.0"} +toml = "0.7.2" +tracing-subscriber = "0.3" +serde = { version = "1.0.149", features = ["derive"] } +serde_json = "1.0.89" +futures = "0.3.25" +ropey = "1.6.0" +uuid = { version = "1.2.2", features = ["v4", "fast-rng", "macro-diagnostics"] } diff --git a/cli/src/lsp.rs b/cli/src/lsp.rs new file mode 100644 index 0000000..f254d66 --- /dev/null +++ b/cli/src/lsp.rs @@ -0,0 +1,3 @@ +mod lsp; + +pub use lsp::*; \ No newline at end of file diff --git a/cli/src/lsp/lsp.rs b/cli/src/lsp/lsp.rs new file mode 100644 index 0000000..bee7b7d --- /dev/null +++ b/cli/src/lsp/lsp.rs @@ -0,0 +1,163 @@ +use ropey::Rope; +use std::collections::HashMap; +use std::sync::Arc; +use tokio::sync::RwLock; +use tower_lsp::jsonrpc::Result; +use tower_lsp::lsp_types::*; +use tower_lsp::{Client, LanguageServer}; + +#[derive(Debug)] +pub struct Document { + pub language_id: String, + pub text: Rope, +} + +impl Document { + pub fn new(language_id: String, text: Rope) -> Self { + Self { language_id, text } + } +} +#[derive(Debug)] +pub struct WhistleBackend { + pub client: Client, + pub document_map: Arc>>, +} + +#[tower_lsp::async_trait] +impl LanguageServer for WhistleBackend { + async fn initialize(&self, _: InitializeParams) -> Result { + Ok(InitializeResult { + capabilities: ServerCapabilities { + text_document_sync: Some(TextDocumentSyncCapability::Kind( + TextDocumentSyncKind::FULL, + )), + hover_provider: Some(HoverProviderCapability::Simple(true)), + completion_provider: Some(CompletionOptions::default()), + ..Default::default() + }, + ..Default::default() + }) + } + + async fn initialized(&self, _: InitializedParams) { + self.client + .log_message(MessageType::INFO, "Whistle language server initialized!") + .await; + } + + async fn shutdown(&self) -> Result<()> { + Ok(()) + } + + // async fn did_change_workspace_folders(&self, _: DidChangeWorkspaceFoldersParams) { + // self.client + // .log_message(MessageType::INFO, "workspace folders changed!") + // .await; + // } + + // async fn did_change_configuration(&self, _: DidChangeConfigurationParams) { + // self.client + // .log_message(MessageType::INFO, "configuration changed!") + // .await; + // } + + // async fn did_change_watched_files(&self, _: DidChangeWatchedFilesParams) { + // self.client + // .log_message(MessageType::INFO, "watched files have changed!") + // .await; + // } + async fn did_open(&self, params: DidOpenTextDocumentParams) { + let rope = ropey::Rope::from_str(¶ms.text_document.text); + let uri = params.text_document.uri.to_string(); + *self + .document_map + .write() + .await + .entry(uri.clone()) + .or_insert(Document::new("unknown".to_owned(), Rope::new())) = + Document::new(params.text_document.language_id, rope); + } + + async fn did_change(&self, params: DidChangeTextDocumentParams) { + let rope = ropey::Rope::from_str(¶ms.content_changes[0].text); + let uri = params.text_document.uri.to_string(); + let mut document_map = self.document_map.write().await; + let doc = document_map + .entry(uri.clone()) + .or_insert(Document::new("unknown".to_owned(), Rope::new())); + doc.text = rope; + self.client + .log_message(MessageType::INFO, format!("{}", doc.text.to_string())) + .await; + } + + // async fn did_save(&self, _: DidSaveTextDocumentParams) { + // self.client + // .log_message(MessageType::INFO, "file saved!") + // .await; + // } + + // async fn did_close(&self, _: DidCloseTextDocumentParams) { + // self.client + // .log_message(MessageType::INFO, "file closed!") + // .await; + // } + async fn completion(&self, _: CompletionParams) -> Result> { + Ok(Some(CompletionResponse::Array(vec![ + //types + CompletionItem::new_simple("i32".to_string(), "32-bit signed integer type".to_string()), + CompletionItem::new_simple("i64".to_string(), "64-bit signed integer type".to_string()), + CompletionItem::new_simple( + "u32".to_string(), + "32-bit unsigned integer type".to_string(), + ), + CompletionItem::new_simple( + "u64".to_string(), + "64-bit unsigned integer type".to_string(), + ), + CompletionItem::new_simple("f32".to_string(), "32-bit floating point type".to_string()), + CompletionItem::new_simple("f64".to_string(), "64-bit floating point type".to_string()), + CompletionItem::new_simple("str".to_string(), "string".to_string()), + CompletionItem::new_simple("char".to_string(), "single character".to_string()), + CompletionItem::new_simple("bool".to_string(), "boolean".to_string()), + CompletionItem::new_simple("none".to_string(), "no value".to_string()), + CompletionItem::new_simple("number".to_string(), "number type".to_string()), + CompletionItem::new_simple("int".to_string(), "int type".to_string()), + //keywords + CompletionItem::new_simple("import".to_string(), "import declaration".to_string()), + CompletionItem::new_simple("builtin".to_string(), "builtin declaration".to_string()), + CompletionItem::new_simple("fn".to_string(), "declares a function".to_string()), + CompletionItem::new_simple("export".to_string(), "export declaration".to_string()), + CompletionItem::new_simple("return".to_string(), "return statement".to_string()), + CompletionItem::new_simple("if".to_string(), "if statement".to_string()), + CompletionItem::new_simple("else".to_string(), "else statement".to_string()), + CompletionItem::new_simple("while".to_string(), "while statement".to_string()), + CompletionItem::new_simple("break".to_string(), "break statement".to_string()), + CompletionItem::new_simple("continue".to_string(), "continue statement".to_string()), + CompletionItem::new_simple( + "var".to_string(), + "declares a function-scoped or globally-scoped variable".to_string(), + ), + CompletionItem::new_simple( + "val".to_string(), + "declares a constant variable".to_string(), + ), + ]))) + } + + async fn hover(&self, _: HoverParams) -> Result> { + // let _markdown = MarkupContent { + // kind: MarkupKind::Markdown, + // value: [ + // "# Header", + // "Some text", + // ] + // .join("\n"), + // }; + Ok(Some(Hover { + contents: HoverContents::Scalar(MarkedString::String("".to_string())), + /// HoverContents::Markup(markdown), + range: None, + })) + } +} diff --git a/cli/src/main.rs b/cli/src/main.rs index fa127d5..353a800 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -1,157 +1,135 @@ -extern crate clap; - -use clap::{App, AppSettings, Arg, SubCommand}; -use std::fs; +use clap::{Parser, Subcommand}; +use std::collections::HashMap; use std::time::Instant; +use std::{fs, sync::Arc}; +use tokio::sync::RwLock; +mod lsp; mod util; -const INTRO: &str = " ▄███▀▀▀ - ██▀ ▄▄█▀▀ ▄ █ ▄ █ █ █ █ █▀ ▀█▀ █ █▀▀ -██ █▀ ▄▄ ▄ ██ █ █ █ █▀█ █ ▀█ █ █ █▀ -██ █▄ ▀ ▄█ ██ ▀▀▀ ▀ ▀ ▀ ▀▀ ▀ ▀▀ ▀▀▀ - ██▄ ▀▀▀ ▄██ One hella programming language. - ▀█████▀ Made with <3 a̶n̶d̶ ̶c̶o̶d̶e by the Whistle Team. - "; - -fn main() { - let lex_option = SubCommand::with_name("lex") - .about("lex [file]") - .arg( - Arg::with_name("output") - .takes_value(true) - .short("o") - .help("Output the result to a file"), - ) - .arg( - Arg::with_name("file") - .help("Sets the input file to use") - .required(true), - ); - - let parse_option = SubCommand::with_name("parse") - .about("parse [file]") - .arg( - Arg::with_name("output") - .takes_value(true) - .short("o") - .help("Output the result to a file"), - ) - .arg( - Arg::with_name("file") - .help("Sets the input file to use") - .required(true), - ); - - let check_option = SubCommand::with_name("check") - .about("check [file]") - .arg( - Arg::with_name("output") - .takes_value(true) - .short("o") - .help("Output the result to a file"), - ) - .arg( - Arg::with_name("file") - .help("Sets the input file to use") - .required(true), - ); - - let compile_option = SubCommand::with_name("compile") - .about("compile [file]") - .arg( - Arg::with_name("file") - .help("Sets the input file to use") - .required(true), - ) - .arg( - Arg::with_name("output") - .takes_value(true) - .short("o") - .help("Output the result to a file") - .required(true), - ); - - let app = App::new(INTRO) - .setting(AppSettings::ArgRequiredElseHelp) - .version(&*format!("cli {}", env!("CARGO_PKG_VERSION"))) - .subcommand(compile_option) - .subcommand(lex_option) - .subcommand(parse_option) - .subcommand(check_option) - .get_matches(); - - if let Some(command) = app.subcommand_name() { - if let Some(matches) = app.subcommand_matches(command) { - let file = matches - .value_of("file") - .expect("This argument can't be empty, we said it was required."); - let text = fs::read_to_string(file).expect("Something went wrong, we can't read this file."); - let output = matches.value_of("output"); - - match command { - "lex" => lex(&text, output), - "parse" => parse(&text, output), - "check" => check(&text, output), - "compile" => compile(&text, output.unwrap()), - _ => unreachable!(), - }; - } - } -} -fn lex(text: &str, output: Option<&str>) { - let now = Instant::now(); - let (_, tokens) = util::preprocess(text, output.is_none()); +use lsp::WhistleBackend; - if let Some(file) = output { - fs::write(file, format!("{:#?}", tokens)) - .expect("Something went wrong, we can't write this file."); - } else { - println!("{:#?}", tokens); - } +use tower_lsp::{LspService, Server}; - println!( - "Operation complete! Took us about {} seconds.", - now.elapsed().as_secs_f64() - ); +#[derive(Debug, Parser)] +#[command(name = "whistle")] +#[command(author = "The Whistle Authors")] +#[command(about = "Next gen Whistle CLI", long_about = None)] +struct Cli { + #[command(subcommand)] + command: Commands, } -fn parse(text: &str, output: Option<&str>) { - let now = Instant::now(); - let (_, grammar) = util::parse(text, false); - - if let Some(file) = output { - fs::write(file, format!("{:#?}", grammar)) - .expect("Something went wrong, we can't write this file."); - } else { - println!("{:#?}", grammar); - } - - println!( - "Operation complete! Took us about {} seconds.", - now.elapsed().as_secs_f64() - ); +#[derive(Debug, Subcommand)] +enum Commands { + /// Lexes the file + Lex { + /// input + #[arg(value_name = "INPUT")] + path: String, + }, + + /// Parses the file + Parse { + /// input + #[arg(value_name = "INPUT")] + path: String, + }, + + /// compiles and runs the code + #[command(arg_required_else_help = true)] + Run { + path: String, + }, + + /// compiles the file + Compile { + /// input + #[arg(value_name = "INPUT")] + path: String, + /// output file + #[arg(short = 'o', long = "output", value_name = "OUTPUT")] + output: Option, + }, + + /// launches the language Server + Lsp, } -fn check(text: &str, _output: Option<&str>) { - let now = Instant::now(); - util::check(text); +#[tokio::main] +async fn main() { + let args = Cli::parse(); + + match args.command { + Commands::Lex { path } => { + let now = Instant::now(); + let text = fs::read_to_string(path).expect("Something went wrong, we can't read this file."); + let (_, tokens) = util::preprocess(&text, false); + println!("{:#?}", tokens); + println!( + "Operation complete! Took us about {} seconds.", + now.elapsed().as_secs_f64() + ); + } - println!( - "Operation complete! Took us about {} seconds.", - now.elapsed().as_secs_f64() - ); -} + Commands::Parse { path } => { + let now = Instant::now(); + let text = fs::read_to_string(path).expect("Something went wrong, we can't read this file."); + let ast = util::parse(&text, false); + println!("{:#?}", ast); + println!( + "Operation complete! Took us about {} seconds.", + now.elapsed().as_secs_f64() + ); + } -fn compile(text: &str, output: &str) { - let now = Instant::now(); - let bytes = util::compile(text); + Commands::Run { path } => { + let text = fs::read_to_string(path).expect("Something went wrong, we can't read this file."); + let bytes = util::compile(&text); + let engine = wasmtime::Engine::default(); + let mut linker = wasmtime::Linker::new(&engine); + wasmtime_wasi::add_to_linker(&mut linker, |s| s).unwrap(); + let wasi = wasmtime_wasi::WasiCtxBuilder::new() + .inherit_stdio() + .inherit_args().unwrap() + .build(); + let mut store = wasmtime::Store::new(&engine, wasi); + + let module = wasmtime::Module::new(&engine, &bytes).unwrap(); + linker.module(&mut store, "", &module).unwrap(); + linker + .get_default(&mut store, "").unwrap() + .typed::<(), ()>(&store).unwrap() + .call(&mut store, ()).unwrap(); + } - fs::write(output, &bytes[..]).expect("Something went wrong, we can't write this file."); + Commands::Compile { path, output } => { + let now = Instant::now(); + let output = output.unwrap_or(path.replace(".whi", ".wasm")); + let text = fs::read_to_string(path).expect("Something went wrong, we can't read this file."); + let bytes = util::compile(&text); + if output.ends_with(".wat") { + let wasm_text = wasmprinter::print_bytes(&bytes).unwrap(); + fs::write(output, wasm_text.as_bytes()) + .expect("Something went wrong, we can't write this file."); + } else { + fs::write(output, bytes).expect("Something went wrong, we can't write this file."); + } + println!( + "Operation complete! Took us about {} seconds.", + now.elapsed().as_secs_f64() + ); + } - println!( - "Operation complete! Took us about {} seconds.", - now.elapsed().as_secs_f64() - ); + Commands::Lsp => { + tracing_subscriber::fmt().init(); + let (stdin, stdout) = (tokio::io::stdin(), tokio::io::stdout()); + let (service, socket) = LspService::new(|client| WhistleBackend { + client, + document_map: Arc::new(RwLock::new(HashMap::new())), + }); + Server::new(stdin, stdout, socket).serve(service).await; + } + } } diff --git a/cli/src/util.rs b/cli/src/util.rs index a7dee62..1e64130 100644 --- a/cli/src/util.rs +++ b/cli/src/util.rs @@ -55,4 +55,4 @@ pub fn handle_errors(handler: &mut DiagnosticHandler) { println!("{:#?}", handler.errors); std::process::exit(1); }; -} +} \ No newline at end of file diff --git a/examples/lunatic.whi b/examples/lunatic.whi index 4389c72..7f1ac18 100644 --- a/examples/lunatic.whi +++ b/examples/lunatic.whi @@ -3,6 +3,6 @@ extern "lunatic::process" { } -export fn main(): none { +fn main(): none { sleep_ms(10000) } \ No newline at end of file diff --git a/examples/wasi.whi b/examples/wasi.whi index d963444..4e976f8 100644 --- a/examples/wasi.whi +++ b/examples/wasi.whi @@ -2,6 +2,6 @@ extern "wasi_unstable" { fn proc_exit(rval: i32): none } -export fn main(): none { +fn main(): none { proc_exit(0) } \ No newline at end of file From 73f895f309d42d52dc2adc88eab463dac2ce82db Mon Sep 17 00:00:00 2001 From: Dean Srebnik <49134864+load1n9@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:44:58 -0400 Subject: [PATCH 11/11] feat: enum example --- examples/enum.whi | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 examples/enum.whi diff --git a/examples/enum.whi b/examples/enum.whi new file mode 100644 index 0000000..937cb32 --- /dev/null +++ b/examples/enum.whi @@ -0,0 +1,5 @@ +enum Test { + A, + B, + C, +} \ No newline at end of file