From 0f4019f58c40325ce79d4bcf59fb8b03b5616005 Mon Sep 17 00:00:00 2001 From: Justin Restivo Date: Sun, 31 Dec 2023 20:51:33 -0500 Subject: [PATCH] feat: update to 2023, fix bear on mbp --- Cargo.lock | 182 +++++++++++++++++++-------------------- Cargo.toml | 2 +- compile_commands.json | 37 ++++++++ dawn-bindings/Cargo.toml | 6 +- dawn-bindings/build.rs | 5 +- dawn-bindings/src/lib.rs | 1 + dawn-infra/Cargo.toml | 28 +++--- dawn-plugin/Cargo.toml | 28 +++--- dawn-plugin/src/main.rs | 1 + flake.lock | 57 +++++++----- flake.nix | 22 +++-- justfile | 14 +-- 12 files changed, 220 insertions(+), 163 deletions(-) create mode 100644 compile_commands.json diff --git a/Cargo.lock b/Cargo.lock index 81a9fc6..7e32a38 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,13 +39,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "531b97fb4cd3dfdce92c35dedbfdc1f0b9d8091c8ca943d6dae340ef5012d514" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.28", ] [[package]] @@ -126,15 +126,15 @@ checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cbindgen" -version = "0.24.5" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b922faaf31122819ec80c4047cc684c6979a087366c069611e33649bf98e18d" +checksum = "da6bc11b07529f16944307272d5bd9b22530bc7d05751717c9d416586cedab49" dependencies = [ "clap", "heck", @@ -151,9 +151,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -270,12 +273,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - [[package]] name = "either" version = "1.9.0" @@ -320,9 +317,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -335,9 +332,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -345,15 +342,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -362,38 +359,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.28", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -517,9 +514,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "linux-raw-sys" @@ -545,9 +542,9 @@ checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "lsp-types" -version = "0.94.0" +version = "0.94.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b63735a13a1f9cd4f4835223d828ed9c2e35c8c5e61837774399f558b6a1237" +checksum = "c66bfd44a06ae10647fe3f8214762e9369fd4248df1350924b4ef9e770a85ea1" dependencies = [ "bitflags 1.3.2", "serde", @@ -558,9 +555,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "miette" @@ -591,7 +588,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.28", ] [[package]] @@ -605,9 +602,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi", @@ -718,14 +715,14 @@ checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.28", ] [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -735,9 +732,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" [[package]] name = "proc-macro-error" @@ -852,29 +849,29 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.174" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b88756493a5bd5e5395d53baa70b194b05764ab85b59e43e4b8f4e1192fa9b1" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.174" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5c3a298c7f978e53536f95a63bdc4c4a64550582f31a0359a9afda6aede62e" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.28", ] [[package]] name = "serde_json" -version = "1.0.103" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -889,7 +886,7 @@ checksum = "e168eaaf71e8f9bd6037feb05190485708e019f4fd87d161b3c0a0d37daf85e5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.28", ] [[package]] @@ -933,34 +930,33 @@ checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" [[package]] name = "snafu" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" +checksum = "d342c51730e54029130d7dc9fd735d28c4cd360f1368c01981d4f03ff207f096" dependencies = [ - "doc-comment", "snafu-derive", ] [[package]] name = "snafu-derive" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" +checksum = "080c44971436b1af15d6f61ddd8b543995cf63ab8e677d46b00cc06f4ef267a0" dependencies = [ "heck", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] name = "socket2" -version = "0.4.9" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "winapi", + "windows-sys", ] [[package]] @@ -1010,9 +1006,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.27" +version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" dependencies = [ "proc-macro2", "quote", @@ -1085,7 +1081,7 @@ checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.28", ] [[package]] @@ -1115,11 +1111,10 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", @@ -1135,20 +1130,20 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.28", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -1189,9 +1184,9 @@ checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] name = "tower-lsp" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b38fb0e6ce037835174256518aace3ca621c4f96383c56bb846cfc11b341910" +checksum = "d4ba052b54a6627628d9b3c34c176e7eda8359b7da9acd497b9f20998d118508" dependencies = [ "async-trait", "auto_impl", @@ -1212,13 +1207,13 @@ dependencies = [ [[package]] name = "tower-lsp-macros" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34723c06344244474fdde365b76aebef8050bf6be61a935b91ee9ff7c4e91157" +checksum = "84fd902d4e0b9a4b27f2f440108dc034e1758628a9b702f8ec61ad66355422fa" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -1229,11 +1224,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -1241,20 +1235,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.28", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -1262,20 +1256,20 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "nu-ansi-term", "sharded-slab", diff --git a/Cargo.toml b/Cargo.toml index 2f62e44..4cd455a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ resolver = "2" exclude = ["target_dirs", ".github"] [workspace.package] -rust-version = "1.71.0" +rust-version = "1.75.0" edition = "2021" version = "0.1.0" exclude = ["target_dirs", ".github", "target"] diff --git a/compile_commands.json b/compile_commands.json new file mode 100644 index 0000000..c6ebca1 --- /dev/null +++ b/compile_commands.json @@ -0,0 +1,37 @@ +[ + { + "arguments": [ + "/nix/store/3gz297am1parf7xr1j7vkhx82vx143vv-clang-wrapper-11.1.0/bin/clang++", + "-O2", + "-ffunction-sections", + "-fdata-sections", + "-fPIC", + "-gdwarf-2", + "-fno-omit-frame-pointer", + "-arch", + "arm64", + "-stdlib=libc++", + "-Wall", + "-Wextra", + "-std=c++20", + "-isystem", + "/nix/store/1r1j5n4ja7bg7lgwiqzr8hd47mjciqc4-nix-2.19.2-dev/include/nix", + "-isystem", + "/nix/store/w393wyn9cmw6hzsnfj4k25ffb433an12-boehm-gc-8.2.2-dev/include", + "-isystem", + "/nix/store/1r1j5n4ja7bg7lgwiqzr8hd47mjciqc4-nix-2.19.2-dev/include/nix", + "-isystem", + "/nix/store/1r1j5n4ja7bg7lgwiqzr8hd47mjciqc4-nix-2.19.2-dev/include/nix", + "-DNIX_2_4_0", + "-DNIX_2_6_0", + "-DNIX_2_9_0", + "-c", + "-o", + "/Users/jrestivo/dev/dawn/target_dirs/nix_rustc/debug/build/dawn-bindings-b497435e10cda334/out/plugin.o", + "plugin.cpp" + ], + "directory": "/Users/jrestivo/dev/dawn/dawn-bindings", + "file": "/Users/jrestivo/dev/dawn/dawn-bindings/plugin.cpp", + "output": "/Users/jrestivo/dev/dawn/target_dirs/nix_rustc/debug/build/dawn-bindings-b497435e10cda334/out/plugin.o" + } +] diff --git a/dawn-bindings/Cargo.toml b/dawn-bindings/Cargo.toml index 3ba8764..ab5ecb3 100644 --- a/dawn-bindings/Cargo.toml +++ b/dawn-bindings/Cargo.toml @@ -17,7 +17,7 @@ crate_type = ["cdylib"] test = false [build-dependencies] -cc = "1.0.79" -pkg-config = "0.3.27" -cbindgen = "0.24.5" +cc = "1.0.83" +pkg-config = "0.3.28" +cbindgen = "0.26.0" miette = { version = "5.10.0", features = ["fancy"] } diff --git a/dawn-bindings/build.rs b/dawn-bindings/build.rs index 7c95a8c..1d81c3e 100644 --- a/dawn-bindings/build.rs +++ b/dawn-bindings/build.rs @@ -53,13 +53,12 @@ fn main() -> miette::Result<()> { .cpp(true) .shared_flag(true) .flag("-std=c++20") - .cpp_set_stdlib("c++") + .cpp_set_stdlib("c++") .add_pkg_config(nix_expr) .add_pkg_config(nix_store) .add_pkg_config(nix_main) .cargo_metadata(false) - .file("plugin.cpp") - ; + .file("plugin.cpp"); // HACK: For some reason, rustc doesn't link libc++ on macOS by itself even // though cc-rs has been told cpp(true). So we force it. diff --git a/dawn-bindings/src/lib.rs b/dawn-bindings/src/lib.rs index 6b3a866..98f1064 100644 --- a/dawn-bindings/src/lib.rs +++ b/dawn-bindings/src/lib.rs @@ -2,6 +2,7 @@ pub struct Context {} #[no_mangle] pub extern "C" fn initialize_plugin() -> *mut Context { + println!("We initialized debugging context"); Box::into_raw(Box::new(Context {})) } diff --git a/dawn-infra/Cargo.toml b/dawn-infra/Cargo.toml index 8fc6175..52e5ff8 100644 --- a/dawn-infra/Cargo.toml +++ b/dawn-infra/Cargo.toml @@ -13,26 +13,26 @@ categories = { workspace = true } exclude = { workspace = true } [dependencies] -tokio = {version = "1.26.0", default-features = false, features = [ "full" ] } -tracing = "0.1.37" -tracing-subscriber = "0.3.16" -snafu = "0.7.4" +tokio = {version = "1.35.1", default-features = false, features = [ "full" ] } +tracing = "0.1.40" +tracing-subscriber = "0.3.18" +snafu = "0.8.0" debug_types = "1.0.0" -tokio-util = { version = "0.7.7", features = ["codec"]} -futures = { version = "0.3.26"} -async-trait = "0.1.65" +tokio-util = { version = "0.7.10", features = ["codec"]} +futures = { version = "0.3.30"} +async-trait = "0.1.76" -serde = { version = "1.0", features = ["derive"] } -serde_json = { version = "1.0.47", features = ["unbounded_depth"] } -bytes = { version = "1.4.0"} -memchr = { version = "2.5.0"} +serde = { version = "1.0.193", features = ["derive"] } +serde_json = { version = "1.0.108", features = ["unbounded_depth"] } +bytes = { version = "1.5.0"} +memchr = { version = "2.7.1"} httparse = { version = "1.8.0"} nll = { git = "https://github.com/EspressoSystems/nll" } -futures-util = { version = "0.3.26"} -either = "1.8.1" +futures-util = { version = "0.3.30"} +either = "1.9.0" -tower-lsp = { version = "0.19.0" } +tower-lsp = { version = "0.20.0" } tower-service = "0.3.2" atomic_enum = "0.2.0" diff --git a/dawn-plugin/Cargo.toml b/dawn-plugin/Cargo.toml index 52b09aa..a351f25 100644 --- a/dawn-plugin/Cargo.toml +++ b/dawn-plugin/Cargo.toml @@ -13,26 +13,26 @@ categories = { workspace = true } exclude = { workspace = true } [dependencies] -tokio = {version = "1.26.0", default-features = false, features = [ "full" ] } -tracing = "0.1.37" -tracing-subscriber = "0.3.16" -snafu = "0.7.4" +tokio = {version = "1.35.1", default-features = false, features = [ "full" ] } +tracing = "0.1.40" +tracing-subscriber = "0.3.18" +snafu = "0.8.0" debug_types = "1.0.0" -tokio-util = { version = "0.7.7", features = ["codec"]} -futures = { version = "0.3.26"} -async-trait = "0.1.65" +tokio-util = { version = "0.7.10", features = ["codec"]} +futures = { version = "0.3.30"} +async-trait = "0.1.76" -serde = { version = "1.0", features = ["derive"] } -serde_json = { version = "1.0.47", features = ["unbounded_depth"] } -bytes = { version = "1.4.0"} -memchr = { version = "2.5.0"} +serde = { version = "1.0.193", features = ["derive"] } +serde_json = { version = "1.0.108", features = ["unbounded_depth"] } +bytes = { version = "1.5.0"} +memchr = { version = "2.7.1"} httparse = { version = "1.8.0"} nll = { git = "https://github.com/EspressoSystems/nll" } -futures-util = { version = "0.3.26"} -either = "1.8.1" +futures-util = { version = "0.3.30"} +either = "1.9.0" -tower-lsp = { version = "0.19.0" } +tower-lsp = { version = "0.20.0" } tower-service = "0.3.2" dawn-infra = { path = "../dawn-infra" } diff --git a/dawn-plugin/src/main.rs b/dawn-plugin/src/main.rs index 514e1d4..6608f4d 100644 --- a/dawn-plugin/src/main.rs +++ b/dawn-plugin/src/main.rs @@ -15,6 +15,7 @@ use debug_types::ProtocolMessage; use nix_debugger::{NixDebugAdapter, NixDebugState}; use tokio_util::codec::{FramedRead, FramedWrite}; use tracing::error; + ///! debugger pub mod nix_debugger; diff --git a/flake.lock b/flake.lock index 9a3e354..039d7fa 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "bear-fix": { + "locked": { + "lastModified": 1687163274, + "narHash": "sha256-7W1TQdZkTPu9x/0j1NjPulAEnXfnEYsNtYnFz16hf/U=", + "owner": "emilazy", + "repo": "nixpkgs", + "rev": "c26b580c8cb6b1b9deeb26817d0bc12392f80391", + "type": "github" + }, + "original": { + "owner": "emilazy", + "ref": "fix-bear", + "repo": "nixpkgs", + "type": "github" + } + }, "fenix": { "inputs": { "nixpkgs": [ @@ -8,11 +24,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1690006794, - "narHash": "sha256-8yCkGGykFry+mH596ouLSWSqNcrwHBD7UE0uufIahq8=", + "lastModified": 1703917281, + "narHash": "sha256-fmhKbANx4PLG/Rt/QvKBsAdmyl8vAGQfROtccenMonw=", "owner": "nix-community", "repo": "fenix", - "rev": "90ce0d205450fceeea30b295810c8fd8b2325f18", + "rev": "8ad4353759945bec3a5f4bfc53efe818bb41e12a", "type": "github" }, "original": { @@ -61,32 +77,32 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1690219894, - "narHash": "sha256-QMYAkdtU+g9HlZKtoJ+AI6TbWzzovKGnPZJHfZdclc8=", + "lastModified": 1701122567, + "narHash": "sha256-iA8DqS+W2fWTfR+nNJSvMHqQ+4NpYMRT3b+2zS6JTvE=", "owner": "NixOS", "repo": "nix", - "rev": "a212300a1d9f9c7b0daf19c00c87fc50480f54f4", + "rev": "50f8f1c8bc019a4c0fd098b9ac674b94cfc6af0d", "type": "github" }, "original": { "owner": "NixOS", - "ref": "2.17.0", + "ref": "2.19.2", "repo": "nix", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1670461440, - "narHash": "sha256-jy1LB8HOMKGJEGXgzFRLDU1CBGL0/LlkolgnqIsF0D8=", + "lastModified": 1704018918, + "narHash": "sha256-erjg/HrpC9liEfm7oLqb8GXCqsxaFwIIPqCsknW5aFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "04a75b2eecc0acf6239acf9dd04485ff8d14f425", + "rev": "2c9c58e98243930f8cb70387934daa4bc8b00373", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.11-small", + "ref": "release-23.05", "repo": "nixpkgs", "type": "github" } @@ -109,11 +125,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1690026219, - "narHash": "sha256-oOduRk/kzQxOBknZXTLSEYd7tk+GoKvr8wV6Ab+t4AU=", + "lastModified": 1703499205, + "narHash": "sha256-lF9rK5mSUfIZJgZxC3ge40tp1gmyyOXZ+lRY3P8bfbg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f465da166263bc0d4b39dfd4ca28b777c92d4b73", + "rev": "e1fa12d4f6c6fe19ccb59cac54b5b3f25e160870", "type": "github" }, "original": { @@ -125,6 +141,7 @@ }, "root": { "inputs": { + "bear-fix": "bear-fix", "fenix": "fenix", "nix-release": "nix-release", "nixpkgs": "nixpkgs_2", @@ -134,11 +151,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1689936585, - "narHash": "sha256-tpEKMKIkzq3MoDviXdqE/AjDMLj3H4zlIZmeQicyPsA=", + "lastModified": 1703873342, + "narHash": "sha256-QPO56c5rVuYOxAsRdO0hExzaphHnNYOkIEKjxepH9QQ=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "899dd84b4dbc53bab02553f77f6d7c3187d33637", + "rev": "e1e4626ff5f6831c375256bd8d0a153ee104390e", "type": "github" }, "original": { @@ -168,11 +185,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "owner": "numtide", "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 2e660dd..ea348d6 100644 --- a/flake.nix +++ b/flake.nix @@ -9,19 +9,22 @@ inputs.nixpkgs.follows = "nixpkgs"; }; nix-release = { - url = "github:NixOS/nix?ref=2.17.0"; + url = "github:NixOS/nix?ref=2.19.2"; + }; + bear-fix = { + url = "github:emilazy/nixpkgs/fix-bear"; }; }; - outputs = inputs@{ self, nixpkgs, utils, fenix, nix-release }: + outputs = inputs@{ self, nixpkgs, utils, fenix, nix-release, bear-fix }: utils.lib.eachDefaultSystem (system: let fenixStable = fenix.packages.${system}.stable.withComponents [ "cargo" "clippy" "rust-src" "rustc" "rustfmt" "llvm-tools-preview" ]; overlaid = final: prev: { - rustc = fenixStable; - cargo = fenixStable; - rust-src = fenixStable; + # rustc = fenixStable; + # cargo = fenixStable; + # rust-src = fenixStable; nix = nix-release.packages.${system}.nix-clang11Stdenv; }; pkgs = import nixpkgs { @@ -40,17 +43,18 @@ RUST_SRC_PATH = pkgs.rustPlatform.rustLibSrc; buildInputs = with pkgs; [ - rust-src + # rust-src pkg-config fenixStable fenix.packages.${system}.rust-analyzer just cargo-expand - cargo - rustc + # cargo + # rustc nix nix.dev - bear + bear-fix.legacyPackages.${system}.bear + # bear rust-cbindgen # for executable cbindgen clang-tools_15 # for up to date clangd clang_11 diff --git a/justfile b/justfile index f7a4422..2a2e649 100644 --- a/justfile +++ b/justfile @@ -2,18 +2,18 @@ default: build lint test build: echo Building nix dap adapter.. - cargo build --release --workspace --examples --bins --tests + cargo build --workspace --examples --bins --tests build_bindings: echo Building nix dap adapter.. - cargo build --release --package dawn-bindings + cargo build --package dawn-bindings run_plugin_mbp: - nix --option plugin-files ./target_dirs/nix_rustc/debug/libnix_bindings.dylib repl + nix --option plugin-files ./target_dirs/nix_rustc/debug/libdawn_bindings.dylib repl test: echo Testing nix dap adapter... - cargo test --release --workspace -- --nocapture --test-threads=1 + cargo test --workspace -- --nocapture --test-threads=1 clean: echo Cleaning... @@ -21,7 +21,7 @@ clean: lint: echo Linting… - cargo clippy --release --workspace --examples --bins --tests + cargo clippy --workspace --examples --bins --tests fmt: cargo fmt @@ -31,3 +31,7 @@ fix: doc: cargo doc --workspace --open + +gen_compile_commands: + cargo clean + bear -- cargo build --package dawn-bindings